Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 338e5cb

Browse files
committed
movied variables in listview filter to camel case convention used elsewhere
1 parent 1b32fdd commit 338e5cb

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

js/jquery.mobile.listview.filter.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,41 @@ $( "[data-role='listview']" ).live( "listviewcreate", function() {
1616
}
1717

1818
var wrapper = $( "<form>", { "class": "ui-listview-filter ui-bar-c", "role": "search" } ),
19-
19+
2020
search = $( "<input>", {
2121
placeholder: "Filter results...",
2222
"data-type": "search"
2323
})
2424
.bind( "keyup change", function() {
2525
var val = this.value.toLowerCase(),
26-
list_items = list.children();
27-
list_items.show();
26+
listItems = list.children();
27+
listItems.show();
2828
if ( val ) {
2929
// This handles hiding regular rows without the text we search for
3030
// and any list dividers without regular rows shown under it
31-
var any_in_the_bucket = false,
31+
var childItems = false,
3232
item;
33-
34-
for (var i = list_items.length; i >= 0; i--) {
35-
item = $(list_items[i]);
33+
34+
for (var i = listItems.length; i >= 0; i--) {
35+
item = $(listItems[i]);
3636
if (item.is("li[data-role=list-divider]")) {
37-
if (!any_in_the_bucket) {
37+
if (!childItems) {
3838
item.hide();
3939
}
4040
// New bucket!
41-
any_in_the_bucket = false;
41+
childItems = false;
4242
} else if (item.text().toLowerCase().indexOf( val ) === -1) {
4343
item.hide();
4444
} else {
4545
// There's a shown item in the bucket
46-
any_in_the_bucket = true;
46+
childItems = true;
4747
}
4848
}
4949
}
50-
51-
//listview._numberItems();
5250
})
5351
.appendTo( wrapper )
5452
.textinput();
55-
53+
5654
wrapper.insertBefore( list );
5755
});
5856

0 commit comments

Comments
 (0)