PluginProbe
Theme Switcha – Easily Switch Themes for Development and Testing / 2.8
Theme Switcha – Easily Switch Themes for Development and Testing v2.8
3.4.5 trunk 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.3.1 3.3.2 All 33 releases
theme-switcha / js / settings.js

settings.js in Theme Switcha – Easily Switch Themes for Development and Testing 2.8, at js/settings.js

33 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* Dashboard Widgets Suite - Admin JavaScript */
2
3 jQuery(document).ready(function($) {
4
5 $('.reset-options').on('click', function(e) {
6 e.preventDefault();
7 $('.modal-dialog').dialog('destroy');
8 var link = this;
9 var button_names = {}
10 button_names[theme_switcha_settings.reset_true] = function() { window.location = link.href; }
11 button_names[theme_switcha_settings.reset_false] = function() { $(this).dialog('close'); }
12 $('<div class="modal-dialog">'+ theme_switcha_settings.reset_message +'</div>').dialog({
13 title: theme_switcha_settings.reset_title,
14 buttons: button_names,
15 modal: true,
16 width: 350,
17 closeText: ''
18 });
19 });
20
21 $('.theme-screenshot').on('click', function() {
22 if ($(this).hasClass('enable-plugin')) {
23 $('.theme-screenshot').removeClass('theme-active');
24 var switched = $(this).data('switched');
25 $('.theme-switcha-status-switched span').text(switched);
26 $(this).addClass('theme-active');
27 if ($(this).hasClass('enable-admin')) {
28 $(this).append($('.theme-screenshot').find('.theme-admin'));
29 }
30 }
31 });
32
33 });