pagelayout : change external refresh call and ime status follow only current page
[platform/framework/web/web-ui-fw.git] / src / widgets / pagelayout / js / jquery.mobile.tizen.pagelayout.js
index 5547745..f86067f 100644 (file)
                                        var thisPage = this;
                                        if ( o.updatePagePadding ) {
                                                self.updatePagePadding(thisPage);
-                                               self.updatePageLayout( false, thisPage);
+                                               self.updatePageLayout( thisPage, data);
                                        }
                                })
 
                                                $( window ).bind( "throttledresize." + self.widgetName, function () {
                                                        self.updatePagePadding(thisPage);
 
-                                                       self.updatePageLayout( false, thisPage);
+                                                       self.updatePageLayout( thisPage, false);
                                                        self._updateHeaderArea( thisPage );
                                                        self._setContentMinHeight( thisPage );
                                                });
                                });
 
                        window.addEventListener( "softkeyboardchange", function ( e ) {
-                               var thisPage = this;
+                               var thisPage = $( ".ui-page-active" );
 
                                if ( e.state == "on" ) {
                                        $elCurrentFooter = $( ".ui-page-active .ui-footer" );
                                        $elCurrentFooter.show();
                                }
                                self.updatePagePadding( thisPage );
-                               self.updatePageLayout( true, thisPage );
+                               self.updatePageLayout( thisPage, true );
                        });
                },
 
                },
 
                /* 1. Calculate and update content height   */
-               updatePageLayout: function ( receiveType, thisPage ) {
+               updatePageLayout: function ( thisPage, receiveType ) {
                        var $elFooter,
                                $elPage = $( thisPage ),
                                $elHeader = $elPage.find( ":jqmData(role='header')" ),
                        }
 
                        // calculate footer height
-                       resultFooterHeight = ( $elFooter.css( "display" ) == "none" ) ? 0 : $elFooter.height();
-                       resultHeaderHeight = ( $elHeader.css( "display" ) == "none" ) ? 0 : $elHeader.height();
+                       resultFooterHeight = ( $elFooter.css( "display" ) == "none" || $elFooter.length == 0 ) ? 0 : $elFooter.height();
+                       resultHeaderHeight = ( $elHeader.css( "display" ) == "none" || $elHeader.length == 0 ) ? 0 : $elHeader.height();
 
                        if (resultFooterHeight != 0 ) {
                                $elFooter.css( "bottom", 0 );