2010-09-10 22:23:13 +00:00
|
|
|
/*
|
2010-11-10 00:55:52 +00:00
|
|
|
* jQuery Mobile Framework : "fixHeaderFooter" plugin - on-demand positioning for headers,footers
|
2010-09-10 22:23:13 +00:00
|
|
|
* Copyright (c) jQuery Project
|
2010-11-20 03:47:47 +00:00
|
|
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
|
|
|
* http://jquery.org/license
|
2010-09-10 22:23:13 +00:00
|
|
|
*/
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
(function( $, undefined ) {
|
This commit decouples all widgets from the page plugin so that they can be used ad-hoc.
- Internally, each plugin self-initializes by binding to the pagecreate event.
- Unit tests have been added and adjusted to support some internal changes involved in this commit.
- In the process, the portions of the page plugin that were used to enhance the header,content,and footer sections of a native-app style page layout are now located in jquery.mobile.page.sections.js.
- No public API options have changed, except that the page plugin no longer has options for keepNative, and degradeInputs, as plugins now handle these internally (keepNative was never documented, and degradeInputs only affected slider, so it lives there now. Page options related to the page sections are now located in the page.sections script, but they are still configurable via the page plugin's options api.
- Make, Ant, and index files are updated with a new load order for all JS files.
2011-07-19 23:05:35 +00:00
|
|
|
|
|
|
|
|
//auto self-init widgets
|
2011-07-22 13:05:55 +00:00
|
|
|
$( document ).bind( "pagecreate create", function( e ){
|
This commit decouples all widgets from the page plugin so that they can be used ad-hoc.
- Internally, each plugin self-initializes by binding to the pagecreate event.
- Unit tests have been added and adjusted to support some internal changes involved in this commit.
- In the process, the portions of the page plugin that were used to enhance the header,content,and footer sections of a native-app style page layout are now located in jquery.mobile.page.sections.js.
- No public API options have changed, except that the page plugin no longer has options for keepNative, and degradeInputs, as plugins now handle these internally (keepNative was never documented, and degradeInputs only affected slider, so it lives there now. Page options related to the page sections are now located in the page.sections script, but they are still configurable via the page plugin's options api.
- Make, Ant, and index files are updated with a new load order for all JS files.
2011-07-19 23:05:35 +00:00
|
|
|
|
|
|
|
|
if( $( ":jqmData(position='fixed')", e.target ).length ){
|
|
|
|
|
$( e.target ).each(function(){
|
|
|
|
|
|
|
|
|
|
if ( !$.support.scrollTop ) {
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var $this = $( this );
|
|
|
|
|
|
|
|
|
|
if ( $this.jqmData( "fullscreen" ) ) {
|
|
|
|
|
$this.addClass( "ui-page-fullscreen" );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Should be slidedown
|
|
|
|
|
$this.find( ".ui-header:jqmData(position='fixed')" ).addClass( "ui-header-fixed ui-fixed-inline fade" );
|
|
|
|
|
|
|
|
|
|
// Should be slideup
|
|
|
|
|
$this.find( ".ui-footer:jqmData(position='fixed')" ).addClass( "ui-footer-fixed ui-fixed-inline fade" );
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
$.fn.fixHeaderFooter = function( options ) {
|
|
|
|
|
|
|
|
|
|
if ( !$.support.scrollTop ) {
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return this.each(function() {
|
|
|
|
|
var $this = $( this );
|
|
|
|
|
|
|
|
|
|
if ( $this.jqmData( "fullscreen" ) ) {
|
|
|
|
|
$this.addClass( "ui-page-fullscreen" );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Should be slidedown
|
|
|
|
|
$this.find( ".ui-header:jqmData(position='fixed')" ).addClass( "ui-header-fixed ui-fixed-inline fade" );
|
|
|
|
|
|
|
|
|
|
// Should be slideup
|
|
|
|
|
$this.find( ".ui-footer:jqmData(position='fixed')" ).addClass( "ui-footer-fixed ui-fixed-inline fade" );
|
2010-09-12 15:33:23 +00:00
|
|
|
});
|
2010-12-28 15:15:30 +00:00
|
|
|
};
|
2010-09-12 15:33:23 +00:00
|
|
|
|
2011-06-29 00:11:46 +00:00
|
|
|
//single controller for all showing,hiding,toggling
|
|
|
|
|
$.fixedToolbars = (function() {
|
|
|
|
|
|
|
|
|
|
if ( !$.support.scrollTop ) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var currentstate = "inline",
|
2011-01-24 15:11:19 +00:00
|
|
|
autoHideMode = false,
|
|
|
|
|
showDelay = 100,
|
2010-10-02 03:36:25 +00:00
|
|
|
delayTimer,
|
2011-06-29 00:11:46 +00:00
|
|
|
ignoreTargets = "a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed",
|
|
|
|
|
toolbarSelector = ".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last",
|
|
|
|
|
//for storing quick references to duplicate footers
|
|
|
|
|
stickyFooter,
|
2010-10-05 15:58:55 +00:00
|
|
|
supportTouch = $.support.touch,
|
|
|
|
|
touchStartEvent = supportTouch ? "touchstart" : "mousedown",
|
|
|
|
|
touchStopEvent = supportTouch ? "touchend" : "mouseup",
|
|
|
|
|
stateBefore = null,
|
2010-12-09 14:01:31 +00:00
|
|
|
scrollTriggered = false,
|
2010-12-10 18:17:16 +00:00
|
|
|
touchToggleEnabled = true;
|
2010-12-09 14:01:31 +00:00
|
|
|
|
2011-06-29 00:11:46 +00:00
|
|
|
function showEventCallback( event ) {
|
2011-01-24 15:11:19 +00:00
|
|
|
// An event that affects the dimensions of the visual viewport has
|
|
|
|
|
// been triggered. If the header and/or footer for the current page are in overlay
|
|
|
|
|
// mode, we want to hide them, and then fire off a timer to show them at a later
|
|
|
|
|
// point. Events like a resize can be triggered continuously during a scroll, on
|
|
|
|
|
// some platforms, so the timer is used to delay the actual positioning until the
|
|
|
|
|
// flood of events have subsided.
|
|
|
|
|
//
|
|
|
|
|
// If we are in autoHideMode, we don't do anything because we know the scroll
|
|
|
|
|
// callbacks for the plugin will fire off a show when the scrolling has stopped.
|
2011-06-29 00:11:46 +00:00
|
|
|
if ( !autoHideMode && currentstate === "overlay" ) {
|
|
|
|
|
if ( !delayTimer ) {
|
|
|
|
|
$.fixedToolbars.hide( true );
|
|
|
|
|
}
|
|
|
|
|
|
2011-01-24 15:11:19 +00:00
|
|
|
$.fixedToolbars.startShowTimer();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-09-15 02:37:46 +00:00
|
|
|
$(function() {
|
2011-06-29 00:11:46 +00:00
|
|
|
var $document = $( document ),
|
|
|
|
|
$window = $(window);
|
|
|
|
|
|
|
|
|
|
$document
|
|
|
|
|
.bind( "vmousedown", function( event ) {
|
|
|
|
|
if ( touchToggleEnabled ) {
|
2010-12-10 18:17:16 +00:00
|
|
|
stateBefore = currentstate;
|
|
|
|
|
}
|
2010-10-02 03:36:25 +00:00
|
|
|
})
|
2011-06-29 00:11:46 +00:00
|
|
|
.bind( "vclick", function( event) {
|
|
|
|
|
if ( touchToggleEnabled ) {
|
|
|
|
|
|
|
|
|
|
if ( $(event.target).closest( ignoreTargets ).length ) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( !scrollTriggered ) {
|
|
|
|
|
$.fixedToolbars.toggle( stateBefore );
|
2010-12-10 18:17:16 +00:00
|
|
|
stateBefore = null;
|
|
|
|
|
}
|
2010-10-02 03:36:25 +00:00
|
|
|
}
|
2011-05-26 16:40:49 +00:00
|
|
|
})
|
2011-06-29 00:11:46 +00:00
|
|
|
.bind( "silentscroll", showEventCallback );
|
2011-05-26 15:51:16 +00:00
|
|
|
|
|
|
|
|
|
2011-06-29 00:11:46 +00:00
|
|
|
// The below checks first for a $(document).scrollTop() value, and if zero, binds scroll events to $(window) instead.
|
|
|
|
|
// If the scrollTop value is actually zero, both will return zero anyway.
|
|
|
|
|
//
|
|
|
|
|
// Works with $(document), not $(window) : Opera Mobile (WinMO phone; kinda broken anyway)
|
|
|
|
|
// Works with $(window), not $(document) : IE 7/8
|
|
|
|
|
// Works with either $(window) or $(document) : Chrome, FF 3.6/4, Android 1.6/2.1, iOS
|
|
|
|
|
// Needs work either way : BB5, Opera Mobile (iOS)
|
2011-05-26 15:51:16 +00:00
|
|
|
|
2011-06-29 00:11:46 +00:00
|
|
|
( ( $document.scrollTop() === 0 ) ? $window : $document )
|
|
|
|
|
.bind( "scrollstart", function( event ) {
|
2011-05-26 15:51:16 +00:00
|
|
|
|
2011-01-24 15:11:19 +00:00
|
|
|
scrollTriggered = true;
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
if ( stateBefore === null ) {
|
|
|
|
|
stateBefore = currentstate;
|
|
|
|
|
}
|
2011-01-24 15:11:19 +00:00
|
|
|
|
|
|
|
|
// We only enter autoHideMode if the headers/footers are in
|
|
|
|
|
// an overlay state or the show timer was started. If the
|
|
|
|
|
// show timer is set, clear it so the headers/footers don't
|
|
|
|
|
// show up until after we're done scrolling.
|
2011-06-29 00:11:46 +00:00
|
|
|
var isOverlayState = stateBefore == "overlay";
|
|
|
|
|
|
2011-01-24 15:11:19 +00:00
|
|
|
autoHideMode = isOverlayState || !!delayTimer;
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
if ( autoHideMode ) {
|
2011-01-24 15:11:19 +00:00
|
|
|
$.fixedToolbars.clearShowTimer();
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
if ( isOverlayState ) {
|
|
|
|
|
$.fixedToolbars.hide( true );
|
2011-01-24 15:11:19 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
2011-06-29 00:11:46 +00:00
|
|
|
.bind( "scrollstop", function( event ) {
|
|
|
|
|
|
|
|
|
|
if ( $( event.target ).closest( ignoreTargets ).length ) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-05 15:58:55 +00:00
|
|
|
scrollTriggered = false;
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
if ( autoHideMode ) {
|
2011-01-24 15:11:19 +00:00
|
|
|
$.fixedToolbars.startShowTimer();
|
2011-06-29 00:11:46 +00:00
|
|
|
autoHideMode = false;
|
2010-12-10 18:17:16 +00:00
|
|
|
}
|
2010-10-05 15:58:55 +00:00
|
|
|
stateBefore = null;
|
2011-05-26 16:40:49 +00:00
|
|
|
});
|
2011-01-24 15:11:19 +00:00
|
|
|
|
2011-06-29 00:11:46 +00:00
|
|
|
$window.bind( "resize", showEventCallback );
|
2011-01-07 09:07:22 +00:00
|
|
|
});
|
2010-10-04 23:00:30 +00:00
|
|
|
|
2011-06-29 00:11:46 +00:00
|
|
|
// 1. Before page is shown, check for duplicate footer
|
|
|
|
|
// 2. After page is shown, append footer to new page
|
|
|
|
|
$( ".ui-page" )
|
|
|
|
|
.live( "pagebeforeshow", function( event, ui ) {
|
|
|
|
|
|
|
|
|
|
var page = $( event.target ),
|
|
|
|
|
footer = page.find( ":jqmData(role='footer')" ),
|
|
|
|
|
id = footer.data( "id" ),
|
|
|
|
|
prevPage = ui.prevPage,
|
|
|
|
|
prevFooter = prevPage && prevPage.find( ":jqmData(role='footer')" ),
|
|
|
|
|
prevFooterMatches = prevFooter.length && prevFooter.jqmData( "id" ) === id;
|
|
|
|
|
|
|
|
|
|
if ( id && prevFooterMatches ) {
|
|
|
|
|
stickyFooter = footer;
|
|
|
|
|
setTop( stickyFooter.removeClass( "fade in out" ).appendTo( $.mobile.pageContainer ) );
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.live( "pageshow", function( event, ui ) {
|
|
|
|
|
|
|
|
|
|
var $this = $( this );
|
|
|
|
|
|
|
|
|
|
if ( stickyFooter && stickyFooter.length ) {
|
|
|
|
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
setTop( stickyFooter.appendTo( $this ).addClass( "fade" ) );
|
|
|
|
|
stickyFooter = null;
|
|
|
|
|
}, 500);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$.fixedToolbars.show( true, this );
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//When a collapsiable is hidden or shown we need to trigger the fixed toolbar to reposition itself (#1635)
|
2011-05-18 22:32:59 +00:00
|
|
|
$( ".ui-collapsible-contain" ).live( "collapse expand", showEventCallback );
|
2011-03-29 00:35:17 +00:00
|
|
|
|
2010-11-11 17:27:11 +00:00
|
|
|
// element.getBoundingClientRect() is broken in iOS 3.2.1 on the iPad. The
|
|
|
|
|
// coordinates inside of the rect it returns don't have the page scroll position
|
|
|
|
|
// factored out of it like the other platforms do. To get around this,
|
|
|
|
|
// we'll just calculate the top offset the old fashioned way until core has
|
|
|
|
|
// a chance to figure out how to handle this situation.
|
|
|
|
|
//
|
|
|
|
|
// TODO: We'll need to get rid of getOffsetTop() once a fix gets folded into core.
|
|
|
|
|
|
2011-06-29 00:11:46 +00:00
|
|
|
function getOffsetTop( ele ) {
|
|
|
|
|
var top = 0,
|
|
|
|
|
op;
|
|
|
|
|
|
|
|
|
|
if ( ele ) {
|
|
|
|
|
op = ele.offsetParent, body = document.body;
|
2010-11-11 17:27:11 +00:00
|
|
|
top = ele.offsetTop;
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
while ( ele && ele != body ) {
|
2010-11-11 17:27:11 +00:00
|
|
|
top += ele.scrollTop || 0;
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
if ( ele == op ) {
|
2010-11-11 17:27:11 +00:00
|
|
|
top += op.offsetTop;
|
|
|
|
|
op = ele.offsetParent;
|
|
|
|
|
}
|
2011-06-29 00:11:46 +00:00
|
|
|
|
2010-11-11 17:27:11 +00:00
|
|
|
ele = ele.parentNode;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return top;
|
|
|
|
|
}
|
|
|
|
|
|
2011-06-29 00:11:46 +00:00
|
|
|
function setTop( el ) {
|
2010-10-12 15:59:23 +00:00
|
|
|
var fromTop = $(window).scrollTop(),
|
2011-06-29 00:11:46 +00:00
|
|
|
thisTop = getOffsetTop( el[ 0 ] ), // el.offset().top returns the wrong value on iPad iOS 3.2.1, call our workaround instead.
|
|
|
|
|
thisCSStop = el.css( "top" ) == "auto" ? 0 : parseFloat(el.css( "top" )),
|
2010-10-12 15:59:23 +00:00
|
|
|
screenHeight = window.innerHeight,
|
|
|
|
|
thisHeight = el.outerHeight(),
|
2011-06-29 00:11:46 +00:00
|
|
|
useRelative = el.parents( ".ui-page:not(.ui-page-fullscreen)" ).length,
|
2010-10-12 15:59:23 +00:00
|
|
|
relval;
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
if ( el.is( ".ui-header-fixed" ) ) {
|
|
|
|
|
|
2010-10-12 15:59:23 +00:00
|
|
|
relval = fromTop - thisTop + thisCSStop;
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
if ( relval < thisTop) {
|
|
|
|
|
relval = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return el.css( "top", useRelative ? relval : fromTop );
|
2010-10-12 15:59:23 +00:00
|
|
|
}
|
|
|
|
|
else{
|
2011-06-29 00:11:46 +00:00
|
|
|
// relval = -1 * (thisTop - (fromTop + screenHeight) + thisCSStop + thisHeight);
|
|
|
|
|
// if ( relval > thisTop ) { relval = 0; }
|
|
|
|
|
relval = fromTop + screenHeight - thisHeight - (thisTop - thisCSStop );
|
|
|
|
|
|
|
|
|
|
return el.css( "top", useRelative ? relval : fromTop + screenHeight - thisHeight );
|
2010-10-12 15:43:11 +00:00
|
|
|
}
|
2010-10-12 15:59:23 +00:00
|
|
|
}
|
2010-09-12 15:33:23 +00:00
|
|
|
|
2011-06-29 00:11:46 +00:00
|
|
|
// Exposed methods
|
2010-09-12 15:33:23 +00:00
|
|
|
return {
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
show: function( immediately, page ) {
|
|
|
|
|
|
2011-01-24 15:11:19 +00:00
|
|
|
$.fixedToolbars.clearShowTimer();
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
currentstate = "overlay";
|
|
|
|
|
|
|
|
|
|
var $ap = page ? $( page ) :
|
|
|
|
|
( $.mobile.activePage ? $.mobile.activePage :
|
|
|
|
|
$( ".ui-page-active" ) );
|
|
|
|
|
|
|
|
|
|
return $ap.children( toolbarSelector ).each(function() {
|
|
|
|
|
|
|
|
|
|
var el = $( this ),
|
|
|
|
|
fromTop = $( window ).scrollTop(),
|
|
|
|
|
thisTop = getOffsetTop( el[ 0 ] ), // el.offset().top returns the wrong value on iPad iOS 3.2.1, call our workaround instead.
|
2010-10-02 03:36:25 +00:00
|
|
|
screenHeight = window.innerHeight,
|
|
|
|
|
thisHeight = el.outerHeight(),
|
2011-06-29 00:11:46 +00:00
|
|
|
alreadyVisible = ( el.is( ".ui-header-fixed" ) && fromTop <= thisTop + thisHeight ) ||
|
|
|
|
|
( el.is( ".ui-footer-fixed" ) && thisTop <= fromTop + screenHeight );
|
|
|
|
|
|
|
|
|
|
// Add state class
|
|
|
|
|
el.addClass( "ui-fixed-overlay" ).removeClass( "ui-fixed-inline" );
|
|
|
|
|
|
|
|
|
|
if ( !alreadyVisible && !immediately ) {
|
|
|
|
|
el.animationComplete(function() {
|
|
|
|
|
el.removeClass( "in" );
|
|
|
|
|
}).addClass( "in" );
|
2010-09-17 22:44:55 +00:00
|
|
|
}
|
2010-10-05 00:09:10 +00:00
|
|
|
setTop(el);
|
2011-06-29 00:11:46 +00:00
|
|
|
});
|
2010-09-12 15:33:23 +00:00
|
|
|
},
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
hide: function( immediately ) {
|
|
|
|
|
|
|
|
|
|
currentstate = "inline";
|
|
|
|
|
|
|
|
|
|
var $ap = $.mobile.activePage ? $.mobile.activePage :
|
|
|
|
|
$( ".ui-page-active" );
|
|
|
|
|
|
|
|
|
|
return $ap.children( toolbarSelector ).each(function() {
|
|
|
|
|
|
|
|
|
|
var el = $(this),
|
|
|
|
|
thisCSStop = el.css( "top" ),
|
|
|
|
|
classes;
|
|
|
|
|
|
|
|
|
|
thisCSStop = thisCSStop == "auto" ? 0 :
|
|
|
|
|
parseFloat(thisCSStop);
|
|
|
|
|
|
|
|
|
|
// Add state class
|
|
|
|
|
el.addClass( "ui-fixed-inline" ).removeClass( "ui-fixed-overlay" );
|
|
|
|
|
|
|
|
|
|
if ( thisCSStop < 0 || ( el.is( ".ui-header-fixed" ) && thisCSStop !== 0 ) ) {
|
|
|
|
|
|
|
|
|
|
if ( immediately ) {
|
|
|
|
|
el.css( "top", 0);
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
if ( el.css( "top" ) !== "auto" && parseFloat( el.css( "top" ) ) !== 0 ) {
|
|
|
|
|
|
|
|
|
|
classes = "out reverse";
|
|
|
|
|
|
|
|
|
|
el.animationComplete(function() {
|
|
|
|
|
el.removeClass( classes ).css( "top", 0 );
|
|
|
|
|
}).addClass( classes );
|
2010-11-12 00:08:45 +00:00
|
|
|
}
|
2010-09-12 12:39:32 +00:00
|
|
|
}
|
2010-09-10 22:23:13 +00:00
|
|
|
}
|
|
|
|
|
});
|
2010-09-12 15:33:23 +00:00
|
|
|
},
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
startShowTimer: function() {
|
|
|
|
|
|
2011-01-24 15:11:19 +00:00
|
|
|
$.fixedToolbars.clearShowTimer();
|
2011-06-29 00:11:46 +00:00
|
|
|
|
2011-01-24 15:11:19 +00:00
|
|
|
var args = $.makeArray(arguments);
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
delayTimer = setTimeout(function() {
|
2011-01-24 15:11:19 +00:00
|
|
|
delayTimer = undefined;
|
2011-06-29 00:11:46 +00:00
|
|
|
$.fixedToolbars.show.apply( null, args );
|
2011-01-24 15:11:19 +00:00
|
|
|
}, showDelay);
|
|
|
|
|
},
|
2011-06-29 00:11:46 +00:00
|
|
|
|
2011-01-24 15:11:19 +00:00
|
|
|
clearShowTimer: function() {
|
2011-06-29 00:11:46 +00:00
|
|
|
if ( delayTimer ) {
|
|
|
|
|
clearTimeout( delayTimer );
|
2011-01-24 15:11:19 +00:00
|
|
|
}
|
|
|
|
|
delayTimer = undefined;
|
2010-09-12 15:33:23 +00:00
|
|
|
},
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
toggle: function( from ) {
|
|
|
|
|
if ( from ) {
|
|
|
|
|
currentstate = from;
|
|
|
|
|
}
|
|
|
|
|
return ( currentstate === "overlay" ) ? $.fixedToolbars.hide() :
|
|
|
|
|
$.fixedToolbars.show();
|
2010-12-09 14:01:31 +00:00
|
|
|
},
|
2011-06-29 00:11:46 +00:00
|
|
|
|
|
|
|
|
setTouchToggleEnabled: function(enabled) {
|
|
|
|
|
touchToggleEnabled = enabled;
|
|
|
|
|
}
|
2010-09-12 15:33:23 +00:00
|
|
|
};
|
|
|
|
|
})();
|
2010-09-12 12:39:32 +00:00
|
|
|
|
2011-03-07 17:27:57 +00:00
|
|
|
})(jQuery);
|