New settings panel & &subscription
This commit is contained in:
@@ -65,12 +65,12 @@ function Spot(asGlobals)
|
||||
|
||||
/* Interface with server */
|
||||
|
||||
this.get = function(sAction, fOnSuccess, oVars, fOnError, bProcessIcon)
|
||||
this.get = function(sAction, fOnSuccess, oVars, fOnError, fonProgress)
|
||||
{
|
||||
if(!oVars) oVars = {};
|
||||
fOnError = fOnError || function(sError) {console.log(sError);};
|
||||
bProcessIcon = bProcessIcon || false;
|
||||
//if(bProcessIcon) self.addBufferIcon();
|
||||
fonProgress = fonProgress || function(sState){};
|
||||
fonProgress('start');
|
||||
|
||||
oVars['a'] = sAction;
|
||||
oVars['t'] = self.consts.timezone;
|
||||
@@ -82,18 +82,15 @@ function Spot(asGlobals)
|
||||
})
|
||||
.done(function(oData)
|
||||
{
|
||||
fonProgress('done');
|
||||
if(oData.desc.substr(0, self.consts.lang_prefix.length)==self.consts.lang_prefix) oData.desc = self.lang(oData.desc.substr(5));
|
||||
|
||||
if(oData.result==self.consts.error) fOnError(oData.desc);
|
||||
else
|
||||
{
|
||||
//if(bProcessIcon) self.resetIcon();
|
||||
fOnSuccess(oData.data);
|
||||
}
|
||||
else fOnSuccess(oData.data);
|
||||
})
|
||||
.fail(function(jqXHR, textStatus, errorThrown)
|
||||
{
|
||||
//if(bProcessIcon) self.resetIcon();
|
||||
fonProgress('fail');
|
||||
fOnError(textStatus+' '+errorThrown);
|
||||
});
|
||||
};
|
||||
@@ -171,7 +168,7 @@ function Spot(asGlobals)
|
||||
self.onSamePageMove = function(asHash){return false};
|
||||
self.onQuitPage = function(){return true};
|
||||
self.onResize = function(){};
|
||||
self.onFeedback = function(sType, sMsg){feedback(sType, sMsg);};
|
||||
self.onFeedback = function(sType, sMsg){};
|
||||
self.onKeydown = function(oEvent){};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user