compass-jquery-plugin 0.3.2.3 → 0.3.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +54 -37
- data/VERSION.yml +1 -1
- data/lib/handle_attributes.rb +4 -4
- data/lib/handle_js_files.rb +5 -5
- data/lib/jqtouch_theme.rb +2 -2
- data/lib/jquery/dynatree.rb +2 -2
- data/lib/jquery/emulators.rb +1 -1
- data/lib/jquery/flash_messages.rb +6 -6
- data/lib/jquery/graphics.rb +5 -0
- data/lib/jquery/gridify/assertions.rb +1 -1
- data/lib/jquery/gridify/grid.rb +76 -59
- data/lib/jquery/gridify/grid_column.rb +73 -67
- data/lib/jquery/gridify/grid_finder.rb +79 -79
- data/lib/jquery/gridify/grid_options.rb +154 -149
- data/lib/jquery/gridify/grid_view.rb +143 -143
- data/lib/jquery/gridify.rb +25 -25
- data/lib/jquery/ical/calendar.rb +2 -2
- data/lib/jquery/ical/event.rb +48 -44
- data/lib/jquery/ical/helpers/ui_event_helper.rb +3 -3
- data/lib/jquery/jqgrid/jqgrid.rb +58 -58
- data/lib/jquery/jqgrid.rb +1 -1
- data/lib/jquery/jqtouch.rb +1 -1
- data/lib/jquery/jquery.rb +117 -117
- data/lib/jquery/jquery_auto_complete.rb +9 -9
- data/lib/jquery/jquery_json_response.rb +12 -12
- data/lib/jquery/jquery_selector_assertions.rb +55 -53
- data/lib/jquery/jstree.rb +2 -2
- data/lib/jquery/mobile.rb +1 -1
- data/lib/jquery/ribbon.rb +2 -2
- data/lib/jquery/secret_sauce/controller/ui_dialog_controls.rb +5 -5
- data/lib/jquery/secret_sauce/controller/ui_grid_controls.rb +5 -5
- data/lib/jquery/secret_sauce/helpers/ui_dialog_helper.rb +1 -1
- data/lib/jquery/secret_sauce/helpers/ui_form_helper.rb +39 -39
- data/lib/jquery/secret_sauce/helpers/ui_grid_helper.rb +74 -74
- data/lib/jquery/secret_sauce/model/find_for_grid.rb +21 -21
- data/lib/jquery/secret_sauce.rb +1 -1
- data/lib/jquery/tools.rb +1 -1
- data/lib/jquery_mobile_theme.rb +2 -2
- data/lib/jquery_ui_theme.rb +12 -12
- data/templates/dynatree/config/initializers/dynatree.rb +3 -3
- data/templates/dynatree/jquery/dynatree/aero.scss +16 -16
- data/templates/dynatree/jquery/dynatree/aqua.scss +16 -16
- data/templates/dynatree/jquery/dynatree/crystal.scss +16 -16
- data/templates/dynatree/jquery/dynatree/xp.scss +17 -17
- data/templates/dynatree/jquery.dynatree.js +2926 -2912
- data/templates/emulators/config/initializers/emulators.rb +6 -6
- data/templates/graphics/config/initializers/graphics.rb +5 -0
- data/templates/graphics/jquery/ganttView.scss +89 -0
- data/templates/graphics/jquery.ganttView.js +1669 -0
- data/templates/graphics/jquery.ganttView.min.js +70 -0
- data/templates/{jquery → graphics}/jquery.sparkline.js +466 -438
- data/templates/{jquery → graphics}/jquery.sparkline.min.js +0 -0
- data/templates/graphics/manifest.rb +9 -0
- data/templates/jqgrid/config/initializers/jqgrid.rb +1 -1
- data/templates/jqgrid/i18n/jqgrid/locale-ar.js +131 -125
- data/templates/jqgrid/i18n/jqgrid/locale-bg.js +135 -131
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.js +135 -131
- data/templates/jqgrid/i18n/jqgrid/locale-cat.js +132 -126
- data/templates/jqgrid/i18n/jqgrid/locale-cn.js +137 -131
- data/templates/jqgrid/i18n/jqgrid/locale-cs.js +133 -127
- data/templates/jqgrid/i18n/jqgrid/locale-da.js +132 -126
- data/templates/jqgrid/i18n/jqgrid/locale-de.js +138 -132
- data/templates/jqgrid/i18n/jqgrid/locale-el.js +131 -125
- data/templates/jqgrid/i18n/jqgrid/locale-en.js +133 -127
- data/templates/jqgrid/i18n/jqgrid/locale-es.js +133 -127
- data/templates/jqgrid/i18n/jqgrid/locale-fa.js +19 -16
- data/templates/jqgrid/i18n/jqgrid/locale-fi.js +132 -126
- data/templates/jqgrid/i18n/jqgrid/locale-fr.js +131 -125
- data/templates/jqgrid/i18n/jqgrid/locale-gl.js +131 -125
- data/templates/jqgrid/i18n/jqgrid/locale-he.js +132 -126
- data/templates/jqgrid/i18n/jqgrid/locale-hu.js +133 -127
- data/templates/jqgrid/i18n/jqgrid/locale-is.js +131 -125
- data/templates/jqgrid/i18n/jqgrid/locale-it.js +8 -1
- data/templates/jqgrid/i18n/jqgrid/locale-ja.js +139 -136
- data/templates/jqgrid/i18n/jqgrid/locale-nl.js +4 -1
- data/templates/jqgrid/i18n/jqgrid/locale-no.js +14 -1
- data/templates/jqgrid/i18n/jqgrid/locale-pl.js +132 -126
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.js +132 -126
- data/templates/jqgrid/i18n/jqgrid/locale-pt.js +130 -124
- data/templates/jqgrid/i18n/jqgrid/locale-ro.js +144 -138
- data/templates/jqgrid/i18n/jqgrid/locale-ru.js +132 -126
- data/templates/jqgrid/i18n/jqgrid/locale-sk.js +132 -126
- data/templates/jqgrid/i18n/jqgrid/locale-sr.js +133 -127
- data/templates/jqgrid/i18n/jqgrid/locale-sv.js +132 -126
- data/templates/jqgrid/i18n/jqgrid/locale-tr.js +131 -125
- data/templates/jqgrid/i18n/jqgrid/locale-ua.js +132 -126
- data/templates/jqgrid/jquery.jqGrid.js +12735 -10444
- data/templates/jqgrid/jquery.jqGrid.min.js +477 -469
- data/templates/jqgrid/public/stylesheets/ellipsis-xbl.xml +12 -10
- data/templates/jqtouch/config/initializers/jqtouch.rb +3 -3
- data/templates/jqtouch/jquery/touch/jqtouch.scss +1 -1
- data/templates/jqtouch/jquery.jqtouch.js +10025 -10043
- data/templates/jquery/config/initializers/jquery.rb +2 -4
- data/templates/jquery/history.adapter.jquery.js +71 -0
- data/templates/jquery/history.adapter.jquery.min.js +4 -0
- data/templates/jquery/history.html4.js +690 -0
- data/templates/jquery/history.html4.min.js +21 -0
- data/templates/jquery/history.js +1297 -0
- data/templates/jquery/history.min.js +29 -0
- data/templates/jquery/i18n/jquery.ui/datepicker-af.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ar-DZ.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-ar.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-az.js +19 -19
- data/templates/jquery/i18n/jquery.ui/datepicker-bg.js +8 -8
- data/templates/jquery/i18n/jquery.ui/datepicker-bs.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ca.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-cs.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-da.js +14 -14
- data/templates/jquery/i18n/jquery.ui/datepicker-de.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-el.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-en-AU.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-en-GB.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-en-NZ.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-eo.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-es.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-et.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-eu.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-fa.js +18 -18
- data/templates/jquery/i18n/jquery.ui/datepicker-fi.js +15 -15
- data/templates/jquery/i18n/jquery.ui/datepicker-fo.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-fr-CH.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-fr.js +22 -22
- data/templates/jquery/i18n/jquery.ui/datepicker-gl.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-he.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-hr.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-hu.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-hu.min.js +1 -1
- data/templates/jquery/i18n/jquery.ui/datepicker-hy.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-id.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-is.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-it.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ja.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ko.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-kz.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-lt.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-lv.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ml.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ms.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-nl.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-no.js +16 -16
- data/templates/jquery/i18n/jquery.ui/datepicker-no.min.js +2 -2
- data/templates/jquery/i18n/jquery.ui/datepicker-pl.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-pt-BR.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-pt.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-rm.js +18 -18
- data/templates/jquery/i18n/jquery.ui/datepicker-ro.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-ru.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sk.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sl.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sq.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sr-SR.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sr.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-sv.js +14 -14
- data/templates/jquery/i18n/jquery.ui/datepicker-ta.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-th.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-tr.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-uk.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-vi.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-zh-CN.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-zh-HK.js +20 -20
- data/templates/jquery/i18n/jquery.ui/datepicker-zh-TW.js +20 -20
- data/templates/jquery/{partials → jquery/ui}/_flash_messages.scss +0 -0
- data/templates/jquery/jquery/ui/_theme.scss +14 -13
- data/templates/jquery/jquery/ui/contextMenu/configure.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/copy.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/cut.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/delete.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/edit.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/exit.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/new.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/paste.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/rename.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/show.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/trash.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu.scss +16 -10
- data/templates/jquery/jquery-ui.js +11839 -23066
- data/templates/jquery/jquery-ui.min.js +401 -795
- data/templates/jquery/jquery.bgiframe.js +27 -25
- data/templates/jquery/jquery.contextMenu.js +209 -196
- data/templates/jquery/jquery.cookie.js +3 -1
- data/templates/jquery/jquery.dotimeout.js +236 -228
- data/templates/jquery/jquery.dst.js +154 -151
- data/templates/jquery/jquery.farbtastic.js +293 -293
- data/templates/jquery/jquery.flashMessages.js +26 -0
- data/templates/jquery/jquery.flashMessages.min.js +1 -0
- data/templates/jquery/jquery.form.js +803 -786
- data/templates/jquery/jquery.haml.js +248 -247
- data/templates/jquery/jquery.hotkeys.js +89 -89
- data/templates/jquery/jquery.js +8141 -8106
- data/templates/jquery/jquery.layout.js +2451 -2415
- data/templates/jquery/jquery.min.js +167 -166
- data/templates/jquery/jquery.mousewheel.js +62 -54
- data/templates/jquery/jquery.offline.js +171 -171
- data/templates/jquery/jquery.pngFix.js +76 -76
- data/templates/jquery/jquery.replacetext.js +83 -83
- data/templates/jquery/jquery.themeswitchertool.js +202 -177
- data/templates/jquery/jquery.tmpl.js +478 -473
- data/templates/jquery/jquery.tmplPlus.js +82 -81
- data/templates/jquery/jrails.js +178 -175
- data/templates/jquery/json.js +77 -7
- data/templates/jquery/json2.js +480 -0
- data/templates/jquery/json2.min.js +7 -0
- data/templates/jquery/lib/tasks/haml.rake +2 -2
- data/templates/jquery/manifest.rb +21 -17
- data/templates/jstree/jquery.jstree.js +5967 -4536
- data/templates/mobile/config/initializers/mobile.rb +1 -1
- data/templates/mobile/jquery/mobile/_base.scss +944 -927
- data/templates/mobile/jquery/mobile/default.scss +61 -48
- data/templates/mobile/jquery/mobile/valencia.scss +56 -42
- data/templates/mobile/jquery.mobile.js +4461 -4347
- data/templates/mobile/jquery.mobile.min.js +11 -2
- data/templates/mobile/lib/tasks/jquery.mobile.rake +12 -12
- data/templates/ribbon/config/initializers/ribbon.rb +2 -2
- data/templates/ribbon/jquery.ribbon.js +50 -29
- data/templates/secret_sauce/secret_sauce.js +8 -8
- data/templates/tools/flowplayer.js +945 -1
- data/templates/tools/jquery.tools.js +4645 -4335
- data/templates/tools/jquery.tools.min.js +37 -37
- data/templates/tools/lib/tasks/jquery.tools.rake +4 -4
- data/templates/tools/swfobject.js +813 -773
- metadata +33 -21
- data/templates/jquery/haml.js +0 -506
- data/templates/jquery/haml.min.js +0 -5
- data/templates/jquery/jquery/ui/contextMenu/door.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/page_white_copy.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/page_white_delete.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/page_white_edit.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/page_white_new.png +0 -0
- data/templates/jquery/jquery/ui/contextMenu/page_white_paste.png +0 -0
- data/templates/jquery/jquery.compat-1.3.js +0 -291
- data/templates/jquery/jquery.compat-1.3.min.js +0 -6
- data/templates/jquery/jquery.flash_messages.js +0 -5
- data/templates/jquery/jquery.flash_messages.min.js +0 -1
- data/templates/jquery/jquery.history.js +0 -194
- data/templates/jquery/jquery.history.min.js +0 -5
@@ -42,88 +42,88 @@
|
|
42
42
|
// 1.1 - (11/21/2009) Simplified the code and API substantially.
|
43
43
|
// 1.0 - (11/21/2009) Initial release
|
44
44
|
|
45
|
-
(function($){
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
45
|
+
(function($) {
|
46
|
+
'$:nomunge'; // Used by YUI compressor.
|
47
|
+
|
48
|
+
// Method: jQuery.fn.replaceText
|
49
|
+
//
|
50
|
+
// Replace text in specified elements. Note that only text content will be
|
51
|
+
// modified, leaving all tags and attributes untouched. The new text can be
|
52
|
+
// either text or HTML.
|
53
|
+
//
|
54
|
+
// Uses the String prototype replace method, full documentation on that method
|
55
|
+
// can be found here:
|
56
|
+
//
|
57
|
+
// https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/String/Replace
|
58
|
+
//
|
59
|
+
// Usage:
|
60
|
+
//
|
61
|
+
// > jQuery('selector').replaceText( search, replace [, text_only ] );
|
62
|
+
//
|
63
|
+
// Arguments:
|
64
|
+
//
|
65
|
+
// search - (RegExp|String) A RegExp object or substring to be replaced.
|
66
|
+
// Because the String prototype replace method is used internally, this
|
67
|
+
// argument should be specified accordingly.
|
68
|
+
// replace - (String|Function) The String that replaces the substring received
|
69
|
+
// from the search argument, or a function to be invoked to create the new
|
70
|
+
// substring. Because the String prototype replace method is used internally,
|
71
|
+
// this argument should be specified accordingly.
|
72
|
+
// text_only - (Boolean) If true, any HTML will be rendered as text. Defaults
|
73
|
+
// to false.
|
74
|
+
//
|
75
|
+
// Returns:
|
76
|
+
//
|
77
|
+
// (jQuery) The initial jQuery collection of elements.
|
78
|
+
|
79
|
+
$.fn.replaceText = function(search, replace, text_only) {
|
80
|
+
return this.each(function() {
|
81
|
+
var node = this.firstChild,
|
82
|
+
val,
|
83
|
+
new_val,
|
84
|
+
|
85
|
+
// Elements to be removed at the end.
|
86
|
+
remove = [];
|
87
|
+
|
88
|
+
// Only continue if firstChild exists.
|
89
|
+
if (node) {
|
90
|
+
|
91
|
+
// Loop over all childNodes.
|
92
|
+
do {
|
93
|
+
|
94
|
+
// Only process text nodes.
|
95
|
+
if (node.nodeType === 3) {
|
96
|
+
|
97
|
+
// The original node value.
|
98
|
+
val = node.nodeValue;
|
99
|
+
|
100
|
+
// The new value.
|
101
|
+
new_val = val.replace(search, replace);
|
102
|
+
|
103
|
+
// Only replace text if the new value is actually different!
|
104
|
+
if (new_val !== val) {
|
105
|
+
|
106
|
+
if (!text_only && /</.test(new_val)) {
|
107
|
+
// The new value contains HTML, set it in a slower but far more
|
108
|
+
// robust way.
|
109
|
+
$(node).before(new_val);
|
110
|
+
|
111
|
+
// Don't remove the node yet, or the loop will lose its place.
|
112
|
+
remove.push(node);
|
113
|
+
} else {
|
114
|
+
// The new value contains no HTML, so it can be set in this
|
115
|
+
// very fast, simple way.
|
116
|
+
node.nodeValue = new_val;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
} while (node = node.nextSibling);
|
118
122
|
}
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
remove.length && $(remove).remove();
|
126
|
-
});
|
127
|
-
};
|
128
|
-
|
123
|
+
|
124
|
+
// Time to remove those elements!
|
125
|
+
remove.length && $(remove).remove();
|
126
|
+
});
|
127
|
+
};
|
128
|
+
|
129
129
|
})(jQuery);
|
@@ -1,190 +1,215 @@
|
|
1
1
|
/* jQuery plugin themeswitcher
|
2
|
-
---------------------------------------------------------------------*/
|
3
|
-
$.fn.themeswitcher = function(settings){
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
2
|
+
---------------------------------------------------------------------*/
|
3
|
+
$.fn.themeswitcher = function(settings) {
|
4
|
+
var options = jQuery.extend({
|
5
|
+
loadTheme: null,
|
6
|
+
initialText: 'Switch Theme',
|
7
|
+
width: 150,
|
8
|
+
height: 400,
|
9
|
+
buttonPreText: 'Theme: ',
|
10
|
+
closeOnSelect: true,
|
11
|
+
buttonHeight: 14,
|
12
|
+
cookieName: 'jquery-ui-theme',
|
13
|
+
onOpen: function() {
|
14
|
+
},
|
15
|
+
onClose: function() {
|
16
|
+
},
|
17
|
+
onSelect: function() {
|
18
|
+
}
|
19
|
+
}, settings);
|
17
20
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
//markup
|
22
|
+
var button = $('<a href="#" class="jquery-ui-themeswitcher-trigger"><span class="jquery-ui-themeswitcher-icon"></span><span class="jquery-ui-themeswitcher-title">' + options.initialText + '</span></a>');
|
23
|
+
var switcherpane = $('<div class="jquery-ui-themeswitcher"><div id="themeGallery"> <ul> <li><a href="compiled/jquery/ui/ui-lightness.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_ui_light.png" alt="UI Lightness" title="UI Lightness" /> <span class="themeName">UI lightness</span></a></li> <li><a href="compiled/jquery/ui/ui-darkness.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_ui_dark.png" alt="UI Darkness" title="UI Darkness" /> <span class="themeName">UI darkness</span> </a></li> <li><a href="compiled/jquery/ui/smoothness.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_smoothness.png" alt="Smoothness" title="Smoothness" /> <span class="themeName">Smoothness</span> </a></li> <li><a href="compiled/jquery/ui/start.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_start_menu.png" alt="Start" title="Start" /> <span class="themeName">Start</span></a></li></li> <li><a href="compiled/jquery/ui/redmond.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_windoze.png" alt="Redmond" title="Redmond" /> <span class="themeName">Redmond</span></a></li></li> <li><a href="compiled/jquery/ui/sunny.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_sunny.png" alt="Sunny" title="Sunny" /> <span class="themeName">Sunny</span></a></li></li> <li><a href="compiled/jquery/ui/overcast.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_overcast.png" alt="Overcast" title="Overcast" /> <span class="themeName">Overcast</span></a></li> <li><a href="compiled/jquery/ui/le-frog.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_le_frog.png" alt="Le Frog" title="Le Frog" /> <span class="themeName">Le Frog</span></a></li></li> <li><a href="compiled/jquery/ui/flick.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_flick.png" alt="Flick" title="Flick" /> <span class="themeName">Flick</span></a></li> <li><a href="compiled/jquery/ui/pepper-grinder.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_pepper_grinder.png" alt="Pepper Grinder" title="Pepper Grinder" /> <span class="themeName">Pepper Grinder</span></a></li> <li><a href="compiled/jquery/ui/eggplant.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_eggplant.png" alt="Eggplant" title="Eggplant" /> <span class="themeName">Eggplant</span></a></li> <li><a href="compiled/jquery/ui/dark-hive.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_dark_hive.png" alt="Dark Hive" title="Dark Hive" /> <span class="themeName">Dark Hive</span></a></li></li> <li><a href="compiled/jquery/ui/cupertino.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_cupertino.png" alt="Cupertino" title="Cupertino" /> <span class="themeName">Cupertino</span></a></li> <li><a href="compiled/jquery/ui/south-street.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_south_street.png" alt="South St" title="South St" /> <span class="themeName">South Street</span></a></li> <li><a href="compiled/jquery/ui/blitzer.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_blitzer.png" alt="Blitzer" title="Blitzer" /> <span class="themeName">Blitzer</span></a></li></li> <li><a href="compiled/jquery/ui/humanity.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_humanity.png" alt="Humanity" title="Humanity" /> <span class="themeName">Humanity</span></a></li></li> <li><a href="compiled/jquery/ui/hot-sneaks.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_hot_sneaks.png" alt="Hot Sneaks" title="Hot Sneaks" /> <span class="themeName">Hot sneaks</span></a></li></li> <li><a href="compiled/jquery/ui/excite-bike.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_excite_bike.png" alt="Excite Bike" title="Excite Bike" /> <span class="themeName">Excite Bike</span></a></li> <li><a href="compiled/jquery/ui/vader.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_black_matte.png" alt="Vader" title="Vader" /> <span class="themeName">Vader</span></a></li> <li><a href="compiled/jquery/ui/dot-luv.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_dot_luv.png" alt="Dot Luv" title="Dot Luv" /> <span class="themeName">Dot Luv</span></a></li> <li><a href="compiled/jquery/ui/mint-choc.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_mint_choco.png" alt="Mint Choc" title="Mint Choc" /> <span class="themeName">Mint Choc</span></a></li></li> <li><a href="compiled/jquery/ui/black-tie.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_black_tie.png" alt="Black Tie" title="Black Tie" /> <span class="themeName">Black Tie</span></a></li></li> <li><a href="compiled/jquery/ui/trontastic.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_trontastic.png" alt="Trontastic" title="Trontastic" /><span class="themeName">Trontastic</span></a></li> <li><a href="compiled/jquery/ui/swanky-purse.css"> <img src="/images/jquery/ui/themeSwitcher/theme_90_swanky_purse.png" alt="Swanky Purse" title="Swanky Purse" /> <span class="themeName">Swanky Purse</span></a></li></ul></div></div>').find('div').removeAttr('id');
|
24
|
+
//button events
|
25
|
+
button.click(
|
26
|
+
function() {
|
27
|
+
if (switcherpane.is(':visible')) {
|
28
|
+
switcherpane.spHide();
|
29
|
+
}
|
30
|
+
else {
|
31
|
+
switcherpane.spShow();
|
32
|
+
}
|
33
|
+
return false;
|
34
|
+
}
|
35
|
+
);
|
29
36
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
37
|
+
//menu events (mouseout didn't work...)
|
38
|
+
switcherpane.hover(
|
39
|
+
function() {
|
40
|
+
},
|
41
|
+
function() {
|
42
|
+
if (switcherpane.is(':visible')) {
|
43
|
+
$(this).spHide();
|
44
|
+
}
|
45
|
+
}
|
46
|
+
);
|
35
47
|
|
36
|
-
|
37
|
-
|
38
|
-
|
48
|
+
//show/hide panel functions
|
49
|
+
$.fn.spShow = function() {
|
50
|
+
$(this).css({top: button.offset().top + options.buttonHeight + 6, left: button.offset().left}).slideDown(50);
|
51
|
+
button.css(button_active);
|
52
|
+
options.onOpen();
|
53
|
+
}
|
54
|
+
$.fn.spHide = function() {
|
55
|
+
$(this).slideUp(50, function() {
|
56
|
+
options.onClose();
|
57
|
+
});
|
58
|
+
button.css(button_default);
|
59
|
+
}
|
39
60
|
|
40
61
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
62
|
+
/* Theme Loading
|
63
|
+
---------------------------------------------------------------------*/
|
64
|
+
switcherpane.find('a').click(function() {
|
65
|
+
updateCSS($(this).attr('href'));
|
66
|
+
var themeName = $(this).find('span').text();
|
67
|
+
button.find('.jquery-ui-themeswitcher-title').text(options.buttonPreText + themeName);
|
68
|
+
$.cookie(options.cookieName, themeName);
|
69
|
+
options.onSelect();
|
70
|
+
if (options.closeOnSelect && switcherpane.is(':visible')) {
|
71
|
+
switcherpane.spHide();
|
72
|
+
}
|
73
|
+
return false;
|
74
|
+
});
|
52
75
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
76
|
+
//function to append a new theme stylesheet with the new style changes
|
77
|
+
function updateCSS(locStr) {
|
78
|
+
var cssLink = $('<link href="/stylesheets/' + locStr + '" type="text/css" rel="Stylesheet" class="ui-theme" />');
|
79
|
+
$("head").append(cssLink);
|
57
80
|
|
58
81
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
82
|
+
if ($("link.ui-theme").size() > 3) {
|
83
|
+
$("link.ui-theme:first").remove();
|
84
|
+
}
|
85
|
+
}
|
63
86
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
87
|
+
/* Inline CSS
|
88
|
+
---------------------------------------------------------------------*/
|
89
|
+
var button_default = {
|
90
|
+
fontFamily: 'Trebuchet MS, Verdana, sans-serif',
|
91
|
+
fontSize: '11px',
|
92
|
+
color: '#666',
|
93
|
+
background: '#eee image_url("jquery/ui/themeSwitcher/buttonbg.png") 50% 50% repeat-x',
|
94
|
+
border: '1px solid #ccc',
|
95
|
+
'-moz-border-radius': '6px',
|
96
|
+
'-webkit-border-radius': '6px',
|
97
|
+
textDecoration: 'none',
|
98
|
+
padding: '3px 3px 3px 8px',
|
99
|
+
width: options.width - 11,//minus must match left and right padding
|
100
|
+
display: 'block',
|
101
|
+
height: options.buttonHeight,
|
102
|
+
outline: '0'
|
103
|
+
};
|
104
|
+
var button_hover = {
|
105
|
+
'borderColor':'#bbb',
|
106
|
+
'background': '#f0f0f0',
|
107
|
+
cursor: 'pointer',
|
108
|
+
color: '#444'
|
109
|
+
};
|
110
|
+
var button_active = {
|
111
|
+
color: '#aaa',
|
112
|
+
background: '#000',
|
113
|
+
border: '1px solid #ccc',
|
114
|
+
borderBottom: 0,
|
115
|
+
'-moz-border-radius-bottomleft': 0,
|
116
|
+
'-webkit-border-bottom-left-radius': 0,
|
117
|
+
'-moz-border-radius-bottomright': 0,
|
118
|
+
'-webkit-border-bottom-right-radius': 0,
|
119
|
+
outline: '0'
|
120
|
+
};
|
98
121
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
122
|
+
//button css
|
123
|
+
button.css(button_default)
|
124
|
+
.hover(
|
125
|
+
function() {
|
126
|
+
$(this).css(button_hover);
|
127
|
+
},
|
128
|
+
function() {
|
129
|
+
if (!switcherpane.is(':animated') && switcherpane.is(':hidden')) {
|
130
|
+
$(this).css(button_default);
|
131
|
+
}
|
132
|
+
}
|
133
|
+
)
|
134
|
+
.find('.jquery-ui-themeswitcher-icon').css({
|
135
|
+
'float': 'right',
|
136
|
+
width: '16px',
|
137
|
+
height: '16px',
|
138
|
+
background: 'image_url("jquery/ui/themeSwitcher/icon_color_arrow.gif") 50% 50% no-repeat'
|
139
|
+
});
|
140
|
+
//pane css
|
141
|
+
switcherpane.css({
|
142
|
+
position: 'absolute',
|
143
|
+
'float': 'left',
|
144
|
+
fontFamily: 'Trebuchet MS, Verdana, sans-serif',
|
145
|
+
fontSize: '12px',
|
146
|
+
background: '#000',
|
147
|
+
color: '#fff',
|
148
|
+
padding: '8px 3px 3px',
|
149
|
+
border: '1px solid #ccc',
|
150
|
+
'-moz-border-radius-bottomleft': '6px',
|
151
|
+
'-webkit-border-bottom-left-radius': '6px',
|
152
|
+
'-moz-border-radius-bottomright': '6px',
|
153
|
+
'-webkit-border-bottom-right-radius': '6px',
|
154
|
+
borderTop: 0,
|
155
|
+
zIndex: 999999,
|
156
|
+
width: options.width - 6//minus must match left and right padding
|
157
|
+
})
|
158
|
+
.find('ul').css({
|
159
|
+
listStyle: 'none',
|
160
|
+
margin: '0',
|
161
|
+
padding: '0',
|
162
|
+
overflow: 'auto',
|
163
|
+
height: options.height
|
164
|
+
}).end()
|
165
|
+
.find('li').hover(
|
166
|
+
function() {
|
167
|
+
$(this).css({
|
168
|
+
'borderColor':'#555',
|
169
|
+
'background': 'image_url("jquery/ui/themeSwitcher/menuhoverbg.png") 50% 50% repeat-x',
|
170
|
+
cursor: 'pointer'
|
171
|
+
});
|
172
|
+
},
|
173
|
+
function() {
|
174
|
+
$(this).css({
|
175
|
+
'borderColor':'#111',
|
176
|
+
'background': '#000',
|
177
|
+
cursor: 'auto'
|
178
|
+
});
|
179
|
+
}
|
180
|
+
).css({
|
181
|
+
width: options.width - 30,
|
182
|
+
height: '',
|
183
|
+
padding: '2px',
|
184
|
+
margin: '1px',
|
185
|
+
border: '1px solid #111',
|
186
|
+
'-moz-border-radius': '4px',
|
187
|
+
clear: 'left',
|
188
|
+
'float': 'left'
|
189
|
+
}).end()
|
190
|
+
.find('a').css({
|
191
|
+
color: '#aaa',
|
192
|
+
textDecoration: 'none',
|
193
|
+
'float': 'left',
|
194
|
+
width: '100%',
|
195
|
+
outline: '0'
|
196
|
+
}).end()
|
197
|
+
.find('img').css({
|
198
|
+
'float': 'left',
|
199
|
+
border: '1px solid #333',
|
200
|
+
margin: '0 2px'
|
201
|
+
}).end()
|
202
|
+
.find('.themeName').css({
|
203
|
+
'float': 'left',
|
204
|
+
margin: '3px 0'
|
205
|
+
}).end();
|
181
206
|
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
207
|
+
$(this).append(button);
|
208
|
+
$('body').append(switcherpane);
|
209
|
+
switcherpane.hide();
|
210
|
+
if ($.cookie(options.cookieName) || options.loadTheme) {
|
211
|
+
var themeName = $.cookie(options.cookieName) || options.loadTheme;
|
212
|
+
switcherpane.find('a:contains(' + themeName + ')').trigger('click');
|
213
|
+
}
|
214
|
+
return this;
|
190
215
|
};
|