}
};
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); })
<td>
<a
crm-icon="trash"
- crm-confirm="{message: ts('Deleting an attachment will completely remove it from server.'), title: ts('Delete Attachment?')}" on-yes="att.deleteFile(file)"
+ crm-confirm="{message: ts('Deleting an attachment will completely remove it from server.')}" on-yes="att.deleteFile(file)"
+ title="{{ts('Delete attachment')}}"
class="crm-hover-button">
</a>
</td>