From d2b384e9c114aa2f11c779573380213b9a2b350d Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 30 Sep 2018 21:36:14 -0400 Subject: [PATCH] Remove crm.admin.js --- CRM/Admin/Form.php | 2 +- js/crm.admin.js | 21 --------------------- js/jquery/jquery.crmIconPicker.js | 9 +++++++-- 3 files changed, 8 insertions(+), 24 deletions(-) delete mode 100644 js/crm.admin.js diff --git a/CRM/Admin/Form.php b/CRM/Admin/Form.php index 5fa9ba5b06..be00bd95a6 100644 --- a/CRM/Admin/Form.php +++ b/CRM/Admin/Form.php @@ -69,7 +69,7 @@ class CRM_Admin_Form extends CRM_Core_Form { */ public function preProcess() { Civi::resources()->addStyleFile('civicrm', 'css/admin.css'); - Civi::resources()->addScriptFile('civicrm', 'js/crm.admin.js'); + Civi::resources()->addScriptFile('civicrm', 'js/jquery/jquery.crmIconPicker.js'); $this->_id = $this->get('id'); $this->_BAOName = $this->get('BAOName'); diff --git a/js/crm.admin.js b/js/crm.admin.js deleted file mode 100644 index 2884ae90f0..0000000000 --- a/js/crm.admin.js +++ /dev/null @@ -1,21 +0,0 @@ -// https://civicrm.org/licensing -(function($) { - "use strict"; - $(document) - .on('crmLoad', function(e) { - $('.crm-icon-picker', e.target).not('.iconpicker-widget').each(function() { - var $el = $(this); - CRM.loadScript(CRM.config.resourceBase + 'js/jquery/jquery.crmIconPicker.js').done(function() { - $el.crmIconPicker(); - }); - // Hack to get the strings in this lazy-loaded file translated - ts('None'); - ts('Normal'); - ts('Rotate right'); - ts('Rotate left'); - ts('Rotate 180'); - ts('Flip horizontal'); - ts('Flip vertical'); - }); - }); -})(CRM.$); diff --git a/js/jquery/jquery.crmIconPicker.js b/js/jquery/jquery.crmIconPicker.js index 6e84df5c02..5dea481a85 100644 --- a/js/jquery/jquery.crmIconPicker.js +++ b/js/jquery/jquery.crmIconPicker.js @@ -80,9 +80,9 @@ function displayDialog() { dialog.append('' + '' + @@ -117,4 +117,9 @@ }); }; + + $(document) + .on('crmLoad', function(e) { + $('.crm-icon-picker', e.target).not('.iconpicker-widget').crmIconPicker(); + }); }(CRM.$, CRM._)); -- 2.25.1