updated usability of payment_to_invoice_matching tool and fixed hide_toolbar
This commit is contained in:
parent
f0d1eac4ff
commit
3cddbbacbc
3 changed files with 14 additions and 10 deletions
|
|
@ -191,10 +191,12 @@ _f.Frm.prototype.setup_std_layout = function() {
|
|||
});
|
||||
|
||||
// watermark
|
||||
$('<div style="font-size: 21px; color: #aaa; float: right;\
|
||||
margin-top: -5px; margin-right: -5px; z-index: 5;">'
|
||||
+ this.doctype + '</div>')
|
||||
.prependTo(this.page_layout.main);
|
||||
if(!this.meta.issingle) {
|
||||
$('<div style="font-size: 21px; color: #aaa; float: right;\
|
||||
margin-top: -5px; margin-right: -5px; z-index: 5;">'
|
||||
+ this.doctype + '</div>')
|
||||
.prependTo(this.page_layout.main);
|
||||
}
|
||||
|
||||
// footer
|
||||
this.setup_footer();
|
||||
|
|
@ -604,7 +606,7 @@ _f.Frm.prototype.refresh = function(docname) {
|
|||
_f.Frm.prototype.refresh_footer = function() {
|
||||
var f = this.page_layout.footer;
|
||||
if(f.save_area) {
|
||||
if(this.editable && (!this.meta.in_dialog || this.in_form)
|
||||
if(this.editable && (!this.meta.hide_toolbar) && (!this.meta.in_dialog || this.in_form)
|
||||
&& this.doc.docstatus==0 && !this.meta.istable && this.perm[0][WRITE]
|
||||
&& (this.fields && this.fields.length > 7) && !this.save_disabled) {
|
||||
f.show_save();
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ _f.FrmHeader = Class.extend({
|
|||
},
|
||||
set_label: function(labinfo) {
|
||||
this.$w.find('.label').remove();
|
||||
if(cur_frm.meta.hide_toolbar) return;
|
||||
$(repl('<span class="label %(lab_class)s">\
|
||||
%(lab_status)s</span>', {
|
||||
lab_status: labinfo[0],
|
||||
|
|
@ -123,6 +124,7 @@ _f.FrmHeader = Class.extend({
|
|||
|
||||
if(cur_frm.meta.hide_toolbar) {
|
||||
$('.appframe-toolbar').toggle(false);
|
||||
cur_frm.save_disabled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,16 +42,16 @@ wn.ui.form.States = Class.extend({
|
|||
</ul>\
|
||||
</div>\
|
||||
</div>').appendTo(this.frm.page_layout.body_header);
|
||||
this.$wrapper.toggle(false);
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
// hide if its not yet saved
|
||||
this.$wrapper.toggle(false);
|
||||
if(this.frm.doc.__islocal) {
|
||||
this.set_default_state();
|
||||
this.$wrapper.toggle(false);
|
||||
return;
|
||||
}
|
||||
this.$wrapper.toggle(true);
|
||||
|
||||
// state text
|
||||
var state = this.get_state();
|
||||
|
|
@ -76,9 +76,9 @@ wn.ui.form.States = Class.extend({
|
|||
this.show_actions(state);
|
||||
|
||||
// disable if not allowed
|
||||
} else {
|
||||
this.$wrapper.toggle(false);
|
||||
}
|
||||
if(!this.frm.doc.__islocal)
|
||||
this.$wrapper.toggle(true);
|
||||
}
|
||||
},
|
||||
|
||||
show_actions: function(state) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue