From: Wilfried Goesgens Date: Mon, 9 Jul 2012 12:14:41 +0000 (+0200) Subject: SMTP-Queue: streamline redisplaying X-Git-Tag: v8.13~16 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=388112362d2dfec7d6e517727251d7dd092b3e65 SMTP-Queue: streamline redisplaying - on delete, display important message, and trigger re-display of the queue - re-add the refresh button which re-loads the page - add ListOnly=yes to output just the table to replace not the full document. --- diff --git a/webcit/smtpqueue.c b/webcit/smtpqueue.c index 0ce44e328..360886380 100644 --- a/webcit/smtpqueue.c +++ b/webcit/smtpqueue.c @@ -311,7 +311,10 @@ ServerStartModule_SMTP_QUEUE int qview_PrintPageHeader(SharedMessageStatus *Stat, void **ViewSpecific) { - output_headers(1, 1, 1, 0, 0, 0); + if (yesbstr("ListOnly")) + output_headers(1, 0, 0, 0, 0, 0); + else + output_headers(1, 1, 1, 0, 0, 0); return 0; } @@ -333,7 +336,10 @@ int qview_GetParamsGetServerCall(SharedMessageStatus *Stat, else { snprintf(cmd, len, "MSGS ALL|0|1"); snprintf(filter, flen, "SUBJ|QMSG"); - DoTemplate(HKEY("view_mailq_header"), NULL, NULL); + if (yesbstr("ListOnly")) + DoTemplate(HKEY("view_mailq_table"), NULL, NULL); + else + DoTemplate(HKEY("view_mailq_header"), NULL, NULL); return 200; } } @@ -364,16 +370,22 @@ int qview_RenderView_or_Tail(SharedMessageStatus *Stat, wcsession *WCC = WC; WCTemplputParams SubTP; - if (GetCount(WCC->summ) == 0) - DoTemplate(HKEY("view_mailq_footer_empty"),NULL, &SubTP); + if (yesbstr("ListOnly")) + DoTemplate(HKEY("view_mailq_footer_listonly"),NULL, &SubTP); else - DoTemplate(HKEY("view_mailq_footer"),NULL, &SubTP); - + { + if (GetCount(WCC->summ) == 0) + DoTemplate(HKEY("view_mailq_footer_empty"),NULL, &SubTP); + else + DoTemplate(HKEY("view_mailq_footer"),NULL, &SubTP); + } + return 0; } int qview_Cleanup(void **ViewSpecific) { - wDumpContent(1); + + wDumpContent(yesbstr("ListOnly")?0:1); return 0; } diff --git a/webcit/static/t/view_mailq/footer.html b/webcit/static/t/view_mailq/footer.html index 2880a2b46..d6c5574b5 100644 --- a/webcit/static/t/view_mailq/footer.html +++ b/webcit/static/t/view_mailq/footer.html @@ -1,7 +1,7 @@ - - +



+ diff --git a/webcit/static/t/view_mailq/footer_empty.html b/webcit/static/t/view_mailq/footer_empty.html index 52e2324b6..50ac5ad05 100644 --- a/webcit/static/t/view_mailq/footer_empty.html +++ b/webcit/static/t/view_mailq/footer_empty.html @@ -1,5 +1,5 @@ - +



diff --git a/webcit/static/t/view_mailq/footer_listonly.html b/webcit/static/t/view_mailq/footer_listonly.html new file mode 100644 index 000000000..bdcc76e37 --- /dev/null +++ b/webcit/static/t/view_mailq/footer_listonly.html @@ -0,0 +1 @@ + diff --git a/webcit/static/t/view_mailq/header.html b/webcit/static/t/view_mailq/header.html index 98cd3be6f..20e5ce3e4 100644 --- a/webcit/static/t/view_mailq/header.html +++ b/webcit/static/t/view_mailq/header.html @@ -25,16 +25,8 @@
- - +
+ +
+ diff --git a/webcit/static/t/view_mailq/table.html b/webcit/static/t/view_mailq/table.html new file mode 100644 index 000000000..4d036e4cc --- /dev/null +++ b/webcit/static/t/view_mailq/table.html @@ -0,0 +1,13 @@ +
+
- - - - - - - - - -
+ diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 632153126..fb828a683 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -931,8 +931,8 @@ function WCLog(msg) { } function RefreshSMTPqueueDisplay() { - new Ajax.Updater('smtpqueue_inner_div', - 'display_smtpqueue_inner_div', { method: 'get', + new Ajax.Updater('mailqueue_list', + 'dotskip?room=__CitadelSMTPspoolout__&view=11&ListOnly=yes', { method: 'get', parameters: Math.random() } ); } @@ -942,7 +942,7 @@ function DeleteSMTPqueueMsg(msgnum1, msgnum2) { 'ajax_servcmd', { method: 'post', parameters: p, - onComplete: RefreshSMTPqueueDisplay() + onComplete: function(transport) { ajax_important_message(transport.responseText.substr(4)); RefreshSMTPqueueDisplay();} } ); }
+ + + + + + + + + +