pagelayout : change external refresh call and ime status follow only current page
authorJinhyuk Jun <jinhyuk.jun@samsung.com>
Fri, 1 Feb 2013 04:09:59 +0000 (13:09 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 7 Feb 2013 05:53:01 +0000 (14:53 +0900)
Change-Id: Ic11b2415a0d781a5aa9c51aadcee6b600cbb2b46

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 );