Skip to content

Commit 7948b93

Browse files
author
Michael Aufreiter
committed
hide search field if searchable: false is passed
1 parent 3f7a9dd commit 7948b93

File tree

3 files changed

+8
-21
lines changed

3 files changed

+8
-21
lines changed

css/ui.multiselect.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
.ui-multiselect ul li span.ui-icon-arrowthick-2-n-s { position: absolute; left: 2px; }
2626
.ui-multiselect ul li a.action { position: absolute; right: 2px; top: 2px; }
2727

28-
.ui-multiselect input.search { height: 14px; padding: 1px; opacity: 0.5; margin: 5px; width: 100px; }
28+
.ui-multiselect input.search { height: 14px; padding: 1px; opacity: 0.5; margin: 4px; width: 100px; }
2929
.ui-multiselect input.waiting { color: #aaa; font-style: italic; }

index.html

+4-19
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<script type="text/javascript" src="js/ui.multiselect.js"></script>
1313
<script type="text/javascript">
1414
$(function(){
15-
$(".multiselect").multiselect({sortable: true});
15+
$(".multiselect").multiselect();
1616
$('#switcher').themeswitcher();
1717
});
1818
</script>
@@ -25,9 +25,11 @@ <h1>jQuery UI Multiselect</h1>
2525
The widget is styleable using <a href="http://jqueryui.com/themeroller/" title="jQuery UI Themeroller">Themeroller</a>.
2626
It works in an <em>unobtrusive</em> fashion, by just turning html multiple select inputs into a sexier equivalent. There's no extra markup needed.
2727
</p><p>
28+
For installation instructions please have a look at the corresponding <a href="http://www.quasipartikel.at/2009/05/10/jqueryui-multiselect/">blogpost</a>.<br/><br/>
29+
2830
The source code is available at <a href="http://github.com/michael/multiselect/" title="Social Coding">Github</a>.<br/><br/>
2931

30-
If you are looking for the original version, it has been moved <a href="http://quasipartikel.at/multiselect_original/">here</a>.
32+
If you are looking for the original version, it has been moved <a href="http://quasipartikel.at/multiselect_original/">here</a>.<br/><br/>
3133
</p>
3234

3335
<h1>Demo</h1>
@@ -145,23 +147,6 @@ <h2>Choose countries</h2>
145147
<option value="VNM">Vietnam</option>
146148
</select>
147149
</form>
148-
<h1>Installation</h1>
149-
<div id="installation">
150-
<p>
151-
...is a cakewalk.
152-
</p><p>
153-
Add the library references.
154-
</p>
155-
<script src="http://gist.github.com/98231.js"></script>
156-
<p>
157-
Define your selectbox having the <em>multiple</em> attribute set.
158-
</p>
159-
<script src="http://gist.github.com/98232.js"></script>
160-
<p>
161-
Invoke the Multiselect Spirits.
162-
</p>
163-
<script src="http://gist.github.com/98234.js"></script>
164-
</div>
165150
<h1>Credits</h1>
166151
<p>My name is <em>Michael Aufreiter</em>. Neither I have a website nor I have my own blog yet.
167152
Fortunately, I'm a member of <a href="http://www.quasipartikel.at">Quasipartikel</a>, a small

js/ui.multiselect.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
*/
2323

2424

25-
2625
/* String.contains - taken from Mootools */
2726
String.prototype.contains = function(string, separator) {
2827
return (separator) ? (separator + this + separator).indexOf(separator + string + separator) > -1 : this.indexOf(string) > -1;
@@ -83,6 +82,9 @@ $.widget("ui.multiselect", {
8382
.parents('form').submit(function(){
8483
return false;
8584
});
85+
} else {
86+
// hide search
87+
$('.search').hide();
8688
}
8789

8890
// batch actions

0 commit comments

Comments
 (0)