CRM- 16415 ang: handle crm-i class for fontawesome icons
authorAndrew Hunt <andrew@aghstrategies.com>
Wed, 30 Sep 2015 17:03:01 +0000 (13:03 -0400)
committerAndrew Hunt <andrew@aghstrategies.com>
Tue, 13 Oct 2015 17:21:20 +0000 (13:21 -0400)
ang/crmUi.js

index 300d745a3a297bf41e642ff88a79eda5be8ca588..42179c689e985939a8af4437df4ead06e0b36baf 100644 (file)
         restrict: 'EA',
         scope: {},
         link: function (scope, element, attrs) {
-          $(element).prepend('<span class="icon ui-icon-' + attrs.crmIcon + '"></span> ');
+          if (attrs.crmIcon.substring(0,3) == 'fa-') {
+            $(element).prepend('<i class="crm-i ' + attrs.crmIcon + '"></i> ');
+          }
+          else {
+            $(element).prepend('<span class="icon ui-icon-' + attrs.crmIcon + '"></span> ');
+          }
           if ($(element).is('button')) {
             $(element).addClass('crm-button');
           }