From 63f62b40e9b4021cd957747b5e68b308759b8d81 Mon Sep 17 00:00:00 2001 From: Gareth J Barnard Date: Thu, 3 Mar 2016 18:42:26 +0000 Subject: [PATCH] V2.9.1 --- amd/src/block_theme_selector.js | 62 ++++++++++++++++----------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/amd/src/block_theme_selector.js b/amd/src/block_theme_selector.js index 2de348d..5a042d9 100644 --- a/amd/src/block_theme_selector.js +++ b/amd/src/block_theme_selector.js @@ -28,40 +28,40 @@ /* jshint ignore:start */ define(['jquery', 'core/log'], function($, log) { - "use strict"; // jshint ;_; + "use strict"; // jshint ;_; - log.debug('Block Theme Selector jQuery AMD'); + log.debug('Block Theme Selector jQuery AMD'); - return { - init: function(data) { - log.debug('Block Theme Selector AMD init initialised'); + return { + init: function(data) { + log.debug('Block Theme Selector AMD init initialised'); - $(document).ready(function() { - $('.block_theme_selector select').on('change', function(e) { - var $select = $(e.target); - var choose = $select.find(':selected').val(); - var urlswitch = $select.data('urlswitch'); - if (urlswitch == 2) { - var changeparam; - var urlparams = $select.data('urlparams'); - if (urlparams == 1) { - changeparam = '?'; - } else { - changeparam = '&'; - } - changeparam += 'theme=' + choose; - window.location = $select.data('url') + changeparam; - } else { - var params = { - 'sesskey': $select.data('sesskey'), - 'device': $select.data('device'), - 'choose': choose - }; - window.location = '/theme/index.php?' + $.param(params); - } - }); - }); + $(document).ready(function() { + $('.block_theme_selector select').on('change', function(e) { + var $select = $(e.target); + var choose = $select.find(':selected').val(); + var urlswitch = $select.data('urlswitch'); + if (urlswitch == 2) { + var changeparam; + var urlparams = $select.data('urlparams'); + if (urlparams == 1) { + changeparam = '?'; + } else { + changeparam = '&'; + } + changeparam += 'theme=' + choose; + window.location = $select.data('url') + changeparam; + } else { + var params = { + 'sesskey': $select.data('sesskey'), + 'device': $select.data('device'), + 'choose': choose + }; + window.location = '/theme/index.php?' + $.param(params); + } + }); + }); + } } - } }); /* jshint ignore:end */