From 269d44f5ba3e707b77d31956f99b5224961a0069 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 28 Jan 2015 10:01:50 -0500 Subject: [PATCH] CRM-15705 - Add button icons to angular popup --- js/angular-crmMailing.js | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) 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); } -- 2.25.1