From 00403e3dcc6c0afb2625d76aeda14110b4819774 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 26 Nov 2012 12:31:28 +0530 Subject: [PATCH] support ticket: reload if older than 20 sec. --- support/doctype/support_ticket/support_ticket.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/support/doctype/support_ticket/support_ticket.js b/support/doctype/support_ticket/support_ticket.js index 5185b9a56b..97ed89a6aa 100644 --- a/support/doctype/support_ticket/support_ticket.js +++ b/support/doctype/support_ticket/support_ticket.js @@ -16,9 +16,7 @@ $.extend(cur_frm.cscript, { onload: function(doc, dt, dn) { - // - // help area - // + cur_frm.last_reload = new Date(); if(in_list(user_roles,'System Manager')) { cur_frm.page_layout.footer.help_area.innerHTML = '
\

Email Settings
\ @@ -29,6 +27,11 @@ $.extend(cur_frm.cscript, { }, refresh: function(doc) { + if(new Date() - cur_frm.last_reload > 20000) { + cur_frm.last_reload = new Date(); + cur_frm.reload_doc(); + return; + } erpnext.hide_naming_series(); cur_frm.cscript.make_listing(doc); if(!doc.__islocal) {