1 From 83fdd7d7b42cc8a9326f0f991d6a1928c83fb8cf Mon Sep 17 00:00:00 2001
2 From: Lee Wongi <wongi11.lee@samsung.com>
3 Date: Wed, 29 Feb 2012 14:21:44 +0900
4 Subject: [PATCH] JQM remove search init selector and functions.
6 Signed-off-by: Lee Wongi <wongi11.lee@samsung.com>
8 .../js/jquery.mobile.forms.textinput.js | 41 ++------------------
9 1 files changed, 4 insertions(+), 37 deletions(-)
11 diff --git a/libs/js/jquery-mobile-1.0.1pre/js/jquery.mobile.forms.textinput.js b/libs/js/jquery-mobile-1.0.1pre/js/jquery.mobile.forms.textinput.js
12 index f44c8a8..44cab9b 100644
13 --- a/libs/js/jquery-mobile-1.0.1pre/js/jquery.mobile.forms.textinput.js
14 +++ b/libs/js/jquery-mobile-1.0.1pre/js/jquery.mobile.forms.textinput.js
16 $.widget( "mobile.textinput", $.mobile.widget, {
19 - initSelector: "input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type])"
20 + initSelector: "input[type='text'], input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type])"
24 @@ -37,38 +37,7 @@ $.widget( "mobile.textinput", $.mobile.widget, {
28 - //"search" input widget
29 - if ( input.is( "[type='search'],:jqmData(type='search')" ) ) {
31 - focusedEl = input.wrap( "<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield" + themeclass + "'></div>" ).parent();
32 - clearbtn = $( "<a href='#' class='ui-input-clear' title='clear text'>clear text</a>" )
33 - .tap(function( event ) {
34 - input.val( "" ).focus();
35 - input.trigger( "change" );
36 - clearbtn.addClass( "ui-input-clear-hidden" );
37 - event.preventDefault();
39 - .appendTo( focusedEl )
47 - function toggleClear() {
48 - setTimeout(function() {
49 - clearbtn.toggleClass( "ui-input-clear-hidden", !input.val() );
55 - input.bind('paste cut keyup focus change blur', toggleClear);
58 - input.addClass( "ui-corner-all ui-shadow-inset" + themeclass );
60 + input.addClass( "ui-corner-all ui-shadow-inset" + themeclass );
62 input.focus(function() {
63 focusedEl.addClass( "ui-focus" );
64 @@ -110,13 +79,11 @@ $.widget( "mobile.textinput", $.mobile.widget, {
68 - ( this.element.attr( "disabled", true ).is( "[type='search'],:jqmData(type='search')" ) ?
69 - this.element.parent() : this.element ).addClass( "ui-disabled" );
70 + this.element.attr( "disabled", true ).addClass( "ui-disabled" );
74 - ( this.element.attr( "disabled", false).is( "[type='search'],:jqmData(type='search')" ) ?
75 - this.element.parent() : this.element ).removeClass( "ui-disabled" );
76 + this.element.attr( "disabled", false).removeClass( "ui-disabled" );