Export 0.1.47
[platform/framework/web/web-ui-fw.git] / libs / patch / 0002-JQM-nolabel-n-favorite-class-for-check-support.patch
1 From 2807a575905be49a8445aea0b1759a88339f4e16 Mon Sep 17 00:00:00 2001
2 From: Koeun Choi <koeun.choi@samsung.com>
3 Date: Fri, 15 Jun 2012 17:11:51 +0900
4 Subject: [PATCH] JQM:nolabel n favorite class for check support
5
6 Signed-off-by: Koeun Choi <koeun.choi@samsung.com>
7 ---
8  .../js/jquery.mobile.forms.checkboxradio.js        |   10 ++++++++++
9  1 file changed, 10 insertions(+)
10
11 diff --git a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.forms.checkboxradio.js b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.forms.checkboxradio.js
12 index eb4731b..b373431 100644
13 --- a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.forms.checkboxradio.js
14 +++ b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.forms.checkboxradio.js
15 @@ -43,6 +43,12 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
16                         return;
17                 }
18  
19 +               // Support fake label
20 +               if ( label.length == 0 ) {
21 +                       label = $( "<label for='" + input[ 0 ].id  +
22 +                               "'></label>" );
23 +               }
24 +
25                 // Expose for other methods
26                 $.extend( this, {
27                         label: label,
28 @@ -70,6 +76,10 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
29                 var wrapper = document.createElement('div');
30                 wrapper.className = 'ui-' + inputtype;
31  
32 +               if ( input.hasClass( "favorite" ) ) {
33 +                       wrapper.className += ' favorite';
34 +               }
35 +
36                 input.add( label ).wrapAll( wrapper );
37  
38                 label.bind({
39 -- 
40 1.7.9.5
41