Commit 24475790 by Robb Hamilton

Add normalizeIconClass filter

parent 244f136c
...@@ -1582,6 +1582,20 @@ angular.module('openshiftCommonUI') ...@@ -1582,6 +1582,20 @@ angular.module('openshiftCommonUI')
}); });
;'use strict'; ;'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') angular.module('openshiftCommonUI')
.filter('parseJSON', function() { .filter('parseJSON', function() {
return function(json) { return function(json) {
......
...@@ -1788,6 +1788,20 @@ angular.module('openshiftCommonUI') ...@@ -1788,6 +1788,20 @@ angular.module('openshiftCommonUI')
}]); }]);
;'use strict'; ;'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') angular.module('openshiftCommonUI')
.filter('parseJSON', function() { .filter('parseJSON', function() {
return function(json) { return function(json) {
......
...@@ -835,7 +835,11 @@ return uri.is("absolute") && ("http" === protocol || "https" === protocol); ...@@ -835,7 +835,11 @@ return uri.is("absolute") && ("http" === protocol || "https" === protocol);
return function(text, target, alreadyEscaped) { return function(text, target, alreadyEscaped) {
return HTMLService.linkify(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) { return function(json) {
if (!json) return null; if (!json) return null;
try { 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