mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Docs: update theme switcher
This commit is contained in:
parent
07eeada942
commit
59eeb6cdc4
@ -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/"
|
||||
}
|
||||
]
|
||||
|
8
docs/js/jquery.jui_theme_switch.min.js
vendored
8
docs/js/jquery.jui_theme_switch.min.js
vendored
@ -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+='<label id="'+u+'" for="'+h+'">'+k.switcher_label+"</label>";s+='<select id="'+h+'" size="'+k.list_size+'">';for(q=0;q<r;q++){if(l=i[q]["active"]=="yes"||k.show_all=="yes"){if(k.use_groups=="yes"){l=i[q]["group"];if(l!==j){s+='<optgroup label="'+l+'">';j=l}}if(k.default_theme==i[q]["theme_name"]){g.data(c)["selected_theme"]=i[q];o=' selected="selected"'}else{o=""}v="";if(i[q].hasOwnProperty("hosted_locally")){if(i[q]["hosted_locally"]=="yes"){v=k.project_url}}s+='<option value="'+v+i[q]["theme_url"]+'"'+o+">";s+=i[q]["theme_name"];s+="</option>";if(k.use_groups=="yes"){if(q<r-1&&i[parseInt(q)+1]["group"]!==j){s+="</optgroup>"}}}}s+="</select>";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;q<r;q++){if(e("#"+h+" option:selected").text()==i[q]["theme_name"]){g.data(c)["selected_theme"]=i[q];break}}g.triggerHandler("onChangeTheme",i[q])});g.triggerHandler("onDisplay")}})})},getDefaults:function(){return{switcher_label:"Select theme",default_theme:"ui-lightness",list_size:"1",use_groups:"yes",show_all:"no",project_url:"",containerClass:"switcher_container",labelClass:"switcher_label",listClass:"switcher_list",switcher_label_id_prefix:"lbl_",switcher_id_prefix:"switcher_",onChangeTheme:function(){},onDisplay:function(){}}},getOption:function(f){var g=this;return g.data(d)[f]},getAllOptions:function(){var f=this;return f.data(d)},setOption:function(f,i,h){var g=this;g.data(d)[f]=i;if(h){g.jui_theme_switch("init")}},refresh:function(){var f=this;f.jui_theme_switch()},destroy:function(){return e(this).each(function(){var f=e(this);f.removeData(d)})},getTheme:function(){var f=this;return f.data(c)["selected_theme"]}};var b=function(g,f){return g+f};e.fn.jui_theme_switch=function(g){if(this.size()!=1){var f="You must use this plugin ("+d+") with a unique element (at once)";this.html('<span style="color: red;">ERROR: '+f+"</span>");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);
|
||||
"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+='<label id="'+h+'" for="'+p+'">'+a.switcher_label+"</label>";f+='<select id="'+p+'" size="'+a.list_size+'">';for(b=0;b<n;b++)if(l="yes"==e[b].active||"yes"==a.show_all)"yes"==a.use_groups&&(l=e[b].group,l!==r&&(f+='<optgroup label="'+l+'">',r=l)),a.default_theme==e[b].theme_name?
|
||||
(d.data("jui_theme_switch_status").selected_theme=e[b],q=' selected="selected"'):q="",t="",e[b].hasOwnProperty("hosted_locally")&&"yes"==e[b].hosted_locally&&(t=a.project_url),f+='<option value="'+t+e[b].theme_url+'"'+q+">",f+=e[b].theme_name,f+="</option>","yes"==a.use_groups&&b<n-1&&e[parseInt(b)+1].group!==r&&(f+="</optgroup>");f+="</select>";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;b<n;b++)if(c("#"+p+" option:selected").text()==e[b].theme_name){d.data("jui_theme_switch_status").selected_theme=e[b];break}d.triggerHandler("onChangeTheme",e[b])});d.triggerHandler("onDisplay")}})})},getDefaults:function(){return{switcher_label:"Select theme",default_theme:"ui-lightness",list_size:"1",use_groups:"yes",show_all:"no",project_url:"",containerClass:"switcher_container",
|
||||
labelClass:"switcher_label",listClass:"switcher_list",switcher_label_id_prefix:"lbl_",switcher_id_prefix:"switcher_",onChangeTheme:function(){},onDisplay:function(){}}},getOption:function(c){return this.data("jui_theme_switch")[c]},getAllOptions:function(){return this.data("jui_theme_switch")},setOption:function(c,d,a){this.data("jui_theme_switch")[c]=d;a&&this.jui_theme_switch("init")},refresh:function(){this.jui_theme_switch()},destroy:function(){return c(this).each(function(){c(this).removeData("jui_theme_switch")})},
|
||||
getTheme:function(){return this.data("jui_theme_switch_status").selected_theme}};c.fn.jui_theme_switch=function(g){1!=this.length&&(this.html('<span style="color: red;">ERROR: You must use this plugin (jui_theme_switch) with a unique element (at once)</span>'),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);
|
Loading…
Reference in New Issue
Block a user