ソースを参照

fix: Add missing Toggle Full Width action in Navbar Settings

version-14
Deepesh Garg 5年前
コミット
ecacb4cc4e
3個のファイルの変更25行の追加0行の削除
  1. +1
    -0
      frappe/patches.txt
  2. +18
    -0
      frappe/patches/v13_0/add_toggle_width_in_navbar_settings.py
  3. +6
    -0
      frappe/utils/install.py

+ 1
- 0
frappe/patches.txt ファイルの表示

@@ -299,3 +299,4 @@ frappe.patches.v13_0.rename_is_custom_field_in_dashboard_chart
frappe.patches.v13_0.add_standard_navbar_items frappe.patches.v13_0.add_standard_navbar_items
frappe.patches.v13_0.generate_theme_files_in_public_folder frappe.patches.v13_0.generate_theme_files_in_public_folder
frappe.patches.v13_0.increase_password_length frappe.patches.v13_0.increase_password_length
frappe.patches.v13_0.add_toggle_width_in_navbar_settings

+ 18
- 0
frappe/patches/v13_0/add_toggle_width_in_navbar_settings.py ファイルの表示

@@ -0,0 +1,18 @@
from __future__ import unicode_literals
import frappe

def execute():
navbar_settings = navbar_settings = frappe.get_single("Navbar Settings")

for navbar_item in navbar_settings.settings_dropdown[4:]:
navbar_item.idx = navbar_item.idx + 1

navbar_settings.append('settings_dropdown', {
'item_label': 'Toggle Full Width',
'item_type': 'Action',
'action': 'frappe.ui.toolbar.toggle_full_width()',
'is_standard': 1,
'idx': 6
})

navbar_settings.save()

+ 6
- 0
frappe/utils/install.py ファイルの表示

@@ -201,6 +201,12 @@ def add_standard_navbar_items():
'action': 'frappe.ui.toolbar.view_website()', 'action': 'frappe.ui.toolbar.view_website()',
'is_standard': 1 'is_standard': 1
}, },
{
'item_label': 'Toggle Full Width',
'item_type': 'Action',
'action': 'frappe.ui.toolbar.toggle_full_width()',
'is_standard': 1
},
{ {
'item_label': 'Background Jobs', 'item_label': 'Background Jobs',
'item_type': 'Route', 'item_type': 'Route',


読み込み中…
キャンセル
保存