CRM-15705 - Add button icons to angular popup
authorColeman Watts <coleman@civicrm.org>
Wed, 28 Jan 2015 15:01:50 +0000 (10:01 -0500)
committerColeman Watts <coleman@civicrm.org>
Wed, 28 Jan 2015 21:48:51 +0000 (16:48 -0500)
js/angular-crmMailing.js

index 5bad720dd3b534dcb48753fde1a725cdaa9673db..8881051f6d3111cd57f16396bfc35e6d95b97187 100644 (file)
       // When using dialogService with a button bar, the major button actions
       // need to be registered with the dialog widget (and not embedded in
       // the body of the dialog).
-      var buttons = {};
-      buttons[ts('Save')] = function () {
-        $scope.save().then(function (item) {
-          dialogService.close('saveTemplateDialog', item);
-        });
-      };
-      buttons[ts('Cancel')] = function () {
-        dialogService.cancel('saveTemplateDialog');
-      };
+      var buttons = [
+        {
+          text: ts('Save'),
+          icons: {primary: 'ui-icon-check'},
+          click: function () {
+            $scope.save().then(function (item) {
+              dialogService.close('saveTemplateDialog', item);
+            });
+          }
+        },
+        {
+          text: ts('Cancel'),
+          icons: {primary: 'ui-icon-close'},
+          click: function () {
+            dialogService.cancel('saveTemplateDialog');
+          }
+        }
+      ];
       dialogService.setButtons('saveTemplateDialog', buttons);
     }