blob: d256c08e13eba877d9a4130c7e175ceb3c155884 [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
Rushabh Mehta147acfd2015-08-05 14:49:32 +053014 $('.navbar-home').html('<img class="erpnext-icon" src="'+
15 frappe.urllib.get_base_url()+'/assets/erpnext/images/erp-icon.svg" />');
Rushabh Mehtae8dd4162014-08-22 15:21:27 +053016
pratu16x784228402016-11-07 17:18:15 +053017 $('[data-link="docs"]').attr("href", "https://frappe.github.io/erpnext/")
Neil Trini Lasrado728d0192016-05-02 18:37:47 +053018 $('[data-link="issues"]').attr("href", "https://github.com/frappe/erpnext/issues")
Rushabh Mehta3d93ddc2016-08-22 18:47:35 +053019
20
21 // default documentation goes to erpnext
Rushabh Mehta547dff52016-08-24 12:44:32 +053022 // $('[data-link-type="documentation"]').attr('data-path', '/erpnext/manual/index');
Rushabh Mehta3d93ddc2016-08-22 18:47:35 +053023
24 // additional help links for erpnext
25 var $help_menu = $('.dropdown-help ul .documentation-links');
26
27 $('<li><a data-link-type="forum" href="https://discuss.erpnext.com" \
28 target="_blank">'+__('User Forum')+'</a></li>').insertBefore($help_menu);
29 $('<li><a href="https://gitter.im/frappe/erpnext" \
30 target="_blank">'+__('Chat')+'</a></li>').insertBefore($help_menu);
31 $('<li><a href="https://github.com/frappe/erpnext/issues" \
32 target="_blank">'+__('Report an Issue')+'</a></li>').insertBefore($help_menu);
33
Anand Doshi859cb722012-04-10 11:35:19 +053034});
Rushabh Mehta4c36d732015-01-01 15:59:34 +053035
Rushabh Mehta3d93ddc2016-08-22 18:47:35 +053036
37
Rushabh Mehta4c36d732015-01-01 15:59:34 +053038// doctypes created via tree
Rushabh Mehtaf5f0d5a2015-03-09 15:47:15 +053039$.extend(frappe.create_routes, {
Saurabh17022732016-06-21 13:19:17 +053040 "Customer Group": "Tree/Customer Group",
41 "Territory": "Tree/Territory",
42 "Item Group": "Tree/Item Group",
43 "Sales Person": "Tree/Sales Person",
44 "Account": "Tree/Account",
45 "Cost Center": "Tree/Cost Center"
Rushabh Mehtaf5f0d5a2015-03-09 15:47:15 +053046});
47
48// preferred modules for breadcrumbs
49$.extend(frappe.breadcrumbs.preferred, {
50 "Item Group": "Stock",
51 "Customer Group": "Selling",
52 "Supplier Type": "Buying",
53 "Territory": "Selling",
54 "Sales Person": "Selling",
55 "Sales Partner": "Selling",
56 "Brand": "Selling"
57});