diff --git a/js/legacy/form.compressed.js b/js/legacy/form.compressed.js index 263c986dde..2507e84483 100644 --- a/js/legacy/form.compressed.js +++ b/js/legacy/form.compressed.js @@ -252,8 +252,7 @@ if(st=='Write'){if(cur_frm.editable&&this.perm[this.df.permlevel]&&this.perm[thi this.grid.can_add_rows=true;} if(cur_frm.editable&&cur_frm.doc.docstatus>0){if(this.df.allow_on_submit&&cur_frm.doc.docstatus==1){this.grid.can_edit=true;if(this.df['default'].toLowerCase()=='no toolbar'){this.grid.can_add_rows=false;}else{this.grid.can_add_rows=true;}}else{this.grid.can_add_rows=false;this.grid.can_edit=false;}} if(this.df['default'].toLowerCase()=='no add rows'){this.grid.can_add_rows=false;}} -if(this.old_status!=st){if(st=='Write'){this.grid.show();}else if(st=='Read'){this.grid.show();}else{this.grid.hide();} -this.old_status=st;} +if(st=='Write'){this.grid.show();}else if(st=='Read'){this.grid.show();}else{this.grid.hide();} this.grid.refresh();} _f.TableField.prototype.set=function(v){};_f.TableField.prototype.set_input=function(v){};_f.CodeField=function(){};_f.CodeField.prototype=new Field();_f.CodeField.prototype.make_input=function(){var me=this;this.label_span.innerHTML=this.df.label;this.input=$a(this.input_area,'textarea','code_text',{fontSize:'12px'});this.myid=wn.dom.set_unique_id(this.input);this.input.set_input=function(v){if(me.editor){me.editor.setContent(v);}else{me.input.value=v;me.input.innerHTML=v;}} this.input.onchange=function(){if(me.editor){}else{me.set(me.input.value);} diff --git a/js/legacy/widgets/form/form_fields.js b/js/legacy/widgets/form/form_fields.js index 1c5aa1360f..67b13da569 100644 --- a/js/legacy/widgets/form/form_fields.js +++ b/js/legacy/widgets/form/form_fields.js @@ -306,17 +306,17 @@ _f.TableField.prototype.refresh = function() { } } - if(this.old_status!=st) { - if(st=='Write') { - // nothing - this.grid.show(); - } else if(st=='Read') { - this.grid.show(); - } else { - this.grid.hide(); - } - this.old_status = st; // save this if next time + //if(this.old_status!=st) { + if(st=='Write') { + // nothing + this.grid.show(); + } else if(st=='Read') { + this.grid.show(); + } else { + this.grid.hide(); } + // this.old_status = st; // save this if next time + //} this.grid.refresh(); }