From: Wilfried Goesgens Date: Sat, 30 Jun 2012 14:35:39 +0000 (+0200) Subject: SMTPQueue: add ability to rerun the queue X-Git-Tag: v8.13~40 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=d7bf32c0e81825e584e97354f3f1306bcaf223b3 SMTPQueue: add ability to rerun the queue - to protect the user from himself force him to read the hint text before actualy triggering SMTP runqueue - add the status of the runqueue to the important message to give feedback to the user. --- diff --git a/webcit/static/t/navbar.html b/webcit/static/t/navbar.html index 453759cef..608606f3e 100644 --- a/webcit/static/t/navbar.html +++ b/webcit/static/t/navbar.html @@ -167,4 +167,11 @@ + +
  • + + +
  • + + diff --git a/webcit/static/t/view_mailq/header.html b/webcit/static/t/view_mailq/header.html index d028db9dd..98cd3be6f 100644 --- a/webcit/static/t/view_mailq/header.html +++ b/webcit/static/t/view_mailq/header.html @@ -4,7 +4,6 @@ -
    + + + + +
    diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index c338cb055..956dd67b5 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -77,6 +77,18 @@ function ToggleLogEnable($Which) }); } +function SMTPRunQueue() +{ + var p; + + p= encodeURI('g_cmd=SMTP runqueue'); + new Ajax.Request('ajax_servcmd', { + method: 'post', + parameters: p, + onComplete: function(transport) { ajax_important_message(transport.responseText.substr(4));} + }); +} + function ToggleVisibility ($Which) { if (document.getElementById) @@ -177,6 +189,36 @@ function hide_imsg_popup() { document.poppedLayer.style.visibility = "hidden"; } +function unhide_imsg_popup() { + if (browserType == "gecko") { + document.poppedLayer = eval('document.getElementById(\'important_message\')'); + } + else if (browserType == "ie") { + document.poppedLayer = eval('document.all[\'important_message\']'); + } + else { + document.poppedLayer = eval('document.layers[\'`important_message\']'); + } + + document.poppedLayer.style.visibility = "visible"; + setTimeout('hide_imsg_popup()', 5000); +} + +function ajax_important_message(messagetext) +{ + if (browserType == "gecko") { + document.poppedLayer = eval('document.getElementById(\'important_message\')'); + } + else if (browserType == "ie") { + document.poppedLayer = eval('document.all[\'important_message\']'); + } + else { + document.poppedLayer = eval('document.layers[\'`important_message\']'); + } + document.poppedLayer.style.visibility = "visible"; + setTimeout('hide_imsg_popup()', 5000); + document.poppedLayer.innerHTML = messagetext; +} // This function activates the ajax-powered recipient autocompleters on the message entry screen. function activate_entmsg_autocompleters() {