1 From b3120cd2bf164dbcb4ee47fe9a5c7b2c945dd494 Mon Sep 17 00:00:00 2001
2 From: Youmin Ha <youmin.ha@samsung.com>
3 Date: Thu, 24 Jan 2013 15:51:17 +0900
4 Subject: [PATCH] JQM: Trim text in listitem to get index in autodivider
6 JQM autodivider uses $(li).text().slice(0,1) to get index of each
7 listitem, but it may have whitespaces in the beginning and
8 end. This patch trims those whitespaces from the text.
10 Signed-off-by: Youmin Ha <youmin.ha@samsung.com>
12 .../js/widgets/listview.autodividers.js | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
15 diff --git a/libs/js/jquery-mobile-1.2.0/js/widgets/listview.autodividers.js b/libs/js/jquery-mobile-1.2.0/js/widgets/listview.autodividers.js
16 index f0c228c..4d947b4 100644
17 --- a/libs/js/jquery-mobile-1.2.0/js/widgets/listview.autodividers.js
18 +++ b/libs/js/jquery-mobile-1.2.0/js/widgets/listview.autodividers.js
19 @@ -16,7 +16,7 @@ $.mobile.listview.prototype.options.autodividersSelector = function( elt ) {
22 // create the text for the divider (first uppercased letter)
23 - text = text.slice( 0, 1 ).toUpperCase();
24 + text = text.trim().slice( 0, 1 ).toUpperCase();