Skip to content

Commit 6608601

Browse files
fix(demo): removed toolbar eventlistener (backport #52171) (#52172)
Co-authored-by: Diptanil Saha <diptanil@frappe.io> fix(demo): removed toolbar eventlistener (#52171)
1 parent 195a2f3 commit 6608601

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

erpnext/public/js/utils/demo.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
frappe.provide("erpnext.demo");
22

3-
$(document).on("toolbar_setup", function () {
4-
if (frappe.boot.sysdefaults.demo_company) {
5-
render_clear_demo_action();
6-
}
7-
});
8-
93
$(document).on("desktop_screen", function (event, data) {
104
data.desktop.add_menu_item({
115
label: __("Clear Demo Data"),
@@ -19,16 +13,6 @@ $(document).on("desktop_screen", function (event, data) {
1913
});
2014
});
2115

22-
function render_clear_demo_action() {
23-
let demo_action = $(
24-
`<a class="dropdown-item" onclick="return erpnext.demo.clear_demo()">
25-
${__("Clear Demo Data")}
26-
</a>`
27-
);
28-
29-
demo_action.appendTo($("#toolbar-user"));
30-
}
31-
3216
erpnext.demo.clear_demo = function () {
3317
frappe.confirm(__("Are you sure you want to clear all demo data?"), () => {
3418
frappe.call({

0 commit comments

Comments
 (0)