blob: 9870f819105027a858ea0c57d3d8a982aab54b0f [file] [log] [blame]
Anand Doshi885e0742015-03-03 14:55:30 +05301// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
Rushabh Mehtae67d1fb2013-08-05 14:59:54 +05302// License: GNU General Public License v3. See license.txt
3
Rushabh Mehta793ba6b2014-02-14 15:47:51 +05304frappe.provide('erpnext');
Rushabh Mehta8c309be2012-01-20 13:47:16 +05305
Rushabh Mehtaa9209432012-05-07 18:00:57 +05306// add toolbar icon
Rushabh Mehta8c309be2012-01-20 13:47:16 +05307$(document).bind('toolbar_setup', function() {
Rushabh Mehta793ba6b2014-02-14 15:47:51 +05308 frappe.app.name = "ERPNext";
Rushabh Mehta8a40c132014-04-15 16:30:55 +05309
Anand Doshi5e849ae2015-07-13 16:56:37 +053010 frappe.help_feedback_link = '<p><a class="text-muted" \
11 href="https://discuss.erpnext.com">Feedback</a></p>'
12
13
scmmishraf2d0be72019-01-21 19:35:46 +053014 $('[data-link="docs"]').attr("href", "https://erpnext.com/docs")
Neil Trini Lasrado728d0192016-05-02 18:37:47 +053015 $('[data-link="issues"]').attr("href", "https://github.com/frappe/erpnext/issues")
Rushabh Mehta3d93ddc2016-08-22 18:47:35 +053016
17
18 // default documentation goes to erpnext
Rushabh Mehta547dff52016-08-24 12:44:32 +053019 // $('[data-link-type="documentation"]').attr('data-path', '/erpnext/manual/index');
Rushabh Mehta3d93ddc2016-08-22 18:47:35 +053020
21 // additional help links for erpnext
22 var $help_menu = $('.dropdown-help ul .documentation-links');
scmmishra3f9b2312019-01-25 12:56:27 +053023 $('<li><a data-link-type="forum" href="https://erpnext.com/docs/user/manual" \
scmmishraf2d0be72019-01-21 19:35:46 +053024 target="_blank">'+__('Documentation')+'</a></li>').insertBefore($help_menu);
Rushabh Mehta3d93ddc2016-08-22 18:47:35 +053025 $('<li><a data-link-type="forum" href="https://discuss.erpnext.com" \
26 target="_blank">'+__('User Forum')+'</a></li>').insertBefore($help_menu);
Rushabh Mehta3d93ddc2016-08-22 18:47:35 +053027 $('<li><a href="https://github.com/frappe/erpnext/issues" \
28 target="_blank">'+__('Report an Issue')+'</a></li>').insertBefore($help_menu);
29
Anand Doshi859cb722012-04-10 11:35:19 +053030});
Rushabh Mehta4c36d732015-01-01 15:59:34 +053031
Rushabh Mehtaf5f0d5a2015-03-09 15:47:15 +053032// preferred modules for breadcrumbs
33$.extend(frappe.breadcrumbs.preferred, {
34 "Item Group": "Stock",
35 "Customer Group": "Selling",
Zlash652e080982018-04-19 18:37:53 +053036 "Supplier Group": "Buying",
Rushabh Mehtaf5f0d5a2015-03-09 15:47:15 +053037 "Territory": "Selling",
38 "Sales Person": "Selling",
39 "Sales Partner": "Selling",
Parth Kharwar2bccd7f2020-01-30 12:12:42 +053040 "Brand": "Stock"
Rushabh Mehtaf5f0d5a2015-03-09 15:47:15 +053041});
Faris Ansariab46f0f2019-07-10 18:49:41 +053042
43$.extend(frappe.breadcrumbs.module_map, {
44 'ERPNext Integrations': 'Integrations',
45 'Geo': 'Settings',
Faris Ansariab46f0f2019-07-10 18:49:41 +053046 'Portal': 'Website',
Faris Ansaria7a69872019-07-10 19:22:16 +053047 'Utilities': 'Settings',
48 'Shopping Cart': 'Website',
49 'Contacts': 'CRM'
Suraj Shetty7837fbe2019-07-10 19:39:40 +053050});