mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-04 12:54:41 +00:00
inputs with type=search now get turned into search widgets. Their type then degrades to "text" . Demos updated to match changes.
This commit is contained in:
parent
160777a83a
commit
c5ceff745c
5 changed files with 6 additions and 6 deletions
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<form method="get" action="_searchresult.html" data-role="ajaxform">
|
||||
<label for="term" data-role="nojs">Search:</label>
|
||||
<input type="text" name="term" id="term" placeholder="search..." data-role="search" />
|
||||
<input type="search" name="term" id="term" placeholder="search..." />
|
||||
<button type="submit" data-role="nojs">Search</button>
|
||||
</form>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<form method="get" action="_search-results.html" data-role="ajaxform">
|
||||
<label for="term" data-role="nojs">Search:</label>
|
||||
<input type="text" name="term" id="term" placeholder="search..." data-role="search" />
|
||||
<input type="search" name="term" id="term" placeholder="search..." />
|
||||
<button type="submit" data-role="nojs">Search</button>
|
||||
</form>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<div data-role="content" class="ui-body-b">
|
||||
<form method="get" action="" data-role="autoform">
|
||||
<label for="term" data-role="nojs">Search:</label>
|
||||
<input type="number" name="term" id="term" placeholder="search..." data-role="search" value="1" />
|
||||
<input type="search" name="term" id="term" placeholder="search..." value="1" />
|
||||
</form>
|
||||
<div class="ui-content">
|
||||
<ul id="conversions" data-role="listview" data-inset="true"></ul>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ jQuery.fn.customTextInput = function(options){
|
|||
var input = $(this);
|
||||
|
||||
var o = $.extend({
|
||||
search: input.is('[data-role="search"]')
|
||||
search: input.is('[type="search"],[data-type="search"]')
|
||||
//defaultTheme: "a"
|
||||
}, options);
|
||||
|
||||
|
|
|
|||
|
|
@ -286,14 +286,14 @@
|
|||
$el.find('[data-role="nojs"]').addClass('ui-nojs');
|
||||
|
||||
//replace HTML5 input types that have crap browser implementations
|
||||
$el.find('input[type=number],input[type=range],input[type=tel],input[type=url],input[type=email],input[type=date]').each(function(){
|
||||
$el.find('input[type=number],input[type=range],input[type=tel],input[type=url],input[type=email],input[type=date],input[type=search]').each(function(){
|
||||
$(this).replaceWith( $( '<div>' ).html( $(this).clone() ).html().replace(/type="([a-zA-Z]+)"/, 'type="text" data-type="$1"') );
|
||||
|
||||
});
|
||||
|
||||
$el.find('input[type=radio],input[type=checkbox]').customCheckboxRadio();
|
||||
$el.find('button, input[type=submit], input[type=reset], input[type=image]').not('.ui-nojs').customButton();
|
||||
$el.find('input[type=text],input[type=number],input[type=tel],input[type=url],input[type=email],input[type=password],textarea').customTextInput();
|
||||
$el.find('input[type=text],input[type=password],textarea').customTextInput();
|
||||
$el.find("input, select").filter('[data-role="slider"]').slider();
|
||||
$el.find('select').not('[data-role="slider"]').customSelect();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue