From 666a6cdfaa12e0c310b9a0701408d999dd063aa6 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 1 Mar 2012 11:15:27 +0530 Subject: [PATCH] is_onload is global now --- js/legacy/widgets/form/form.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/legacy/widgets/form/form.js b/js/legacy/widgets/form/form.js index 90ad572483..5c6eb0896a 100644 --- a/js/legacy/widgets/form/form.js +++ b/js/legacy/widgets/form/form.js @@ -602,9 +602,9 @@ _f.Frm.prototype.refresh = function(docname) { this.doc = get_local(this.doctype, this.docname); // load the record for the first time, if not loaded (call 'onload') - var is_onload = false; + cur_frm.cscript.is_onload = false; if(!this.opendocs[this.docname]) { - is_onload = true; + cur_frm.cscript.is_onload = true; this.setnewdoc(this.docname); } @@ -652,7 +652,7 @@ _f.Frm.prototype.refresh = function(docname) { if(this.layout) this.layout.show(); // call onload post render for callbacks to be fired - if(is_onload) + if(cur_frm.cscript.is_onload) this.runclientscript('onload_post_render', this.doctype, this.docname); } else {