Rácz Tibor Zoltán [email protected]
This jQuery plugin forked from https://github.com/jasonlau/jQuery-jlThemeSwitcher
Version: 3.0
Licensed under MIT/GPL.
GPL license: http://www.gnu.org/licenses/gpl.html
MIT license: http://www.opensource.org/licenses/mit-license.php
$(div_selector).themeswitcher({/* options */});
autoOpen - boolean - Default: false
Automatically opens the widget when the page loads.
closeIcon - boolean - Default: true
Toggles the visibility of the close button located in the widget header.
closeIconContainerClass - string - Default: 'ui-state-default ui-corner-all'
Plus CSS classes for the container div of close button on right top
closeIconContainerClass - string - Default: 'ui-icon-circle-close'
Plus CSS classes for close button
closeOnClick - boolean - Default: true
Closes the widget when a theme is selected.
contentClass - string - Default: 'ui-widget-content ui-corner-bl ui-corner-br'
Plus CSS classes for container div of theme item list (under the header).
cookieName - string - Default: 'themeswitcher-theme'
The name of the cookie that the widget will set for your domain. Once a theme has been loaded, it will be remembered on future loads.
cookieOptions - object - Default: {expires:365}
The options for the cookie that the widget will set for your domain. Uses the same syntax as the jQuery cookies plugin.
defaultTheme - string - Default: ''
Loads a default theme as soon as the widget loads. String must match the name of a theme in the themes list.
excludeThemes - string - Default: ''
A comma-separated list of theme names to exclude from the widget.
headerClass - string - Default: 'ui-widget-header ui-corner-tl ui-corner-tr'
Plus CSS classes for header div.
hoverText - boolean - Default: false
Hides the theme name captions for the themes list until the mouse is over each item.
importThemes - boolean - Default: false
Imports all of the publicly available themes from importThemesPath
setting. All jQuery UI themes are included. Set to false if you wish to use your own custom themes which were created with jQuery UI ThemeRoller.
importThemesPath - string - Default: 'http://jasonlau.biz/public
/themes.run'
The URL to the JSON formatted themes list.
file format: ({"themes":"THEME_NAME,THUMBNAIL_URL,THEME_CSS_URL,|..."});
joinThemes - boolean - Default: true
Combines your custom themes list with the public imported themes list.
noHeader - boolean - Default: false
Toggles the visibility of the widget header.
onClose - function - Default: function(){}
Callback function to be executed whenever the switcher menu closes.
onOpen - function - Default: function(){}
Callback function to be executed whenever the switcher menu opens.
onSelect - function - Default: function(){}
Callback function to be executed whenever a theme is selected.
openAtOpener - boolean - Default: false
When set to true the widget will open at the same top and left position as the object with the class jlthemeswitcher-opener.
themeItemClass - string - Default: 'ui-corner-all'
Plus CSS classes for theme items.
themeItemActiveClass - string - Default: 'ui-state-active'
Plus CSS classes for the active theme item.
themeItemImageClass - string - Default: 'ui-corner-all'
Plus CSS classes for theme icons, images.
themeItemWidth - integer - Default: 82
The width of each theme item in the list in pixels.
themePreview - boolean - Default: true
Switches the webpage theme to the one which is currently in mouseover hover state to provide a quick preview. The previously selected theme reloads when the mouse exits the list item.
autoThemeVersionReplace - boolean - Default: true
If true: in the default themes replace the [VERSION] marker to the current loaded jQuery UI version number (uiVersion
config)
themes - string - Default: 'UI Lightness,...|Swanky Purse,http://static.jquery.com/ui/themeroller/images/themeGallery/theme_30_swanky_purse.png,http://ajax.googleapis.com/ajax/libs/jqueryui/[VERSION]/themes/swanky-purse/jquery-ui.css'
The list of themes the widget will use. Requires the following format:
'THEME_NAME,THEME_THUMBNAIL_URL,THEME_CSS_URL|...'
title - string - Default: 'Theme Switcher'
The widget title. Remove the title altogether by using this option with a blank value like this: title: ''
uiVersion - string - Default: 'auto'
jQuery UI version. This version number will be used for 'autoThemeVersionReplace' setting.
width - string - Default: ''300px'
The default width of the theme switcher widget in string form so you can use % or px format.
zindex - integer - Default: 2147483647
The default z-index stacking order for the widget.
- 3.0
- CSS reorganizations:
- 'captionCSS' option removed. Instead 'theme_name' css class name
- 'bgClass' option removed.
- 'closeIconCSS' option removed. Instead 'jlthemeswitcher-close-icon' css class name
- 'headerCSS' option removed. Instead 'jlthemeswitcher-header' css class name
- 'imageHoverCSS' option removed. Instead '.jlthemeswitcher a img:hover' css style rule
- 'themeItemCSS' option removed. Instead 'ul.jlthemeswitcher li.theme_item' css style rule
- 'themeswitcherCSS' option removed. Instead 'div.jlthemeswitcher' css style rule
- 'titleCSS' option removed. Instead '.jlthemeswitcher-title' css style rule
- some css rule move to the CSS file
- update the Cookie plugin
- new option: 'autoThemeVersionReplace':
in the default themes replace the [VERSION] marker to the
current loaded jQuery UI version number
- new option: 'uiVersion':
jQueryUI version. Default: 'auto' (auto detect)
This version number will be used for 'autoThemeVersionReplace' setting
- change 'themes' option format
- Jason Lau former changes:
2.0.3 – 1.21.11 -Version 2.0.3 adds the boolean noHeader option, which removes the header portion of the jlThemeSwitcher widget when set to true. Default is false.
2.0.2 – 1.18.11 -Version 2.0.2 fixes various and sundry bugs. Made backwards compatible with IE7. Fixes bug that caused it to crash if there was no defaultTheme set.
2.0.1 – 9.21.10 -Fixed bug in default cookie options and updated documentation. Cookie options is an object not string.
2.0.0 – 8.9.10 – Major recode. Removed the following options – fixedPosition, height, left, toggle, top. Added the following options – closeIcon, zindex. Positioning should now be accomplished with css. Removed the function toggle_jlThemeSwitcher(). Added the class .jlthemeswitcher-toggle to replace the toggle function.
1.0.2 – 8.2.10 – Minor bug fix
1.0.1 – 8.1.10 – Minor bug fix
1.0.0 – 8.1.10 – Initial release
Copyright (C) 2013 Rácz Tibor Zoltán [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.