Tokentextarea: Delete footer and add H/W key event
authorMinkyeong Kim <minkyeong.kim@samsung.com>
Thu, 11 Jul 2013 07:16:59 +0000 (16:16 +0900)
committerheeju.joo <heeju.joo@samsung.com>
Fri, 12 Jul 2013 05:41:51 +0000 (14:41 +0900)
Resolves #N_SE-45858

Change-Id: Ief0ed7cbc2e10611cac2a53a9833e470ead32e85

demos/tizen-winsets/widgets/tokentextarea/addressbook.html

index 3c7c978..658245d 100644 (file)
@@ -1,4 +1,4 @@
-<div data-role="page" id="addressbook" data-add-back-btn="true" data-dom-cache="true">
+<div data-role="page" id="addressbook" data-dom-cache="true">
        <div data-role="header" data-position="fixed">
                <h1>ADDRESS BOOK</h1>
        </div>
                        <li><a>Sawyer Wakefield</a></li>
                </ul>
        </div> <!--/content -->
-       <div data-role="footer">
-       </div>
+       <script>
+       $( "#addressbook" ).on( "pageshow" , function() {
+               $( window ).on( "tizenhwkey", function ( ev ) {
+                       if ( ev.originalEvent.keyName === "back" ) {
+                               //bind callbacks to the H/W keys
+                               window.history.back();
+                       }
+               });
+       });
+       $( "#addressbook" ).on( "pagebeforehide" , function() {
+               //unbind callbacks to the H/W keys
+               $( window ).off( "tizenhwkey" );
+       });
+       </script>
 </div> <!--/page -->