From 5b00b0d6322d99b3da72a0a12e08c167d92b71f6 Mon Sep 17 00:00:00 2001 From: Minkyeong Kim Date: Tue, 15 Jan 2013 16:24:24 +0900 Subject: [PATCH] Tokentextarea: Fix issues Remove 'data-add-back-btn' in #addressbook. Add scroll-to-top at 'Remove all.' --- demos/tizen-winsets/index.html | 4 +-- demos/tizen-winsets/index.html.orig | 41 ++++++++++++++++------ demos/tizen-winsets/widgets/tokentextarea-demo.js | 1 + .../common/jquery.mobile.tizen.tokentextarea.less | 13 ++++--- .../js/jquery.mobile.tizen.tokentextarea.js | 2 +- 5 files changed, 43 insertions(+), 18 deletions(-) diff --git a/demos/tizen-winsets/index.html b/demos/tizen-winsets/index.html index e1e100b..f668a1d 100755 --- a/demos/tizen-winsets/index.html +++ b/demos/tizen-winsets/index.html @@ -236,8 +236,8 @@
-
-
+
+

Address Book

diff --git a/demos/tizen-winsets/index.html.orig b/demos/tizen-winsets/index.html.orig index bc8f22c..e1e100b 100755 --- a/demos/tizen-winsets/index.html.orig +++ b/demos/tizen-winsets/index.html.orig @@ -7,7 +7,8 @@ @@ -22,7 +23,7 @@ - -
+
    @@ -131,9 +134,12 @@

    page a

    + +
    +
-
+
    @@ -147,9 +153,12 @@

    page b

    + +
    +
-
+
    @@ -163,16 +172,21 @@

    page c

    + +
    +
-
+

Not Implemented

Not Implemented

+
+
@@ -191,11 +205,15 @@
  • Text Slider
  • +
  • data-highlight="false"
  • +
  • +
    +
    -
    +

    Token Text Area

    @@ -215,8 +233,10 @@
  • Remove All Item
  • +
    +
    -
    +

    Address Book

    @@ -281,5 +301,6 @@ + diff --git a/demos/tizen-winsets/widgets/tokentextarea-demo.js b/demos/tizen-winsets/widgets/tokentextarea-demo.js index 2f580e0..191351c 100755 --- a/demos/tizen-winsets/widgets/tokentextarea-demo.js +++ b/demos/tizen-winsets/widgets/tokentextarea-demo.js @@ -19,6 +19,7 @@ $( "#MBTremoveAllItemTest" ).click( function () { $( ":jqmData(role='tokentextarea')" ).tokentextarea( "remove" ); + $( ":jqmData(role='tokentextarea')" ).parents( ".ui-scrollview-view" ).parent().scrollview( "scrollTo", 0, 0 ); }); $( "#MBTgetSelectedItemTest" ).click( function () { diff --git a/src/themes/tizen/common/jquery.mobile.tizen.tokentextarea.less b/src/themes/tizen/common/jquery.mobile.tizen.tokentextarea.less index c2f7238..2674f50 100755 --- a/src/themes/tizen/common/jquery.mobile.tizen.tokentextarea.less +++ b/src/themes/tizen/common/jquery.mobile.tizen.tokentextarea.less @@ -19,7 +19,7 @@ } .ui-tokentextarea-input { - display : inline-block; + display : inline-block !important; outline : none; position : relative; border : 0 !important; @@ -56,14 +56,17 @@ div.ui-tokentextarea-block { background-color : @color_tokentextarea_block_bg; - background-image: url(./images/00_contacts_button_header.png); - background-size: contain; - background-repeat: no-repeat; + background-image : url(./images/00_contacts_button_header.png); + background-size : contain; + background-repeat : no-repeat; padding-left : .7em; } div.ui-tokentextarea-sblock { - background : @color_tokentextarea_press_bg; + background-color : @color_tokentextarea_press_bg; + background-image : url(./images/00_contacts_button_header_press.png); + background-size : contain; + background-repeat : no-repeat; padding-left : .7em; } diff --git a/src/widgets/tokentextarea/js/jquery.mobile.tizen.tokentextarea.js b/src/widgets/tokentextarea/js/jquery.mobile.tizen.tokentextarea.js index a649852..b6884d8 100755 --- a/src/widgets/tokentextarea/js/jquery.mobile.tizen.tokentextarea.js +++ b/src/widgets/tokentextarea/js/jquery.mobile.tizen.tokentextarea.js @@ -481,7 +481,7 @@ _unlockTextBlock : function () { var $view = this.element, lockBlock = $view.find( "div.ui-tokentextarea-sblock" ); - if ( !lockBlock ) { + if ( lockBlock ) { lockBlock.removeClass( "ui-tokentextarea-sblock" ).addClass( "ui-tokentextarea-block" ); } }, -- 2.7.4