1 From c70b1f818389c9703af17bb59e1f78f4eefa7c65 Mon Sep 17 00:00:00 2001
2 From: wongi11.lee <wongi11.lee@samsung.com>
3 Date: Fri, 29 Jun 2012 13:24:49 +0900
4 Subject: [PATCH] JQM remove 'search' from forms.textinput.
6 Change-Id: I3de28a38dad8cfcc40a6e98273107e5beabb836e
7 Signed-off-by: wongi11.lee <wongi11.lee@samsung.com>
9 .../js/jquery.mobile.forms.textinput.js | 49 +++----------------
10 1 files changed, 8 insertions(+), 41 deletions(-)
12 diff --git a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.forms.textinput.js b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.forms.textinput.js
13 index f444522..a06d54d 100644
14 --- a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.forms.textinput.js
15 +++ b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.forms.textinput.js
16 @@ -13,8 +13,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 @@ -46,41 +45,7 @@ $.widget( "mobile.textinput", $.mobile.widget, {
30 - //"search" input widget
31 - if ( input.is( "[type='search'],:jqmData(type='search')" ) ) {
33 - 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();
34 - clearbtn = $( "<a href='#' class='ui-input-clear' title='" + o.clearSearchButtonText + "'>" + o.clearSearchButtonText + "</a>" )
35 - .bind('click', function( event ) {
39 - .trigger( "change" );
40 - clearbtn.addClass( "ui-input-clear-hidden" );
41 - event.preventDefault();
43 - .appendTo( focusedEl )
52 - function toggleClear() {
53 - setTimeout(function() {
54 - clearbtn.toggleClass( "ui-input-clear-hidden", !input.val() );
60 - input.bind('paste cut keyup focus change blur', toggleClear);
63 - input.addClass( "ui-corner-all ui-shadow-inset" + themeclass + miniclass );
65 + input.addClass( "ui-corner-all ui-shadow-inset" + themeclass + miniclass );
67 input.focus(function() {
68 focusedEl.addClass( $.mobile.focusClass );
69 @@ -133,13 +98,15 @@ $.widget( "mobile.textinput", $.mobile.widget, {
73 - ( this.element.attr( "disabled", true ).is( "[type='search'],:jqmData(type='search')" ) ?
74 - this.element.parent() : this.element ).addClass( "ui-disabled" );
75 + if ( this.element.attr( "disabled", true ) ) {
76 + this.element.addClass( "ui-disabled" );
81 - ( this.element.attr( "disabled", false).is( "[type='search'],:jqmData(type='search')" ) ?
82 - this.element.parent() : this.element ).removeClass( "ui-disabled" );
83 + if ( this.element.attr( "disabled", false) ) {
84 + this.element.removeClass( "ui-disabled" );