From 59eeb6cdc49879698e7e9c82b288e97cc16d61b9 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Sun, 17 Jul 2016 12:30:25 -0500 Subject: [PATCH] Docs: update theme switcher --- docs/assets/theme_switcher.json | 230 ++++++++++++++----------- docs/js/jquery.jui_theme_switch.min.js | 8 +- 2 files changed, 138 insertions(+), 100 deletions(-) diff --git a/docs/assets/theme_switcher.json b/docs/assets/theme_switcher.json index c16f4d9b..95a1aee7 100644 --- a/docs/assets/theme_switcher.json +++ b/docs/assets/theme_switcher.json @@ -1,200 +1,217 @@ [ { - "theme_name": "black-tie", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/black-tie/jquery-ui.css", + "theme_name": "base", + "theme_url": "https://code.jquery.com/ui/{version}/themes/base/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" + }, + { + "theme_name": "black-tie", + "theme_url": "https://code.jquery.com/ui/{version}/themes/black-tie/jquery-ui.css", + "group": "Official", + "active": "yes", + "author": "jQuery Project", + "license": "https://jquery.org/license" }, { "theme_name": "blitzer", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/blitzer/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/blitzer/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "cupertino", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/cupertino/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/cupertino/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "dark-hive", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/dark-hive/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/dark-hive/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "dot-luv", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/dot-luv/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/dot-luv/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "eggplant", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/eggplant/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/eggplant/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "excite-bike", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/excite-bike/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/excite-bike/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "flick", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/flick/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/flick/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "hot-sneaks", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/hot-sneaks/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/hot-sneaks/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "humanity", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/humanity/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/humanity/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "le-frog", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/le-frog/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/le-frog/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "mint-choc", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/mint-choc/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/mint-choc/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "overcast", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/overcast/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/overcast/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "pepper-grinder", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/pepper-grinder/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/pepper-grinder/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "redmond", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/redmond/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/redmond/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "smoothness", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/smoothness/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "south-street", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/south-street/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/south-street/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "start", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/start/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/start/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "sunny", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/sunny/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/sunny/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "swanky-purse", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/swanky-purse/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/swanky-purse/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "trontastic", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/trontastic/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/trontastic/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "ui-darkness", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/ui-darkness/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/ui-darkness/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "ui-lightness", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/ui-lightness/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/ui-lightness/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, { "theme_name": "vader", - "theme_url": "//code.jquery.com/ui/1.11.4/themes/vader/jquery-ui.css", + "theme_url": "https://code.jquery.com/ui/{version}/themes/vader/jquery-ui.css", "group": "Official", "active": "yes", "author": "jQuery Project", - "license": "//jquery.org/license" + "license": "https://jquery.org/license" }, + { + "theme_name": "Absolution", + "theme_url": "https://rawgit.com/MichaelVdheeren/Absolution/master/compiled/absolution.css", + "group": "3rd-party", + "active": "yes", + "author": "https://github.com/MichaelVdheeren/Absolution", + "license": "Dual licensed under the MIT or GPL Version 2 licenses", + "notes": "You are free to redistribute or change the theme. You can change the theme, but you should keep the references to contributors!" + }, { "theme_name": "aristo", - "theme_url": "//taitems.github.com/Aristo-jQuery-UI-Theme/css/Aristo/Aristo.css", + "theme_url": "https://taitems.github.io/Aristo-jQuery-UI-Theme/css/Aristo/Aristo.css", "group": "3rd-party", "active": "yes", "author": "https://github.com/taitems/Aristo-jQuery-UI-Theme", @@ -202,94 +219,109 @@ }, { "theme_name": "jquery-ui-bootstrap", - "theme_url": "//jquery-ui-bootstrap.github.io/jquery-ui-bootstrap/css/custom-theme/jquery-ui-1.10.3.custom.css", + "theme_url": "https://jquery-ui-bootstrap.github.io/jquery-ui-bootstrap/css/custom-theme/jquery-ui-1.10.3.custom.css", "group": "3rd-party", "active": "yes", "author": "https://github.com/jquery-ui-bootstrap/jquery-ui-bootstrap", - "license": "Copyright 2012, Addy Osmani - Dual licensed under the MIT or GPL Version 2 licenses" - }, - { - "theme_name": "Absolution", - "hosted_locally": "yes", - "theme_url": "/lib/jquery-ui-1.10.0.custom/css/3rd-party/Absolution/absolution.css", - "group": "3rd-party", - "active": "yes", - "author": "//www.michaelvanderheeren.be/archives/382", - "license": "https://github.com/michaelvanderheeren/Absolution/blob/master/README.md", - "notes": "You are free to redistribute or change the theme. You can change the theme, but you should keep the references to contributors!" - }, - { - "theme_name": "Selene", - "theme_url": "//gravityonmars.github.com/Selene/css/ui-selene/jquery-ui-1.8.17.custom.css", - "group": "3rd-party", - "active": "yes", - "author": "https://github.com/gravityonmars/Selene", "license": "MIT" }, { "theme_name": "kiandra-delta", - "theme_url": "//kiandra.github.com/Delta-jQuery-UI-Theme/theme/jquery-ui.css", + "theme_url": "https://kiandra.github.io/Delta-jQuery-UI-Theme/theme/jquery-ui.css", "group": "3rd-party", "active": "yes", "author": "https://github.com/kiandra/Delta-jQuery-UI-Theme", "license": "Dual licensed under the MIT or GPL Version 2 licenses." }, - + { + "theme_name": "Selene", + "theme_url": "https://rawgit.com/rickyrauch/Selene/master/css/ui-selene/jquery-ui-1.8.17.custom.css", + "group": "3rd-party", + "active": "yes", + "author": "https://github.com/gravityonmars/Selene", + "license": "MIT" + }, { "theme_name": "arctic", - "theme_url": "//cdn.wijmo.com/themes/arctic/jquery-wijmo.css", + "theme_url": "https://rawgit.com/wijmo/Wijmo-Complete/master/themes/arctic/jquery-wijmo.css", + "theme_url_insecure": "http://cdn.wijmo.com/themes/arctic/jquery-wijmo.css", "group": "Wijmo", "active": "yes", - "author": "//wijmo.com", - "license": "//wijmo.com/license" + "author": "http://wijmo.com", + "license": "http://wijmo.com/widgets/license/" }, { - "theme_name": "midnight", - "theme_url": "//cdn.wijmo.com/themes/midnight/jquery-wijmo.css", + "theme_name": "aristo", + "theme_url": "https://rawgit.com/wijmo/Wijmo-Complete/master/themes/aristo/jquery-wijmo.css", + "theme_url_insecure": "http://cdn.wijmo.com/themes/aristo/jquery-wijmo.css", "group": "Wijmo", "active": "yes", - "author": "//wijmo.com", - "license": "//wijmo.com/license" + "author": "http://wijmo.com", + "license": "http://wijmo.com/widgets/license/", + "notes": "Based on the Aristo theme concept created by 280 North and Pinvoke (https://github.com/280north/aristo)" }, { - "theme_name": "rocket", - "theme_url": "//cdn.wijmo.com/themes/rocket/jquery-wijmo.css", + "theme_name": "bootstrap", + "theme_url": "https://rawgit.com/wijmo/Wijmo-Complete/master/themes/bootstrap/jquery-ui.css", + "theme_url_insecure": "http://cdn.wijmo.com/themes/bootstrap/jquery-ui.css", "group": "Wijmo", "active": "yes", - "author": "//wijmo.com", - "license": "//wijmo.com/license" + "author": "http://wijmo.com", + "license": "http://wijmo.com/widgets/license/" }, { "theme_name": "cobalt", - "theme_url": "//cdn.wijmo.com/themes/cobalt/jquery-wijmo.css", + "theme_url": "https://rawgit.com/wijmo/Wijmo-Complete/master/themes/cobalt/jquery-wijmo.css", + "theme_url_insecure": "http://cdn.wijmo.com/themes/cobalt/jquery-wijmo.css", "group": "Wijmo", "active": "yes", - "author": "//wijmo.com", - "license": "//wijmo.com/license" - }, - { - "theme_name": "sterling", - "theme_url": "//cdn.wijmo.com/themes/sterling/jquery-wijmo.css", - "group": "Wijmo", - "active": "yes", - "author": "//wijmo.com", - "license": "//wijmo.com/license" + "author": "http://wijmo.com", + "license": "http://wijmo.com/widgets/license/" }, { "theme_name": "metro", - "theme_url": "//cdn.wijmo.com/themes/metro/jquery-wijmo.css", + "theme_url": "https://rawgit.com/wijmo/Wijmo-Complete/master/themes/metro/jquery-wijmo.css", + "theme_url_insecure": "http://cdn.wijmo.com/themes/metro/jquery-wijmo.css", "group": "Wijmo", "active": "yes", - "author": "//wijmo.com", - "license": "//wijmo.com/license" + "author": "http://wijmo.com", + "license": "http://wijmo.com/widgets/license/" }, { "theme_name": "metro-dark", - "theme_url": "//cdn.wijmo.com/themes/metro-dark/jquery-wijmo.css", + "theme_url": "https://rawgit.com/wijmo/Wijmo-Complete/master/themes/metro-dark/jquery-wijmo.css", + "theme_url_insecure": "http://cdn.wijmo.com/themes/metro-dark/jquery-wijmo.css", "group": "Wijmo", "active": "yes", - "author": "//wijmo.com", - "license": "//wijmo.com/license" + "author": "http://wijmo.com", + "license": "http://wijmo.com/widgets/license/" + }, + { + "theme_name": "midnight", + "theme_url": "https://rawgit.com/wijmo/Wijmo-Complete/master/themes/midnight/jquery-wijmo.css", + "theme_url_insecure": "http://cdn.wijmo.com/themes/midnight/jquery-wijmo.css", + "group": "Wijmo", + "active": "yes", + "author": "http://wijmo.com", + "license": "http://wijmo.com/widgets/license/" + }, + { + "theme_name": "rocket", + "theme_url": "https://rawgit.com/wijmo/Wijmo-Complete/master/themes/rocket/jquery-wijmo.css", + "theme_url_insecure": "http://cdn.wijmo.com/themes/rocket/jquery-wijmo.css", + "group": "Wijmo", + "active": "yes", + "author": "http://wijmo.com", + "license": "http://wijmo.com/widgets/license/" + }, + { + "theme_name": "sterling", + "theme_url": "https://rawgit.com/wijmo/Wijmo-Complete/master/themes/sterling/jquery-wijmo.css", + "theme_url_insecure": "http://cdn.wijmo.com/themes/sterling/jquery-wijmo.css", + "group": "Wijmo", + "active": "yes", + "author": "http://wijmo.com", + "license": "http://wijmo.com/widgets/license/" } ] diff --git a/docs/js/jquery.jui_theme_switch.min.js b/docs/js/jquery.jui_theme_switch.min.js index d3e916cc..495fb0e6 100644 --- a/docs/js/jquery.jui_theme_switch.min.js +++ b/docs/js/jquery.jui_theme_switch.min.js @@ -8,4 +8,10 @@ * @author Christos Pontikis http://pontikis.net * @requires jquery, jquery-ui */ -"use strict";(function(e){var d="jui_theme_switch",c="jui_theme_switch_status";var a={init:function(f){var g=this;return this.each(function(){var k=g.data(d);if(typeof(k)=="undefined"){var n=g.jui_theme_switch("getDefaults");k=e.extend({},n,f)}else{k=e.extend({},k,f)}g.data(d,k);if(typeof g.data(c)==="undefined"){g.data(c,{});g.data(c)["selected_theme"]={}}g.unbind("onChangeTheme").bind("onChangeTheme",k.onChangeTheme);g.unbind("onDisplay").bind("onDisplay",k.onDisplay);var p=g.attr("id"),r,q,s="",h=b(k.switcher_id_prefix,p),u=b(k.switcher_label_id_prefix,p),t,m,w=e("#"+k.stylesheet_link_id),o="",l,j="",v="";e.ajax({url:k.datasource_url,dataType:"json",cache:false,success:function(i){r=i.length;s+='";s+='";g.html(s);m=e("#"+u);t=e("#"+h);m.removeClass().addClass(k.labelClass);t.removeClass().addClass(k.listClass);g.removeClass().addClass(k.containerClass);g.off("change",t).on("change",t,function(){w.attr("href",t.val());for(q=0;qERROR: '+f+"");e.error(f)}if(a[g]){return a[g].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof g==="object"||!g){return a.init.apply(this,arguments)}else{e.error("Method "+g+" does not exist on jQuery."+d)}}}})(jQuery); \ No newline at end of file +"use strict";(function(c){var h={init:function(g){var d=this;return this.each(function(){var a=d.data("jui_theme_switch");if("undefined"==typeof a)var m=d.jui_theme_switch("getDefaults"),a=c.extend({},m,g);else a=c.extend({},a,g);d.data("jui_theme_switch",a);"undefined"===typeof d.data("jui_theme_switch_status")&&(d.data("jui_theme_switch_status",{}),d.data("jui_theme_switch_status").selected_theme={});d.unbind("onChangeTheme").bind("onChangeTheme",a.onChangeTheme);d.unbind("onDisplay").bind("onDisplay",a.onDisplay); +var m=d.attr("id"),n,b,f="",p=a.switcher_id_prefix+m,h=a.switcher_label_id_prefix+m,k,u,w=c("#"+a.stylesheet_link_id),q="",l,r="",t="",v;c.ajax({url:a.datasource_url,dataType:"json",cache:!1,success:function(e){n=e.length;f+='";f+='";d.html(f);u=c("#"+h);k=c("#"+p);u.removeClass().addClass(a.labelClass);k.removeClass().addClass(a.listClass);d.removeClass().addClass(a.containerClass);d.off("change", +k).on("change",k,function(){v=(k.val()||"").replace(/\{version\}/g,c.ui&&c.ui.version||"1.12.0");w.attr("href",v);for(b=0;bERROR: You must use this plugin (jui_theme_switch) with a unique element (at once)'),c.error("You must use this plugin (jui_theme_switch) with a unique element (at once)"));if(h[g])return h[g].apply(this,Array.prototype.slice.call(arguments,1));if("object"!==typeof g&&g)c.error("Method "+g+" does not exist on jQuery.jui_theme_switch"); +else return h.init.apply(this,arguments)}})(jQuery); \ No newline at end of file