Unverified Commit 7e270915 by Sam Padgett Committed by GitHub

Merge pull request #270 from rhamilto/origin-issue-17745

Add normalizeIconClass filter
parents 244f136c 24475790
......@@ -1582,6 +1582,20 @@ angular.module('openshiftCommonUI')
});
;'use strict';
angular.module("openshiftCommonUI")
.filter("normalizeIconClass", function() {
return function(iconClass) {
// if iconClass starts with "icon-", append "font-icon "
// so the Openshift Logos Icon font is used
if(_.startsWith(iconClass, "icon-")) {
return "font-icon " + iconClass;
} else {
return iconClass;
}
};
});
;'use strict';
angular.module('openshiftCommonUI')
.filter('parseJSON', function() {
return function(json) {
......
......@@ -1788,6 +1788,20 @@ angular.module('openshiftCommonUI')
}]);
;'use strict';
angular.module("openshiftCommonUI")
.filter("normalizeIconClass", function() {
return function(iconClass) {
// if iconClass starts with "icon-", append "font-icon "
// so the Openshift Logos Icon font is used
if(_.startsWith(iconClass, "icon-")) {
return "font-icon " + iconClass;
} else {
return iconClass;
}
};
});
;'use strict';
angular.module('openshiftCommonUI')
.filter('parseJSON', function() {
return function(json) {
......
......@@ -835,7 +835,11 @@ return uri.is("absolute") && ("http" === protocol || "https" === protocol);
return function(text, target, alreadyEscaped) {
return HTMLService.linkify(text, target, alreadyEscaped);
};
} ]), angular.module("openshiftCommonUI").filter("parseJSON", function() {
} ]), angular.module("openshiftCommonUI").filter("normalizeIconClass", function() {
return function(iconClass) {
return _.startsWith(iconClass, "icon-") ? "font-icon " + iconClass :iconClass;
};
}), angular.module("openshiftCommonUI").filter("parseJSON", function() {
return function(json) {
if (!json) return null;
try {
......
'use strict';
angular.module("openshiftCommonUI")
.filter("normalizeIconClass", function() {
return function(iconClass) {
// if iconClass starts with "icon-", append "font-icon "
// so the Openshift Logos Icon font is used
if(_.startsWith(iconClass, "icon-")) {
return "font-icon " + iconClass;
} else {
return iconClass;
}
};
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment