pagelayout: fix jslint error
authorMinkyu Kang <mk7.kang@samsung.com>
Wed, 23 Jan 2013 08:11:19 +0000 (17:11 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Wed, 23 Jan 2013 11:05:21 +0000 (20:05 +0900)
1 Expected '(' at column 21, not column 25.
( ( platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1  || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534 ) // Line 59, Pos 25
2 Unexpected 'in'. Compare with undefined, or use the hasOwnProperty method instead.
( "palmGetResource" in window && wkversion && wkversion < 534 ) // Line 73, Pos 45
3 Expected exactly one space between 'function' and '('.
window.addEventListener( "softkeyboardchange", function( e ) { // Line 252, Pos 68
4 'imestatus' was used before it was defined.
if ( this.options.fullscreen && imestatus ) { return; } // Line 310, Pos 45
5 The '&&' subexpression should be wrapped in parens.
( this.options.transition && this.options.transition !== "none" && // Line 371, Pos 81
6 Move the invocation into the parens that contain the function.
})( jQuery ); // Line 435, Pos 3

Change-Id: Ib49ea3b09cd011c29361fb5d84addd54b634b58f

src/widgets/pagelayout/js/jquery.mobile.tizen.pagelayout.js

index b3c7e3f..5547745 100755 (executable)
                                        omversion = !!operammobilematch && operammobilematch[ 1 ];
 
                                if (
-                                               // iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
-                                               ( ( platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1  || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534 )
-                                               ||
+                                       // iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
+                                       ( ( platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1  || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534 ) ||
                                                // Opera Mini
-                                               ( w.operamini && ({}).toString.call( w.operamini ) === "[object OperaMini]" )
-                                               ||
-                                               ( operammobilematch && omversion < 7458 )
-                                               ||
+                                               ( w.operamini && ({}).toString.call( w.operamini ) === "[object OperaMini]" ) ||
+                                               ( operammobilematch && omversion < 7458 ) ||
                                                //Android lte 2.1: Platform is Android and Webkit version is less than 533 (Android 2.2)
-                                               ( ua.indexOf( "Android" ) > -1 && wkversion && wkversion < 533 )
-                                               ||
+                                               ( ua.indexOf( "Android" ) > -1 && wkversion && wkversion < 533 ) ||
                                                // Firefox Mobile before 6.0 -
-                                               ( ffversion && ffversion < 6 )
-                                               ||
+                                               ( ffversion && ffversion < 6 ) ||
                                                // WebOS less than 3
-                                               ( "palmGetResource" in window && wkversion && wkversion < 534 )
-                                               ||
+                                               ( window.palmGetResource !== undefined && wkversion && wkversion < 534 ) ||
                                                // MeeGo
                                                ( ua.indexOf( "MeeGo" ) > -1 && ua.indexOf( "NokiaBrowser/8.5.0" ) > -1 )
                                ) {
                                        }
                                });
 
-                       window.addEventListener( "softkeyboardchange", function( e ) {
+                       window.addEventListener( "softkeyboardchange", function ( e ) {
                                var thisPage = this;
 
                                if ( e.state == "on" ) {
                                footer = $el.siblings( ".ui-footer" ).length;
 
                        // This behavior only applies to "fixed", not "fullscreen"
-                       if ( this.options.fullscreen && imestatus ) { return; }
+                       if ( this.options.fullscreen ) {
+                               return;
+                       }
 
                        tbPage = tbPage || $el.closest( ".ui-page" );
 
                        }
                },
 
-               _useTransition: function ( notransition ) {
-                       var $win = $( window ),
-                               $el = this.element,
-                               scroll = $win.scrollTop(),
-                               elHeight = $el.height(),
-                               pHeight = $el.closest( ".ui-page" ).height(),
-                               viewportHeight = $.mobile.getScreenHeight(),
-                               tbtype = $el.is( ":jqmData(role='header')" ) ? "header" : "footer";
-
-                       return !notransition &&
-                               ( this.options.transition && this.options.transition !== "none" &&
-                               (
-                                               ( tbtype === "header" && !this.options.fullscreen && scroll > elHeight ) ||
-                                               ( tbtype === "footer" && !this.options.fullscreen && scroll + viewportHeight < pHeight - elHeight )
-                                       ) || this.options.fullscreen
-                               );
-               },
-
                show: function ( notransition ) {
-/*                     var hideClass = "ui-fixed-hidden",
-                               $el = this.element;
-
-                       if ( this._useTransition( notransition ) ){
-                               $el
-                                       .removeClass( "out " + hideClass )
-                                       .addClass( "in" );
-                       }
-                       else {
-                               $el.removeClass( hideClass );
-                       }
-                       this._visible = true;*/
+                       /* blank function: deprecated */
                },
 
                hide: function ( notransition ) {
-/*                     var hideClass = "ui-fixed-hidden",
-                               $el = this.element,
-                               // if it's a slide transition, our new transitions need the reverse class as well to slide outward
-                               outclass = "out" + ( this.options.transition === "slide" ? " reverse" : "" );
-
-                       if ( this._useTransition( notransition ) ){
-                               $el
-                                       .addClass( outclass )
-                                       .removeClass( "in" )
-                                       .animationComplete( function () {
-                                               $el.addClass( hideClass ).removeClass( outclass );
-                                       });
-                       }
-                       else {
-                               $el.addClass( hideClass ).removeClass( outclass );
-                       }
-                       this._visible = false;*/
+                       /* blank function: deprecated */
                },
 
                toggle: function () {
                        $.mobile.pagelayout.prototype.enhanceWithin( e.target );
                });
 
-})( jQuery );
+}( jQuery ));