mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-12 11:25:09 +00:00
Merge pull request #51500 from diptanilsaha/pos_ui_ux
This commit is contained in:
@@ -5,6 +5,7 @@ frappe.pages["point-of-sale"].on_page_load = function (wrapper) {
|
||||
parent: wrapper,
|
||||
title: __("Point of Sale"),
|
||||
single_column: true,
|
||||
hide_sidebar: true,
|
||||
});
|
||||
|
||||
frappe.require("point-of-sale.bundle.js", function () {
|
||||
|
||||
@@ -258,33 +258,6 @@ erpnext.PointOfSale.Controller = class {
|
||||
this.page.clear_icons();
|
||||
this.page.set_primary_action(__("New Invoice"), this.new_invoice_event.bind(this));
|
||||
this.page.set_secondary_action(__("Recent Orders"), this.toggle_recent_order.bind(this));
|
||||
this.page.add_action_icon(
|
||||
"fullscreen",
|
||||
this.bind_fullscreen_events.bind(this),
|
||||
"btn-fullscreen",
|
||||
"Fullscreen"
|
||||
);
|
||||
this.page.add_action_icon(
|
||||
"minimize",
|
||||
this.bind_fullscreen_events.bind(this),
|
||||
"btn-minimize hide",
|
||||
"Minimize"
|
||||
);
|
||||
}
|
||||
|
||||
bind_fullscreen_events() {
|
||||
if (!document.fullscreenElement) {
|
||||
document.documentElement.requestFullscreen();
|
||||
this.toggle_fullscreen_btn(".btn-minimize", ".btn-fullscreen");
|
||||
} else if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
this.toggle_fullscreen_btn(".btn-fullscreen", ".btn-minimize");
|
||||
}
|
||||
}
|
||||
|
||||
toggle_fullscreen_btn(show, hide) {
|
||||
this.page.page_actions.find(hide).addClass("hide");
|
||||
this.page.page_actions.find(show).removeClass("hide");
|
||||
}
|
||||
|
||||
open_form_view() {
|
||||
|
||||
Reference in New Issue
Block a user