1 From 4b9929185d24ea9230e51bf1f02692e7da69a8cc Mon Sep 17 00:00:00 2001
2 From: Minkyu Kang <mk7.kang@samsung.com>
3 Date: Thu, 29 Nov 2012 10:41:59 +0900
4 Subject: [PATCH] JQM: remove search from forms.textinput.
6 Signed-off-by: wongi11.lee <wongi11.lee@samsung.com>
7 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 .../js/widgets/forms/textinput.js | 46 +++-----------------
10 1 file changed, 7 insertions(+), 39 deletions(-)
12 diff --git a/libs/js/jquery-mobile-1.2.0/js/widgets/forms/textinput.js b/libs/js/jquery-mobile-1.2.0/js/widgets/forms/textinput.js
13 index 08505ed..530cdb8 100644
14 --- a/libs/js/jquery-mobile-1.2.0/js/widgets/forms/textinput.js
15 +++ b/libs/js/jquery-mobile-1.2.0/js/widgets/forms/textinput.js
16 @@ -14,8 +14,7 @@ $.widget( "mobile.textinput", $.mobile.widget, {
18 // This option defaults to true on iOS devices.
19 preventFocusZoom: /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1,
20 - 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])",
21 - clearSearchButtonText: "clear text",
22 + 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])",
26 @@ -54,37 +53,6 @@ $.widget( "mobile.textinput", $.mobile.widget, {
27 input[0].setAttribute( "autocomplete", "off" );
31 - //"search" input widget
32 - if ( input.is( "[type='search'],:jqmData(type='search')" ) ) {
34 - focusedEl = input.wrap( "<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield" + themeclass + miniclass + "'></div>" ).parent();
35 - clearbtn = $( "<a href='#' class='ui-input-clear' title='" + o.clearSearchButtonText + "'>" + o.clearSearchButtonText + "</a>" )
36 - .bind('click', function( event ) {
40 - .trigger( "change" );
41 - clearbtn.addClass( "ui-input-clear-hidden" );
42 - event.preventDefault();
44 - .appendTo( focusedEl )
55 - input.bind( 'paste cut keyup focus change blur', toggleClear );
58 - input.addClass( "ui-corner-all ui-shadow-inset" + themeclass + miniclass );
61 input.focus(function() {
62 focusedEl.addClass( $.mobile.focusClass );
64 @@ -141,10 +109,10 @@ $.widget( "mobile.textinput", $.mobile.widget, {
68 - if ( this.element.attr( "disabled", true ).is( "[type='search'], :jqmData(type='search')" ) ) {
69 - $el = this.element.parent();
71 + if ( this.element.attr( "disabled", true ) ) {
76 $el.addClass( "ui-disabled" );
77 return this._setOption( "disabled", true );
78 @@ -154,10 +122,10 @@ $.widget( "mobile.textinput", $.mobile.widget, {
81 // TODO using more than one line of code is acceptable ;)
82 - if ( this.element.attr( "disabled", false ).is( "[type='search'], :jqmData(type='search')" ) ) {
83 - $el = this.element.parent();
85 + if ( this.element.attr( "disabled", false ) ) {
90 $el.removeClass( "ui-disabled" );
91 return this._setOption( "disabled", false );