mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
* improved "access denied" handler (catch all requests)
This commit is contained in:
parent
ed2544ba8c
commit
1e36a1604c
2 changed files with 5 additions and 6 deletions
|
|
@ -577,7 +577,6 @@ function loadTasks(opts)
|
|||
});
|
||||
refreshTaskCnt();
|
||||
$('#tasklist').html(tasks);
|
||||
//port: if(json.denied) errorDenied();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@ mytinytodoStorageAjax.prototype =
|
|||
{
|
||||
if(!this[action]) throw "Unknown storage action: "+action;
|
||||
|
||||
this[action](params, callback);
|
||||
this[action](params, function(json){
|
||||
if(json.denied) mtt.errorDenied();
|
||||
callback.call(mtt, json)
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
|
@ -142,10 +145,7 @@ mytinytodoStorageAjax.prototype =
|
|||
|
||||
publishList: function(params, callback)
|
||||
{
|
||||
$.post(this.mtt.mttUrl+'ajax.php?publishList', { list:params.list, publish:params.publish }, function(json){
|
||||
if(json.denied) mtt.errorDenied();
|
||||
callback.call(mtt, json)
|
||||
}, 'json');
|
||||
$.post(this.mtt.mttUrl+'ajax.php?publishList', { list:params.list, publish:params.publish }, callback, 'json');
|
||||
},
|
||||
|
||||
changeListOrder: function(params, callback)
|
||||
|
|
|
|||
Loading…
Reference in a new issue