On resize management
This commit is contained in:
@@ -3,7 +3,7 @@ function Spot(asGlobals)
|
||||
self = this;
|
||||
this.consts = asGlobals.consts;
|
||||
this.consts.hash_sep = '-';
|
||||
this.consts.title = 'Te Araroa';
|
||||
this.consts.title = 'Spotty';
|
||||
this.consts.default_page = 'project';
|
||||
|
||||
/* Initialization */
|
||||
@@ -20,14 +20,15 @@ function Spot(asGlobals)
|
||||
self.elem.container = $('#container');
|
||||
self.elem.main = $('#main');
|
||||
|
||||
self.resetTmpFunctions();
|
||||
|
||||
//on window resize
|
||||
//$(window).resize(self.onResize).resize();
|
||||
$(window).on('resize', function(){self.onResize();});
|
||||
|
||||
//Setup menu
|
||||
//self.initMenu();
|
||||
|
||||
//Hash management
|
||||
self.resetTmpFunctions();
|
||||
$(window)
|
||||
.bind('hashchange', self.onHashChange)
|
||||
.trigger('hashchange');
|
||||
@@ -63,7 +64,7 @@ function Spot(asGlobals)
|
||||
this.get = function(sAction, fOnSuccess, oVars, fOnError, bProcessIcon)
|
||||
{
|
||||
if(!oVars) oVars = {};
|
||||
fOnError = fOnError || function(textStatus, errorThrown) {console.log(textStatus+' '+errorThrown);};
|
||||
fOnError = fOnError || function(sError) {console.log(sError);};
|
||||
bProcessIcon = bProcessIcon || false;
|
||||
//if(bProcessIcon) self.addBufferIcon();
|
||||
|
||||
@@ -86,7 +87,7 @@ function Spot(asGlobals)
|
||||
.fail(function(jqXHR, textStatus, errorThrown)
|
||||
{
|
||||
//if(bProcessIcon) self.resetIcon();
|
||||
fOnError(textStatus, errorThrown);
|
||||
fOnError(textStatus+' '+errorThrown);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -147,6 +148,7 @@ function Spot(asGlobals)
|
||||
self.pageInit = function(asHash){console.log('no init for the page: '+asHash.page)};
|
||||
self.onSamePageMove = function(asHash){return false};
|
||||
self.onQuitPage = function(){return true};
|
||||
self.onResize = function(){};
|
||||
self.onFeedback = function(sType, sMsg){feedback(sType, sMsg);};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user