[fix] [minor] workflow icon fix
This commit is contained in:
parent
0f04fcd2db
commit
1ef1f2763e
1 changed files with 9 additions and 7 deletions
|
|
@ -83,19 +83,21 @@ wn.ui.form.States = Class.extend({
|
|||
var state_doc = wn.model.get("Workflow State", {name:state})[0];
|
||||
|
||||
// set the icon
|
||||
this.workflow_button.find('i').removeClass()
|
||||
if (state_doc) {
|
||||
this.workflow_button.find('i').removeClass()
|
||||
.addClass("icon-white")
|
||||
.addClass("icon-" + state_doc.icon);
|
||||
|
||||
// set the style
|
||||
this.workflow_button.removeClass().addClass("btn btn-default dropdown-toggle")
|
||||
// set the style
|
||||
this.workflow_button.removeClass().addClass("btn btn-default dropdown-toggle")
|
||||
|
||||
if(state_doc && state_doc.style)
|
||||
this.workflow_button.addClass("btn-" + state_doc.style.toLowerCase());
|
||||
}
|
||||
|
||||
if(state_doc && state_doc.style)
|
||||
this.workflow_button.addClass("btn-" + state_doc.style.toLowerCase());
|
||||
|
||||
// show actions from that state
|
||||
this.show_actions(state);
|
||||
|
||||
|
||||
if(this.frm.doc.__islocal) {
|
||||
this.workflow_button.prop('disabled', true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue