exception handling for input
authorKoeun Choi <koeun.choi@samsung.com>
Mon, 17 Dec 2012 08:37:08 +0000 (17:37 +0900)
committerGerrit Code Review <gerrit2@kim11>
Thu, 20 Dec 2012 11:04:25 +0000 (20:04 +0900)
Change-Id: I8987a3217e629b2b47bdb926ce262924f9967cf9

libs/patch/0011-JQM-nolabel-n-favorite-class-for-check-support.patch
src/themes/tizen/common/jquery.mobile.forms.checkboxradio.less

index 8d9d101..78e9113 100644 (file)
@@ -10,26 +10,16 @@ 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..da00887 100644
+index 2e1114f..4ee4523 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
-@@ -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, {
+@@ -44,6 +44,11 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
                        return;
                }
  
 +              // Support fake label
-+              if ( label.length == 0 ) {
-+                      label = $( "<label for='" + input[ 0 ].id  +
-+                              "'></label>" );
++              if ( label.length == 0 && ( input[0].id !== '' ) ) {
++                      label = $( "<label for='" + input[0].id + "'></label>" );
 +              }
 +
                // Expose for other methods
index 5282a94..4487b04 100755 (executable)
        //clear btn basic setting
        .LESSclear-btn-basic-setting();
        input {
+               z-index: 1;
                position: absolute;
-               left: -10000px;
                height: 100%;
                outline: 0 !important;
        }
        .ui-btn {
+               z-index: 2;             // checkbox,radio input z-index: 1
                height: 100%;
                margin: 0;
                text-align: left;