Skip to content
This repository
Browse code

added search capabilities and more ...

  • Loading branch information...
commit bb31dbbb2cd93bddefceac466571dbd9e8369c05 1 parent f3f3364
authored May 05, 2009
7  MIT-LICENSE.txt
... ...
@@ -1,9 +1,4 @@
1  
-Copyright (c) 2008 Paul Bakaus, http://ui.jquery.com/
2  
-
3  
-This software consists of voluntary contributions made by many
4  
-individuals (AUTHORS.txt, http://ui.jquery.com/about) For exact
5  
-contribution history, see the revision history and logs, available
6  
-at http://jquery-ui.googlecode.com/svn/
  1
+Copyright (c) 2009 Michael Aufreiter, http://www.quasipartikel.at
7 2
 
8 3
 Permission is hereby granted, free of charge, to any person obtaining
9 4
 a copy of this software and associated documentation files (the
BIN  css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
BIN  css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
BIN  css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
BIN  css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
BIN  css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
BIN  css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
BIN  css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
BIN  css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
BIN  css/smoothness/images/ui-icons_222222_256x240.png
BIN  css/smoothness/images/ui-icons_2e83ff_256x240.png
BIN  css/smoothness/images/ui-icons_454545_256x240.png
BIN  css/smoothness/images/ui-icons_888888_256x240.png
BIN  css/smoothness/images/ui-icons_cd0a0a_256x240.png
425  css/smoothness/jquery-ui-1.7.1.custom.css
... ...
@@ -1,425 +0,0 @@
1  
-/*
2  
-* jQuery UI CSS Framework
3  
-* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
4  
-* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
5  
-*/
6  
-
7  
-/* Layout helpers
8  
-----------------------------------*/
9  
-.ui-helper-hidden { display: none; }
10  
-.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
11  
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
12  
-.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
13  
-.ui-helper-clearfix { display: inline-block; }
14  
-/* required comment for clearfix to work in Opera \*/
15  
-* html .ui-helper-clearfix { height:1%; }
16  
-.ui-helper-clearfix { display:block; }
17  
-/* end clearfix */
18  
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
19  
-
20  
-
21  
-/* Interaction Cues
22  
-----------------------------------*/
23  
-.ui-state-disabled { cursor: default !important; }
24  
-
25  
-
26  
-/* Icons
27  
-----------------------------------*/
28  
-
29  
-/* states and images */
30  
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
31  
-
32  
-
33  
-/* Misc visuals
34  
-----------------------------------*/
35  
-
36  
-/* Overlays */
37  
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
38  
-
39  
-/*
40  
-* jQuery UI CSS Framework
41  
-* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
42  
-* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
43  
-* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
44  
-*/
45  
-
46  
-
47  
-/* Component containers
48  
-----------------------------------*/
49  
-.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
50  
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
51  
-.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
52  
-.ui-widget-content a { color: #222222; }
53  
-.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
54  
-.ui-widget-header a { color: #222222; }
55  
-
56  
-/* Interaction states
57  
-----------------------------------*/
58  
-.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; outline: none; }
59  
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; outline: none; }
60  
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; outline: none; }
61  
-.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; outline: none; }
62  
-.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; outline: none; }
63  
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; outline: none; text-decoration: none; }
64  
-
65  
-/* Interaction Cues
66  
-----------------------------------*/
67  
-.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
68  
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; }
69  
-.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
70  
-.ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a; }
71  
-.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; }
72  
-.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
73  
-.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
74  
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
75  
-
76  
-/* Icons
77  
-----------------------------------*/
78  
-
79  
-/* states and images */
80  
-.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
81  
-.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
82  
-.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
83  
-.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
84  
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
85  
-.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
86  
-.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
87  
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
88  
-
89  
-/* positioning */
90  
-.ui-icon-carat-1-n { background-position: 0 0; }
91  
-.ui-icon-carat-1-ne { background-position: -16px 0; }
92  
-.ui-icon-carat-1-e { background-position: -32px 0; }
93  
-.ui-icon-carat-1-se { background-position: -48px 0; }
94  
-.ui-icon-carat-1-s { background-position: -64px 0; }
95  
-.ui-icon-carat-1-sw { background-position: -80px 0; }
96  
-.ui-icon-carat-1-w { background-position: -96px 0; }
97  
-.ui-icon-carat-1-nw { background-position: -112px 0; }
98  
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
99  
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
100  
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
101  
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
102  
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
103  
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
104  
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
105  
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
106  
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
107  
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
108  
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
109  
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
110  
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
111  
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
112  
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
113  
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
114  
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
115  
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
116  
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
117  
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
118  
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
119  
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
120  
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
121  
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
122  
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
123  
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
124  
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
125  
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
126  
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
127  
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
128  
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
129  
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
130  
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
131  
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
132  
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
133  
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
134  
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
135  
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
136  
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
137  
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
138  
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
139  
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
140  
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
141  
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
142  
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
143  
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
144  
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
145  
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
146  
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
147  
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
148  
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
149  
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
150  
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
151  
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
152  
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
153  
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
154  
-.ui-icon-arrow-4 { background-position: 0 -80px; }
155  
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
156  
-.ui-icon-extlink { background-position: -32px -80px; }
157  
-.ui-icon-newwin { background-position: -48px -80px; }
158  
-.ui-icon-refresh { background-position: -64px -80px; }
159  
-.ui-icon-shuffle { background-position: -80px -80px; }
160  
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
161  
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
162  
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
163  
-.ui-icon-folder-open { background-position: -16px -96px; }
164  
-.ui-icon-document { background-position: -32px -96px; }
165  
-.ui-icon-document-b { background-position: -48px -96px; }
166  
-.ui-icon-note { background-position: -64px -96px; }
167  
-.ui-icon-mail-closed { background-position: -80px -96px; }
168  
-.ui-icon-mail-open { background-position: -96px -96px; }
169  
-.ui-icon-suitcase { background-position: -112px -96px; }
170  
-.ui-icon-comment { background-position: -128px -96px; }
171  
-.ui-icon-person { background-position: -144px -96px; }
172  
-.ui-icon-print { background-position: -160px -96px; }
173  
-.ui-icon-trash { background-position: -176px -96px; }
174  
-.ui-icon-locked { background-position: -192px -96px; }
175  
-.ui-icon-unlocked { background-position: -208px -96px; }
176  
-.ui-icon-bookmark { background-position: -224px -96px; }
177  
-.ui-icon-tag { background-position: -240px -96px; }
178  
-.ui-icon-home { background-position: 0 -112px; }
179  
-.ui-icon-flag { background-position: -16px -112px; }
180  
-.ui-icon-calendar { background-position: -32px -112px; }
181  
-.ui-icon-cart { background-position: -48px -112px; }
182  
-.ui-icon-pencil { background-position: -64px -112px; }
183  
-.ui-icon-clock { background-position: -80px -112px; }
184  
-.ui-icon-disk { background-position: -96px -112px; }
185  
-.ui-icon-calculator { background-position: -112px -112px; }
186  
-.ui-icon-zoomin { background-position: -128px -112px; }
187  
-.ui-icon-zoomout { background-position: -144px -112px; }
188  
-.ui-icon-search { background-position: -160px -112px; }
189  
-.ui-icon-wrench { background-position: -176px -112px; }
190  
-.ui-icon-gear { background-position: -192px -112px; }
191  
-.ui-icon-heart { background-position: -208px -112px; }
192  
-.ui-icon-star { background-position: -224px -112px; }
193  
-.ui-icon-link { background-position: -240px -112px; }
194  
-.ui-icon-cancel { background-position: 0 -128px; }
195  
-.ui-icon-plus { background-position: -16px -128px; }
196  
-.ui-icon-plusthick { background-position: -32px -128px; }
197  
-.ui-icon-minus { background-position: -48px -128px; }
198  
-.ui-icon-minusthick { background-position: -64px -128px; }
199  
-.ui-icon-close { background-position: -80px -128px; }
200  
-.ui-icon-closethick { background-position: -96px -128px; }
201  
-.ui-icon-key { background-position: -112px -128px; }
202  
-.ui-icon-lightbulb { background-position: -128px -128px; }
203  
-.ui-icon-scissors { background-position: -144px -128px; }
204  
-.ui-icon-clipboard { background-position: -160px -128px; }
205  
-.ui-icon-copy { background-position: -176px -128px; }
206  
-.ui-icon-contact { background-position: -192px -128px; }
207  
-.ui-icon-image { background-position: -208px -128px; }
208  
-.ui-icon-video { background-position: -224px -128px; }
209  
-.ui-icon-script { background-position: -240px -128px; }
210  
-.ui-icon-alert { background-position: 0 -144px; }
211  
-.ui-icon-info { background-position: -16px -144px; }
212  
-.ui-icon-notice { background-position: -32px -144px; }
213  
-.ui-icon-help { background-position: -48px -144px; }
214  
-.ui-icon-check { background-position: -64px -144px; }
215  
-.ui-icon-bullet { background-position: -80px -144px; }
216  
-.ui-icon-radio-off { background-position: -96px -144px; }
217  
-.ui-icon-radio-on { background-position: -112px -144px; }
218  
-.ui-icon-pin-w { background-position: -128px -144px; }
219  
-.ui-icon-pin-s { background-position: -144px -144px; }
220  
-.ui-icon-play { background-position: 0 -160px; }
221  
-.ui-icon-pause { background-position: -16px -160px; }
222  
-.ui-icon-seek-next { background-position: -32px -160px; }
223  
-.ui-icon-seek-prev { background-position: -48px -160px; }
224  
-.ui-icon-seek-end { background-position: -64px -160px; }
225  
-.ui-icon-seek-first { background-position: -80px -160px; }
226  
-.ui-icon-stop { background-position: -96px -160px; }
227  
-.ui-icon-eject { background-position: -112px -160px; }
228  
-.ui-icon-volume-off { background-position: -128px -160px; }
229  
-.ui-icon-volume-on { background-position: -144px -160px; }
230  
-.ui-icon-power { background-position: 0 -176px; }
231  
-.ui-icon-signal-diag { background-position: -16px -176px; }
232  
-.ui-icon-signal { background-position: -32px -176px; }
233  
-.ui-icon-battery-0 { background-position: -48px -176px; }
234  
-.ui-icon-battery-1 { background-position: -64px -176px; }
235  
-.ui-icon-battery-2 { background-position: -80px -176px; }
236  
-.ui-icon-battery-3 { background-position: -96px -176px; }
237  
-.ui-icon-circle-plus { background-position: 0 -192px; }
238  
-.ui-icon-circle-minus { background-position: -16px -192px; }
239  
-.ui-icon-circle-close { background-position: -32px -192px; }
240  
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
241  
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
242  
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
243  
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
244  
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
245  
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
246  
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
247  
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
248  
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
249  
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
250  
-.ui-icon-circle-check { background-position: -208px -192px; }
251  
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
252  
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
253  
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
254  
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
255  
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
256  
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
257  
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
258  
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
259  
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
260  
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
261  
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
262  
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
263  
-
264  
-
265  
-/* Misc visuals
266  
-----------------------------------*/
267  
-
268  
-/* Corner radius */
269  
-.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; }
270  
-.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; }
271  
-.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; }
272  
-.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
273  
-.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; }
274  
-.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
275  
-.ui-corner-right {  -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
276  
-.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; }
277  
-.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; }
278  
-
279  
-/* Overlays */
280  
-.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
281  
-.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; }/* Accordion
282  
-----------------------------------*/
283  
-.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
284  
-.ui-accordion .ui-accordion-li-fix { display: inline; }
285  
-.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
286  
-.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; }
287  
-.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
288  
-.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; }
289  
-.ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker
290  
-----------------------------------*/
291  
-.ui-datepicker { width: 17em; padding: .2em .2em 0; }
292  
-.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
293  
-.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
294  
-.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
295  
-.ui-datepicker .ui-datepicker-prev { left:2px; }
296  
-.ui-datepicker .ui-datepicker-next { right:2px; }
297  
-.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
298  
-.ui-datepicker .ui-datepicker-next-hover { right:1px; }
299  
-.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }
300  
-.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
301  
-.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
302  
-.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
303  
-.ui-datepicker select.ui-datepicker-month, 
304  
-.ui-datepicker select.ui-datepicker-year { width: 49%;}
305  
-.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
306  
-.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
307  
-.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }
308  
-.ui-datepicker td { border: 0; padding: 1px; }
309  
-.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
310  
-.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
311  
-.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
312  
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
313  
-
314  
-/* with multiple calendars */
315  
-.ui-datepicker.ui-datepicker-multi { width:auto; }
316  
-.ui-datepicker-multi .ui-datepicker-group { float:left; }
317  
-.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
318  
-.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
319  
-.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
320  
-.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
321  
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
322  
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
323  
-.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
324  
-.ui-datepicker-row-break { clear:both; width:100%; }
325  
-
326  
-/* RTL support */
327  
-.ui-datepicker-rtl { direction: rtl; }
328  
-.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
329  
-.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
330  
-.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
331  
-.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
332  
-.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
333  
-.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
334  
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
335  
-.ui-datepicker-rtl .ui-datepicker-group { float:right; }
336  
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
337  
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
338  
-
339  
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
340  
-.ui-datepicker-cover {
341  
-    display: none; /*sorry for IE5*/
342  
-    display/**/: block; /*sorry for IE5*/
343  
-    position: absolute; /*must have*/
344  
-    z-index: -1; /*must have*/
345  
-    filter: mask(); /*must have*/
346  
-    top: -4px; /*must have*/
347  
-    left: -4px; /*must have*/
348  
-    width: 200px; /*must have*/
349  
-    height: 200px; /*must have*/
350  
-}/* Dialog
351  
-----------------------------------*/
352  
-.ui-dialog { position: relative; padding: .2em; width: 300px; }
353  
-.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative;  }
354  
-.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } 
355  
-.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
356  
-.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
357  
-.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
358  
-.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
359  
-.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
360  
-.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
361  
-.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
362  
-.ui-draggable .ui-dialog-titlebar { cursor: move; }
363  
-
364  
-/* Multiselect
365  
-----------------------------------*/
366  
-
367  
-.ui-multiselect { margin:2px 0 30px 10px; border: solid 1px #bbb;}
368  
-.ui-multiselect ul.selected { background: #fff; margin: 0; padding: 0; padding-top: 1px; overflow: auto; list-style: none; border: 0; float:left; position: relative; }
369  
-.ui-multiselect ul.selected li { line-height: 20px; font-size: 11px; }
370  
-.ui-multiselect ul.selected li a { color: #999; text-decoration: none; padding: 0 0 0 20px; display: block; float: left;}
371  
-.ui-multiselect ul.available { padding: 0; padding-top: 1px; overflow: auto; background: #fff; margin: 0; list-style: none; border: 0; float:left; position: relative; border-left: 1px solid #bbb;}
372  
-.ui-multiselect ul.available li { line-height: 20px; font-size: 11px;}
373  
-.ui-multiselect ul.available li a { color: #999; text-decoration: none; padding: 0 0 0 20px; display: block; float: left;}
374  
-.ui-state-default { border: none; position: relative; padding-left: 20px; border-bottom: 1px solid #ccc;}
375  
-.ui-state-hover { border: none; border-bottom: 1px solid #ccc; }
376  
-.ui-multiselect ul li span.ui-icon-arrowthick-2-n-s { position: absolute; left: 2px;}
377  
-.ui-multiselect ul li a.action { position: absolute; right: 2px; top: 2px; }
378  
-
379  
-
380  
-/* Progressbar
381  
-----------------------------------*/
382  
-.ui-progressbar { height:2em; text-align: left; }
383  
-.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
384  
-/* Resizable
385  
-----------------------------------*/
386  
-.ui-resizable { position: relative;}
387  
-.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
388  
-.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
389  
-.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; }
390  
-.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; }
391  
-.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; }
392  
-.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; }
393  
-.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
394  
-.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
395  
-.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
396  
-.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}
397  
-/* Slider
398  
-----------------------------------*/
399  
-.ui-slider { position: relative; text-align: left; }
400  
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
401  
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
402  
-
403  
-.ui-slider-horizontal { height: .8em; }
404  
-.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
405  
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
406  
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
407  
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
408  
-
409  
-.ui-slider-vertical { width: .8em; height: 100px; }
410  
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
411  
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
412  
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
413  
-.ui-slider-vertical .ui-slider-range-max { top: 0; }
414  
-/* Tabs
415  
-----------------------------------*/
416  
-.ui-tabs { padding: .2em; zoom: 1; }
417  
-.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
418  
-.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; }
419  
-.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
420  
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; }
421  
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
422  
-.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } 
423  
-/* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
424  
-.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
425  
-.ui-tabs .ui-tabs-hide { display: none !important; }
29  css/ui.multiselect.css
... ...
@@ -0,0 +1,29 @@
  1
+/* Multiselect
  2
+----------------------------------*/
  3
