diff --git a/frappe/desk/doctype/dashboard_chart/dashboard_chart.json b/frappe/desk/doctype/dashboard_chart/dashboard_chart.json index 75941a9019..b5201a8b1f 100644 --- a/frappe/desk/doctype/dashboard_chart/dashboard_chart.json +++ b/frappe/desk/doctype/dashboard_chart/dashboard_chart.json @@ -224,15 +224,14 @@ }, { "default": "0", - "description": "This chart will be public to all Users if this is set", + "description": "This chart will be available to all Users if this is set", "fieldname": "is_public", "fieldtype": "Check", - "label": "Is Public", - "permlevel": 1 + "label": "Is Public" } ], "links": [], - "modified": "2020-04-23 13:01:07.178866", + "modified": "2020-05-01 15:22:59.119341", "modified_by": "Administrator", "module": "Desk", "name": "Dashboard Chart", diff --git a/frappe/desk/doctype/number_card/number_card.json b/frappe/desk/doctype/number_card/number_card.json index 6bdcf26f12..5fb058d8ce 100644 --- a/frappe/desk/doctype/number_card/number_card.json +++ b/frappe/desk/doctype/number_card/number_card.json @@ -72,7 +72,7 @@ }, { "default": "0", - "description": "This card will be public to all Users if this is set", + "description": "This card will be available to all Users if this is set", "fieldname": "is_public", "fieldtype": "Check", "label": "Is Public" @@ -99,7 +99,7 @@ } ], "links": [], - "modified": "2020-05-01 11:10:20.788844", + "modified": "2020-05-01 15:23:29.550243", "modified_by": "Administrator", "module": "Desk", "name": "Number Card", diff --git a/frappe/public/js/frappe/views/dashboard/dashboard_view.js b/frappe/public/js/frappe/views/dashboard/dashboard_view.js index 0ca096f07d..13c44d2130 100644 --- a/frappe/public/js/frappe/views/dashboard/dashboard_view.js +++ b/frappe/public/js/frappe/views/dashboard/dashboard_view.js @@ -24,6 +24,7 @@ frappe.views.DashboardView = class DashboardView extends frappe.views.ListView { this.setup_dashboard_page(); this.setup_dashboard_customization(); this.make_dashboard(); + this.setup_events(); } setup_dashboard_customization() { @@ -43,13 +44,11 @@ frappe.views.DashboardView = class DashboardView extends frappe.views.ListView {
${dashboard_name}
${__('Customize')}
- - ${__('Reset')} - / - ${__('Save')} - / - ${__('Discard')} - + ${__('Reset')} + / + ${__('Save')} + / + ${__('Discard')}
`); @@ -103,13 +102,11 @@ frappe.views.DashboardView = class DashboardView extends frappe.views.ListView { if (!this.charts.length && !this.number_cards.length) { this.render_empty_state(); } - - this.setup_events(); } setup_events() { - $(document.body).on('toggleFullWidth', () => this.make_dashboard()); - $(document.body).on('toggleListSidebar', () => this.make_dashboard()); + $(document.body).on('toggleFullWidth', () => this.render_dashboard()); + $(document.body).on('toggleListSidebar', () => this.render_dashboard()); } fetch_dashboard_items(doctype, filters, obj_name) { @@ -231,12 +228,14 @@ frappe.views.DashboardView = class DashboardView extends frappe.views.ListView { } reset_dashboard_customization() { - this.dashboard_settings = null; - frappe.model.user_settings.save( - this.doctype, 'dashboard_settings', this.dashboard_settings - ).then(() => this.make_dashboard()); + frappe.confirm(__("Are you sure you want to reset all customizations?"), () => { + this.dashboard_settings = null; + frappe.model.user_settings.save( + this.doctype, 'dashboard_settings', this.dashboard_settings + ).then(() => this.make_dashboard()); - this.toggle_customize(false); + this.toggle_customize(false); + }); } toggle_customize(show) { diff --git a/frappe/public/less/dashboard_view.less b/frappe/public/less/dashboard_view.less index c26045c21b..874e4e2e36 100644 --- a/frappe/public/less/dashboard_view.less +++ b/frappe/public/less/dashboard_view.less @@ -38,6 +38,10 @@ .customize-options { display: none; cursor: pointer; + + .customize-option:hover { + text-decoration: underline; + } } } } diff --git a/frappe/public/less/desktop.less b/frappe/public/less/desktop.less index 47d19f50e6..9ecff872f0 100644 --- a/frappe/public/less/desktop.less +++ b/frappe/public/less/desktop.less @@ -433,8 +433,9 @@ justify-content: space-between; .number { - font-size: 25px; - line-height: 2em; + font-weight: 600; + font-size: 26px; + line-height: 1.8em; } .number-text { @@ -638,4 +639,4 @@ transform: scale3d(0.5, 0.5, 0.5); opacity: 0; visibility: hidden; -} \ No newline at end of file +}