From a73f25bbe630c01edb2d0b314aa05c167b4d93fb Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 28 Nov 2013 15:24:57 -0800 Subject: [PATCH] CRM-10693 - crmSnippet - JS tweaks. --- js/Common.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/js/Common.js b/js/Common.js index a3e0b5a343..68fdb87bdb 100644 --- a/js/Common.js +++ b/js/Common.js @@ -822,16 +822,16 @@ CRM.validate = CRM.validate || { $.widget('civicrm.crmSnippet', { options: { - url: document.location.href, + url: null, block: true, crmForm: null }, _create: function() { - this.refresh(); this.element.addClass('crm-ajax-container'); if (!this.element.is('.crm-container *')) { this.element.addClass('crm-container'); } + this.options.url ? this.refresh() : this.options.url = document.location.href; }, _onFailure: function(data) { this.options.block && this.element.unblock(); @@ -889,18 +889,6 @@ CRM.validate = CRM.validate || { data.title && $(this).dialog('option', 'title', data.title); }); } - // Automatically open form links as new popups - settings.formLinks && $(settings.target).on('click', settings.formLinks, function() { - CRM.loadForm(this.href, { - dialog: { - width: '60%', - height: parseInt($(window).height() * .8) - } - }).on('crmFormSuccess', function() { - $(settings.target).crmSnippet('refresh'); - }); - return false; - }); return $(settings.target).crmSnippet(settings); }; -- 2.25.1