Permalink
Browse files

added list filterTheme option. Available as data attribute data-filte…

…r-theme on listviews with filters enabled. Fixes #1790 - List view filter can not be themed.

Thanks for the idea @adamvaughan! Docs update coming next.
  • Loading branch information...
1 parent 5950adf commit 093fc46fdcf2bc57c10666d90790fc73f4374b66 scottjehl committed Jun 17, 2011
Showing with 3 additions and 2 deletions.
  1. +1 −1 docs/lists/lists-search-with-dividers.html
  2. +2 −1 js/jquery.mobile.listview.filter.js
@@ -19,7 +19,7 @@
</div><!-- /header -->
<div data-role="content">
- <ul data-role="listview" data-filter="true" data-filter-placeholder="Search people...">
+ <ul data-role="listview" data-filter="true" data-filter-placeholder="Search people..." data-filter-theme="b">
<li data-role="list-divider">A</li>
<li><a href="index.html">Adam Kinkaid</a></li>
<li><a href="index.html">Alex Wickerham</a></li>
@@ -8,6 +8,7 @@
$.mobile.listview.prototype.options.filter = false;
$.mobile.listview.prototype.options.filterPlaceholder = "Filter items...";
+$.mobile.listview.prototype.options.filterTheme = "c";
$( ":jqmData(role='listview')" ).live( "listviewcreate", function() {
var list = $( this ),
@@ -17,7 +18,7 @@ $( ":jqmData(role='listview')" ).live( "listviewcreate", function() {
return;
}
- var wrapper = $( "<form>", { "class": "ui-listview-filter ui-bar-c", "role": "search" } ),
+ var wrapper = $( "<form>", { "class": "ui-listview-filter ui-bar-" + listview.options.filterTheme, "role": "search" } ),
search = $( "<input>", {
placeholder: listview.options.filterPlaceholder

0 comments on commit 093fc46

Please sign in to comment.