diff --git a/frappe/boot.py b/frappe/boot.py index e2b1c136e0..b471f10901 100644 --- a/frappe/boot.py +++ b/frappe/boot.py @@ -34,22 +34,9 @@ def get_bootinfo(): bootinfo.modules = {} bootinfo.module_list = [] - for app in frappe.get_installed_apps(frappe_last=True): - try: - modules = frappe.get_attr(app + ".config.desktop.get_data")() or {} - if isinstance(modules, dict): - bootinfo.modules.update(modules) - else: - for m in modules: - bootinfo.modules[m['module_name']] = m - bootinfo.module_list.append(m['module_name']) - except ImportError: - pass - except AttributeError: - pass + load_desktop_icons(bootinfo) bootinfo.module_app = frappe.local.module_app - bootinfo.hidden_modules = frappe.db.get_global("hidden_modules") bootinfo.doctype_icons = dict(frappe.db.sql("""select name, icon from tabDocType where ifnull(icon,'')!=''""")) bootinfo.single_types = frappe.db.sql_list("""select name from tabDocType where issingle=1""") @@ -88,6 +75,10 @@ def load_conf_settings(bootinfo): for key in ['developer_mode']: if key in conf: bootinfo[key] = conf.get(key) +def load_desktop_icons(bootinfo): + from frappe.desk.doctype.desktop_icon.desktop_icon import get_desktop_icons + bootinfo.desktop_icons = get_desktop_icons() + def get_allowed_pages(): roles = frappe.get_roles() page_info = {} diff --git a/frappe/config/desktop.py b/frappe/config/desktop.py index e90d97595a..bc54de29b9 100644 --- a/frappe/config/desktop.py +++ b/frappe/config/desktop.py @@ -41,5 +41,13 @@ def get_data(): "icon": "octicon octicon-circuit-board", "type": "module", "system_manager": 1 - } + }, + { + "module_name": "All Applications", + "label": _("All Applications"), + "color": "#4aa3df", + "icon": "octicon octicon-three-bars", + "type": "module", + "link": "javascript:frappe.desktop.all_applications.show()" + }, ] diff --git a/frappe/core/doctype/user/user.js b/frappe/core/doctype/user/user.js index eb33ab2de4..ec1b3cb0d4 100644 --- a/frappe/core/doctype/user/user.js +++ b/frappe/core/doctype/user/user.js @@ -98,7 +98,7 @@ frappe.ModuleEditor = Class.extend({ }, make: function() { var me = this; - $.each(keys(frappe.boot.modules), function(i, m) { + this.frm.doc.__onload.all_modules.forEach(function(m) { // TODO: add checkbox $(repl('
\