1 $( document ).one( "pageinit", "#popupwindow-demo", function () {
2 $("#btn_textbox_popup_cancel").on("vclick", function ( ev ) {
3 $("#textbox_popup").find("input").val("");
4 $("#textbox_popup").popup("close");
8 if ( $.tizen.__tizen__.util.isMobileBrowser() ) {
9 var direction = window.screen.orientation;
10 if ( direction === "landscape-primary" || direction === "landscape-secondary" ) {
11 $( "#go_textbox_popup a" ).attr( "href", "#textbox_popup_landscape" );
16 function onSuccessPopupCallback ( ori ) {
17 if ( ori.status === "PORTRAIT_PRIMARY" || ori.status === "PORTRAIT_SECONDARY" ) {
18 $("#textbox_popup_landscape").popup("close");
19 $("#go_textbox_popup a").attr("href", "#textbox_popup");
21 else if ( ori.status === "LANDSCAPE_PRIMARY" || ori.status === "LANDSCAPE_SECONDARY" ) {
22 $("#textbox_popup").popup("close");
23 $("#go_textbox_popup a").attr("href", "#textbox_popup_landscape");
28 function onErrorPopupCallback ( error ) {
29 console.error( "An error occurred " + error.message );
32 if ( $.tizen.__tizen__.util.isMobileBrowser() ) {
33 tizen.systeminfo.addPropertyValueChangeListener( "DEVICE_ORIENTATION", onSuccessPopupCallback, onErrorPopupCallback );