]> git.proxmox.com Git - pmg-gui.git/commitdiff
set the from date for QuarantineList from url parameter
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 23 Oct 2017 10:20:59 +0000 (12:20 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 23 Oct 2017 15:27:53 +0000 (17:27 +0200)
when we click a link in a Quarantine report, we want the
'from' date to be the day of that mail, so that we can
select the mail

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
js/Utils.js

index 73cd336b12b14df924452b32309f3ddd46772295..2f714e1e9dd43dfc22ab71b40cc31f9cd6285163 100644 (file)
@@ -670,10 +670,22 @@ Ext.define('PMG.Utils', {
        var cselect = qs.cselect;
        var action = qs.action;
        var ticket = qs.ticket;
+       var dateString = qs.date;
+
+       if (dateString) {
+           var date = new Date(dateString).getTime()/1000;
+
+           // set from date for QuarantineList
+           /*jslint confusion: true*/
+           /*from is a string above and number here */
+           PMG.QuarantineList.from = date;
+           /*jslint confusion: false*/
+       }
 
        delete qs.cselect;
        delete qs.action;
        delete qs.ticket;
+       delete qs.date;
 
        var newsearch = Ext.Object.toQueryString(qs);