Revert "[checkboxradio] exception handling for input"
authorKoeun Choi <koeun.choi@samsung.com>
Wed, 26 Dec 2012 06:13:47 +0000 (15:13 +0900)
committerYoumin Ha <youmin.ha@samsung.com>
Wed, 26 Dec 2012 08:36:27 +0000 (17:36 +0900)
This reverts commit 72478c32704fa96362db577e6cf9511777919ea8.
Tizen style supports no-label radio and checkbox when making lists.
So it ignores html input operation. Instead, it supports tizen style radio and checkbox theme.

Conflicts:

src/themes/tizen/common/jquery.mobile.forms.checkboxradio.less

Change-Id: Ib7adeff25c8f26a8dfb3bc6b0bb443ed110e3b99

libs/patch/0011-JQM-nolabel-n-favorite-class-for-check-support.patch

index 78e9113..8d9d101 100644 (file)
@@ -10,16 +10,26 @@ Signed-off-by: Youmin Ha <youmin.ha@samsung.com>
  1 file changed, 11 insertions(+), 1 deletion(-)
 
 diff --git a/libs/js/jquery-mobile-1.2.0/js/widgets/forms/checkboxradio.js b/libs/js/jquery-mobile-1.2.0/js/widgets/forms/checkboxradio.js
-index 2e1114f..4ee4523 100644
+index 2e1114f..da00887 100644
 --- a/libs/js/jquery-mobile-1.2.0/js/widgets/forms/checkboxradio.js
 +++ b/libs/js/jquery-mobile-1.2.0/js/widgets/forms/checkboxradio.js
-@@ -44,6 +44,11 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
+@@ -27,7 +27,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
+                       // NOTE: Windows Phone could not find the label through a selector
+                       // filter works though.
+                       parentLabel = $( input ).closest( "label" ),
+-                      label = parentLabel.length ? parentLabel : $( input ).closest( "form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[0].id + "']" ).first(),
++                      label = parentLabel.length ? parentLabel : ( input[0].id ? $( input ).closest( "form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[0].id + "']" ) : [ ] ),
+                       inputtype = input[0].type,
+                       mini = inheritAttr( input, "mini" ),
+                       checkedState = inputtype + "-on",
+@@ -44,6 +44,12 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
                        return;
                }
  
 +              // Support fake label
-+              if ( label.length == 0 && ( input[0].id !== '' ) ) {
-+                      label = $( "<label for='" + input[0].id + "'></label>" );
++              if ( label.length == 0 ) {
++                      label = $( "<label for='" + input[ 0 ].id  +
++                              "'></label>" );
 +              }
 +
                // Expose for other methods