From 38b388e3bceab0b4aa298634c2f851fb914d3409 Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Mon, 30 Jan 2017 15:40:15 -0500 Subject: [PATCH] WIP test for @iionly --- mod/ckeditor/start.php | 3 +-- mod/ckeditor/views/default/elgg/ckeditor/set-basepath.js | 8 -------- .../views/default/elgg/ckeditor/set-basepath.php | 9 +++++++++ 3 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 mod/ckeditor/views/default/elgg/ckeditor/set-basepath.js create mode 100644 mod/ckeditor/views/default/elgg/ckeditor/set-basepath.php diff --git a/mod/ckeditor/start.php b/mod/ckeditor/start.php index b6cf4442aa6..9f40669cd36 100644 --- a/mod/ckeditor/start.php +++ b/mod/ckeditor/start.php @@ -15,7 +15,6 @@ function ckeditor_init() { elgg_extend_view('elgg/wysiwyg.css', 'elements/typography.css', 100); elgg_define_js('ckeditor', array( - 'deps' => ['elgg/ckeditor/set-basepath'], 'exports' => 'CKEDITOR', )); elgg_define_js('jquery.ckeditor', array( @@ -24,7 +23,7 @@ function ckeditor_init() { )); // need to set basepath early - elgg_extend_view('elgg.js', 'elgg/ckeditor/set-basepath.js'); + elgg_extend_view('elgg.js', 'elgg/ckeditor/set-basepath', 499); elgg_extend_view('input/longtext', 'ckeditor/init'); diff --git a/mod/ckeditor/views/default/elgg/ckeditor/set-basepath.js b/mod/ckeditor/views/default/elgg/ckeditor/set-basepath.js deleted file mode 100644 index 1eaa1c14cc5..00000000000 --- a/mod/ckeditor/views/default/elgg/ckeditor/set-basepath.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * This view extends elgg.js and sets ckeditor basepath before jquery.ckeditor is loaded - */ -define('elgg/ckeditor/set-basepath', function (require) { - var elgg = require('elgg'); - // This global variable must be set before the editor script loading. - CKEDITOR_BASEPATH = elgg.get_simplecache_url('ckeditor/'); -}); diff --git a/mod/ckeditor/views/default/elgg/ckeditor/set-basepath.php b/mod/ckeditor/views/default/elgg/ckeditor/set-basepath.php new file mode 100644 index 00000000000..86a6abb4fc2 --- /dev/null +++ b/mod/ckeditor/views/default/elgg/ckeditor/set-basepath.php @@ -0,0 +1,9 @@ + +window.CKEDITOR_BASEPATH = ;