summaryrefslogtreecommitdiff
path: root/libs/patch/0002-JQM-nolabel-n-favorite-class-for-check-support.patch
blob: e09c2835d921c6c403670a31cc3c42a6eb107ba2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 2807a575905be49a8445aea0b1759a88339f4e16 Mon Sep 17 00:00:00 2001
From: Koeun Choi <koeun.choi@samsung.com>
Date: Fri, 15 Jun 2012 17:11:51 +0900
Subject: [PATCH] JQM:nolabel n favorite class for check support

Signed-off-by: Koeun Choi <koeun.choi@samsung.com>
---
 .../js/jquery.mobile.forms.checkboxradio.js        |   10 ++++++++++
 1 file changed, 10 insertions(+)

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
index eb4731b..b373431 100644
--- 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
@@ -43,6 +43,12 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
 			return;
 		}
 
+		// Support fake label
+		if ( label.length == 0 ) {
+			label = $( "<label for='" + input[ 0 ].id  +
+				"' style='display:block;width:1px;height:1px;'></label>" );
+		}
+
 		// Expose for other methods
 		$.extend( this, {
 			label: label,
@@ -70,6 +76,10 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
 		var wrapper = document.createElement('div');
 		wrapper.className = 'ui-' + inputtype;
 
+		if ( input.hasClass( "favorite" ) ) {
+			wrapper.className += ' favorite';
+		}
+
 		input.add( label ).wrapAll( wrapper );
 
 		label.bind({
-- 
1.7.9.5