From: Coleman Watts Date: Wed, 28 Jan 2015 15:01:50 +0000 (-0500) Subject: CRM-15705 - Add button icons to angular popup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=269d44f5ba3e707b77d31956f99b5224961a0069;p=civicrm-core.git CRM-15705 - Add button icons to angular popup --- diff --git a/js/angular-crmMailing.js b/js/angular-crmMailing.js index 5bad720dd3..8881051f6d 100644 --- a/js/angular-crmMailing.js +++ b/js/angular-crmMailing.js @@ -404,15 +404,24 @@ // 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); }