From c68b3313741a367e2510ea6be54895405e4438ca Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Sun, 15 Mar 2020 11:26:41 -0400 Subject: [PATCH] inline editing not working and other js packages issues --- js/jquery/jquery.crmEditable.js | 2 +- js/view/crm.designer.js | 2 +- js/wysiwyg/crm.ckeditor.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/jquery/jquery.crmEditable.js b/js/jquery/jquery.crmEditable.js index b68b27f0a2..cfbdb446a4 100644 --- a/js/jquery/jquery.crmEditable.js +++ b/js/jquery/jquery.crmEditable.js @@ -168,7 +168,7 @@ }); } - CRM.loadScript(CRM.config.packagesBase + 'jquery/plugins/jquery.jeditable.min.js').done(function() { + CRM.loadScript(CRM.config.packagesBase.replace(/\/+$/, '') + '/jquery/plugins/jquery.jeditable.min.js').done(function() { $i.editable(callback, settings); }); diff --git a/js/view/crm.designer.js b/js/view/crm.designer.js index 9d43b92bf0..ec3ae53c4f 100644 --- a/js/view/crm.designer.js +++ b/js/view/crm.designer.js @@ -370,7 +370,7 @@ "theme": 'classic', "dots": false, "icons": false, - "url": CRM.config.packagesBase + 'jquery/plugins/jstree/themes/classic/style.css' + "url": CRM.config.packagesBase.replace(/\/+$/, '') + '/jquery/plugins/jstree/themes/classic/style.css' }, 'plugins': ['themes', 'json_data', 'ui', 'search'] }).bind('loaded.jstree', function () { diff --git a/js/wysiwyg/crm.ckeditor.js b/js/wysiwyg/crm.ckeditor.js index 59bf880df9..b970da4568 100644 --- a/js/wysiwyg/crm.ckeditor.js +++ b/js/wysiwyg/crm.ckeditor.js @@ -54,8 +54,8 @@ function initialize() { var - browseUrl = CRM.config.packagesBase + "kcfinder/browse.php?cms=civicrm", - uploadUrl = CRM.config.packagesBase + "kcfinder/upload.php?cms=civicrm&format=json", + browseUrl = CRM.config.packagesBase.replace(/\/+$/, '') + "/kcfinder/browse.php?cms=civicrm", + uploadUrl = CRM.config.packagesBase.replace(/\/+$/, '') + "/kcfinder/upload.php?cms=civicrm&format=json", preset = $(item).data('preset') || 'default', // This variable is always an array but a legacy extension could be setting it as a string. customConfig = (typeof CRM.config.CKEditorCustomConfig === 'string') ? CRM.config.CKEditorCustomConfig : -- 2.25.1