fixed list->new->onload hooks

This commit is contained in:
Rushabh Mehta 2012-03-13 15:19:06 +05:30
parent b9878d01e1
commit 052b7e4049
11 changed files with 61 additions and 1094 deletions

View File

@ -302,15 +302,15 @@ div.notice {
*/
/* FORMS */
div.form-section-break {
div.form-section-head {
margin: 15px 0px 3px 0px;
}
div.form-section-break h3 {
div.form-section-head h3 {
line-height: 20px;
}
div.form-section-break hr {
div.form-section-head hr {
margin: 9px 0px;
}
@ -462,6 +462,10 @@ div.time_field select{
color: #888;
}
.help ol {
padding-left: 19px;
}
.field_description_top {
margin-bottom: 3px;
}

View File

@ -0,0 +1,5 @@
You can use projects to:
1. Track budgets (Purchase Orders, Invoices).
2. Track material consumption.
3. Create and assign tasks (and view them on a Gantt Chart).

View File

@ -1,335 +0,0 @@
# Module Def, Selling
[
# These values are common in all dictionaries
{
'creation': '2011-07-01 17:39:08',
'docstatus': 0,
'modified': '2012-01-23 18:25:58',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all Module Def Role
{
'doctype': 'Module Def Role',
'name': '__common__',
'parent': 'Selling',
'parentfield': 'roles',
'parenttype': 'Module Def'
},
# These values are common for all Module Def Item
{
'doctype': 'Module Def Item',
'name': '__common__',
'parent': 'Selling',
'parentfield': 'items',
'parenttype': 'Module Def'
},
# These values are common for all Module Def
{
'disabled': 'No',
'doctype': u'Module Def',
'doctype_list': 'Print Format, Sales Order\nPrint Format, Quotation Format\nPrint Format, Delivery Note Format',
'file_list': 'crm.gif,FileData/00208',
'is_hidden': 'No',
'module_desc': 'Manage you sales team, with your leads, customers, quotes, orders etc.',
'module_icon': 'Selling.gif',
'module_label': 'Selling',
'module_name': 'Selling',
'module_seq': 3,
'name': '__common__'
},
# Module Def, Selling
{
'doctype': u'Module Def',
'name': 'Selling'
},
# Module Def Item
{
'description': 'Database of potential customers you need to keep in touch with',
'display_name': 'Lead',
'doc_name': 'Lead',
'doc_type': 'Forms',
'doctype': 'Module Def Item',
'fields': 'status\nlead_owner\nlead_name\ncontact_no\ncontact_by\ncontact_date\nexpected_month'
},
# Module Def Item
{
'description': 'Your Customer Database',
'display_name': 'Customer',
'doc_name': 'Customer',
'doc_type': 'Forms',
'doctype': 'Module Def Item',
'fields': 'customer_group\ncountry'
},
# Module Def Item
{
'description': 'Specific requirements from a Lead / Customer',
'display_name': 'Enquiry',
'doc_name': 'Enquiry',
'doc_type': 'Forms',
'doctype': 'Module Def Item',
'fields': 'status\ntransaction_date\ncustomer\ncontact_person\ncost_center\ncompany'
},
# Module Def Item
{
'description': 'Offers you have made to your customers',
'display_name': 'Quotation',
'doc_name': 'Quotation',
'doc_type': 'Forms',
'doctype': 'Module Def Item',
'fields': 'status\ntransaction_date\ncustomer\ncontact_person\ncost_center\ngrand_total\ncompany'
},
# Module Def Item
{
'description': 'Database of confirmed Sale Orders from your Customers',
'display_name': 'Sales Order',
'doc_name': 'Sales Order',
'doc_type': 'Forms',
'doctype': 'Module Def Item',
'fields': 'status\ntransaction_date\ncustomer\ncost_center\ngrand_total\nper_delivered\nper_billed\ncompany'
},
# Module Def Item
{
'display_name': 'Sales Dashboard',
'doc_name': 'Sales Dashboard',
'doc_type': 'Pages',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'doc_name': 'Reports',
'doc_type': 'Separator',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'doc_name': 'Reports',
'doc_type': 'Separator',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Gross Profit',
'doc_name': 'Delivery Note Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Territory, Item Group wise GP',
'doc_name': 'Delivery Note',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Itemwise Sales Details',
'doc_name': 'Sales Order Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Itemwise Delivery Details',
'doc_name': 'Delivery Note Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Sales Personwise Transaction Summary',
'doc_name': 'Sales Person',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Total Target Variance Report',
'doc_name': 'Target Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Sales Persons Target Variance (Item Group wise)',
'doc_name': 'Target Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Territories Target Variance (Item Group wise)',
'doc_name': 'Target Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Sales Order Pending Items',
'doc_name': 'Sales Order Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Sales Orderwise Booking & Delivery Summary',
'doc_name': 'Sales Order Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Sales Orderwise Pending Qty To Deliver',
'doc_name': 'Sales Order Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Sales Orderwise Pending Amount To Bill',
'doc_name': 'Sales Order Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Delivered Items to be Install',
'doc_name': 'Delivery Note Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Itemwise Price List',
'doc_name': 'Ref Rate Detail',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'display_name': 'Follow-up Report',
'doc_name': 'Follow up',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'description': 'Ledger details of your debtors',
'display_name': "Debtor's Ledger",
'doc_name': 'GL Entry',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'description': 'Report displaying Customer, Primary Address Details & Primary Contact Details',
'display_name': 'Customer Address Contact',
'doc_name': 'Customer',
'doc_type': 'Reports',
'doctype': 'Module Def Item'
},
# Module Def Item
{
'description': 'Customer Category',
'display_name': 'Customer Group',
'doc_name': 'Customer Group',
'doc_type': 'Setup Forms',
'doctype': 'Module Def Item',
'fields': 'id\ndescription'
},
# Module Def Item
{
'description': 'Sales person details',
'display_name': 'Sales Person',
'doc_name': 'Sales Person',
'doc_type': 'Setup Forms',
'doctype': 'Module Def Item',
'fields': 'id\nterritory\ndepartment\nmobile_no\nemail_id'
},
# Module Def Item
{
'description': 'Item master',
'display_name': 'Item',
'doc_name': 'Item',
'doc_type': 'Setup Forms',
'doctype': 'Module Def Item',
'fields': 'name\nitem_group\ndescription'
},
# Module Def Item
{
'description': 'Sales partner details',
'display_name': 'Sales Partner',
'doc_name': 'Sales Partner',
'doc_type': 'Setup Forms',
'doctype': 'Module Def Item',
'fields': 'id\npartner_type\nmobile\nemail\nterritory'
},
# Module Def Item
{
'description': 'Business campaigns',
'display_name': 'Campaign',
'doc_name': 'Campaign',
'doc_type': 'Setup Forms',
'doctype': 'Module Def Item',
'fields': 'id\ncampaign_name\ndescription'
},
# Module Def Role
{
'doctype': 'Module Def Role',
'role': 'Administrator'
},
# Module Def Role
{
'doctype': 'Module Def Role',
'role': 'Sales Manager'
},
# Module Def Role
{
'doctype': 'Module Def Role',
'role': 'Sales User'
},
# Module Def Role
{
'doctype': 'Module Def Role',
'role': 'Sales Master Manager'
}
]

View File

@ -1,652 +0,0 @@
[
{
'_last_update': None,
'creation': '2010-11-30 22:43:08',
'disabled': 'No',
'docstatus': 0,
'doctype': 'Module Def',
'doctype_list': None,
'file_list': None,
'idx': None,
'is_hidden': 'No',
'last_updated_date': '2011-03-21 12:13:39',
'modified': '2010-09-25 00:00:00',
'modified_by': 'Administrator',
'module_desc': None,
'module_icon': 'wired.png',
'module_label': 'Setup',
'module_name': 'Setup',
'module_page': 'Setup',
'module_seq': 1,
'name': 'Setup',
'owner': 'Administrator',
'parent': None,
'parentfield': None,
'parenttype': None,
'trash_reason': None,
'widget_code': None
},
{
'click_function': None,
'creation': '2010-11-30 22:43:08',
'description': 'All important setup items in one place',
'display_name': 'Setup Wizard',
'doc_name': 'Setup Wizard',
'doc_type': 'Pages',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': 'lightbulb.gif',
'idx': 1,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': 'MDI00221',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2010-11-30 22:43:08',
'description': 'Personalize settings like company banner, date format, print format header etc.',
'display_name': 'Personalize',
'doc_name': 'Personalize Page',
'doc_type': 'Pages',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': 'star.gif',
'idx': 2,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': 'MDI00222',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2010-11-30 22:43:08',
'description': 'Enable / Disable users. Set user roles.',
'display_name': 'Manage Users',
'doc_name': 'Manage Users',
'doc_type': 'Pages',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': 'group.gif',
'idx': 3,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': 'MDI00223',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2010-11-30 22:43:08',
'description': 'Set global default values and account settings',
'display_name': 'Setup Defaults',
'doc_name': 'Manage Account',
'doc_type': 'Single DocType',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': 'folder.gif',
'idx': 4,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': 'MDI00224',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2010-11-30 22:43:08',
'description': 'General Masters',
'display_name': 'Setup Masters',
'doc_name': 'Setup Masters',
'doc_type': 'Pages',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': 'wrench.gif',
'idx': 5,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': 'MDI00225',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2010-11-30 22:43:08',
'description': None,
'display_name': 'Sales Browser',
'doc_name': 'Sales Browser',
'doc_type': 'Pages',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 6,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': 'MDI00226',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2011-03-24 15:04:47',
'description': None,
'display_name': None,
'doc_name': None,
'doc_type': 'Separator',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 7,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': '000003107',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2010-11-30 22:43:08',
'description': "Import data like Customers, Items etc in 'CSV' format",
'display_name': 'Import Data',
'doc_name': 'Import Data',
'doc_type': 'Pages',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': 'disk.gif',
'idx': 8,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': 'MDI00228',
'owner': 'nabin@webnotestech.com',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2010-11-30 22:43:08',
'description': 'Set series prefix for transactions',
'display_name': 'Setup Series',
'doc_name': 'Naming Series',
'doc_type': 'Single DocType',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': 'paperclip.gif',
'idx': 9,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': 'MDI00229',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2010-11-30 22:43:08',
'description': 'Set approval rights for transactions based on grand total and discount.',
'display_name': 'Authorization Rule',
'doc_name': 'Authorization Rule',
'doc_type': 'Forms',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': 'transaction\nbased_on\nmaster_name\nsystem_user\nsystem_role\napproving_role\napproving_user\nvalue',
'hide': None,
'icon': 'accept.gif',
'idx': 10,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': 'MDI00230',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2010-11-30 22:43:08',
'description': 'Add fields in transactions, masters...',
'display_name': 'Custom Field',
'doc_name': 'Custom Field',
'doc_type': 'Forms',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': 'dt\nlabel\nfieldtype\noptions',
'hide': None,
'icon': 'paperclip.gif',
'idx': 11,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': 'MDI00231',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2010-11-30 22:43:08',
'description': 'Contains records that you have trashed.',
'display_name': 'Trash',
'doc_name': 'Trash',
'doc_type': 'Pages',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 12,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': 'MDI00232',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2011-03-24 15:04:47',
'description': None,
'display_name': 'Price List',
'doc_name': 'Price List',
'doc_type': 'Setup Forms',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 13,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': '000003108',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2011-03-24 15:04:47',
'description': None,
'display_name': 'Warehouse Type',
'doc_name': 'Warehouse Type',
'doc_type': 'Setup Forms',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 14,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': '000003109',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2011-03-24 15:04:47',
'description': None,
'display_name': 'Warehouse',
'doc_name': 'Warehouse',
'doc_type': 'Setup Forms',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 15,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': '000003110',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2011-03-24 15:04:47',
'description': None,
'display_name': 'UOM',
'doc_name': 'UOM',
'doc_type': 'Setup Forms',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 16,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': '000003111',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2011-03-24 15:04:47',
'description': None,
'display_name': 'Term',
'doc_name': 'Term',
'doc_type': 'Setup Forms',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 17,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': '000003112',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2011-03-24 15:04:47',
'description': None,
'display_name': 'Taxes and Charges',
'doc_name': 'Other Charges',
'doc_type': 'Setup Forms',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 18,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': '000003113',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2011-03-24 15:04:47',
'description': None,
'display_name': 'Business Letter Type',
'doc_name': 'Business Letter Type',
'doc_type': 'Setup Forms',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 19,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': '000003114',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2011-03-24 15:04:47',
'description': None,
'display_name': 'Business Letter Template',
'doc_name': 'Business Letter Template',
'doc_type': 'Setup Forms',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 20,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': '000003115',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'click_function': None,
'creation': '2011-03-24 15:04:47',
'description': None,
'display_name': 'Mode of Payment',
'doc_name': 'Mode of Payment',
'doc_type': 'Setup Forms',
'docstatus': 0,
'doctype': 'Module Def Item',
'fields': None,
'hide': None,
'icon': None,
'idx': 21,
'modified': '2011-03-24 15:04:47',
'modified_by': 'Administrator',
'name': '000003116',
'owner': 'harshada@webnotestech.com',
'parent': 'Setup',
'parentfield': 'items',
'parenttype': 'Module Def'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 1,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00042',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Administrator'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 2,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00043',
'owner': 'Administrator',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'System Manager'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 3,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00044',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Sales User'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 4,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00045',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Sales Master Manager'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 5,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00046',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Sales Master Manager'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 6,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00047',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Purchase User'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 7,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00048',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Purchase Master Manager'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 8,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00049',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Purchase Manager'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 9,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00050',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Material User'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 10,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00051',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Material Master Manager'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 11,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00052',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Material Manager'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 12,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00053',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Accounts User'
},
{
'creation': '2010-11-30 22:43:08',
'docstatus': 0,
'doctype': 'Module Def Role',
'idx': 13,
'modified': '2010-11-30 22:43:08',
'modified_by': 'Administrator',
'name': 'MDR00054',
'owner': 'saumil@webnotestech.com',
'parent': 'Setup',
'parentfield': 'roles',
'parenttype': 'Module Def',
'role': 'Accounts Manager'
}
]

View File

@ -1,26 +0,0 @@
# Role, System Manager
[
# These values are common in all dictionaries
{
'creation': '2010-08-08 17:08:51',
'docstatus': 0,
'modified': '2009-07-07 17:00:24',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all Role
{
'doctype': 'Role',
'module': 'Setup',
'name': '__common__',
'role_name': 'System Manager'
},
# Role, System Manager
{
'doctype': 'Role',
'name': 'System Manager'
}
]

View File

@ -0,0 +1,3 @@
install_docs = [
{'doctype':'Role', 'name': 'System Manager'}
]

View File

@ -1,4 +1,4 @@
wn.require('lib/js/lib/jquery-ui-sortable.min.js');
wn.require('lib/js/lib/jquery/jquery.ui.sortable.js');
$.extend(wn.pages.modules_setup, {
modules: ['Activity', 'Accounts', 'Selling', 'Buying', 'Stock', 'Production', 'Projects',

View File

@ -1,28 +0,0 @@
# Module Def, Utilities
[
# These values are common in all dictionaries
{
'creation': '2011-07-01 17:46:25',
'docstatus': 0,
'modified': '2011-07-01 17:47:34',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all Module Def
{
'disabled': 'No',
'doctype': 'Module Def',
'is_hidden': 'No',
'module_label': 'Utilities',
'module_name': 'Utilities',
'name': '__common__'
},
# Module Def, Utilities
{
'doctype': 'Module Def',
'name': 'Utilities'
}
]

View File

@ -542,7 +542,7 @@ Field.prototype.set_description=function(){if(this.df.description){var p=in_list
if(in_list(['Text Editor','Code'],this.df.fieldtype))
$(this.desc_area).addClass('field_description_top');}}
Field.prototype.get_status=function(){if(this.in_filter)this.not_in_form=this.in_filter;if(this.not_in_form){return'Write';}
var fn=this.df.fieldname?this.df.fieldname:this.df.label;this.df=get_field(this.doctype,fn,this.docname);if(!this.df.permlevel)this.df.permlevel=0;var p=this.perm[this.df.permlevel];var ret;if(cur_frm.editable&&p&&p[WRITE])ret='Write';else if(p&&p[READ])ret='Read';else ret='None';if(this.df.fieldtype=='Binary')
if(!this.df.permlevel)this.df.permlevel=0;var p=this.perm[this.df.permlevel];var ret;if(cur_frm.editable&&p&&p[WRITE])ret='Write';else if(p&&p[READ])ret='Read';else ret='None';if(this.df.fieldtype=='Binary')
ret='None';if(cint(this.df.hidden))
ret='None';if(ret=='Write'&&cint(cur_frm.doc.docstatus)>0)ret='Read';var a_o_s=cint(this.df.allow_on_submit);if(a_o_s&&(this.in_grid||(this.frm&&this.frm.not_in_container))){a_o_s=null;if(this.in_grid)a_o_s=this.grid.field.df.allow_on_submit;if(this.frm&&this.frm.not_in_container){a_o_s=cur_grid.field.df.allow_on_submit;}}
if(cur_frm.editable&&a_o_s&&cint(cur_frm.doc.docstatus)>0&&!this.df.hidden){tmp_perm=get_perm(cur_frm.doctype,cur_frm.docname,1);if(tmp_perm[this.df.permlevel]&&tmp_perm[this.df.permlevel][WRITE])ret='Write';}
@ -884,7 +884,7 @@ Layout.prototype.setcolour=function(col){$bg(cc,col);}
Layout.prototype.show=function(){$ds(this.wrapper);}
Layout.prototype.hide=function(){$dh(this.wrapper);}
Layout.prototype.close_borders=function(){if(this.with_border){this.myrows[this.myrows.length-1].wrapper.style.borderBottom='1px solid #000';}}
function LayoutRow(layout,parent){this.layout=layout;this.wrapper=$a(parent,'div');this.main_head=$a(this.wrapper,'div');this.main_body=$a(this.wrapper,'div');if(layout.with_border){this.wrapper.style.border='1px solid #000';this.wrapper.style.borderBottom='0px';}
function LayoutRow(layout,parent){this.layout=layout;this.wrapper=$a(parent,'div','form-layout-row');this.main_head=$a(this.wrapper,'div');this.main_body=$a(this.wrapper,'div');if(layout.with_border){this.wrapper.style.border='1px solid #000';this.wrapper.style.borderBottom='0px';}
this.header=$a(this.main_body,'div','',{padding:(layout.with_border?'0px 8px':'0px')});this.body=$a(this.main_body,'div');this.table=$a(this.body,'table','',{width:'100%',borderCollapse:'collapse'});this.row=this.table.insertRow(0);this.mycells=[];}
LayoutRow.prototype.hide=function(){$dh(this.wrapper);}
LayoutRow.prototype.show=function(){$ds(this.wrapper);}
@ -1111,8 +1111,6 @@ if(get_local('Page',page_name)||wn.pages[page_name])
fn();else{args=get_url_dict();args.name=page_name;$c('webnotes.widgets.page.getpage',args,fn);}}
pscript.update_page_history=function(page_name,no_history){var arg=null;var t=null;if(window.location.hash){var t=nav_obj.get_page(window.location.hash)}else if(get_url_arg('page')){var t=nav_obj.get_page(get_url_arg('page'))}
if(t&&t[1]==page_name)arg=t[2];nav_obj.open_notify('Page',page_name,arg,no_history);}
function loadscript(src,call_back){set_loading();var script=$a('head','script');script.type='text/javascript';script.src=src;script.onload=function(){if(call_back)call_back();hide_loading();}
script.onreadystatechange=function(){if(this.readyState=='complete'||this.readyState=='loaded'){hide_loading();call_back();}}}
var doc_browser_page;function loaddocbrowser(dt,label,fields){wn.require('lib/js/legacy/webpage/docbrowser.js');dt=get_label_doctype(dt);if(!doc_browser_page)
doc_browser_page=new ItemBrowserPage();doc_browser_page.show(dt,label,fields);nav_obj.open_notify('List',dt,'');}
function loaddocbrowser2(dt,label,fields){wn.pages.doclistview.show(dt);return;}
@ -1386,7 +1384,7 @@ Field.prototype.set_description=function(){if(this.df.description){var p=in_list
if(in_list(['Text Editor','Code'],this.df.fieldtype))
$(this.desc_area).addClass('field_description_top');}}
Field.prototype.get_status=function(){if(this.in_filter)this.not_in_form=this.in_filter;if(this.not_in_form){return'Write';}
var fn=this.df.fieldname?this.df.fieldname:this.df.label;this.df=get_field(this.doctype,fn,this.docname);if(!this.df.permlevel)this.df.permlevel=0;var p=this.perm[this.df.permlevel];var ret;if(cur_frm.editable&&p&&p[WRITE])ret='Write';else if(p&&p[READ])ret='Read';else ret='None';if(this.df.fieldtype=='Binary')
if(!this.df.permlevel)this.df.permlevel=0;var p=this.perm[this.df.permlevel];var ret;if(cur_frm.editable&&p&&p[WRITE])ret='Write';else if(p&&p[READ])ret='Read';else ret='None';if(this.df.fieldtype=='Binary')
ret='None';if(cint(this.df.hidden))
ret='None';if(ret=='Write'&&cint(cur_frm.doc.docstatus)>0)ret='Read';var a_o_s=cint(this.df.allow_on_submit);if(a_o_s&&(this.in_grid||(this.frm&&this.frm.not_in_container))){a_o_s=null;if(this.in_grid)a_o_s=this.grid.field.df.allow_on_submit;if(this.frm&&this.frm.not_in_container){a_o_s=cur_grid.field.df.allow_on_submit;}}
if(cur_frm.editable&&a_o_s&&cint(cur_frm.doc.docstatus)>0&&!this.df.hidden){tmp_perm=get_perm(cur_frm.doctype,cur_frm.docname,1);if(tmp_perm[this.df.permlevel]&&tmp_perm[this.df.permlevel][WRITE])ret='Write';}
@ -1633,17 +1631,14 @@ this.dn_area.innerHTML=f.docname;var doc=locals[f.doctype][f.docname];var sl=thi
wn.provide('_f');_f.edit_record=function(dt,dn){d=_f.frm_dialog;var show_dialog=function(){var f=frms[dt];if(f.meta.istable){f.parent_doctype=cur_frm.doctype;f.parent_docname=cur_frm.docname;}
d.cur_frm=f;d.dn=dn;d.table_form=f.meta.istable;f.refresh(dn);}
if(!frms[dt]){_f.add_frm(dt,show_dialog,null);}else{show_dialog();}}
_f.Frm=function(doctype,parent){this.docname='';this.doctype=doctype;this.display=0;var me=this;this.is_editable={};this.opendocs={};this.cur_section={};this.sections=[];this.sections_by_label={};this.section_count;this.grids=[];this.cscript={};this.pformat={};this.fetch_dict={};this.parent=parent;this.tinymce_id_list=[];frms[doctype]=this;this.setup_meta(doctype);rename_observers.push(this);}
_f.Frm=function(doctype,parent){this.docname='';this.doctype=doctype;this.display=0;var me=this;this.is_editable={};this.opendocs={};this.sections=[];this.sections_by_label={};this.section_count;this.grids=[];this.cscript={};this.pformat={};this.fetch_dict={};this.parent=parent;this.tinymce_id_list=[];frms[doctype]=this;this.setup_meta(doctype);rename_observers.push(this);}
_f.Frm.prototype.setup=function(){var me=this;this.fields=[];this.fields_dict={};this.wrapper=$a(this.parent.body,'div');this.setup_print_layout();this.saved_wrapper=$a(this.wrapper,'div');this.setup_std_layout();this.setup_client_script();this.setup_done=true;}
_f.Frm.prototype.setup_print_layout=function(){this.print_wrapper=$a(this.wrapper,'div');this.print_head=$a(this.print_wrapper,'div');this.print_body=$a(this.print_wrapper,'div','layout_wrapper',{padding:'23px'});var t=make_table(this.print_head,1,2,'100%',[],{padding:'6px'});this.view_btn_wrapper=$a($td(t,0,0),'span','green_buttons');this.view_btn=$btn(this.view_btn_wrapper,'View Details',function(){cur_frm.edit_doc()},{marginRight:'4px'},'green');this.print_btn=$btn($td(t,0,0),'Print',function(){cur_frm.print_doc()});$y($td(t,0,1),{textAlign:'right'});this.print_close_btn=$btn($td(t,0,1),'Close',function(){nav_obj.show_last_open();});}
_f.Frm.prototype.onhide=function(){if(_f.cur_grid_cell)_f.cur_grid_cell.grid.cell_deselect();}
_f.Frm.prototype.setup_std_layout=function(){this.page_layout=new wn.PageLayout({parent:this.wrapper,main_width:this.in_dialog?'100%':'75%',sidebar_width:this.in_dialog?'0%':'25%'})
this.meta.section_style='Simple';this.layout=new Layout(this.page_layout.body,'100%');if(this.in_dialog){$(this.page_layout.wrapper).removeClass('layout-wrapper-background');$(this.page_layout.main).removeClass('layout-main-section');$(this.page_layout.sidebar_area).toggle(false);}else{this.setup_sidebar();}
this.setup_footer();if(!(this.meta.istable||user=='Guest'))this.frm_head=new _f.FrmHeader(this.page_layout.head,this);if(this.frm_head&&this.meta.in_dialog)$dh(this.frm_head.page_head.close_btn);if(this.meta.colour)
this.layout.wrapper.style.backgroundColor='#'+this.meta.colour.split(':')[1];this.setup_fields_std();if(this.meta.description)
this.add_description();}
_f.Frm.prototype.add_description=function(){if(!wn.md2html){wn.require('lib/js/lib/showdown.js');wn.md2html=new Showdown.converter();}
this.description_wrapper=$a(this.page_layout.footer.help_area,'div','well',{marginTop:'11px'},wn.md2html.makeHtml('#### Help\n\n'+this.meta.description));}
this.layout.wrapper.style.backgroundColor='#'+this.meta.colour.split(':')[1];this.setup_fields_std();}
_f.Frm.prototype.setup_print=function(){var fl=getchildren('DocFormat',this.meta.name,'formats','DocType');var l=[];this.default_format='Standard';if(fl.length){this.default_format=fl[0].format;for(var i=0;i<fl.length;i++)
l.push(fl[i].format);}
if(this.meta.default_print_format)
@ -1653,20 +1648,18 @@ _p.show_dialog();}
_f.Frm.prototype.email_doc=function(){if(!_e.dialog)_e.make();sel=this.print_sel;var c=$td(_e.dialog.rows['Format'].tab,0,1);if(c.cur_sel){c.removeChild(c.cur_sel);c.cur_sel=null;}
c.appendChild(this.print_sel);c.cur_sel=this.print_sel;_e.dialog.widgets['Send With Attachments'].checked=0;if(cur_frm.doc.file_list){$ds(_e.dialog.rows['Send With Attachments']);}else{$dh(_e.dialog.rows['Send With Attachments']);}
_e.dialog.widgets['Subject'].value=get_doctype_label(this.meta.name)+': '+this.docname;_e.dialog.show();}
_f.Frm.prototype.rename_notify=function(dt,old,name){if(this.doctype!=dt)return;this.cur_section[name]=this.cur_section[old];delete this.cur_section[old];this.is_editable[name]=this.is_editable[old];delete this.is_editable[old];if(this.docname==old)
_f.Frm.prototype.rename_notify=function(dt,old,name){if(this.doctype!=dt)return;this.is_editable[name]=this.is_editable[old];delete this.is_editable[old];if(this.docname==old)
this.docname=name;if(this&&this.opendocs[old]){local_dt[dt][name]=local_dt[dt][old];local_dt[dt][old]=null;}
this.opendocs[old]=false;this.opendocs[name]=true;}
_f.Frm.prototype.set_heading=function(){if(!this.meta.istable&&this.frm_head)this.frm_head.refresh_labels(this);}
_f.Frm.prototype.set_section=function(sec_id){if(!this.sections[sec_id]||!this.sections[sec_id].expand)
return;if(this.sections[this.cur_section[this.docname]])
this.sections[this.cur_section[this.docname]].collapse();this.sections[sec_id].expand();this.cur_section[this.docname]=sec_id;}
_f.Frm.prototype.setup_meta=function(){this.meta=get_local('DocType',this.doctype);this.perm=get_perm(this.doctype);this.setup_print();}
_f.Frm.prototype.setup_sidebar=function(){this.sidebar=new wn.widgets.form.sidebar.Sidebar(this);}
_f.Frm.prototype.setup_footer=function(){var me=this;var f=this.page_layout.footer;f.save_area=$a(this.page_layout.footer,'div','',{display:'none'});f.help_area=$a(this.page_layout.footer,'div');var b=$btn(f.save_area,'Save',function(){cur_frm.save('Save');},{marginLeft:'0px'},'green');f.show_save=function(){$ds(me.page_layout.footer.save_area);}
_f.Frm.prototype.setup_footer=function(){var me=this;var f=this.page_layout.footer;f.save_area=$a(this.page_layout.footer,'div','',{display:'none',marginTop:'11px'});f.help_area=$a(this.page_layout.footer,'div');var b=$btn(f.save_area,'Save',function(){cur_frm.save('Save');},{marginLeft:'0px'},'green');f.show_save=function(){$ds(me.page_layout.footer.save_area);}
f.hide_save=function(){$dh(me.page_layout.footer.save_area);}}
_f.Frm.prototype.setup_fields_std=function(){var fl=fields_list[this.doctype];fl.sort(function(a,b){return a.idx-b.idx});if(fl[0]&&fl[0].fieldtype!="Section Break"||get_url_arg('embed')){this.layout.addrow();if(fl[0].fieldtype!="Column Break"){var c=this.layout.addcell();$y(c.wrapper,{padding:'8px'});}}
var sec;for(var i=0;i<fl.length;i++){var f=fl[i];if(get_url_arg('embed')&&(in_list(['Section Break','Column Break'],f.fieldtype)))continue;if(f.fieldtype=='Section Break'&&fl[i+1]&&fl[i+1].fieldtype=='Section Break')continue;var fn=f.fieldname?f.fieldname:f.label;var fld=make_field(f,this.doctype,this.layout.cur_cell,this);this.fields[this.fields.length]=fld;this.fields_dict[fn]=fld;if(this.meta.section_style!='Simple')
fld.parent_section=sec;if(f.fieldtype=='Section Break'&&f.options!='Simple')
var sec;for(var i=0;i<fl.length;i++){var f=fl[i];if(f.fieldtype=='Section Break'&&fl[i+1]&&fl[i+1].fieldtype=='Section Break')
continue;var fn=f.fieldname?f.fieldname:f.label;var fld=make_field(f,this.doctype,this.layout.cur_cell,this);this.fields[this.fields.length]=fld;this.fields_dict[fn]=fld;if(sec&&['Section Break','Column Break'].indexOf(f.fieldtype)==-1){fld.parent_section=sec;sec.fields.push(fld);}
if(f.fieldtype=='Section Break'&&f.options!='Simple')
sec=fld;if((f.fieldtype=='Section Break')&&(fl[i+1])&&(fl[i+1].fieldtype!='Column Break')&&!f.hidden){var c=this.layout.addcell();$y(c.wrapper,{padding:'8px'});}}}
_f.Frm.prototype.add_custom_button=function(label,fn,icon){this.frm_head.page_head.add_button(label,fn,1);}
_f.Frm.prototype.clear_custom_buttons=function(){}
@ -1703,14 +1696,14 @@ if(this.doc.__islocal)
this.is_editable[this.docname]=1;this.editable=this.is_editable[this.docname];if(!this.doc.__archived&&(this.editable||(!this.editable&&this.meta.istable))){if(this.print_wrapper){$dh(this.print_wrapper);$ds(this.page_layout.wrapper);}
if(!this.meta.istable){this.refresh_header();this.sidebar&&this.sidebar.refresh();}
this.runclientscript('refresh');$(document).trigger('form_refresh')
this.refresh_tabs();this.refresh_fields();this.refresh_dependency();this.refresh_footer();if(this.layout)this.layout.show();if(cur_frm.cscript.is_onload)
this.refresh_fields();this.refresh_dependency();this.refresh_footer();if(this.layout)this.layout.show();if(cur_frm.cscript.is_onload)
this.runclientscript('onload_post_render',this.doctype,this.docname);}else{this.refresh_header();if(this.print_wrapper){this.refresh_print_layout();}
this.runclientscript('edit_status_changed');}
if(!this.display)this.show_the_frm();if(!this.meta.in_dialog)page_body.change_to('Forms');$(cur_frm.wrapper).trigger('render_complete');}}
_f.Frm.prototype.refresh_tabs=function(){var me=this;if(me.meta.section_style=='Tray'||me.meta.section_style=='Tabbed'){for(var i in me.sections){me.sections[i].collapse();}
me.set_section(me.cur_section[me.docname]);}}
_f.Frm.prototype.refresh_footer=function(){var f=this.page_layout.footer;if(f.save_area){if(get_url_arg('embed')||(this.editable&&!this.meta.in_dialog&&this.doc.docstatus==0&&!this.meta.istable&&this.get_doc_perms()[WRITE])){f.show_save();}else{f.hide_save();}}}
_f.Frm.prototype.refresh_fields=function(){for(var i=0;i<this.fields.length;i++){var f=this.fields[i];f.perm=this.perm;f.docname=this.docname;if(f.refresh)f.refresh();}
_f.Frm.prototype.refresh_fields=function(){for(var i=0;i<this.fields.length;i++){var f=this.fields[i];f.perm=this.perm;f.docname=this.docname;var fn=f.df.fieldname||f.df.label;if(fn)
f.df=get_field(this.doctype,fn,this.docname);if(f.refresh)
f.refresh();}
this.cleanup_refresh(this);}
_f.Frm.prototype.cleanup_refresh=function(){var me=this;if(me.fields_dict['amended_from']){if(me.doc.amended_from){unhide_field('amended_from');unhide_field('amendment_date');}else{hide_field('amended_from');hide_field('amendment_date');}}
if(me.fields_dict['trash_reason']){if(me.doc.trash_reason&&me.doc.docstatus==2){unhide_field('trash_reason');}else{hide_field('trash_reason');}}
@ -1720,8 +1713,7 @@ dep_dict[guardian]=[];dep_dict[guardian][dep_dict[guardian].length]=f;has_dep=tr
if(!has_dep)return;for(var i=me.fields.length-1;i>=0;i--){var f=me.fields[i];f.guardian_has_value=true;if(f.df.depends_on){var v=doc[f.df.depends_on];if(f.df.depends_on.substr(0,5)=='eval:'){f.guardian_has_value=eval(f.df.depends_on.substr(5));}else if(f.df.depends_on.substr(0,3)=='fn:'){f.guardian_has_value=me.runclientscript(f.df.depends_on.substr(3),me.doctype,me.docname);}else{if(v||(v==0&&!v.substr)){}else{f.guardian_has_value=false;}}
if(f.guardian_has_value){if(f.grid)f.grid.show();else $ds(f.wrapper);}else{if(f.grid)f.grid.hide();else $dh(f.wrapper);}}}}
_f.Frm.prototype.setnewdoc=function(docname){if(this.opendocs[docname]){this.docname=docname;return;}
Meta.make_local_dt(this.doctype,docname);this.docname=docname;var me=this;var viewname=docname;if(this.meta.issingle)viewname=this.doctype;this.runclientscript('onload',this.doctype,this.docname);this.is_editable[docname]=1;if(this.meta.read_only_onload)this.is_editable[docname]=0;if(this.meta.section_style=='Tray'||this.meta.section_style=='Tabbed'){this.cur_section[docname]=0;}
this.opendocs[docname]=true;}
Meta.make_local_dt(this.doctype,docname);this.docname=docname;var me=this;var viewname=docname;if(this.meta.issingle)viewname=this.doctype;this.runclientscript('onload',this.doctype,this.docname);this.is_editable[docname]=1;if(this.meta.read_only_onload)this.is_editable[docname]=0;this.opendocs[docname]=true;}
_f.Frm.prototype.edit_doc=function(){this.is_editable[this.docname]=true;this.refresh();}
_f.Frm.prototype.show_doc=function(dn){this.refresh(dn);}
var validated;_f.Frm.prototype.save=function(save_action,call_back){if(!save_action)save_action='Save';var me=this;if(this.savingflag){msgprint("Document is currently saving....");return;}
@ -1780,23 +1772,27 @@ cur_frm.comments.list.dt=cur_frm.doctype;cur_frm.comments.list.dn=cur_frm.docnam
_f.ColumnBreak=function(){this.set_input=function(){};}
_f.ColumnBreak.prototype.make_body=function(){if((!this.perm[this.df.permlevel])||(!this.perm[this.df.permlevel][READ])||this.df.hidden){return;}
this.cell=this.frm.layout.addcell(this.df.width);$y(this.cell.wrapper,{padding:'8px'});_f.cur_col_break_width=this.df.width;var fn=this.df.fieldname?this.df.fieldname:this.df.label;if(this.df&&this.df.label){this.label=$a(this.cell.wrapper,'div','','',this.df.label);}}
_f.ColumnBreak.prototype.refresh=function(layout){if(!this.cell)return;var fn=this.df.fieldname?this.df.fieldname:this.df.label;if(fn){this.df=get_field(this.doctype,fn,this.docname);if(this.set_hidden!=this.df.hidden){if(this.df.hidden)
_f.ColumnBreak.prototype.refresh=function(layout){if(!this.cell)return;if(this.set_hidden!=this.df.hidden){if(this.df.hidden)
this.cell.hide();else
this.cell.show();this.set_hidden=this.df.hidden;}}}
_f.SectionBreak=function(){this.set_input=function(){};}
_f.SectionBreak.prototype.make_row=function(){this.row=this.df.label?this.frm.layout.addrow():this.frm.layout.addsubrow();}
_f.SectionBreak.prototype.add_to_sections=function(){this.sec_id=this.frm.sections.length;this.frm.sections[this.sec_id]=this;this.frm.sections_by_label[this.df.label]=this;}
_f.cur_sec_header=null;_f.SectionBreak.prototype.make_body=function(){if((!this.perm[this.df.permlevel])||(!this.perm[this.df.permlevel][READ])||this.df.hidden){return;}
this.make_row();this.wrapper=$a(this.row.main_head,'div');if(this.df.label){if(!this.df.description)this.df.description='';$(this.wrapper).html(repl('<div class="form-section-break">\
<h3>%(label)s</h3>\
<div class="help">%(description)s</div>\
</div>',this.df));}else{$(this.wrapper).html('<div class="form-section-break"></div>');}
this.cell.show();this.set_hidden=this.df.hidden;}}
_f.SectionBreak=function(){this.fields=[];this.set_input=function(){};this.make_row=function(){this.row=this.df.label?this.frm.layout.addrow():this.frm.layout.addsubrow();}}
_f.SectionBreak.prototype.make_body=function(){var me=this;if((!this.perm[this.df.permlevel])||(!this.perm[this.df.permlevel][READ])||this.df.hidden){return;}
this.make_row();if(this.df.label){if(!this.df.description)
this.df.description='';$(this.row.main_head).html(repl('<div class="form-section-head" style="cursor: pointer">\
<div class="head">%(label)s</h3>\
<div class="help">%(description)s</div>\
</div>',this.df));this.$expand=$(this.row.main_head).find('.form-section-head').click(function(){if($(me.row.main_head).find('h3').length){me.section_collapse();}else{me.section_expand();}
return false;});this.collapsible=true;}else{$(this.wrapper).html('<div class="form-section-head"></div>');}
this.section_collapse=function(){$(me.row.main_head).find('.head').html('<i class="icon-play"></i> \
<a href="#" onclick="return false;">Show "'+me.df.label+'"</a>');$(me.row.main_body).toggle(false);}
this.section_expand=function(){$(me.row.main_head).find('.head').html('<h3><i class="icon-minus" style="margin-top: 3px"></i> '
+me.df.label+'</h3>');$(me.row.main_body).slideDown();}
$y(this.row.body,{marginLeft:'17px'});}
_f.SectionBreak.prototype.refresh=function(layout){var fn=this.df.fieldname?this.df.fieldname:this.df.label;if(fn)
this.df=get_field(this.doctype,fn,this.docname);if(this.set_hidden!=this.df.hidden){if(this.df.hidden){if(this.frm.meta.section_style=='Tabbed'){$dh(this.mytab);}else if(this.tray_item)
this.tray_item.hide();if(this.row)this.row.hide();}else{if(this.frm.meta.section_style=='Tabbed'){$di(this.mytab);}else if(this.tray_item)
this.tray_item.show();if(this.expanded)this.row.show();}
this.set_hidden=this.df.hidden;}}
_f.SectionBreak.prototype.has_data=function(){var me=this;for(var i in me.fields){var f=me.fields[i];var v=f.df.get_value?f.df.get_value():null;defaultval=f.df['default']||sys_defaults[f.fieldname]||user_defaults[f.fieldname];if(v&&v!=defaultval){return true;}
if(!v&&f.df.reqd){return true;}
if(f.df.fieldtype=='Table'){if(f.grid.get_children.length||f.df.reqd){return true;}}}
return false;}
_f.SectionBreak.prototype.refresh=function(layout){if(this.df.hidden){if(this.row)this.row.hide();}else{if(this.collapsible){if(this.has_data()){this.section_expand();}else{this.section_collapse();}}}}
_f.ImageField=function(){this.images={};}
_f.ImageField.prototype=new Field();_f.ImageField.prototype.onmake=function(){this.no_img=$a(this.wrapper,'div','no_img');this.no_img.innerHTML="No Image";$dh(this.no_img);}
_f.ImageField.prototype.get_image_src=function(doc){if(doc.file_list){file=doc.file_list.split(',');extn=file[0].split('.');extn=extn[extn.length-1].toLowerCase();var img_extn_list=['gif','jpg','bmp','jpeg','jp2','cgm','ief','jpm','jpx','png','tiff','jpe','tif'];if(in_list(img_extn_list,extn)){var src=wn.request.url+"?cmd=downloadfile&file_id="+file[1];}}else{var src="";}
@ -1896,7 +1892,8 @@ this.btns[i].isactive=true;}
_f.FormGrid.prototype.make_columns=function(){var gl=fields_list[this.field.df.options];if(!gl){alert('Table details not found "'+this.field.df.options+'"');}
gl.sort(function(a,b){return a.idx-b.idx});var p=this.field.perm;for(var i=0;i<gl.length;i++){if(p[this.field.df.permlevel]&&p[this.field.df.permlevel][READ]){this.insert_column(this.field.df.options,gl[i].fieldname,gl[i].fieldtype,gl[i].label,gl[i].width,gl[i].options,this.field.perm,gl[i].reqd);if(gl[i].hidden){this.set_column_disp(gl[i].fieldname,false);}}}}
_f.FormGrid.prototype.set_column_label=function(fieldname,label){for(var i=0;i<this.head_row.cells.length;i++){var c=this.head_row.cells[i];if(c.fieldname==fieldname){c.innerHTML='<div class="grid_head_div">'+label+'</div>';c.cur_label=label;break;}}}
_f.FormGrid.prototype.refresh=function(){var docset=getchildren(this.doctype,this.field.frm.docname,this.field.df.fieldname,this.field.frm.doctype);var data=[];for(var i=0;i<docset.length;i++){locals[this.doctype][docset[i].name].idx=i+1;data[data.length]=docset[i].name;}
_f.FormGrid.prototype.get_children=function(){return getchildren(this.doctype,this.field.frm.docname,this.field.df.fieldname,this.field.frm.doctype);}
_f.FormGrid.prototype.refresh=function(){var docset=this.get_children();var data=[];for(var i=0;i<docset.length;i++){locals[this.doctype][docset[i].name].idx=i+1;data[data.length]=docset[i].name;}
this.set_data(data);if(_f.frm_dialog&&_f.frm_dialog.dialog.display&&_f.frm_dialog.cur_frm){_f.frm_dialog.cur_frm.refresh();}}
_f.FormGrid.prototype.set_unsaved=function(){locals[cur_frm.doctype][cur_frm.docname].__unsaved=1;cur_frm.set_heading();}
_f.FormGrid.prototype.insert_row=function(){var d=this.new_row_doc();var ci=_f.cur_grid_cell.cellIndex;var row_idx=_f.cur_grid_cell.row.rowIndex;d.idx=row_idx+1;for(var ri=row_idx;ri<this.tab.rows.length;ri++){var r=this.tab.rows[ri];if(r.docname)
@ -2074,7 +2071,8 @@ CommentItem.prototype.cmt_delete=function(cell,ri,ci,d){var me=this;if(d[ri][2]=
/*
* lib/js/legacy/wn/widgets/form/sidebar.js
*/
wn.widgets.form.sidebar={Sidebar:function(form){var me=this;this.form=form;this.opts={sections:[{title:'Actions',items:[{type:'link',label:'New',icon:'icon-plus',display:function(){return in_list(profile.can_create,form.doctype)},onclick:function(){new_doc(me.form.doctype)}},{type:'link',label:'Refresh',icon:'icon-refresh',onclick:function(){me.form.reload_doc()}},{type:'link',label:'Print',display:function(){return!(me.form.doc.__islocal||me.form.meta.allow_print);},icon:'icon-print',onclick:function(){me.form.print_doc()}},{type:'link',label:'Email',display:function(){return!(me.form.doc.__islocal||me.form.meta.allow_email);},icon:'icon-envelope',onclick:function(){me.form.email_doc()}},{type:'link',label:'Copy',display:function(){return in_list(profile.can_create,me.form.doctype)&&!me.form.meta.allow_copy},icon:'icon-file',onclick:function(){me.form.copy_doc()}},{type:'link',label:'Delete',display:function(){return me.form.meta.allow_trash&&cint(me.form.doc.docstatus)!=2&&(!me.form.doc.__islocal)&&me.form.perm[0][CANCEL]},icon:'icon-remove-sign',onclick:function(){me.form.savetrash()}}]},{title:'Assign To',render:function(wrapper){me.form.assign_to=new wn.widgets.form.sidebar.AssignTo(wrapper,me,me.form.doctype,me.form.docname);},display:function(){if(me.form.doc.__local)return false;else return true;}},{title:'Attachments',render:function(wrapper){me.form.attachments=new wn.widgets.form.sidebar.Attachments(wrapper,me,me.form.doctype,me.form.docname);},display:function(){return me.form.meta.allow_attach}},{title:'Comments',render:function(wrapper){new wn.widgets.form.sidebar.Comments(wrapper,me,me.form.doctype,me.form.docname);},display:function(){return!me.form.doc.__islocal}},{title:'Tags',render:function(wrapper){me.form.taglist=new TagList(wrapper,me.form.doc._user_tags?me.form.doc._user_tags.split(','):[],me.form.doctype,me.form.docname,0,function(){});},display:function(){return!me.form.doc.__islocal}}]}
wn.widgets.form.sidebar={Sidebar:function(form){var me=this;this.form=form;this.opts={sections:[{title:'Actions',items:[{type:'link',label:'New',icon:'icon-plus',display:function(){return in_list(profile.can_create,form.doctype)},onclick:function(){new_doc(me.form.doctype)}},{type:'link',label:'List',icon:'icon-list',display:function(){return true;},onclick:function(){window.location.href="#!List2/"+me.form.doctype}},{type:'link',label:'Refresh',icon:'icon-refresh',onclick:function(){me.form.reload_doc()}},{type:'link',label:'Print',display:function(){return!(me.form.doc.__islocal||me.form.meta.allow_print);},icon:'icon-print',onclick:function(){me.form.print_doc()}},{type:'link',label:'Email',display:function(){return!(me.form.doc.__islocal||me.form.meta.allow_email);},icon:'icon-envelope',onclick:function(){me.form.email_doc()}},{type:'link',label:'Copy',display:function(){return in_list(profile.can_create,me.form.doctype)&&!me.form.meta.allow_copy},icon:'icon-file',onclick:function(){me.form.copy_doc()}},{type:'link',label:'Delete',display:function(){return me.form.meta.allow_trash&&cint(me.form.doc.docstatus)!=2&&(!me.form.doc.__islocal)&&me.form.perm[0][CANCEL]},icon:'icon-remove-sign',onclick:function(){me.form.savetrash()}}]},{title:'Assign To',render:function(wrapper){me.form.assign_to=new wn.widgets.form.sidebar.AssignTo(wrapper,me,me.form.doctype,me.form.docname);},display:function(){if(me.form.doc.__local)return false;else return true;}},{title:'Attachments',render:function(wrapper){me.form.attachments=new wn.widgets.form.sidebar.Attachments(wrapper,me,me.form.doctype,me.form.docname);},display:function(){return me.form.meta.allow_attach}},{title:'Comments',render:function(wrapper){new wn.widgets.form.sidebar.Comments(wrapper,me,me.form.doctype,me.form.docname);},display:function(){return!me.form.doc.__islocal}},{title:'Tags',render:function(wrapper){me.form.taglist=new TagList(wrapper,me.form.doc._user_tags?me.form.doc._user_tags.split(','):[],me.form.doctype,me.form.docname,0,function(){});},display:function(){return!me.form.doc.__islocal}},{title:'Help',render:function(wrapper){if(!wn.md2html){wn.require('lib/js/lib/showdown.js');wn.md2html=new Showdown.converter();}
$a(wrapper,'div','help',{},wn.md2html.makeHtml(me.form.meta.description));},display:function(){return me.form.meta.description}}]}
this.refresh=function(){var parent=this.form.page_layout.sidebar_area;if(!this.sidebar){this.sidebar=new wn.widgets.PageSidebar(parent,this.opts);}else{this.sidebar.refresh();}}}}
/*
* lib/js/legacy/wn/widgets/form/comments.js

View File

@ -439,7 +439,7 @@ Field.prototype.set_description=function(){if(this.df.description){var p=in_list
if(in_list(['Text Editor','Code'],this.df.fieldtype))
$(this.desc_area).addClass('field_description_top');}}
Field.prototype.get_status=function(){if(this.in_filter)this.not_in_form=this.in_filter;if(this.not_in_form){return'Write';}
var fn=this.df.fieldname?this.df.fieldname:this.df.label;this.df=get_field(this.doctype,fn,this.docname);if(!this.df.permlevel)this.df.permlevel=0;var p=this.perm[this.df.permlevel];var ret;if(cur_frm.editable&&p&&p[WRITE])ret='Write';else if(p&&p[READ])ret='Read';else ret='None';if(this.df.fieldtype=='Binary')
if(!this.df.permlevel)this.df.permlevel=0;var p=this.perm[this.df.permlevel];var ret;if(cur_frm.editable&&p&&p[WRITE])ret='Write';else if(p&&p[READ])ret='Read';else ret='None';if(this.df.fieldtype=='Binary')
ret='None';if(cint(this.df.hidden))
ret='None';if(ret=='Write'&&cint(cur_frm.doc.docstatus)>0)ret='Read';var a_o_s=cint(this.df.allow_on_submit);if(a_o_s&&(this.in_grid||(this.frm&&this.frm.not_in_container))){a_o_s=null;if(this.in_grid)a_o_s=this.grid.field.df.allow_on_submit;if(this.frm&&this.frm.not_in_container){a_o_s=cur_grid.field.df.allow_on_submit;}}
if(cur_frm.editable&&a_o_s&&cint(cur_frm.doc.docstatus)>0&&!this.df.hidden){tmp_perm=get_perm(cur_frm.doctype,cur_frm.docname,1);if(tmp_perm[this.df.permlevel]&&tmp_perm[this.df.permlevel][WRITE])ret='Write';}
@ -726,11 +726,11 @@ $.extend(this,this.opts);this.prepare_opts();$(this.parent).html(repl('\
</div>\
</div>\
',this.opts));this.$w=$(this.parent).find('.wnlist');this.set_events();this.make_filters();},show_view:function($btn,$div,$btn_unsel,$div_unsel){$btn_unsel.removeClass('btn-info');$btn_unsel.find('i').removeClass('icon-white');$div_unsel.toggle(false);$btn.addClass('btn-info');$btn.find('i').addClass('icon-white');$div.toggle(true);},set_events:function(){var me=this;this.$w.find('.btn-refresh').click(function(){me.run();});this.$w.find('.btn-more').click(function(){me.run({append:true});});this.$w.find('.btn-list').click(function(){me.show_view($(this),me.$w.find('.result-list'),me.$w.find('.btn-grid'),me.$w.find('.result-grid'))});this.$w.find('.btn-grid').click(function(){me.show_view($(this),me.$w.find('.result-grid'),me.$w.find('.btn-list'),me.$w.find('.result-list'))});if(this.title){this.$w.find('h3').html(this.title).toggle(true);}
if(this.new_doctype){this.$w.find('.btn-new').toggle(true).click(function(){newdoc(me.new_doctype);})}else{this.$w.find('.btn-new').toggle(false).attr('hidden','hidden');}
if(!me.show_filters){this.$w.find('.btn-filter').toggle(false).attr('hidden','hidden');}
if(this.hide_refresh||this.no_refresh){this.$w.find('.btn-refresh').toggle(false).attr('hidden','hidden');}
if(this.new_doctype){this.$w.find('.btn-new').toggle(true).click(function(){newdoc(me.new_doctype,me.new_doc_onload,true,me.new_doc_onsave);})}else{this.$w.find('.btn-new').remove();}
if(!me.show_filters){this.$w.find('.btn-filter').remove();}
if(this.hide_refresh||this.no_refresh){this.$w.find('.btn-refresh').remove();}
if(this.show_grid){this.$w.find('.select-view').toggle(true);}
if(this.$w.find('.list-toolbar a[hidden!="hidden"]').length>1){this.$w.find('.list-toolbar').addClass('btn-group')}
if(this.$w.find('.list-toolbar a').length>1){this.$w.find('.list-toolbar').addClass('btn-group')}
if(this.$w.find('.list-toolbar a[hidden!="hidden"]').length==0){this.$w.find('.list-toolbar-wrapper').toggle(false);}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
this.onrun=a0;if(a0&&a0.callback)
this.onrun=a0.callback;if(!a1&&!(a0&&a0.append))
@ -784,7 +784,7 @@ Layout.prototype.setcolour=function(col){$bg(cc,col);}
Layout.prototype.show=function(){$ds(this.wrapper);}
Layout.prototype.hide=function(){$dh(this.wrapper);}
Layout.prototype.close_borders=function(){if(this.with_border){this.myrows[this.myrows.length-1].wrapper.style.borderBottom='1px solid #000';}}
function LayoutRow(layout,parent){this.layout=layout;this.wrapper=$a(parent,'div');this.main_head=$a(this.wrapper,'div');this.main_body=$a(this.wrapper,'div');if(layout.with_border){this.wrapper.style.border='1px solid #000';this.wrapper.style.borderBottom='0px';}
function LayoutRow(layout,parent){this.layout=layout;this.wrapper=$a(parent,'div','form-layout-row');this.main_head=$a(this.wrapper,'div');this.main_body=$a(this.wrapper,'div');if(layout.with_border){this.wrapper.style.border='1px solid #000';this.wrapper.style.borderBottom='0px';}
this.header=$a(this.main_body,'div','',{padding:(layout.with_border?'0px 8px':'0px')});this.body=$a(this.main_body,'div');this.table=$a(this.body,'table','',{width:'100%',borderCollapse:'collapse'});this.row=this.table.insertRow(0);this.mycells=[];}
LayoutRow.prototype.hide=function(){$dh(this.wrapper);}
LayoutRow.prototype.show=function(){$ds(this.wrapper);}
@ -920,8 +920,6 @@ if(get_local('Page',page_name)||wn.pages[page_name])
fn();else{args=get_url_dict();args.name=page_name;$c('webnotes.widgets.page.getpage',args,fn);}}
pscript.update_page_history=function(page_name,no_history){var arg=null;var t=null;if(window.location.hash){var t=nav_obj.get_page(window.location.hash)}else if(get_url_arg('page')){var t=nav_obj.get_page(get_url_arg('page'))}
if(t&&t[1]==page_name)arg=t[2];nav_obj.open_notify('Page',page_name,arg,no_history);}
function loadscript(src,call_back){set_loading();var script=$a('head','script');script.type='text/javascript';script.src=src;script.onload=function(){if(call_back)call_back();hide_loading();}
script.onreadystatechange=function(){if(this.readyState=='complete'||this.readyState=='loaded'){hide_loading();call_back();}}}
var doc_browser_page;function loaddocbrowser(dt,label,fields){wn.require('lib/js/legacy/webpage/docbrowser.js');dt=get_label_doctype(dt);if(!doc_browser_page)
doc_browser_page=new ItemBrowserPage();doc_browser_page.show(dt,label,fields);nav_obj.open_notify('List',dt,'');}
function loaddocbrowser2(dt,label,fields){wn.pages.doclistview.show(dt);return;}

View File

@ -1 +1 @@
965
1003