diff options
author | Youmin Ha <youmin.ha@samsung.com> | 2012-09-05 20:46:09 +0900 |
---|---|---|
committer | Youmin Ha <youmin.ha@samsung.com> | 2012-09-05 20:46:09 +0900 |
commit | 3f08f13c69c30821bcd1a6f1f010395afb8e356a (patch) | |
tree | 4319859b727600c6d8382b95e68a0c0d52cf38f0 /src/widgets | |
parent | d1ea4c5d62438c778b76ca4f89a709e78a9750d1 (diff) | |
download | web-ui-fw-3f08f13c69c30821bcd1a6f1f010395afb8e356a.tar.gz web-ui-fw-3f08f13c69c30821bcd1a6f1f010395afb8e356a.tar.bz2 web-ui-fw-3f08f13c69c30821bcd1a6f1f010395afb8e356a.zip |
Export 0.1.45
Diffstat (limited to 'src/widgets')
7 files changed, 59 insertions, 24 deletions
diff --git a/src/widgets/circularview/js/jquery.mobile.tizen.circularview.js b/src/widgets/circularview/js/jquery.mobile.tizen.circularview.js index c23f896f..b45c513f 100755 --- a/src/widgets/circularview/js/jquery.mobile.tizen.circularview.js +++ b/src/widgets/circularview/js/jquery.mobile.tizen.circularview.js @@ -53,7 +53,7 @@ }; function getCurrentTime() { - return ( new Date()).getTime(); + return Date.now(); } $.extend( MomentumTracker.prototype, { diff --git a/src/widgets/common/js/jquery.mobile.tizen.scrollview.js b/src/widgets/common/js/jquery.mobile.tizen.scrollview.js index 6bc7f047..08ff1499 100644 --- a/src/widgets/common/js/jquery.mobile.tizen.scrollview.js +++ b/src/widgets/common/js/jquery.mobile.tizen.scrollview.js @@ -35,7 +35,7 @@ }; function getCurrentTime() { - return ( new Date() ).getTime(); + return Date.now(); } jQuery.widget( "tizen.scrollview", jQuery.mobile.widget, { @@ -470,6 +470,13 @@ target.is( '.ui-btn-inner' ) || target.is( '.ui-btn-inner .ui-icon' ); + if ( this._is_button ) { + if ( target.parents('.ui-slider-handle') ) { + this._skip_dragging = true; + return; + } + } + /* * We need to prevent the default behavior to * suppress accidental selection of text, etc. @@ -816,11 +823,13 @@ focused.trigger("resize.scrollview"); } - /* calibration */ - if ( self._sy < $c.height() - $v.height() ) { - self.scrollTo( 0, self._sy, - self.options.snapbackDuration ); - } + /* calibration - after triggered throttledresize */ + setTimeout( function () { + if ( self._sy < $c.height() - $v.height() ) { + self.scrollTo( 0, self._sy, + self.options.snapbackDuration ); + } + }, 260 ); self._view_height = $v.height(); }); diff --git a/src/widgets/controlbar/js/jquery.mobile.tizen.controlbar.js b/src/widgets/controlbar/js/jquery.mobile.tizen.controlbar.js index 94ea751c..7c5348ca 100755 --- a/src/widgets/controlbar/js/jquery.mobile.tizen.controlbar.js +++ b/src/widgets/controlbar/js/jquery.mobile.tizen.controlbar.js @@ -155,7 +155,8 @@ }); $( document ).bind( "pageshow", function ( e, ui ) { - var controlbar_filter = $( ".ui-page" ).find( ":jqmData(role='footer')" ).eq( 0 ).find( ":jqmData(role='controlbar')" ), + var controlbar_filter = $( ".ui-page-active" ).find( ":jqmData(role='footer')" ).eq( 0 ).find( ":jqmData(role='controlbar')" ), + element_width = 0, element_count = controlbar_filter.find( 'li' ).length; if ( controlbar_filter.find(".ui-btn-active").length == 0 ) { @@ -171,6 +172,22 @@ .css( "width", controlbar_filter.width() ) .css( "height", controlbar_filter.height() ); } + + if ( controlbar_filter.length ) { + element_width = Math.floor( controlbar_filter.outerWidth() / element_count ); + controlbar_filter.find("li:last").width( controlbar_filter.outerWidth() - element_width * ( element_count - 1 ) ); + } + }); + + $( window ).bind( "resize", function ( e ) { + var controlbar_filter = $( ".ui-page-active" ).find( ":jqmData(role='footer')" ).eq( 0 ).find( ":jqmData(role='controlbar')" ), + element_width = 0, + element_count = controlbar_filter.find( 'li' ).length; + + if ( controlbar_filter.length ) { + element_width = Math.floor( controlbar_filter.outerWidth() / element_count ); + controlbar_filter.find("li:last").width( controlbar_filter.outerWidth() - element_width * ( element_count - 1 ) ); + } }); this._bindControlbarEvents(); diff --git a/src/widgets/imageslider/js/jquery.mobile.tizen.imageslider.js b/src/widgets/imageslider/js/jquery.mobile.tizen.imageslider.js index 757d0604..b35f8bab 100755 --- a/src/widgets/imageslider/js/jquery.mobile.tizen.imageslider.js +++ b/src/widgets/imageslider/js/jquery.mobile.tizen.imageslider.js @@ -219,7 +219,6 @@ _move: function ( _x ) { var delta = this.org_x - _x, flip = 0, - date, drag_time, sec, self; @@ -235,8 +234,7 @@ } if ( !flip ) { - date = new Date(); - drag_time = date.getTime() - this.org_time; + drag_time = Date.now() - this.org_time; if ( Math.abs( delta ) / drag_time > 1 ) { flip = 1; @@ -326,8 +324,7 @@ self.org_x = e.pageX; - date = new Date(); - self.org_time = date.getTime(); + self.org_time = Date.now(); } ); this.container.bind( 'vmouseup', function ( e ) { diff --git a/src/widgets/pagelayout/js/jquery.mobile.tizen.pagelayout.js b/src/widgets/pagelayout/js/jquery.mobile.tizen.pagelayout.js index baf88d1b..502554de 100755 --- a/src/widgets/pagelayout/js/jquery.mobile.tizen.pagelayout.js +++ b/src/widgets/pagelayout/js/jquery.mobile.tizen.pagelayout.js @@ -246,17 +246,17 @@ /* Groupcontrol cannot initialize inline property at first page */ $elFooterGroup.addClass( "ui-footer-extended-controlgroup-" + gLength + "btn" ); - - footerButton = $elFooter.children( "a" ); - footerButton.each( function ( i ) { - if ( footerButton.eq( i ).is(".ui-btn") && !footerButton.eq( i ).is(".ui-btn-back") ) { - footerButton.eq( i ) - .removeClass( "ui-btn-left" ) - .addClass( "ui-btn-footer-right" ); - } - }); } + footerButton = $elFooter.children( "a" ); + footerButton.each( function ( i ) { + if ( footerButton.eq( i ).is(".ui-btn") && !footerButton.eq( i ).is(".ui-btn-back") ) { + footerButton.eq( i ) + .removeClass( "ui-btn-left" ) + .addClass( "ui-btn-footer-right" ); + } + }); + if ( $elFooter.is(".ui-footer-fixed") ) { $elFooter.css( "bottom", 0 ); } @@ -304,11 +304,13 @@ .bind( "pageshow", function ( event ) { self.updatePagePadding(); // FIXME: unused function. + self._updateHeaderArea(); if ( o.updatePagePadding ) { $( window ).bind( "throttledresize." + self.widgetName, function () { self.updatePagePadding(); // FIXME: unused function. self.layoutPageIME(); // IME/resize reposition self.updatePageLayout(); + self._updateHeaderArea(); }); } @@ -357,6 +359,16 @@ }); }, + _updateHeaderArea : function() { + var $elPage = $( ".ui-page-active" ), + $elHeader = $elPage.find( ":jqmData(role='header')" ).length ? $elPage.find( ":jqmData(role='header')") : $elPage.siblings( ":jqmData(role='header')"), + headerBtnNum = $elHeader.children("a").length, + headerSrcNum = $elHeader.children("img").length; + + $elHeader.find( "h1" ).css( "width", window.innerWidth - $elHeader.children( "a" ).width() * headerBtnNum - $elHeader.children( "a" ).width() / 4 - $elHeader.children( "img" ).width() * headerSrcNum * 3 ); + /* add half width for default space between text and button, and img tag area is too narrow, so multiply three for img width*/ + }, + _visible: true, _IMEShown : false, _IMEindicatorHeight : window.outerHeight - window.innerHeight, diff --git a/src/widgets/slider/js/jquery.mobile.tizen.slider.js b/src/widgets/slider/js/jquery.mobile.tizen.slider.js index 6290fe45..c022a4d7 100755 --- a/src/widgets/slider/js/jquery.mobile.tizen.slider.js +++ b/src/widgets/slider/js/jquery.mobile.tizen.slider.js @@ -106,7 +106,7 @@ // set the popup according to the html attribute popupEnabledAttr = inputElement.jqmData('popup'); if ( popupEnabledAttr !== undefined ) { - self.options.popup = ( popupEnabledAttr === 'true' ); + self.options.popup = ( popupEnabledAttr == true ); } // get the actual slider added by jqm diff --git a/src/widgets/virtualgrid/js/jquery.mobile.tizen.virtualgrid.js b/src/widgets/virtualgrid/js/jquery.mobile.tizen.virtualgrid.js index 990bbe92..bdcfba43 100755 --- a/src/widgets/virtualgrid/js/jquery.mobile.tizen.virtualgrid.js +++ b/src/widgets/virtualgrid/js/jquery.mobile.tizen.virtualgrid.js @@ -121,7 +121,7 @@ }; function getCurrentTime () { - return (new Date()).getTime(); + return Date.now(); } $.extend (MomentumTracker.prototype, { |