upload tizen1.0 source
[framework/web/web-ui-fw.git] / libs / patch / 0009-JQM-remove-search-init-selector-and-functions.patch
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.
5
6 Signed-off-by: Lee Wongi <wongi11.lee@samsung.com>
7 ---
8  .../js/jquery.mobile.forms.textinput.js            |   41 ++------------------
9  1 files changed, 4 insertions(+), 37 deletions(-)
10
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
15 @@ -7,7 +7,7 @@
16  $.widget( "mobile.textinput", $.mobile.widget, {
17         options: {
18                 theme: null,
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])"
21         },
22  
23         _create: function() {
24 @@ -37,38 +37,7 @@ $.widget( "mobile.textinput", $.mobile.widget, {
25                 }
26  
27  
28 -               //"search" input widget
29 -               if ( input.is( "[type='search'],:jqmData(type='search')" ) ) {
30 -
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();
38 -                               })
39 -                               .appendTo( focusedEl )
40 -                               .buttonMarkup({
41 -                                       icon: "delete",
42 -                                       iconpos: "notext",
43 -                                       corners: true,
44 -                                       shadow: true
45 -                               });
46 -
47 -                       function toggleClear() {
48 -                               setTimeout(function() {
49 -                                       clearbtn.toggleClass( "ui-input-clear-hidden", !input.val() );
50 -                               }, 0);
51 -                       }
52 -
53 -                       toggleClear();
54 -
55 -                       input.bind('paste cut keyup focus change blur', toggleClear);
56 -
57 -               } else {
58 -                       input.addClass( "ui-corner-all ui-shadow-inset" + themeclass );
59 -               }
60 +               input.addClass( "ui-corner-all ui-shadow-inset" + themeclass );
61  
62                 input.focus(function() {
63                                 focusedEl.addClass( "ui-focus" );
64 @@ -110,13 +79,11 @@ $.widget( "mobile.textinput", $.mobile.widget, {
65         },
66  
67         disable: function(){
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" );
71         },
72  
73         enable: function(){
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" );
77         }
78  });
79  
80 -- 
81 1.7.0.4
82