Merge branch 'develop' into fix-13167
This commit is contained in:
commit
24244d1c7d
4 changed files with 20 additions and 5 deletions
|
|
@ -289,7 +289,7 @@ frappe.Application = class Application {
|
|||
}
|
||||
if (!frappe.workspaces['home']) {
|
||||
// default workspace is settings for Frappe
|
||||
frappe.workspaces['home'] = frappe.workspaces['build'];
|
||||
frappe.workspaces['home'] = frappe.workspaces[Object.keys(frappe.workspaces)[0]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1125,9 +1125,17 @@ frappe.ui.form.Form = class FrappeForm {
|
|||
|
||||
add_custom_button(label, fn, group) {
|
||||
// temp! old parameter used to be icon
|
||||
if(group && group.indexOf("fa fa-")!==-1) group = null;
|
||||
var btn = this.page.add_inner_button(label, fn, group);
|
||||
if(btn) {
|
||||
if (group && group.indexOf("fa fa-") !== -1)
|
||||
group = null;
|
||||
|
||||
let btn = this.page.add_inner_button(label, fn, group);
|
||||
|
||||
if (btn) {
|
||||
// Add actions as menu item in Mobile View
|
||||
let menu_item_label = group ? `${group} > ${label}` : label;
|
||||
let menu_item = this.page.add_menu_item(menu_item_label, fn, false);
|
||||
menu_item.parent().addClass("hidden-lg");
|
||||
|
||||
this.custom_buttons[label] = btn;
|
||||
}
|
||||
return btn;
|
||||
|
|
|
|||
|
|
@ -120,6 +120,12 @@ pre {
|
|||
}
|
||||
}
|
||||
|
||||
.hidden-lg {
|
||||
@include media-breakpoint-up(md) {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.visible-xs {
|
||||
@include media-breakpoint-up(sm) {
|
||||
display: none !important;
|
||||
|
|
|
|||
|
|
@ -505,8 +505,9 @@ window.print();
|
|||
|
||||
// close the window after print
|
||||
// NOTE: doesn't close if print is cancelled in Chrome
|
||||
// Changed timeout to 5s from 1s because it blocked mobile view rendering
|
||||
setTimeout(function() {
|
||||
window.close();
|
||||
}, 1000);
|
||||
}, 5000);
|
||||
</script>
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue