X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=js%2Fjquery%2Fjquery.crmEditable.js;h=b68b27f0a24012a04ecf7d34a41526bfe4b31902;hb=579293b64c754bcc526a6d510bb17f22f2b0e101;hp=624f51b971b1137666570c4e994faca42b273657;hpb=146d89958a273935ea97b4157fa8c89c7a5bffc5;p=civicrm-core.git diff --git a/js/jquery/jquery.crmEditable.js b/js/jquery/jquery.crmEditable.js index 624f51b971..b68b27f0a2 100644 --- a/js/jquery/jquery.crmEditable.js +++ b/js/jquery/jquery.crmEditable.js @@ -29,6 +29,7 @@ ret[fieldName] = $(this).text(); if (this === el) { ret.field = fieldName; + ret.params = $(this).data('params'); } } }); @@ -132,7 +133,7 @@ var info = $i.crmEditableEntity(), $el = $($i), - params = {}, + params = info.params || {}, action = $i.data('action') || info.action; if (!info.field) { return false; @@ -159,7 +160,7 @@ var options = optionsCache[$el.data('optionsHashKey')]; value = options && options[value] ? options[value] : ''; } - $el.trigger('crmFormSuccess'); + $el.trigger('crmFormSuccess', [value]); editableSettings.success.call($el[0], info.entity, info.field, value, data, settings); }) .fail(function(data) { @@ -167,7 +168,7 @@ }); } - CRM.loadScript(CRM.config.resourceBase + 'packages/jquery/plugins/jquery.jeditable.min.js').done(function() { + CRM.loadScript(CRM.config.packagesBase + 'jquery/plugins/jquery.jeditable.min.js').done(function() { $i.editable(callback, settings); });