Merge pull request #566 from rmehta/develop
UI, awesome bar and style fixes
This commit is contained in:
commit
a8f445ff4d
11 changed files with 1050 additions and 1025 deletions
|
|
@ -75,14 +75,23 @@ def load_conf_settings(bootinfo):
|
|||
|
||||
def add_allowed_pages(bootinfo):
|
||||
roles = frappe.get_roles()
|
||||
bootinfo.page_info = dict(frappe.db.sql("""select distinct parent, modified from `tabPage Role`
|
||||
where role in (%s)""" % ', '.join(['%s']*len(roles)), roles))
|
||||
bootinfo.page_info = {}
|
||||
for p in frappe.db.sql("""select distinct
|
||||
tabPage.name, tabPage.modified, tabPage.title
|
||||
from `tabPage Role`, `tabPage`
|
||||
where `tabPage Role`.role in (%s)
|
||||
and `tabPage Role`.parent = `tabPage`.name""" % ', '.join(['%s']*len(roles)),
|
||||
roles, as_dict=True):
|
||||
|
||||
bootinfo.page_info[p.name] = {"modified":p.modified, "title":p.title}
|
||||
|
||||
# pages where role is not set are also allowed
|
||||
bootinfo.page_info.update(dict(frappe.db.sql("""select parent, modified
|
||||
for p in frappe.db.sql("""select name, modified, title
|
||||
from `tabPage` where
|
||||
(select count(*) from `tabPage Role`
|
||||
where `tabPage Role`.parent=tabPage.name) = 0""")))
|
||||
where `tabPage Role`.parent=tabPage.name) = 0""", as_dict=1):
|
||||
|
||||
bootinfo.page_info[p.name] = {"modified":p.modified, "title":p.title}
|
||||
|
||||
def load_translations(bootinfo):
|
||||
if frappe.local.lang != 'en':
|
||||
|
|
|
|||
|
|
@ -286,13 +286,26 @@ def install(db_name, root_login="root", root_password=None, source_sql=None,
|
|||
from frappe.installer import install_db, install_app, make_site_dirs
|
||||
verbose = not quiet
|
||||
|
||||
try:
|
||||
installed = frappe.get_installed_apps()
|
||||
except Exception, e:
|
||||
if e.args[0]!= 1146:
|
||||
raise
|
||||
installed = []
|
||||
|
||||
install_db(root_login=root_login, root_password=root_password, db_name=db_name, source_sql=source_sql,
|
||||
admin_password = admin_password, verbose=verbose, force=force, site_config=site_config, reinstall=reinstall)
|
||||
make_site_dirs()
|
||||
install_app("frappe", verbose=verbose, set_as_patched=not source_sql)
|
||||
|
||||
if frappe.conf.get("install_apps"):
|
||||
for app in frappe.conf.install_apps:
|
||||
install_app(app, verbose=verbose, set_as_patched=not source_sql)
|
||||
|
||||
if installed:
|
||||
for app in installed:
|
||||
install_app(app, verbose=verbose, set_as_patched=not source_sql)
|
||||
|
||||
frappe.destroy()
|
||||
|
||||
@cmd
|
||||
|
|
|
|||
|
|
@ -1,255 +1,254 @@
|
|||
{
|
||||
"_last_update": null,
|
||||
"_user_tags": null,
|
||||
"allow_attach": null,
|
||||
"allow_copy": null,
|
||||
"allow_email": null,
|
||||
"allow_import": 1,
|
||||
"allow_print": null,
|
||||
"allow_rename": null,
|
||||
"allow_trash": null,
|
||||
"autoname": "File.######",
|
||||
"change_log": null,
|
||||
"client_script": null,
|
||||
"client_script_core": null,
|
||||
"client_string": null,
|
||||
"colour": null,
|
||||
"creation": "2012-12-12 11:19:22",
|
||||
"custom": null,
|
||||
"default_print_format": null,
|
||||
"description": null,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": null,
|
||||
"dt_template": null,
|
||||
"_last_update": null,
|
||||
"_user_tags": null,
|
||||
"allow_attach": null,
|
||||
"allow_copy": null,
|
||||
"allow_email": null,
|
||||
"allow_import": 1,
|
||||
"allow_print": null,
|
||||
"allow_rename": null,
|
||||
"allow_trash": null,
|
||||
"autoname": "File.######",
|
||||
"change_log": null,
|
||||
"client_script": null,
|
||||
"client_script_core": null,
|
||||
"client_string": null,
|
||||
"colour": null,
|
||||
"creation": "2012-12-12 11:19:22",
|
||||
"custom": null,
|
||||
"default_print_format": null,
|
||||
"description": null,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": null,
|
||||
"dt_template": null,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "file_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "File Name",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": "file_name",
|
||||
"oldfieldtype": "Data",
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "file_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "File Name",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": "file_name",
|
||||
"oldfieldtype": "Data",
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "file_url",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "File URL",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "file_url",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "File URL",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "attached_to_doctype",
|
||||
"fieldtype": "Link",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "Attached To DocType",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": "DocType",
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": 1,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "attached_to_doctype",
|
||||
"fieldtype": "Link",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "Attached To DocType",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": "DocType",
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": 1,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "attached_to_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "Attached To Name",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": 1,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "attached_to_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "Attached To Name",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": 1,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "file_size",
|
||||
"fieldtype": "Int",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "File Size",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "file_size",
|
||||
"fieldtype": "Int",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "File Size",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": 1,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "content_hash",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": null,
|
||||
"label": "Content Hash",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": null,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": 1,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "content_hash",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": null,
|
||||
"label": "Content Hash",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": null,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": 1,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
}
|
||||
],
|
||||
"hide_heading": null,
|
||||
"hide_toolbar": null,
|
||||
"icon": "icon-file",
|
||||
"idx": 1,
|
||||
"in_create": 1,
|
||||
"in_dialog": null,
|
||||
"is_submittable": null,
|
||||
"is_transaction_doc": null,
|
||||
"issingle": null,
|
||||
"istable": null,
|
||||
"max_attachments": null,
|
||||
"menu_index": null,
|
||||
"modified": "2014-04-16 09:28:02.979858",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "File Data",
|
||||
"name_case": null,
|
||||
"owner": "Administrator",
|
||||
"parent": null,
|
||||
"parent_node": null,
|
||||
"parentfield": null,
|
||||
"parenttype": null,
|
||||
],
|
||||
"hide_heading": null,
|
||||
"hide_toolbar": null,
|
||||
"icon": "icon-file",
|
||||
"idx": 1,
|
||||
"in_create": 1,
|
||||
"in_dialog": null,
|
||||
"is_submittable": null,
|
||||
"is_transaction_doc": null,
|
||||
"issingle": null,
|
||||
"istable": null,
|
||||
"max_attachments": null,
|
||||
"menu_index": null,
|
||||
"modified": "2014-04-16 09:28:02.979858",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "File Data",
|
||||
"name_case": null,
|
||||
"owner": "Administrator",
|
||||
"parent": null,
|
||||
"parent_node": null,
|
||||
"parentfield": null,
|
||||
"parenttype": null,
|
||||
"permissions": [
|
||||
{
|
||||
"amend": null,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": null,
|
||||
"import": null,
|
||||
"match": null,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": null,
|
||||
"restrict": null,
|
||||
"restricted": null,
|
||||
"role": "System Manager",
|
||||
"submit": null,
|
||||
"amend": null,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": null,
|
||||
"import": null,
|
||||
"match": null,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": null,
|
||||
"restrict": null,
|
||||
"restricted": null,
|
||||
"role": "System Manager",
|
||||
"submit": null,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"plugin": null,
|
||||
"print_outline": null,
|
||||
"read_only": 0,
|
||||
"read_only_onload": null,
|
||||
"search_fields": null,
|
||||
"section_style": null,
|
||||
"server_code": null,
|
||||
"server_code_compiled": null,
|
||||
"server_code_core": null,
|
||||
"server_code_error": null,
|
||||
"show_in_menu": null,
|
||||
"smallicon": null,
|
||||
"subject": null,
|
||||
"tag_fields": null,
|
||||
"title_field": null,
|
||||
"use_template": null,
|
||||
],
|
||||
"plugin": null,
|
||||
"print_outline": null,
|
||||
"read_only": 0,
|
||||
"read_only_onload": null,
|
||||
"search_fields": null,
|
||||
"server_code": null,
|
||||
"server_code_compiled": null,
|
||||
"server_code_core": null,
|
||||
"server_code_error": null,
|
||||
"show_in_menu": null,
|
||||
"smallicon": null,
|
||||
"subject": null,
|
||||
"tag_fields": null,
|
||||
"title_field": null,
|
||||
"use_template": null,
|
||||
"version": null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,162 +1,161 @@
|
|||
{
|
||||
"_last_update": null,
|
||||
"_user_tags": null,
|
||||
"allow_attach": null,
|
||||
"allow_copy": null,
|
||||
"allow_email": null,
|
||||
"allow_import": null,
|
||||
"allow_print": null,
|
||||
"allow_rename": 1,
|
||||
"allow_trash": null,
|
||||
"autoname": "field:module_name",
|
||||
"change_log": null,
|
||||
"client_script": null,
|
||||
"client_script_core": null,
|
||||
"client_string": null,
|
||||
"colour": null,
|
||||
"creation": "2013-01-10 16:34:03",
|
||||
"custom": null,
|
||||
"default_print_format": null,
|
||||
"description": null,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": null,
|
||||
"dt_template": null,
|
||||
"_last_update": null,
|
||||
"_user_tags": null,
|
||||
"allow_attach": null,
|
||||
"allow_copy": null,
|
||||
"allow_email": null,
|
||||
"allow_import": null,
|
||||
"allow_print": null,
|
||||
"allow_rename": 1,
|
||||
"allow_trash": null,
|
||||
"autoname": "field:module_name",
|
||||
"change_log": null,
|
||||
"client_script": null,
|
||||
"client_script_core": null,
|
||||
"client_string": null,
|
||||
"colour": null,
|
||||
"creation": "2013-01-10 16:34:03",
|
||||
"custom": null,
|
||||
"default_print_format": null,
|
||||
"description": null,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": null,
|
||||
"dt_template": null,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "module_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "Module Name",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": "module_name",
|
||||
"oldfieldtype": "Data",
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": null,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "module_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "Module Name",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": "module_name",
|
||||
"oldfieldtype": "Data",
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": null,
|
||||
"report_hide": null,
|
||||
"reqd": null,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
},
|
||||
},
|
||||
{
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "app_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "App Name",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": null,
|
||||
"report_hide": null,
|
||||
"reqd": 1,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"allow_on_submit": null,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"fieldname": "app_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": null,
|
||||
"ignore_restrictions": null,
|
||||
"in_filter": null,
|
||||
"in_list_view": 1,
|
||||
"label": "App Name",
|
||||
"no_column": null,
|
||||
"no_copy": null,
|
||||
"oldfieldname": null,
|
||||
"oldfieldtype": null,
|
||||
"options": null,
|
||||
"permlevel": 0,
|
||||
"print_hide": null,
|
||||
"print_width": null,
|
||||
"read_only": null,
|
||||
"report_hide": null,
|
||||
"reqd": 1,
|
||||
"search_index": null,
|
||||
"set_only_once": null,
|
||||
"trigger": null,
|
||||
"width": null
|
||||
}
|
||||
],
|
||||
"hide_heading": null,
|
||||
"hide_toolbar": null,
|
||||
"icon": "icon-sitemap",
|
||||
"idx": 1,
|
||||
"in_create": null,
|
||||
"in_dialog": null,
|
||||
"is_submittable": null,
|
||||
"is_transaction_doc": null,
|
||||
"issingle": null,
|
||||
"istable": null,
|
||||
"max_attachments": null,
|
||||
"menu_index": null,
|
||||
"modified": "2014-04-07 13:00:27.894115",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Module Def",
|
||||
"name_case": null,
|
||||
"owner": "Administrator",
|
||||
"parent": null,
|
||||
"parent_node": null,
|
||||
"parentfield": null,
|
||||
"parenttype": null,
|
||||
],
|
||||
"hide_heading": null,
|
||||
"hide_toolbar": null,
|
||||
"icon": "icon-sitemap",
|
||||
"idx": 1,
|
||||
"in_create": null,
|
||||
"in_dialog": null,
|
||||
"is_submittable": null,
|
||||
"is_transaction_doc": null,
|
||||
"issingle": null,
|
||||
"istable": null,
|
||||
"max_attachments": null,
|
||||
"menu_index": null,
|
||||
"modified": "2014-04-07 13:00:27.894115",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Module Def",
|
||||
"name_case": null,
|
||||
"owner": "Administrator",
|
||||
"parent": null,
|
||||
"parent_node": null,
|
||||
"parentfield": null,
|
||||
"parenttype": null,
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": null,
|
||||
"import": null,
|
||||
"match": null,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"restrict": null,
|
||||
"restricted": null,
|
||||
"role": "Administrator",
|
||||
"submit": 0,
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": null,
|
||||
"import": null,
|
||||
"match": null,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"restrict": null,
|
||||
"restricted": null,
|
||||
"role": "Administrator",
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
},
|
||||
{
|
||||
"amend": null,
|
||||
"cancel": null,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": null,
|
||||
"export": null,
|
||||
"import": null,
|
||||
"match": null,
|
||||
"permlevel": 0,
|
||||
"print": null,
|
||||
"read": 1,
|
||||
"report": null,
|
||||
"restrict": null,
|
||||
"restricted": null,
|
||||
"role": "System Manager",
|
||||
"submit": null,
|
||||
"amend": null,
|
||||
"cancel": null,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": null,
|
||||
"export": null,
|
||||
"import": null,
|
||||
"match": null,
|
||||
"permlevel": 0,
|
||||
"print": null,
|
||||
"read": 1,
|
||||
"report": null,
|
||||
"restrict": null,
|
||||
"restricted": null,
|
||||
"role": "System Manager",
|
||||
"submit": null,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"plugin": null,
|
||||
"print_outline": null,
|
||||
"read_only": null,
|
||||
"read_only_onload": null,
|
||||
"search_fields": null,
|
||||
"section_style": null,
|
||||
"server_code": null,
|
||||
"server_code_compiled": null,
|
||||
"server_code_core": null,
|
||||
"server_code_error": null,
|
||||
"show_in_menu": null,
|
||||
"smallicon": null,
|
||||
"subject": null,
|
||||
"tag_fields": null,
|
||||
"title_field": null,
|
||||
"use_template": null,
|
||||
],
|
||||
"plugin": null,
|
||||
"print_outline": null,
|
||||
"read_only": null,
|
||||
"read_only_onload": null,
|
||||
"search_fields": null,
|
||||
"server_code": null,
|
||||
"server_code_compiled": null,
|
||||
"server_code_core": null,
|
||||
"server_code_error": null,
|
||||
"show_in_menu": null,
|
||||
"smallicon": null,
|
||||
"subject": null,
|
||||
"tag_fields": null,
|
||||
"title_field": null,
|
||||
"use_template": null,
|
||||
"version": null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ def install_app(name, verbose=False, set_as_patched=True):
|
|||
|
||||
if name in installed_apps:
|
||||
print "App Already Installed"
|
||||
frappe.msgprint(_("App Already Installed"))
|
||||
frappe.msgprint("App {0} already installed".format(name))
|
||||
return
|
||||
|
||||
if name != "frappe":
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ frappe.Application = Class.extend({
|
|||
if(localStorage["page_info"]) {
|
||||
frappe.boot.allowed_pages = [];
|
||||
page_info = JSON.parse(localStorage["page_info"]);
|
||||
$.each(frappe.boot.page_info, function(name, modified) {
|
||||
if(page_info[name]!=modified) {
|
||||
$.each(frappe.boot.page_info, function(name, p) {
|
||||
if(page_info[name].modified != p.modified) {
|
||||
delete localStorage["_page:" + name];
|
||||
}
|
||||
frappe.boot.allowed_pages.push(name);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ function msgprint(msg, title) {
|
|||
}
|
||||
|
||||
// Floating Message
|
||||
function show_alert(txt, add_class) {
|
||||
function show_alert(txt, seconds) {
|
||||
if(!$('#dialog-container').length) {
|
||||
$('<div id="dialog-container">').appendTo('body');
|
||||
}
|
||||
|
|
@ -113,13 +113,13 @@ function show_alert(txt, add_class) {
|
|||
$('<div id="alert-container"></div>').appendTo('#dialog-container');
|
||||
}
|
||||
|
||||
var div = $('<div class="alert alert-warning">\
|
||||
<a class="close">×</a>'+ txt +'</div>')
|
||||
var div = $('<div class="alert alert-warning" style="box-shadow: 0px 0px 2px rgba(0,0,0,0.5)">\
|
||||
<a class="close" style="margin-left: 10px;">×</a>'+ txt +'</div>')
|
||||
.appendTo('#alert-container')
|
||||
div.find('.close').click(function() {
|
||||
$(this).parent().remove();
|
||||
return false;
|
||||
});
|
||||
div.delay(7000).fadeOut(500);
|
||||
div.delay(seconds ? seconds * 1000 : 4000).fadeOut(300);
|
||||
return div;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,24 +33,7 @@ frappe.search = {
|
|||
frappe.search.options.sort(function(a, b) {
|
||||
return a.match.length - b.match.length; });
|
||||
|
||||
frappe.search.options.push({
|
||||
value: __("Help on Search"),
|
||||
onclick: function() {
|
||||
var txt = '<table class="table table-bordered">\
|
||||
<tr><td style="width: 50%">'+__("Make a new record")+'</td><td>'+
|
||||
__("<b>new</b> <i>type of document</i>")+'</td></tr>\
|
||||
<tr><td>'+__("List a document type")+'</td><td>'+
|
||||
__("<i>document type...</i>, e.g. <b>customer</b>")+'</td></tr>\
|
||||
<tr><td>'+__("Search in a document type")+'</td><td>'+
|
||||
__("<i>text</i> <b>in</b> <i>document type</i>")+'</td></tr>\
|
||||
<tr><td>'+__("Open a module or tool")+'</td><td>'+
|
||||
__("<i>module name...</i>")+'</td></tr>\
|
||||
<tr><td>'+__("Calculate")+'</td><td>'+
|
||||
__("<i>e.g. <strong>(55 + 434) / 4</strong> or <strong>=Math.sin(Math.PI/2)</strong>...</i>")+'</td></tr>\
|
||||
</table>'
|
||||
msgprint(txt, "Search Help");
|
||||
}
|
||||
});
|
||||
frappe.search.add_help();
|
||||
|
||||
response(frappe.search.options);
|
||||
},
|
||||
|
|
@ -78,7 +61,36 @@ frappe.search = {
|
|||
.data('item.autocomplete', d)
|
||||
.html('<a><p>' + html + '</p></a>')
|
||||
.appendTo(ul);
|
||||
};;
|
||||
};
|
||||
|
||||
frappe.search.make_page_title_map();
|
||||
},
|
||||
add_help: function() {
|
||||
frappe.search.options.push({
|
||||
value: __("Help on Search"),
|
||||
onclick: function() {
|
||||
var txt = '<table class="table table-bordered">\
|
||||
<tr><td style="width: 50%">'+__("Make a new record")+'</td><td>'+
|
||||
__("<b>new</b> <i>type of document</i>")+'</td></tr>\
|
||||
<tr><td>'+__("List a document type")+'</td><td>'+
|
||||
__("<i>document type...</i>, e.g. <b>customer</b>")+'</td></tr>\
|
||||
<tr><td>'+__("Search in a document type")+'</td><td>'+
|
||||
__("<i>text</i> <b>in</b> <i>document type</i>")+'</td></tr>\
|
||||
<tr><td>'+__("Open a module or tool")+'</td><td>'+
|
||||
__("<i>module name...</i>")+'</td></tr>\
|
||||
<tr><td>'+__("Calculate")+'</td><td>'+
|
||||
__("<i>e.g. <strong>(55 + 434) / 4</strong> or <strong>=Math.sin(Math.PI/2)</strong>...</i>")+'</td></tr>\
|
||||
</table>'
|
||||
msgprint(txt, "Search Help");
|
||||
}
|
||||
});
|
||||
},
|
||||
make_page_title_map: function() {
|
||||
frappe.search.pages = {};
|
||||
$.each(frappe.boot.page_info, function(name, p) {
|
||||
frappe.search.pages[p.title] = p;
|
||||
p.name = name;
|
||||
});
|
||||
},
|
||||
find: function(list, txt, process) {
|
||||
var ret = null;
|
||||
|
|
@ -98,7 +110,7 @@ frappe.search.verbs = [
|
|||
// search in list if current
|
||||
function(txt) {
|
||||
var route = frappe.get_route();
|
||||
if(route[0]==="List") {
|
||||
if(route[0]==="List" && txt.indexOf(" in") === -1) {
|
||||
frappe.search.options.push({
|
||||
value: __('Find {0} in {1}', ["<b>"+txt+"</b>", "<b>" + route[1] + "</b>"]),
|
||||
route_options: {"name": ["like", "%" + txt + "%"]},
|
||||
|
|
@ -135,10 +147,10 @@ frappe.search.verbs = [
|
|||
|
||||
// pages
|
||||
function(txt) {
|
||||
frappe.search.find(keys(frappe.boot.page_info), txt, function(match) {
|
||||
frappe.search.find(keys(frappe.search.pages), txt, function(match) {
|
||||
return {
|
||||
value: __("Open {0}", ["<b>"+match+"</b>"]),
|
||||
route: [match]
|
||||
route: [frappe.search.pages[match].route || frappe.search.pages[match].name]
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ frappe.ui.toolbar.Toolbar = Class.extend({
|
|||
placeholder="' + __("Search or type a command") + '" \
|
||||
style="padding: 2px 6px; height: 24px; margin-top: 5px; \
|
||||
margin-left: 10px; background-color: #ddd; \
|
||||
min-width: 250px; \
|
||||
min-width: 230px; \
|
||||
border-radius: 10px;">\
|
||||
</div>\
|
||||
</form>\
|
||||
|
|
@ -132,7 +132,7 @@ frappe.ui.toolbar.Toolbar = Class.extend({
|
|||
},
|
||||
set_user_name: function() {
|
||||
$('#toolbar-user-name').html('<img src="'
|
||||
+frappe.user_info().image+'" style="max-width: 24px; max-height: 24px">');
|
||||
+frappe.user_info().image+'" style="max-width: 24px; max-height: 24px; margin: -2px 0px;">');
|
||||
},
|
||||
|
||||
make_user_menu: function() {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ frappe.views.GridReport = Class.extend({
|
|||
$.extend(this, opts);
|
||||
|
||||
this.wrapper = $('<div>').appendTo(this.parent);
|
||||
this.appframe.parent.find(".appframe").css({"padding-top": "0px"});
|
||||
|
||||
if(this.filters) {
|
||||
this.make_filters();
|
||||
|
|
@ -353,8 +354,7 @@ frappe.views.GridReport = Class.extend({
|
|||
this.round_off_data();
|
||||
this.prepare_data_view();
|
||||
// plot might need prepared data
|
||||
this.wrapper.find(".processing").toggle(true);
|
||||
this.wrapper.find(".processing").delay(2000).fadeOut(300);
|
||||
show_alert("Updated", 2);
|
||||
this.render();
|
||||
this.render_plot && this.render_plot();
|
||||
},
|
||||
|
|
@ -370,12 +370,6 @@ frappe.views.GridReport = Class.extend({
|
|||
this.plot_area = $('<div class="plot" style="margin-bottom: 15px; display: none; \
|
||||
height: 300px; width: 100%;"></div>').appendTo(this.wrapper);
|
||||
|
||||
// print / export
|
||||
$('<div style="text-align: right;"> \
|
||||
<div class="processing" style="background-color: #fec; display: none; \
|
||||
float: left; margin: 2px">Updated! </div> \
|
||||
</div>').appendTo(this.wrapper);
|
||||
|
||||
this.appframe.add_primary_action(__("Export"), function() { return me.export(); }, "icon-download");
|
||||
|
||||
// grid wrapper
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue