fix in grid toolbar issue
This commit is contained in:
parent
aa2340c837
commit
1698bc4199
2 changed files with 11 additions and 12 deletions
|
|
@ -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);}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue