From b8603a6d0db2031109e88169f544409fd95889de Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 14 Feb 2015 10:05:12 -0500 Subject: [PATCH] CRM-15705 - Use element title as default in crmConfirm --- js/angular-crm-ui.js | 4 +++- partials/crmAttachment/attachments.html | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/angular-crm-ui.js b/js/angular-crm-ui.js index edcfbc4728..50259ae9b7 100644 --- a/js/angular-crm-ui.js +++ b/js/angular-crm-ui.js @@ -782,10 +782,12 @@ } }; return { - template: '', link: function (scope, element, attrs) { $(element).click(function () { var options = scope.$eval(attrs.crmConfirm); + if (attrs.title && !options.title) { + options.title = attrs.title; + } var defaults = (options.type) ? defaultFuncs[options.type](options) : {}; CRM.confirm(_.extend(defaults, options)) .on('crmConfirm:yes', function () { scope.$apply(attrs.onYes); }) diff --git a/partials/crmAttachment/attachments.html b/partials/crmAttachment/attachments.html index 7716140780..9f9ad37602 100644 --- a/partials/crmAttachment/attachments.html +++ b/partials/crmAttachment/attachments.html @@ -12,7 +12,8 @@ -- 2.25.1