mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
* close ajax alert on back button click
This commit is contained in:
parent
ff90ca3fe0
commit
d9ba34d5b4
1 changed files with 7 additions and 1 deletions
|
|
@ -544,7 +544,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
|
||||
// AJAX Errors
|
||||
$(document).ajaxSend(function(r,s){
|
||||
$("#msg").hide().removeClass('mtt-error mtt-info').find('.msg-details').hide();
|
||||
hideAlert();
|
||||
clearTimeout(_mtt.timers.ajaxAnimation);
|
||||
_mtt.timers.ajaxAnimation = setTimeout( function(){
|
||||
$("#mtt").addClass("ajax-loading");
|
||||
|
|
@ -831,6 +831,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
|
||||
pageBack: function(clicked)
|
||||
{
|
||||
hideAlert();
|
||||
// If clicked on back button in settings we'll use history navigation
|
||||
if ( clicked &&
|
||||
this.pages.current && this.pages.current.page == 'ajax' && this.pages.current.pageClass == 'settings' &&
|
||||
|
|
@ -2525,6 +2526,11 @@ function toggleMsgDetails()
|
|||
else el.hide()
|
||||
}
|
||||
|
||||
function hideAlert()
|
||||
{
|
||||
$("#msg").hide().removeClass('mtt-error mtt-info').find('.msg-details').hide();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Authorization
|
||||
|
|
|
|||
Loading…
Reference in a new issue