mirror of
https://github.com/moparisthebest/app-UI
synced 2024-12-21 23:18:52 -05:00
added ability to deactivate noClickDelay
added ability to deactivate noClickDelay (e.g.: if it isn't needed)
This commit is contained in:
parent
681925845f
commit
ba82104912
@ -17,7 +17,8 @@ var SplitViewNavigator = function( target, options ) {
|
||||
CSSNamespace: 'splitViewNavigator_',
|
||||
toggleButtonLabel: 'Menu',
|
||||
backLinkCSS: 'viewNavigator_backButton',
|
||||
bindToWindow: true
|
||||
bindToWindow: true,
|
||||
useNoClickDelay: true
|
||||
};
|
||||
|
||||
this.options = options = $.extend( {}, defaults, options );
|
||||
@ -72,8 +73,10 @@ var SplitViewNavigator = function( target, options ) {
|
||||
|
||||
this.contentOverlay.click( function(event){ self.hideSidebar() } );
|
||||
|
||||
new NoClickDelay( this.contentOverlay.get()[0] );
|
||||
new NoClickDelay( this.toggleSidebarButton.get()[0] );
|
||||
if ( this.options.useNoClickDelay ) {
|
||||
new NoClickDelay( this.contentOverlay.get()[0] );
|
||||
new NoClickDelay( this.toggleSidebarButton.get()[0] );
|
||||
}
|
||||
window.splitViewNavigator = this;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,8 @@ var ViewNavigator = function( target, options ) {
|
||||
var defaults = {
|
||||
CSSNamespace: 'viewNavigator_',
|
||||
backLinkCSS: 'viewNavigator_backButton',
|
||||
bindToWindow: true
|
||||
bindToWindow: true,
|
||||
useNoClickDelay: true
|
||||
};
|
||||
|
||||
this.options = options = $.extend( {}, defaults, options );
|
||||
@ -268,7 +269,7 @@ ViewNavigator.prototype.updateView = function( viewDescriptor ) {
|
||||
this.resetScroller();
|
||||
}
|
||||
|
||||
if ( viewDescriptor.backLabel ) {
|
||||
if ( viewDescriptor.backLabel && this.options.useNoClickDelay ) {
|
||||
new NoClickDelay( this.headerBacklink.get()[0] );
|
||||
}
|
||||
|
||||
@ -327,7 +328,7 @@ ViewNavigator.prototype.resetScroller = function() {
|
||||
self.scroller.scrollTo( 0, parseInt( scrollY, 10 ) );
|
||||
}
|
||||
}, 10 );
|
||||
//this.scroller = new iScroll( id );
|
||||
|
||||
}
|
||||
else {
|
||||
var target = $('#'+id );
|
||||
|
Loading…
Reference in New Issue
Block a user