diff --git a/build.json b/build.json
index 08367064635..24e9d4559cb 100644
--- a/build.json
+++ b/build.json
@@ -43,6 +43,7 @@
"lib/css/bootstrap/buttons.css",
"lib/css/bootstrap/navbar.css",
"lib/css/bootstrap/dropdown.css",
+ "lib/css/bootstrap/tooltip.css",
"erpnext/startup/startup.css",
"erpnext/website/css/website.css"
]
@@ -67,6 +68,7 @@
"lib/css/bootstrap/buttons.css",
"lib/css/bootstrap/navbar.css",
"lib/css/bootstrap/dropdown.css",
+ "lib/css/bootstrap/tooltip.css",
"erpnext/startup/startup.css"
]
},
diff --git a/css/all-app.css b/css/all-app.css
index 3397f52653e..a6dcdb73664 100644
--- a/css/all-app.css
+++ b/css/all-app.css
@@ -65,8 +65,30 @@ hr {
border-bottom: 1px solid #ffffff;
}
+/* links */
+
a:active { outline:none; }
+a {
+ color: #0088cc;
+ text-decoration: none;
+}
+a:hover {
+ color: #005580;
+ text-decoration: underline;
+}
+
+.link_type {
+ padding:2px;
+ color: #0088cc;
+ cursor: pointer;
+}
+
+.link_type:hover {
+ color: #005580;
+ text-decoration: underline;
+}
+
:focus { -moz-outline-style:none; }
table.simpletable { border-collapse: collapse; margin-bottom: 10px;}
@@ -107,19 +129,6 @@ div#head_div { background-color: #FFF; }
#head_banner { background-color: #FFF; }
-.link_type {
- padding:2px;
- color: #00b;
- text-decoration: underline;
- cursor: pointer;
-}
-
-.link_type:hover {
- color: #fff !important;
- background-color: #07b;
- text-decoration: none;
-}
-
div.std-footer {
margin: 13px 0px;
border-top: 1px solid #AAA;
@@ -1590,7 +1599,7 @@ div.psidebar div.section-item {
margin-bottom: 7px;
}
-div.psidebar .section-link {
+div.psidebar div.section-item, div.psidebar .section-link {
font-size: 11px;
color: #666;
}
@@ -2617,6 +2626,174 @@ button.btn.small, input[type="submit"].btn.small {
.dropdown.open .dropdown-menu {
display: block;
}
+/*
+ * lib/css/bootstrap/tooltip.css
+ */.tooltip {
+ position: absolute;
+ z-index: 1020;
+ display: block;
+ visibility: visible;
+ padding: 5px;
+ font-size: 11px;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+.tooltip.in {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+.tooltip.top {
+ margin-top: -2px;
+}
+.tooltip.right {
+ margin-left: 2px;
+}
+.tooltip.bottom {
+ margin-top: 2px;
+}
+.tooltip.left {
+ margin-left: -2px;
+}
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 8px;
+ color: #ffffff;
+ text-align: center;
+ text-decoration: none;
+ background-color: #000000;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.tooltip-arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ padding: 5px;
+}
+.popover.top {
+ margin-top: -5px;
+}
+.popover.right {
+ margin-left: 5px;
+}
+.popover.bottom {
+ margin-top: 5px;
+}
+.popover.left {
+ margin-left: -5px;
+}
+.popover.top .arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.popover.right .arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.popover.bottom .arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.popover.left .arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.popover .arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+.popover-inner {
+ padding: 3px;
+ width: 280px;
+ overflow: hidden;
+ background: #000000;
+ background: rgba(0, 0, 0, 0.8);
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+}
+.popover-title {
+ padding: 9px 15px;
+ line-height: 1;
+ background-color: #f5f5f5;
+ border-bottom: 1px solid #eee;
+ -webkit-border-radius: 3px 3px 0 0;
+ -moz-border-radius: 3px 3px 0 0;
+ border-radius: 3px 3px 0 0;
+}
+.popover-content {
+ padding: 14px;
+ background-color: #ffffff;
+ -webkit-border-radius: 0 0 3px 3px;
+ -moz-border-radius: 0 0 3px 3px;
+ border-radius: 0 0 3px 3px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
+}
+.popover-content p, .popover-content ul, .popover-content ol {
+ margin-bottom: 0;
+}
/*
* erpnext/startup/startup.css
*/h1, h2, h3, h4, h5 {
diff --git a/css/all-web.css b/css/all-web.css
index 8abd1aa8497..1e1548932f2 100644
--- a/css/all-web.css
+++ b/css/all-web.css
@@ -65,8 +65,30 @@ hr {
border-bottom: 1px solid #ffffff;
}
+/* links */
+
a:active { outline:none; }
+a {
+ color: #0088cc;
+ text-decoration: none;
+}
+a:hover {
+ color: #005580;
+ text-decoration: underline;
+}
+
+.link_type {
+ padding:2px;
+ color: #0088cc;
+ cursor: pointer;
+}
+
+.link_type:hover {
+ color: #005580;
+ text-decoration: underline;
+}
+
:focus { -moz-outline-style:none; }
table.simpletable { border-collapse: collapse; margin-bottom: 10px;}
@@ -107,19 +129,6 @@ div#head_div { background-color: #FFF; }
#head_banner { background-color: #FFF; }
-.link_type {
- padding:2px;
- color: #00b;
- text-decoration: underline;
- cursor: pointer;
-}
-
-.link_type:hover {
- color: #fff !important;
- background-color: #07b;
- text-decoration: none;
-}
-
div.std-footer {
margin: 13px 0px;
border-top: 1px solid #AAA;
@@ -1416,6 +1425,174 @@ button.btn.small, input[type="submit"].btn.small {
.dropdown.open .dropdown-menu {
display: block;
}
+/*
+ * lib/css/bootstrap/tooltip.css
+ */.tooltip {
+ position: absolute;
+ z-index: 1020;
+ display: block;
+ visibility: visible;
+ padding: 5px;
+ font-size: 11px;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+.tooltip.in {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+.tooltip.top {
+ margin-top: -2px;
+}
+.tooltip.right {
+ margin-left: 2px;
+}
+.tooltip.bottom {
+ margin-top: 2px;
+}
+.tooltip.left {
+ margin-left: -2px;
+}
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 8px;
+ color: #ffffff;
+ text-align: center;
+ text-decoration: none;
+ background-color: #000000;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.tooltip-arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ padding: 5px;
+}
+.popover.top {
+ margin-top: -5px;
+}
+.popover.right {
+ margin-left: 5px;
+}
+.popover.bottom {
+ margin-top: 5px;
+}
+.popover.left {
+ margin-left: -5px;
+}
+.popover.top .arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.popover.right .arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.popover.bottom .arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.popover.left .arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.popover .arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+.popover-inner {
+ padding: 3px;
+ width: 280px;
+ overflow: hidden;
+ background: #000000;
+ background: rgba(0, 0, 0, 0.8);
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+}
+.popover-title {
+ padding: 9px 15px;
+ line-height: 1;
+ background-color: #f5f5f5;
+ border-bottom: 1px solid #eee;
+ -webkit-border-radius: 3px 3px 0 0;
+ -moz-border-radius: 3px 3px 0 0;
+ border-radius: 3px 3px 0 0;
+}
+.popover-content {
+ padding: 14px;
+ background-color: #ffffff;
+ -webkit-border-radius: 0 0 3px 3px;
+ -moz-border-radius: 0 0 3px 3px;
+ border-radius: 0 0 3px 3px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
+}
+.popover-content p, .popover-content ul, .popover-content ol {
+ margin-bottom: 0;
+}
/*
* erpnext/startup/startup.css
*/h1, h2, h3, h4, h5 {
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
index 13416e6a534..2f20a6175a3 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js
@@ -1,11 +1,19 @@
pscript['onload_Accounts Browser'] = function(){
wn.require('lib/js/legacy/widgets/tree.js');
- // if the user directly loads the page, ask to select the chart
- var parent = $i('ab_body');
- parent.innerHTML = 'Please select your chart: '
- var sel = $a(parent,'select');
- add_sel_options(sel, ['Account', 'Cost Center'], 'Account');
- var btn = $btn(parent, 'Go', function() { pscript.make_chart(sel_val(sel)); }, {marginTop:'8px'});
+
+ var route = location.hash;
+ if(route.indexOf('/')!=-1) {
+ var chart_type = route.split('/')[1];
+ pscript.make_chart(chart_type);
+ return;
+ }
+
+ // if the user directly loads the page, ask to select the chart
+ var parent = $i('ab_body');
+ parent.innerHTML = 'Please select your chart: '
+ var sel = $a(parent,'select');
+ add_sel_options(sel, ['Account', 'Cost Center'], 'Account');
+ var btn = $btn(parent, 'Go', function() { pscript.make_chart(sel_val(sel)); }, {marginTop:'8px'});
}
pscript.make_chart = function(b) {
diff --git a/erpnext/accounts/page/accounts_home/__init__.py b/erpnext/accounts/page/accounts_home/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/erpnext/accounts/page/accounts_home/accounts_home.html b/erpnext/accounts/page/accounts_home/accounts_home.html
new file mode 100644
index 00000000000..e5c8a2e87df
--- /dev/null
+++ b/erpnext/accounts/page/accounts_home/accounts_home.html
@@ -0,0 +1,126 @@
+
+
+
Accounts
+
+
+
+
General Ledger Entries
+
+
Bills raised to Customers
+
+
Bills raised by Suppliers
+
+
+
+
Structure of books of accounts
+
+
Structure cost centers
+
+
+
+
Reports
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_home/accounts_home.js b/erpnext/accounts/page/accounts_home/accounts_home.js
new file mode 100644
index 00000000000..615a18ecc05
--- /dev/null
+++ b/erpnext/accounts/page/accounts_home/accounts_home.js
@@ -0,0 +1,6 @@
+pscript['onload_accounts-home'] = function(wrapper) {
+ erpnext.module_page.setup_page('Accounts', wrapper);
+ if(wn.control_panel.country!='India') {
+ $('.india-specific').toggle(false);
+ }
+}
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_home/accounts_home.txt b/erpnext/accounts/page/accounts_home/accounts_home.txt
new file mode 100644
index 00000000000..5cbceff6fa1
--- /dev/null
+++ b/erpnext/accounts/page/accounts_home/accounts_home.txt
@@ -0,0 +1,28 @@
+# Page, accounts-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:23:08',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:23:08',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Accounts',
+ 'name': '__common__',
+ 'page_name': u'accounts-home',
+ 'standard': u'Yes',
+ 'title': u'Accounts Home'
+ },
+
+ # Page, accounts-home
+ {
+ 'doctype': 'Page',
+ 'name': u'accounts-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/buying/page/buying_home/__init__.py b/erpnext/buying/page/buying_home/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/erpnext/buying/page/buying_home/buying_home.txt b/erpnext/buying/page/buying_home/buying_home.txt
new file mode 100644
index 00000000000..d2d2accb03c
--- /dev/null
+++ b/erpnext/buying/page/buying_home/buying_home.txt
@@ -0,0 +1,28 @@
+# Page, buying-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:22:54',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:22:54',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Buying',
+ 'name': '__common__',
+ 'page_name': u'buying-home',
+ 'standard': u'Yes',
+ 'title': u'Buying Home'
+ },
+
+ # Page, buying-home
+ {
+ 'doctype': 'Page',
+ 'name': u'buying-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/hr/page/hr_home/__init__.py b/erpnext/hr/page/hr_home/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/erpnext/hr/page/hr_home/hr_home.txt b/erpnext/hr/page/hr_home/hr_home.txt
new file mode 100644
index 00000000000..a5a4ba9d317
--- /dev/null
+++ b/erpnext/hr/page/hr_home/hr_home.txt
@@ -0,0 +1,28 @@
+# Page, hr-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:24:05',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:24:05',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'HR',
+ 'name': '__common__',
+ 'page_name': u'hr-home',
+ 'standard': u'Yes',
+ 'title': u'Human Resources Home'
+ },
+
+ # Page, hr-home
+ {
+ 'doctype': 'Page',
+ 'name': u'hr-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/production/page/production_home/__init__.py b/erpnext/production/page/production_home/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/erpnext/production/page/production_home/production_home.txt b/erpnext/production/page/production_home/production_home.txt
new file mode 100644
index 00000000000..4f6cabb0061
--- /dev/null
+++ b/erpnext/production/page/production_home/production_home.txt
@@ -0,0 +1,28 @@
+# Page, production-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:24:34',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:24:34',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Production',
+ 'name': '__common__',
+ 'page_name': u'production-home',
+ 'standard': u'Yes',
+ 'title': u'Production Home'
+ },
+
+ # Page, production-home
+ {
+ 'doctype': 'Page',
+ 'name': u'production-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/projects/page/projects_home/__init__.py b/erpnext/projects/page/projects_home/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/erpnext/projects/page/projects_home/projects_home.txt b/erpnext/projects/page/projects_home/projects_home.txt
new file mode 100644
index 00000000000..665ac995326
--- /dev/null
+++ b/erpnext/projects/page/projects_home/projects_home.txt
@@ -0,0 +1,28 @@
+# Page, projects-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:24:22',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:24:22',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Projects',
+ 'name': '__common__',
+ 'page_name': u'projects-home',
+ 'standard': u'Yes',
+ 'title': u'Projects Home'
+ },
+
+ # Page, projects-home
+ {
+ 'doctype': 'Page',
+ 'name': u'projects-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/selling/page/sales_browser/sales_browser.js b/erpnext/selling/page/sales_browser/sales_browser.js
index c7e400e4cc5..b7fc422e9b9 100644
--- a/erpnext/selling/page/sales_browser/sales_browser.js
+++ b/erpnext/selling/page/sales_browser/sales_browser.js
@@ -1,5 +1,13 @@
pscript['onload_Sales Browser'] = function(){
wn.require('lib/js/legacy/widgets/tree.js');
+
+ var route = location.hash;
+ if(route.indexOf('/')!=-1) {
+ var chart_type = route.split('/')[1];
+ new SalesBrowser().set_val(chart_type)
+ return;
+ }
+
var parent = $i('tr_body');
parent.innerHTML = 'Please select your chart: '
var sel = $a(parent,'select');
diff --git a/erpnext/selling/page/selling_home/__init__.py b/erpnext/selling/page/selling_home/__init__.py
index 959135f4728..e69de29bb2d 100644
--- a/erpnext/selling/page/selling_home/__init__.py
+++ b/erpnext/selling/page/selling_home/__init__.py
@@ -1,12 +0,0 @@
-import webnotes
-
-@webnotes.whitelist()
-def get_report_list(arg=None):
- """return list of reports for this module"""
- webnotes.response['values'] = webnotes.conn.sql("""select
- distinct criteria_name, doc_type, parent_doc_type
- from `tabSearch Criteria`
- where module='Selling'
- and docstatus in (0, NULL)
- order by criteria_name
- limit %(limit_start)s, %(limit_page_length)s""" % webnotes.form_dict, as_dict=True)
\ No newline at end of file
diff --git a/erpnext/selling/page/selling_home/selling_home.html b/erpnext/selling/page/selling_home/selling_home.html
index 5c7f1b1100a..2d421b5b6ba 100644
--- a/erpnext/selling/page/selling_home/selling_home.html
+++ b/erpnext/selling/page/selling_home/selling_home.html
@@ -29,27 +29,46 @@
Setup
+
+
Tools
diff --git a/erpnext/selling/page/selling_home/selling_home.js b/erpnext/selling/page/selling_home/selling_home.js
index 76fac705eab..46cf4598528 100644
--- a/erpnext/selling/page/selling_home/selling_home.js
+++ b/erpnext/selling/page/selling_home/selling_home.js
@@ -1,40 +1,3 @@
pscript['onload_selling-home'] = function(wrapper) {
- erpnext.module_page.hide_links(wrapper);
- erpnext.module_page.make_list('Selling', wrapper);
-}
-
-wn.provide('erpnext.module_page');
-
-// hide list links where the user does
-// not have read permissions
-
-erpnext.module_page.hide_links = function(wrapper) {
- $(wrapper).find('[href*="List/"]').each(function() {
- var href = $(this).attr('href');
- var dt = href.split('/')[1];
- if(wn.boot.profile.can_read.indexOf(dt)==-1) {
- $(this).toggle(false);
- }
- });
-}
-
-// make list of reports
-
-erpnext.module_page.make_list = function(module, wrapper) {
- // make project listing
- wrapper.list = new wn.widgets.Listing({
- parent: $(wrapper).find('.reports-list').get(0),
- method: 'selling.page.selling_home.get_report_list',
- render_row: function(row, data) {
- if(!data.parent_doc_type) data.parent_doc_type = data.doc_type;
- $(row).html(repl('
\
- %(criteria_name)s', data))
- },
- args: {
- module: module
- },
- no_refresh: true
- });
- wrapper.list.run();
+ erpnext.module_page.setup_page('Selling', wrapper);
}
\ No newline at end of file
diff --git a/erpnext/startup/modules.js b/erpnext/startup/modules.js
index 0280c742651..35de0e8e706 100644
--- a/erpnext/startup/modules.js
+++ b/erpnext/startup/modules.js
@@ -1,3 +1,69 @@
+wn.provide('erpnext.module_page');
+
+erpnext.module_page.setup_page = function(module, wrapper) {
+ erpnext.module_page.hide_links(wrapper);
+ erpnext.module_page.make_list(module, wrapper);
+ $(wrapper).find("a").tooltip({
+ delay: { show: 500, hide: 100 }
+ });
+}
+
+// hide list links where the user does
+// not have read permissions
+
+erpnext.module_page.hide_links = function(wrapper) {
+ // lists
+ $(wrapper).find('[href*="List/"]').each(function() {
+ var href = $(this).attr('href');
+ var dt = href.split('/')[1];
+ if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1) {
+ var txt = $(this).text();
+ $(this).parent().css('color', '#999').html(txt);
+ }
+ });
+
+ // reports
+ $(wrapper).find('[data-doctype]').each(function() {
+ var dt = $(this).attr('data-doctype');
+ if(wn.boot.profile.can_read.indexOf(dt)==-1) {
+ var txt = $(this).text();
+ $(this).parent().css('color', '#999').html(txt);
+ }
+ });
+
+ // single (forms)
+ $(wrapper).find('[href*="Form/"]').each(function() {
+ var href = $(this).attr('href');
+ var dt = href.split('/')[1];
+ if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1) {
+ var txt = $(this).text();
+ $(this).parent().css('color', '#999').html(txt);
+ }
+ });}
+
+// make list of reports
+
+erpnext.module_page.make_list = function(module, wrapper) {
+ // make project listing
+ wrapper.list = new wn.widgets.Listing({
+ parent: $(wrapper).find('.reports-list').get(0),
+ method: 'utilities.get_report_list',
+ render_row: function(row, data) {
+ if(!data.parent_doc_type) data.parent_doc_type = data.doc_type;
+ $(row).html(repl('
\
+ %(criteria_name)s', data))
+ },
+ args: {
+ module: module
+ },
+ no_refresh: true
+ });
+ wrapper.list.run();
+}
+
+
+
// ====================================================================
pscript.startup_make_sidebar = function() {
diff --git a/erpnext/startup/modules_new.js b/erpnext/startup/modules_new.js
deleted file mode 100644
index 5f912b01914..00000000000
--- a/erpnext/startup/modules_new.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// Tools Page
-erpnext.ListPage = Class.extend({
- init: function(opts) {
- var me = this;
- this.opts = opts;
- this.page = page_body.add_page[opts.title];
- this.page.wrapper = $a(this.page, 'div', 'layout_wrapper');
- this.page.head = new PageHeading(this.wrapper, this.title)
- this.page.list = new wn.widgets.Listing({
- parent: this.page.wrapper,
- query: opts.query,
- render:row: opts.render_row
- });
- },
- show: function() {
- if(this.first) {
- this.page.list.run();
- this.first = false;
- }
- page_body.change_to(this.opts.title);
- }
-});
-
-erpnext.ToolsPage = erpnext.ListPage.extend({
- init: function(opts) {
- this._super({
- title: opts.module + ' Settings',
- query: repl('select name, description from tabDocType where \
- module=%(module)s and ifnull(issingle,0)=1 order by name asc', opts),
- render_row: function(parent, data) {
- parent.innerHTML = repl('
%(name)s\
- ', data)
- }
- })
- }
-});
\ No newline at end of file
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index c68650a800e..a45650005bf 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -111,5 +111,5 @@ erpnext.startup.set_periodic_updates = function() {
// start
$(document).bind('startup', function() {
- erpnext.startup.start();
+ erpnext.startup.start();
});
diff --git a/erpnext/startup/toolbar.js b/erpnext/startup/toolbar.js
index d5c5d97cdcf..1c8735cdb8a 100644
--- a/erpnext/startup/toolbar.js
+++ b/erpnext/startup/toolbar.js
@@ -2,11 +2,15 @@
wn.provide('erpnext.toolbar');
erpnext.toolbar.setup = function() {
+ // modules
+ erpnext.toolbar.add_modules();
+
// profile
$('#toolbar-user').append('
Profile Settings');
$('#toolbar-user').append('
Team / Messages');
+
$('.navbar .pull-right').prepend('\
');
@@ -52,3 +56,24 @@ erpnext.toolbar.setup = function() {
page_body.wntoolbar.set_new_comments();
}
+erpnext.toolbar.add_modules = function() {
+ $('
\
+ Modules\
+ \
+ ').insertAfter('li[data-name="navbar-home"]');
+ $('.navbar .nav:first')
+}
+
diff --git a/erpnext/stock/page/stock_home/__init__.py b/erpnext/stock/page/stock_home/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/erpnext/stock/page/stock_home/stock_home.html b/erpnext/stock/page/stock_home/stock_home.html
new file mode 100644
index 00000000000..e1f7817217b
--- /dev/null
+++ b/erpnext/stock/page/stock_home/stock_home.html
@@ -0,0 +1,89 @@
+
+
+
Stock
+
+
+
+
Transfer stock from one warehouse to another
+
+
Delivery (shipment) to customers
+
+
Goods received from Suppliers
+
+
+
+
Item Master
+
+
Single unit of an Item
+
+
Batch of units of an Item
+
+
Warehouse is where items are stored
+
+
+
+
Reports
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/erpnext/stock/page/stock_home/stock_home.js b/erpnext/stock/page/stock_home/stock_home.js
new file mode 100644
index 00000000000..ead208f93d4
--- /dev/null
+++ b/erpnext/stock/page/stock_home/stock_home.js
@@ -0,0 +1,3 @@
+pscript['onload_stock-home'] = function(wrapper) {
+ erpnext.module_page.setup_page('Stock', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/stock/page/stock_home/stock_home.txt b/erpnext/stock/page/stock_home/stock_home.txt
new file mode 100644
index 00000000000..f3e7cda6988
--- /dev/null
+++ b/erpnext/stock/page/stock_home/stock_home.txt
@@ -0,0 +1,28 @@
+# Page, stock-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:23:22',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:23:22',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Stock',
+ 'name': '__common__',
+ 'page_name': u'stock-home',
+ 'standard': u'Yes',
+ 'title': u'Stock Home'
+ },
+
+ # Page, stock-home
+ {
+ 'doctype': 'Page',
+ 'name': u'stock-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/support/page/__init__.py b/erpnext/support/page/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/erpnext/support/page/support_home/__init__.py b/erpnext/support/page/support_home/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/erpnext/support/page/support_home/support_home.txt b/erpnext/support/page/support_home/support_home.txt
new file mode 100644
index 00000000000..a462abd6fc9
--- /dev/null
+++ b/erpnext/support/page/support_home/support_home.txt
@@ -0,0 +1,28 @@
+# Page, support-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:23:35',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:23:35',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Support',
+ 'name': '__common__',
+ 'page_name': u'support-home',
+ 'standard': u'Yes',
+ 'title': u'Support Home'
+ },
+
+ # Page, support-home
+ {
+ 'doctype': 'Page',
+ 'name': u'support-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/utilities/__init__.py b/erpnext/utilities/__init__.py
index e69de29bb2d..99f3085e2a9 100644
--- a/erpnext/utilities/__init__.py
+++ b/erpnext/utilities/__init__.py
@@ -0,0 +1,12 @@
+import webnotes
+
+@webnotes.whitelist()
+def get_report_list(arg=None):
+ """return list of reports for the given module module"""
+ webnotes.response['values'] = webnotes.conn.sql("""select
+ distinct criteria_name, doc_type, parent_doc_type
+ from `tabSearch Criteria`
+ where module='%(module)s'
+ and docstatus in (0, NULL)
+ order by criteria_name
+ limit %(limit_start)s, %(limit_page_length)s""" % webnotes.form_dict, as_dict=True)
\ No newline at end of file
diff --git a/erpnext/website/js/topbar.js b/erpnext/website/js/topbar.js
index 0db37537918..247614b6f32 100644
--- a/erpnext/website/js/topbar.js
+++ b/erpnext/website/js/topbar.js
@@ -14,7 +14,7 @@ erpnext.navbar.navbar = Class.extend({
$('.brand').html(wn.boot.website_settings.brand_html);
this.make_items();
$('.dropdown-toggle').dropdown();
-pull-right },
+ },
make: function() {
$('header').append('
\
\
@@ -54,7 +54,11 @@ pull-right },
$parent_li.addClass('dropdown');
$parent_li.find('a:first').addClass('dropdown-toggle')
.attr('data-toggle', 'dropdown')
- .append('
');
+ .attr('href', '')
+ .append('
')
+ .click(function() {
+ return false;
+ });
$parent_li.append('');
}
item.route = item.url || item.custom_page;
@@ -79,6 +83,7 @@ erpnext.Footer = Class.extend({
this.make_items();
},
make_items: function() {
+ alert(16);
var items = wn.boot.website_menus
for(var i=0;i
'+t+'');}
+var err_console;var err_list=[];function errprint(t){if(!err_list)err_list=[];err_list.push(''+t+'
');}
function setup_err_console(){err_console=new Dialog(640,480,'Error Console')
err_console.make_body([['HTML','Error List'],['Button','Clear'],['HTML','Error Report']]);var span=$a(err_console.widgets['Error Report'],'span','link_type');span.innerHTML='Send Error Report';span.onclick=function(){msg=prompt('How / where did you get the error [optional]')
var call_back=function(r,rt){err_console.hide();msgprint("Error Report Sent")}
@@ -1334,7 +1335,7 @@ this.make_options();this.make_tools();this.set_user_name();this.make_logout();$(
\
\
\
-
');},make_home:function(){$('.navbar .nav:first').append('Home')},make_document:function(){wn.ui.toolbar.new_dialog=new wn.ui.toolbar.NewDialog();wn.ui.toolbar.search=new wn.ui.toolbar.Search();wn.ui.toolbar.report=new wn.ui.toolbar.Report();$('.navbar .nav:first').append('\
+ ');},make_home:function(){$('.navbar .nav:first').append('Home')},make_document:function(){wn.ui.toolbar.new_dialog=new wn.ui.toolbar.NewDialog();wn.ui.toolbar.search=new wn.ui.toolbar.Search();wn.ui.toolbar.report=new wn.ui.toolbar.Report();$('.navbar .nav:first').append('\
Document\
');$('#toolbar-user').append('Team / Messages');$('.navbar .pull-right').prepend('\
+wn.provide('erpnext.toolbar');erpnext.toolbar.setup=function(){erpnext.toolbar.add_modules();$('#toolbar-user').append('Profile Settings');$('#toolbar-user').append('Team / Messages');$('.navbar .pull-right').prepend('\
');$('.navbar .pull-right').append('\
Help\
@@ -2276,6 +2282,23 @@ $('#toolbar-help').append('Billing')}
$.extend(page_body.wntoolbar,{set_new_comments:function(new_comments){var navbar_nc=$('#toolbar-new-comments');if(new_comments&&new_comments.length>0){navbar_nc.html('');navbar_nc.click(function(){loadpage('My Company');});$.each(new_comments,function(i,v){var msg='New Message: '+(v[1].length<=100?v[1]:(v[1].substr(0,100)+"..."));var id=v[0].replace('/','-');if(!$('#'+id)[0]){show_alert(msg,id);}})}else{navbar_nc.html('');navbar_nc.click(function(){return false;});}}});page_body.wntoolbar.set_new_comments();}
+erpnext.toolbar.add_modules=function(){$('\
+ Modules\
+ \
+ ').insertAfter('li[data-name="navbar-home"]');$('.navbar .nav:first')}
/*
* erpnext/startup/feature_setup.js
*/
diff --git a/js/all-web.js b/js/all-web.js
index 614f0d0efb9..d820dca7a2f 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -800,7 +800,8 @@ $dh(dialog_message);if(!fcount)return;fcount--;if(!fcount){$dh(dialog_back);froz
/*
* lib/js/legacy/webpage/error_console.js
*/
-var err_console;var err_list=[];function errprint(t){err_list[err_list.length]=(''+t+'
');}
+var err_console;var err_list=[];function errprint(t){if(!err_list)err_list=[];err_list.push(''+t+'
');}
function setup_err_console(){err_console=new Dialog(640,480,'Error Console')
err_console.make_body([['HTML','Error List'],['Button','Clear'],['HTML','Error Report']]);var span=$a(err_console.widgets['Error Report'],'span','link_type');span.innerHTML='Send Error Report';span.onclick=function(){msg=prompt('How / where did you get the error [optional]')
var call_back=function(r,rt){err_console.hide();msgprint("Error Report Sent")}
@@ -988,7 +989,8 @@ this.setup_sidebar_menu=function(){if(this.left_sidebar&&this.cp.show_sidebar_me
this.run_startup_code=function(){$(document).trigger('startup');try{if(this.cp.custom_startup_code)
eval(this.cp.custom_startup_code);}catch(e){errprint(e);}}
this.setup=function(){this.cp=wn.control_panel;this.wrapper=$a($i('body_div'),'div');this.body=$a(this.wrapper,'div');this.setup_page_areas();if(user=='Guest')user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){this.wntoolbar=new wn.ui.toolbar.Toolbar();}
-if(this.cp.page_width)$y(this.wrapper,{width:cint(this.cp.page_width)+'px'});}
+if(this.cp.page_width)
+$y(this.wrapper,{width:cint(this.cp.page_width)+'px'});}
this.pages={};this.cur_page=null;this.add_page=function(label,onshow,onhide){var c=$a(this.center.body,'div');if(onshow)
c.onshow=onshow;if(onhide)
c.onhide=onhide;this.pages[label]=c;$dh(c);return c;}
@@ -1008,7 +1010,6 @@ if(r.dt_labels){for(key in r.dt_labels)session.rev_dt_labels[r.dt_labels[key]]=k
wn.control_panel=r.control_panel;}
var setup_history=function(r){rename_observers.push(nav_obj);}
var callback=function(r,rt){if(r.exc)console.log(r.exc);setup_globals(r);setup_history();var a=new Body();page_body.run_startup_code();page_body.setup_sidebar_menu();for(var i=0;i\
+wn.provide('erpnext.navbar');erpnext.navbar.navbar=Class.extend({init:function(){this.make();$('.brand').html(wn.boot.website_settings.brand_html);this.make_items();$('.dropdown-toggle').dropdown();},make:function(){$('header').append('\
\
\
[brand]\
@@ -1079,14 +1080,8 @@ wn.provide('erpnext.navbar');erpnext.navbar.navbar=Class.extend({init:function()
\
');$('.brand').attr('href','#!'+(wn.boot.website_settings.home_page||'Login Page'))},make_items:function(){var items=wn.boot.website_menus;for(var i=0;i
\
%(label)s',item))}}
-for(var i=0;i');$parent_li.append('');}
+for(var i=0;i').click(function(){return false;});$parent_li.append('');}
item.route=item.url||item.custom_page;$parent_li.find('.dropdown-menu').append(repl('\
- %(label)s',item))}}}});erpnext.Footer=Class.extend({init:function(){$('footer').html(repl('',wn.boot.website_settings));this.make_items();},make_items:function(){var items=wn.boot.website_menus
+ %(label)s',item))}}}});erpnext.Footer=Class.extend({init:function(){alert(15);this.make_items();},make_items:function(){alert(16);var items=wn.boot.website_menus
for(var i=0;i%(label)s',item))}}}});$(document).bind('startup',function(){erpnext.footer=new erpnext.Footer();erpnext.navbar.navbar=new erpnext.navbar.navbar();})
\ No newline at end of file
diff --git a/version.num b/version.num
index 7b5a1ce4fde..748e6f1af54 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-589
\ No newline at end of file
+637
\ No newline at end of file