CRM-12910 - logButton.tpl - Pass options directly into $.fn.crmRevisionLink
authorTim Otten <totten@civicrm.org>
Tue, 6 Aug 2013 23:42:37 +0000 (16:42 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 6 Aug 2013 23:42:37 +0000 (16:42 -0700)
----------------------------------------
* CRM-12910: Display revision history for each item under "Job"
  http://issues.civicrm.org/jira/browse/CRM-12910

templates/CRM/common/logButton.tpl

index d9aebb7cffab1ddcd3de373f8184d098dc426220..5c9568ae737e358e0afbeab5eba25c4d1f81c647 100644 (file)
 <script type="text/javascript">
 
 (function($, CRM) {
-  var options = {
-    cssDialogSelector: ".dialog-{/literal}{$snippet.css_class}{literal}",
-    contactId: {/literal}{$snippet.contact_id}{literal},
-    tableName: "{/literal}{$snippet.table_name}{literal}",
-    reportId: {/literal}{$snippet.instance_id}{literal}
-  };
-
   $.fn.crmRevisionLink = function(options) {
     return this.each(function(){
       $(this).on("click", function() {
       });
     }); // this.each
   }; // fn.crmRevisionLink
-  $(".{/literal}{$snippet.css_class}{literal}").crmRevisionLink(options);
+
+  $(".{/literal}{$snippet.css_class}{literal}").crmRevisionLink({
+    cssDialogSelector: ".dialog-{/literal}{$snippet.css_class}{literal}",
+    contactId: {/literal}{$snippet.contact_id}{literal},
+    tableName: "{/literal}{$snippet.table_name}{literal}",
+    reportId: {/literal}{$snippet.instance_id}{literal}
+  });
 })(cj, CRM);
 </script>
 {/literal}