TizenDemo : add initial orientation mode to popup demo
authorJinhyuk Jun <jinhyuk.jun@samsung.com>
Mon, 22 Apr 2013 08:03:49 +0000 (17:03 +0900)
committerYoumin Ha <youmin.ha@samsung.com>
Fri, 26 Apr 2013 05:43:29 +0000 (14:43 +0900)
Change-Id: I322f2c37ce5dbe4345b70040ac5b1ecb118b14fd

demos/tizen-winsets/widgets/popupwindow/popupwindow.js

index 16f93dd..f62f272 100644 (file)
@@ -4,6 +4,13 @@ $( document ).one( "pageinit", "#popupwindow-demo", function () {
                $("#textbox_popup").popup("close");
                return false;
        });
+
+       if ( $.tizen.__tizen__.util.isMobileBrowser() ) {
+                var direction = window.screen.orientation;
+                if ( direction === "landscape-primary" || direction === "landscape-secondary" ) {
+                        $( "#go_textbox_popup a" ).attr( "href", "#textbox_popup_landscape" );
+                }
+        }
 });
 
 function onSuccessPopupCallback ( ori ) {