From af753452a65780ac547fce17c11a46306d5e80f4 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 6 Aug 2013 16:30:54 -0700 Subject: [PATCH] CRM-12910 - logButton.tpl - Use more JS variables instead of Smarty variables ---------------------------------------- * CRM-12910: Display revision history for each item under "Job" http://issues.civicrm.org/jira/browse/CRM-12910 --- templates/CRM/common/logButton.tpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/CRM/common/logButton.tpl b/templates/CRM/common/logButton.tpl index 27515dc161..61e6be5bca 100644 --- a/templates/CRM/common/logButton.tpl +++ b/templates/CRM/common/logButton.tpl @@ -46,6 +46,9 @@ (function($, CRM) { var cssDialogSelector = ".dialog-{/literal}{$snippet.css_class}{literal}"; + var contactId = {/literal}{$snippet.contact_id}{literal}; + var tableName = "{/literal}{$snippet.table_name}{literal}"; + var reportId = {/literal}{$snippet.instance_id}{literal}; $(document).on("click", ".{/literal}{$snippet.css_class}{literal}", function() { $(cssDialogSelector).show( ); $(cssDialogSelector).dialog({ @@ -55,9 +58,9 @@ bgiframe: true, overlay: { opacity: 0.5, background: "black" }, open:function() { - var ajaxurl = CRM.url("civicrm/report/instance/{/literal}{$snippet.instance_id}{literal}"); + var ajaxurl = CRM.url("civicrm/report/instance/" + reportId); cj.ajax({ - data: "reset=1&snippet=4§ion=2&altered_contact_id_op=eq&altered_contact_id_value={/literal}{$snippet.contact_id}{literal}&log_type_table_op=has&log_type_table_value={/literal}{$snippet.table_name}{literal}", + data: "reset=1&snippet=4§ion=2&altered_contact_id_op=eq&altered_contact_id_value="+contactId+"&log_type_table_op=has&log_type_table_value=" + tableName, url: ajaxurl, success: function (data) { $(cssDialogSelector + " .revision-content").html(data); -- 2.25.1