diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js index 6db423ba238105f058d073abbd82f6a6ff51b9c7..cccaf07acae22ee503b56758b18757b9cd395d38 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.js @@ -8,6 +8,7 @@ var ISPConfig = { indicatorCompleted: false, registeredHooks: new Array(), new_tpl_add_id: 0, + dataLogTimer: 0, options: { useLoadIndicator: false, @@ -175,6 +176,8 @@ var ISPConfig = { ISPConfig.onAfterContentLoad(target, $('#'+formname).serialize()); ISPConfig.pageFormChanged = false; } + clearTimeout(dataLogTimer); + ISPConfig.dataLogNotification(); ISPConfig.hideLoadIndicator(); }, error: function(jqXHR, textStatus, errorThrown) { @@ -282,6 +285,8 @@ var ISPConfig = { ISPConfig.onAfterContentLoad(pagename, (params ? params : null)); ISPConfig.pageFormChanged = false; } + clearTimeout(dataLogTimer); // clear running dataLogTimer + ISPConfig.dataLogNotification(); ISPConfig.hideLoadIndicator(); }, error: function() { @@ -346,7 +351,7 @@ var ISPConfig = { ISPConfig.loadMenus(); ISPConfig.keepalive(); - ISPConfig.datalognotification(); + ISPConfig.dataLogNotification(); setTimeout(function() { try { $('form#pageForm').find('input[name="username"]').focus(); @@ -494,7 +499,8 @@ var ISPConfig = { } }); }, - datalognotification: function() { + dataLogNotification: function() { + console.log(ISPConfig.options); var notificationContent = $.ajax({ type: "GET", url: "datalogstatus.php", @@ -502,17 +508,18 @@ var ISPConfig = { success: function(data, textStatus, jqXHR) { var dataLogItems = []; $.each( data['entries'], function( key, val ) { - dataLogItems.push('
  • ' + val['text'] + ': ' + val['count'] + '
  • '); + dataLogItems.push('
  • ' + val['text'] + ': ' + val['count'] + '
  • '); }); if(data['count'] > 0) { $('.modal-body').html(dataLogItems.join("")); $('.notification_text').text(data['count']); $('.notification').css('display',''); - setTimeout( function() { ISPConfig.datalognotification(); }, 2000 ); + dataLogTimer = setTimeout( function() { ISPConfig.dataLogNotification(); }, 2000 ); } else { $('.notification').css('display','none'); $('.modal-body').html(''); - setTimeout( function() { ISPConfig.datalognotification(); }, 5000 ); + $('#datalogModal').modal('hide'); + dataLogTimer = setTimeout( function() { ISPConfig.dataLogNotification(); }, 5000 ); } }, error: function() { diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.min.js b/interface/web/themes/default/assets/javascripts/ispconfig.min.js index 45cea0ec312201c4f61ff48f5fde47e5a44372bb..76af49d1dc114b1279a8ee8941fda095bcdb8cc6 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.min.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.min.js @@ -1 +1 @@ -var ISPConfig={pageFormChanged:!1,tabChangeWarningTxt:"",tabChangeDiscardTxt:"",tabChangeWarning:!1,tabChangeDiscard:!1,requestsRunning:0,indicatorCompleted:!1,registeredHooks:new Array,new_tpl_add_id:0,options:{useLoadIndicator:!1,useComboBox:!1},setOption:function(a,b){ISPConfig.options[a]=b},setOptions:function(a){$.extend(ISPConfig.options,a)},reportError:function(){},registerHook:function(a,b){ISPConfig.registeredHooks[a]||(ISPConfig.registeredHooks[a]=new Array);var c=ISPConfig.registeredHooks[a].length;ISPConfig.registeredHooks[a][c]=b},callHook:function(a,b){if(ISPConfig.registeredHooks[a])for(var c=0;c