+
  4
+.ui-multiselect { margin:2px 0 30px 10px; border: solid 1px; font-size: 0.8em; }
  5
+.ui-multiselect ul { -moz-user-select: none; }
  6
+.ui-multiselect ul li { cursor: default; line-height: 20px; height: 20px; font-size: 11px; }
  7
+.ui-multiselect ul li a { color: #999; text-decoration: none; padding: 0; display: block; float: left; cursor: pointer;}
  8
+.ui-multiselect div.selected { padding: 0; margin: 0; border: 0; float:left; position: relative; }
  9
+
  10
+.ui-multiselect ul.selected { padding: 0; overflow: auto; background: #fff; margin: 0; list-style: none; border: 0; position: relative; width: 100%; }
  11
+.ui-multiselect ul.selected li { }
  12
+.ui-multiselect div.available { padding: 0; margin: 0; border: 0; float:left; position: relative; border-left: 1px solid; }
  13
+.ui-multiselect ul.available { padding: 0; overflow: auto; background: #fff; margin: 0; list-style: none; border: 0; position: relative; width: 100%; }
  14
+.ui-multiselect ul.available li { padding-left: 10px; }
  15
+
  16
+.ui-multiselect .ui-state-default { border: none; margin-bottom: 1px; position: relative; padding-left: 20px;}
  17
+.ui-multiselect .ui-state-hover { border: none; }
  18
+.ui-multiselect .ui-widget-header {border: none; font-size: 11px; margin-bottom: 1px;}
  19
+
  20
+.ui-multiselect .add-all { float: right; padding: 7px;}
  21
+.ui-multiselect .remove-all { float: right; padding: 7px;}
  22
+.ui-multiselect .search-form { float: left; padding: 4px;}
  23
+.ui-multiselect .count { float: left; padding: 7px;}
  24
+
  25
+.ui-multiselect ul li span.ui-icon-arrowthick-2-n-s { position: absolute; left: 2px; }
  26
+.ui-multiselect ul li a.action { position: absolute; right: 2px; top: 2px; }
  27
+
  28
+.ui-multiselect input.search { height: 14px; padding: 1px; opacity: 0.5; margin: 0; width: 100px; }
  29
+.ui-multiselect input.waiting { color: #aaa; font-style: italic; }
137  index.html
@@ -3,17 +3,20 @@
3 3
 <head>
4 4
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 5
   <title>jQuery UI Multiselect</title>
6  
-  <link type="text/css" href="css/smoothness/jquery-ui-1.7.1.custom.css" rel="stylesheet" />
  6
+  <link type="text/css" rel="stylesheet" href="http://jqueryui.com/themes/base/ui.all.css" />
  7
+  <link type="text/css" href="css/ui.multiselect.css" rel="stylesheet" />
  8
+  
7 9
   <link type="text/css" href="css/page.css" rel="stylesheet" />	
8 10
   <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
9 11
   <script type="text/javascript" src="js/jquery-ui-1.7.1.custom.min.js"></script>
10 12
   <script type="text/javascript" src="js/ui.multiselect.js"></script>
11 13
   <script type="text/javascript">
12  
-  $(function(){
13  
-    // Multiselect
14  
-    $(".multiselect").multiselect({sortable: true});
15  
-  });
  14
+    $(function(){
  15
+      $(".multiselect").multiselect({sortable: true});
  16
+      $('#switcher').themeswitcher();
  17
+    });
16 18
   </script>
  19
+  
17 20
 </head>
18 21
 <body>
19 22
   <h1>jQuery UI Multiselect</h1>
@@ -27,19 +30,119 @@
27 30
   
28 31
   <h1>Demo</h1>
29 32
   
30  
-  <h2>Choose your weapons</h2>
31  
-  <select id="weapons" class="multiselect" multiple="multiple" name="weapons[]">
32  
-    <option value="boomerang">Boomerang</option>
33  
-    <option value="medieval_knive">Medieval Knive</option>
34  
-    <option selected="selected" value="ninja_star">Ninja Star</option>
35  
-    <option value="dragon_blades">Dragon Blades</option>
36  
-    <option selected="selected" value="warrior_sword">Warrior Sword</option>
37  
-    <option value="machine_gun">Machine Gun</option>
38  
-    <option selected="selected" value="tomato">Tomato</option>
39  
-    <option value="axe">Axe</option>
40  
-    <option value="jedi_sword">Jedi Sword</option>
41  
-  </select>
  33
+  <script type="text/javascript"
  34
+    src="http://jqueryui.com/themeroller/themeswitchertool/">
  35
+  </script>
  36
+  <div id="switcher"></div>
  37
+  
  38
+  <h2>Choose countries</h2>
  39
+  <form action="index.html">
  40
+    <select id="countries" class="multiselect" multiple="multiple" name="countries[]">
  41
+      <option value="AFG">Afghanistan</option>
  42
+      <option value="ALB">Albania</option>
  43
+      <option value="DZA">Algeria</option>
  44
+      <option value="AND">Andorra</option>
  45
+      <option value="ARG">Argentina</option>
  46
+      <option value="ARM">Armenia</option>
  47
+      <option value="ABW">Aruba</option>
  48
+      <option value="AUS">Australia</option>
  49
+      <option value="AUT" selected="selected">Austria</option>
  50
+
  51
+      <option value="AZE">Azerbaijan</option>
  52
+      <option value="BGD">Bangladesh</option>
  53
+      <option value="BLR">Belarus</option>
  54
+      <option value="BEL">Belgium</option>
  55
+      <option value="BIH">Bosnia and Herzegovina</option>
  56
+      <option value="BRA">Brazil</option>
  57
+      <option value="BRN">Brunei</option>
  58
+      <option value="BGR">Bulgaria</option>
  59
+      <option value="CAN">Canada</option>
  60
+
  61
+      <option value="CHN">China</option>
  62
+      <option value="COL">Colombia</option>
  63
+      <option value="HRV">Croatia</option>
  64
+      <option value="CYP">Cyprus</option>
  65
+      <option value="CZE">Czech Republic</option>
  66
+      <option value="DNK">Denmark</option>
  67
+      <option value="EGY">Egypt</option>
  68
+      <option value="EST">Estonia</option>
  69
+      <option value="FIN">Finland</option>
  70
+
  71
+      <option value="FRA">France</option>
  72
+      <option value="GEO">Georgia</option>
  73
+      <option value="DEU" selected="selected">Germany</option>
  74
+      <option value="GRC">Greece</option>
  75
+      <option value="HKG">Hong Kong</option>
  76
+      <option value="HUN">Hungary</option>
  77
+      <option value="ISL">Iceland</option>
  78
+      <option value="IND">India</option>
  79
+      <option value="IDN">Indonesia</option>
  80
+
  81
+      <option value="IRN">Iran</option>
  82
+      <option value="IRL">Ireland</option>
  83
+      <option value="ISR">Israel</option>
  84
+      <option value="ITA">Italy</option>
  85
+      <option value="JPN">Japan</option>
  86
+      <option value="JOR">Jordan</option>
  87
+      <option value="KAZ">Kazakhstan</option>
  88
+      <option value="KWT">Kuwait</option>
  89
+      <option value="KGZ">Kyrgyzstan</option>
  90
+
  91
+      <option value="LVA">Latvia</option>
  92
+      <option value="LBN">Lebanon</option>
  93
+      <option value="LIE">Liechtenstein</option>
  94
+      <option value="LTU">Lithuania</option>
  95
+      <option value="LUX">Luxembourg</option>
  96
+      <option value="MAC">Macau</option>
  97
+      <option value="MKD">Macedonia</option>
  98
+      <option value="MYS">Malaysia</option>
  99
+      <option value="MLT">Malta</option>
  100
+
  101
+      <option value="MEX">Mexico</option>
  102
+      <option value="MDA">Moldova</option>
  103
+      <option value="MNG">Mongolia</option>
  104
+      <option value="NLD" selected="selected">Netherlands</option>
  105
+      <option value="NZL">New Zealand</option>
  106
+      <option value="NGA">Nigeria</option>
  107
+      <option value="NOR">Norway</option>
  108
+      <option value="PER">Peru</option>
  109
+      <option value="PHL">Philippines</option>
  110
+
  111
+      <option value="POL">Poland</option>
  112
+      <option value="PRT">Portugal</option>
  113
+      <option value="QAT">Qatar</option>
  114
+      <option value="ROU">Romania</option>
  115
+      <option value="RUS">Russia</option>
  116
+      <option value="SMR">San Marino</option>
  117
+      <option value="SAU">Saudi Arabia</option>
  118
+      <option value="CSG">Serbia and Montenegro</option>
  119
+      <option value="SGP">Singapore</option>
  120
+
  121
+      <option value="SVK">Slovakia</option>
  122
+      <option value="SVN">Slovenia</option>
  123
+      <option value="ZAF">South Africa</option>
  124
+      <option value="KOR">South Korea</option>
  125
+      <option value="ESP">Spain</option>
  126
+      <option value="LKA">Sri Lanka</option>
  127
+      <option value="SWE">Sweden</option>
  128
+      <option value="CHE">Switzerland</option>
  129
+      <option value="SYR">Syria</option>
  130
+
  131
+      <option value="TWN">Taiwan</option>
  132
+      <option value="TJK">Tajikistan</option>
  133
+      <option value="THA">Thailand</option>
  134
+      <option value="TUR">Turkey</option>
  135
+      <option value="TKM">Turkmenistan</option>
  136
+      <option value="UKR">Ukraine</option>
  137
+      <option value="ARE">United Arab Emirates</option>
  138
+      <option value="GBR">United Kingdom</option>
  139
+      <option value="USA" selected="selected">United States</option>
42 140
 
  141
+      <option value="UZB">Uzbekistan</option>
  142
+      <option value="VAT">Vatican City</option>
  143
+      <option value="VNM">Vietnam</option>
  144
+    </select>
  145
+  </form>
43 146
 
44 147
   <h1>Installation</h1>
45 148
   <div id="installation">
328  js/ui.multiselect.js
... ...
@@ -1,29 +1,139 @@
1 1
 /*
2 2
  * jQuery UI Multiselect
3 3
  *
4  
- * Copyright (c) 2008 Michael Aufreiter (quasipartikel.at)
  4
+ * Authors:
  5
+ *	Michael Aufreiter (quasipartikel.at)
  6
+ *  Yanick Rochon (yanick.rochon[at]gmail[dot]com)
  7
+ * 
5 8
  * Dual licensed under the MIT (MIT-LICENSE.txt)
6 9
  * and GPL (GPL-LICENSE.txt) licenses.
7 10
  * 
8 11
  * http://www.quasipartikel.at/multiselect/
9 12
  *
  13
+ * 
10 14
  * Depends:
11 15
  *	ui.core.js
12 16
  *	ui.sortable.js
  17
+ * 
  18
+ * Todo:
  19
+ *  use Element storage to avoid circular references
  20
+ *  $('selector').data()....
  21
+ *  Make batch actions faster
13 22
  */
  23
+
  24
+
  25
+// qs_score - Quicksilver Score
  26
+// 
  27
+// A port of the Quicksilver string ranking algorithm
  28
+// 
  29
+// "hello world".score("axl") //=> 0.0
  30
+// "hello world".score("ow") //=> 0.6
  31
+// "hello world".score("hello world") //=> 1.0
  32
+//
  33
+// Tested in Firefox 2 and Safari 3
  34
+//
  35
+// The Quicksilver code is available here
  36
+// http://code.google.com/p/blacktree-alchemy/
  37
+// http://blacktree-alchemy.googlecode.com/svn/trunk/Crucible/Code/NSString+BLTRRanking.m
  38
+//
  39
+// The MIT License
  40
+// 
  41
+// Copyright (c) 2008 Lachie Cox
  42
+// 
  43
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  44
+// of this software and associated documentation files (the "Software"), to deal
  45
+// in the Software without restriction, including without limitation the rights
  46
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  47
+// copies of the Software, and to permit persons to whom the Software is
  48
+// furnished to do so, subject to the following conditions:
  49
+// 
  50
+// The above copyright notice and this permission notice shall be included in
  51
+// all copies or substantial portions of the Software.
  52
+// 
  53
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  54
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  55
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  56
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  57
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  58
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  59
+// THE SOFTWARE.
  60
+
  61
+
  62
+String.prototype.score = function(abbreviation,offset) {
  63
+  offset = offset || 0 // TODO: I think this is unused... remove
  64
+
  65
+  if(abbreviation.length == 0) return 0.9
  66
+  if(abbreviation.length > this.length) return 0.0
  67
+
  68
+  for (var i = abbreviation.length; i > 0; i--) {
  69
+    var sub_abbreviation = abbreviation.substring(0,i)
  70
+    var index = this.indexOf(sub_abbreviation)
  71
+
  72
+
  73
+    if(index < 0) continue;
  74
+    if(index + abbreviation.length > this.length + offset) continue;
  75
+
  76
+    var next_string       = this.substring(index+sub_abbreviation.length)
  77
+    var next_abbreviation = null
  78
+
  79
+    if(i >= abbreviation.length)
  80
+      next_abbreviation = ''
  81
+    else
  82
+      next_abbreviation = abbreviation.substring(i)
  83
+
  84
+    var remaining_score   = next_string.score(next_abbreviation,offset+index)
  85
+
  86
+    if (remaining_score > 0) {
  87
+      var score = this.length-next_string.length;
  88
+
  89
+      if(index != 0) {
  90
+        var j = 0;
  91
+
  92
+        var c = this.charCodeAt(index-1)
  93
+        if(c==32 || c == 9) {
  94
+          for(var j=(index-2); j >= 0; j--) {
  95
+            c = this.charCodeAt(j)
  96
+            score -= ((c == 32 || c == 9) ? 1 : 0.15)
  97
+          }
  98
+
  99
+          // XXX maybe not port this heuristic
  100
+          // 
  101
+          //          } else if ([[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember:[self characterAtIndex:matchedRange.location]]) {
  102
+          //            for (j = matchedRange.location-1; j >= (int) searchRange.location; j--) {
  103
+          //              if ([[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember:[self characterAtIndex:j]])
  104
+          //                score--;
  105
+          //              else
  106
+          //                score -= 0.15;
  107
+          //            }
  108
+        } else {
  109
+          score -= index
  110
+        }
  111
+      }
  112
+
  113
+      score += remaining_score * next_string.length
  114
+      score /= this.length;
  115
+      return score
  116
+    }
  117
+  }
  118
+  return 0.0
  119
+};
14 120
  
15 121
 
16 122
 (function($) {
17 123
 
18 124
 $.widget("ui.multiselect", {
19 125
   _init: function() {
20  
-	
21 126
 		// hide this.element
22 127
 		this.element.hide();
23 128
 		this.id = this.element.attr("id");
24  
-		this.container = $('<div class="ui-multiselect ui-helper-clearfix"></div>').insertAfter(this.element);
25  
-		this.selectedList = $('<ul class="selected"></ul>').appendTo(this.container);
26  
-		this.availableList = $('<ul class="available"></ul>').appendTo(this.container);
  129
+		this.container = $('<div class="ui-multiselect ui-helper-clearfix ui-widget"></div>').insertAfter(this.element);
  130
+		this.count = 0; // number of currently selected options
  131
+		this.selectedContainer = $('<div class="selected"></div>').appendTo(this.container);
  132
+		this.availableContainer = $('<div class="available"></div>').appendTo(this.container);
  133
+		this.selectedActions = $('<div class="actions ui-widget-header ui-helper-clearfix"><span class="count">0 items selected</span><a href="#" class="remove-all">Remove All</a></div>').appendTo(this.selectedContainer);
  134
+		this.availableActions = $('<div class="actions ui-widget-header ui-helper-clearfix"><form method="get" class="search-form"><input type="text" class="search ui-widget-content ui-corner-all"/></form><a href="#" class="add-all">Add All</a></div>').appendTo(this.availableContainer);
  135
+		this.selectedList = $('<ul class="selected"></ul>').bind('selectstart', function(){return false;}).appendTo(this.selectedContainer);
  136
+		this.availableList = $('<ul class="available"></ul>').bind('selectstart', function(){return false;}).appendTo(this.availableContainer);
27 137
 		
28 138
 		var that = this;
29 139
 
@@ -35,14 +145,20 @@ $.widget("ui.multiselect", {
35 145
 		this.selectedList.height(this.element.height());
36 146
 		this.availableList.height(this.element.height());
37 147
 		
38  
-		this.populateLists();		
  148
+		if ( !this.options.animated ) {
  149
+			this.options.show = 'show';
  150
+			this.options.hide = 'hide';
  151
+		}
  152
+		
  153
+		// init lists
  154
+		this._populateLists(this.element.find('option'));
39 155
 		
40 156
 		// register events
41  
-		this.registerAddEvents(this.availableList.find('a.action'));
42  
-		this.registerRemoveEvents(this.selectedList.find('a.action'));
  157
+		this._registerAddEvents(this.availableList.find('a.action'));
  158
+		this._registerRemoveEvents(this.selectedList.find('a.action'));
43 159
 		
  160
+		// make selection sortable
44 161
 		if (this.options.sortable) {
45  
-			// make current selection sortable
46 162
 			$(this.selectedList).sortable({
47 163
 			  containment: 'parent',
48 164
 			  update: function(event, ui) {
@@ -53,6 +169,33 @@ $.widget("ui.multiselect", {
53 169
 			  }
54 170
 			});
55 171
 		}
  172
+		
  173
+		// set up livesearch
  174
+		if (this.options.searchable) {
  175
+			this.availableContainer.find('input.search')
  176
+				.keyup(function() {
  177
+					that._filter.apply(this, [that.availableList]);
  178
+				}).keyup()
  179
+				.parents('form').submit(function(){
  180
+					return false;
  181
+				});
  182
+		}
  183
+		
  184
+		// remove-all
  185
+		$(".remove-all").click(function() {
  186
+			that.selectedList.find('li').each(function() { that._setSelected($(this), false);	});
  187
+			that.count = 0;
  188
+			that._updateCount();
  189
+			return false;
  190
+		});
  191
+		
  192
+		// add-all
  193
+		$(".add-all").click(function() {
  194
+			that.availableList.find('li').each(function() { that._setSelected($(this), true); });
  195
+			that.count = that.element.find('option').size();
  196
+			that._updateCount();
  197
+			return false;
  198
+		});
56 199
   },
57 200
 	destroy: function() {
58 201
 		this.element.show();
@@ -60,93 +203,152 @@ $.widget("ui.multiselect", {
60 203
 
61 204
 		$.widget.prototype.destroy.apply(this, arguments);
62 205
 	},
63  
-  populateLists: function() {
  206
+  _populateLists: function(options) {
64 207
     this.selectedList.empty();
65 208
     this.availableList.empty();
  209
+		this.selectedList.children('*').each(function() { this.itemLink = null; }); // cleanup
66 210
     
67 211
     var that = this;
68  
-    this.element.find('option').each(function(i) {
69  
-	
70  
-      var item = $('<li class="ui-state-default"> \
71  
-										<span class="ui-icon"/> \
72  
-										'+$(this).text()+'\
73  
-										<a href="#" class="action"><span class="ui-corner-all ui-icon"/></a> \
74  
-										</li>').appendTo(that.availableList);
75  
-										
76  
-      item.appendTo(this.selected ? that.selectedList : that.availableList);
77  
-			
78  
-      // store the index as a property
79  
-      item[0].optionLink = this;
80  
-			that.applyItemState(item[0]);
81  
-    });
82  
-
  212
+    var items = $(options.map(function(i) {
  213
+      var item = that._getOptionNode(this).appendTo(this.selected ? that.selectedList : that.availableList).show();
  214
+			if (this.selected) that.count += 1;
  215
+			that._applyItemState(item);
  216
+			item[0].idx = i;
  217
+			return item[0];
  218
+    }));
  219
+		
  220
+		this._registerHoverEvents(this.container.find('li'));
83 221
 		
84  
-		this.registerHoverEvents(this.container.find('li'));
  222
+		// update count
  223
+		this._updateCount();
85 224
   },
86  
-	applyItemState: function(item) {
87  
-		if (item.optionLink.selected) {
88  
-			$(item).removeClass('ui-priority-secondary');
  225
+	_updateCount: function() {
  226
+		this.selectedContainer.find('span.count').text(this.count+" items selected");
  227
+	},
  228
+	_getOptionNode: function(option) {
  229
+		var node = $('<li class="ui-state-default"> \
  230
+			<span class="ui-icon"/> \
  231
+			'+$(option).text()+'\
  232
+			<a href="#" class="action"><span class="ui-corner-all ui-icon"/></a> \
  233
+			</li>').hide();
  234
+		node[0].optionLink = option;
  235
+		return node;
  236
+	},
  237
+	_setSelected: function(item, selected) {
  238
+		try {
  239
+			item[0].optionLink.selected = selected;
  240
+		} catch (e) {
  241
+			/* @HACK: ignore - IE6 complaints for norhing as the attribute was indeed properly set! (yr - 2009-04-28) */
  242
+		}
  243
+
  244
+		if ( selected ) {
  245
+			// clone the item
  246
+			var selectedItem = item.clone(); selectedItem[0].optionLink = item[0].optionLink; selectedItem[0].idx = item[0].idx;
  247
+			item[this.options.hide](this.options.animated, function() { $(this).remove(); });
  248
+			selectedItem.appendTo(this.selectedList).hide()[this.options.show](this.options.animated);
  249
+			
  250
+			this._applyItemState(selectedItem);
  251
+			this._registerHoverEvents(selectedItem);
  252
+			this._registerRemoveEvents(selectedItem.find('a.action'));
  253
+
  254
+		} else {
  255
+			
  256
+			// look for successor based on initial option index
  257
+			var items = this.availableList.find('li');
  258
+			var succ = null; var i = 0;
  259
+			while (i<items.length) {
  260
+				if ((i==0 && items[i].idx > item[0].idx) || ((items[i].idx > item[0].idx) && (items[i-1].idx < item[0].idx))) {
  261
+					succ = items[i];
  262
+					break;
  263
+				}
  264
+				i++;
  265
+			}
  266
+			
  267
+			// clone the item
  268
+			var availableItem = item.clone(); availableItem[0].optionLink = item[0].optionLink; availableItem[0].idx = item[0].idx;
  269
+			succ ? availableItem.insertBefore($(succ)) : availableItem.appendTo(this.availableList);
  270
+			item[this.options.hide](this.options.animated, function() { $(this).remove(); });
  271
+			availableItem.hide()[this.options.show](this.options.animated);
  272
+			
  273
+			this._applyItemState(availableItem);
  274
+			this._registerHoverEvents(availableItem);
  275
+			this._registerAddEvents(availableItem.find('a.action'));
  276
+		}
  277
+	},
  278
+	_applyItemState: function(item) {
  279
+		if (item[0].optionLink.selected) {
  280
+			// item.removeClass('ui-priority-secondary');
89 281
 			if (this.options.sortable)
90  
-				$(item).find('span:first').addClass('ui-icon-arrowthick-2-n-s').removeClass('ui-helper-hidden').addClass('ui-icon');
  282
+				item.find('span:first').addClass('ui-icon-arrowthick-2-n-s').removeClass('ui-helper-hidden').addClass('ui-icon');
91 283
 			else
92  
-				$(item).find('span:first').removeClass('ui-icon-arrowthick-2-n-s').addClass('ui-helper-hidden').removeClass('ui-icon');
93  
-			$(item).find('a.action span').addClass('ui-icon-minus').removeClass('ui-icon-plus');
  284
+				item.find('span:first').removeClass('ui-icon-arrowthick-2-n-s').addClass('ui-helper-hidden').removeClass('ui-icon');
  285
+			item.find('a.action span').addClass('ui-icon-minus').removeClass('ui-icon-plus');
94 286
 		} else {
95  
-			$(item).addClass('ui-priority-secondary');
96  
-			$(item).find('span:first').removeClass('ui-icon-arrowthick-2-n-s').addClass('ui-helper-hidden').removeClass('ui-icon');
97  
-			$(item).find('a.action span').addClass('ui-icon-plus').removeClass('ui-icon-minus');
  287
+			// item.addClass('ui-priority-secondary');
  288
+			item.find('span:first').removeClass('ui-icon-arrowthick-2-n-s').addClass('ui-helper-hidden').removeClass('ui-icon');
  289
+			item.find('a.action span').addClass('ui-icon-plus').removeClass('ui-icon-minus');
98 290
 		}
99 291
 	},
100  
-	registerHoverEvents: function(elements) {
101  
-		// extract this
102  
-		elements.removeClass('ui-state-hover');
  292
+	// taken from John Resig's liveUpdate script
  293
+	_filter: function(list) {
  294
+		var rows = list.children('li'),
  295
+			cache = rows.map(function(){
  296
+				return this.innerHTML.toLowerCase();
  297
+			});
103 298
 		
  299
+		var term = $.trim( $(this).val().toLowerCase() ), scores = [];
  300
+
  301
+		if ( !term ) {
  302
+			rows.show();
  303
+		} else {
  304
+			rows.hide();
  305
+
  306
+			cache.each(function(i) {
  307
+				var score = this.score(term);
  308
+				if (score > 0) { scores.push([score, i]); }
  309
+			});
  310
+
  311
+			$.each(scores.sort(function(a, b){return b[0] - a[0];}), function() {
  312
+				$(rows[ this[1] ]).show();
  313
+			});
  314
+		}
  315
+	},
  316
+	_registerHoverEvents: function(elements) {
  317
+		elements.removeClass('ui-state-hover');
104 318
 		elements.mouseover(function() {
105 319
 			$(this).addClass('ui-state-hover');
106 320
 		});
107  
-		
108 321
 		elements.mouseout(function() {
109 322
 			$(this).removeClass('ui-state-hover');
110 323
 		});
111 324
 	},
112  
-  registerAddEvents: function(elements) {
  325
+	_registerAddEvents: function(elements) {
113 326
     var that = this;
114 327
     elements.click(function() {
115  
-      // select the corresponding option
116  
-      option = $(this).parent()[0].optionLink;
117  
-      option.selected = true;
118  
-      $(option).remove().appendTo(that.element);
119  
-      
120  
-      // move element to selectedList and reregister events
121  
-      var li = $(this).parent().remove().appendTo(that.selectedList);
122  
-			that.applyItemState(li[0]);
123  
-			
124  
-      that.registerRemoveEvents($(this));
125  
-			that.registerHoverEvents(li);
  328
+			var item = that._setSelected($(this).parent(), true);
  329
+			that.count += 1;
  330
+			that._updateCount();
126 331
 			return false;
127 332
     });
128  
-
129 333
   },
130  
-  registerRemoveEvents: function(elements) {
  334
+  _registerRemoveEvents: function(elements) {
131 335
     var that = this;
132 336
     elements.click(function() {
133  
-			
134  
-      // deselect the corresponding option
135  
-      $(this).parent()[0].optionLink.selected = false;
136  
-      // move element to availableList and reregister events
137  
-      var li = $(this).parent().remove().appendTo(that.availableList);
138  
-			that.applyItemState(li[0]);
139  
-      that.registerAddEvents($(this));
140  
-			that.registerHoverEvents(li);
  337
+			that._setSelected($(this).parent(), false);
  338
+			that.count -= 1;
  339
+			that._updateCount();
141 340
 			return false;
142 341
     });
143 342
   }
144 343
 });
145 344
 		
146 345
 $.extend($.ui.multiselect, {
147  
-	getter: "value",
148 346
 	defaults: {
149  
-		sortable: false
  347
+		sortable: true,
  348
+		searchable: true,
  349
+		animated: 'fast',
  350
+		show: 'slideDown',
  351
+		hide: 'slideUp'
150 352
 	}
151 353
 });
152 354
 	

0 notes on commit bb31dbb

Please sign in to comment.
Something went wrong with that request. Please try again.