From 122da242af7653bd084868bb5177789d915a0c8a Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 16 Jul 2020 12:51:20 -0700 Subject: [PATCH] (REF) Setup UI - Follow jQuery plugin conventions more closely 1. Conventional for jQuery plugins to be named `jquery.foo.js` 2. Conventional to bind to `window.jQuery` at load-time --- setup/res/{installer.js => jquery.setupui.js} | 5 ++++- setup/src/Setup/UI/SetupController.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) rename setup/res/{installer.js => jquery.setupui.js} (89%) diff --git a/setup/res/installer.js b/setup/res/jquery.setupui.js similarity index 89% rename from setup/res/installer.js rename to setup/res/jquery.setupui.js index 801c34c2b3..e000da4cd0 100644 --- a/setup/res/installer.js +++ b/setup/res/jquery.setupui.js @@ -1,3 +1,6 @@ +/** + * This is a jQuery plugin which adds some helpers for the setup UI. + */ (function($){ /** * Enable or disable an error message. @@ -28,4 +31,4 @@ this.on('change', cb); return this; }; -})($); \ No newline at end of file +})(jQuery); \ No newline at end of file diff --git a/setup/src/Setup/UI/SetupController.php b/setup/src/Setup/UI/SetupController.php index a0434fa401..c7e685f9ff 100644 --- a/setup/src/Setup/UI/SetupController.php +++ b/setup/src/Setup/UI/SetupController.php @@ -191,7 +191,7 @@ class SetupController implements SetupControllerInterface { $r->body = $body; $r->assets = [ ['type' => 'script-url', 'url' => $this->getUrl('jquery.js')], - ['type' => 'script-url', 'url' => $this->urls['res'] . "installer.js"], + ['type' => 'script-url', 'url' => $this->urls['res'] . "jquery.setupui.js"], ['type' => 'script-code', 'code' => 'window.csj$ = jQuery.noConflict();'], ['type' => 'style-url', 'url' => $this->urls['res'] . "template.css"], ['type' => 'style-url', 'url' => $this->getUrl('font-awesome.css')], -- 2.25.1