diff --git a/accounts/page/accounts_browser/accounts_browser.js b/accounts/page/accounts_browser/accounts_browser.js
index 78776ce4a60..6a6d97e3a8a 100644
--- a/accounts/page/accounts_browser/accounts_browser.js
+++ b/accounts/page/accounts_browser/accounts_browser.js
@@ -22,7 +22,8 @@
pscript['onload_Accounts Browser'] = function(wrapper){
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
- wrapper.appframe.add_module_tab("Accounts");
+ wrapper.appframe.add_home_breadcrumb()
+ wrapper.appframe.add_module_breadcrumb("Accounts")
if (wn.boot.profile.can_create.indexOf("Company") !== -1) {
wrapper.appframe.add_button('New Company', function() { newdoc('Company'); },
diff --git a/accounts/page/financial_analytics/financial_analytics.js b/accounts/page/financial_analytics/financial_analytics.js
index cf962580448..f0bafdb07bd 100644
--- a/accounts/page/financial_analytics/financial_analytics.js
+++ b/accounts/page/financial_analytics/financial_analytics.js
@@ -24,7 +24,9 @@ wn.pages['financial-analytics'].onload = function(wrapper) {
});
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
- wrapper.appframe.add_module_tab("Accounts");
+ wrapper.appframe.add_home_breadcrumb()
+ wrapper.appframe.add_module_breadcrumb("Accounts")
+ wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
diff --git a/accounts/page/general_ledger/general_ledger.js b/accounts/page/general_ledger/general_ledger.js
index d1630218627..cee749f1cb4 100644
--- a/accounts/page/general_ledger/general_ledger.js
+++ b/accounts/page/general_ledger/general_ledger.js
@@ -23,7 +23,9 @@ wn.pages['general-ledger'].onload = function(wrapper) {
erpnext.general_ledger = new erpnext.GeneralLedger(wrapper);
- wrapper.appframe.add_module_tab("Accounts");
+ wrapper.appframe.add_home_breadcrumb()
+ wrapper.appframe.add_module_breadcrumb("Accounts")
+ wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/accounts/page/trial_balance/trial_balance.js b/accounts/page/trial_balance/trial_balance.js
index 3d05d49a899..9ea76666178 100644
--- a/accounts/page/trial_balance/trial_balance.js
+++ b/accounts/page/trial_balance/trial_balance.js
@@ -56,5 +56,7 @@ wn.pages['trial-balance'].onload = function(wrapper) {
})
erpnext.trial_balance = new TrialBalance(wrapper, 'Trial Balance');
- wrapper.appframe.add_module_tab("Accounts");
+ wrapper.appframe.add_home_breadcrumb()
+ wrapper.appframe.add_module_breadcrumb("Accounts")
+ wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
\ No newline at end of file
diff --git a/buying/page/purchase_analytics/purchase_analytics.js b/buying/page/purchase_analytics/purchase_analytics.js
index d1af656db26..6919ad3a877 100644
--- a/buying/page/purchase_analytics/purchase_analytics.js
+++ b/buying/page/purchase_analytics/purchase_analytics.js
@@ -23,7 +23,9 @@ wn.pages['purchase-analytics'].onload = function(wrapper) {
new erpnext.PurchaseAnalytics(wrapper);
- wrapper.appframe.add_module_tab("Buying");
+ wrapper.appframe.add_home_breadcrumb()
+ wrapper.appframe.add_module_breadcrumb("Buying")
+ wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({
diff --git a/home/page/activity/activity.js b/home/page/activity/activity.js
index 6746919640e..3443cc245f0 100644
--- a/home/page/activity/activity.js
+++ b/home/page/activity/activity.js
@@ -1,5 +1,7 @@
wn.pages['activity'].onload = function(wrapper) {
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
+ wrapper.appframe.add_home_breadcrumb();
+ wrapper.appframe.add_breadcrumb(wn.modules["Activity"].icon);
wrapper.appframe.title('Activity');
var list = new wn.ui.Listing({
diff --git a/home/page/desktop/desktop.css b/home/page/desktop/desktop.css
index 88a437c6226..7990216ed44 100644
--- a/home/page/desktop/desktop.css
+++ b/home/page/desktop/desktop.css
@@ -1,49 +1,13 @@
/* Sprite CSS */
-.sprite-account{ background-position: 0 0; width: 32px; height: 40px; }
-.sprite-buying{ background-position: 0 -90px; width: 40px; height: 40px; }
-.sprite-calendar{ background-position: 0 -180px; width: 35px; height: 40px; }
-.sprite-feed{ background-position: 0 -349px; width: 32px; height: 40px; }
-.sprite-hr{ background-position: 0 -439px; width: 40px; height: 32px; }
-.sprite-kb{ background-position: 0 -521px; width: 24px; height: 39px; }
-.sprite-messages{ background-position: 0 -610px; width: 40px; height: 26px; }
-.sprite-manufacturing{ background-position: 0 -686px; width: 40px; height: 33px; }
-.sprite-project{ background-position: 0 -769px; width: 40px; height: 22px; }
-.sprite-report{ background-position: 0 -841px; width: 29px; height: 40px; }
-.sprite-selling{ background-position: 0 -931px; width: 34px; height: 40px; }
-.sprite-setting{ background-position: 0 -1021px; width: 37px; height: 40px; }
-.sprite-stock{ background-position: 0 -1111px; width: 34px; height: 39px; }
-.sprite-support{ background-position: 0 -1200px; width: 40px; height: 40px; }
-.sprite-todo{ background-position: 0 -1290px; width: 40px; height: 34px; }
-.sprite-website{ background-position: 0 -1374px; width: 40px; height: 40px; }
-
-.sprite-image { background-image: url("app/images/sprite-desktop.png"); }
-
-
-.sprite-account{ margin-top: 8px; margin-left: 12px; }
-.sprite-selling{ margin-top: 8px; margin-left: 12px; }
-.sprite-stock{ margin-top: 8px; margin-left: 8px; }
-.sprite-buying{ margin-top: 8px; margin-left: 8px; }
-.sprite-support{ margin-top: 8px; margin-left: 8px; }
-.sprite-hr{ margin-top: 12px; margin-left: 8px; }
-.sprite-project{ margin-top: 16px; margin-left: 8px; }
-.sprite-manufacturing{ margin-top: 10px; margin-left: 8px; }
-.sprite-website{ margin-top: 8px; margin-left: 8px; }
-.sprite-setting{ margin-top: 8px; margin-left: 8px; }
-.sprite-report{ margin-top: 8px; margin-left: 14px; }
-
-.sprite-messages{ margin-top: 14px; margin-left: 8px; }
-.sprite-todo{ margin-top: 10px; margin-left: 10px; }
-.sprite-calendar{ margin-top: 8px; margin-left: 10px; }
-.sprite-kb{ margin-top: 8px; margin-left: 16px; }
-.sprite-feed{ margin-top: 8px; margin-left: 14px; }
.case-border {
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
- width: 56px;
- height: 56px;
- border: 4px solid white;
+ width: 32px;
+ height: 32px;
+ padding: 12px;
+ border: 2px solid white;
box-shadow: 0 0 4px 1px black;
-moz-box-shadow: 0 0 4px 1px black;
-webkit-box-shadow: 0 0 4px 1px black;
@@ -58,6 +22,12 @@
height: 100px;
}
+.case-wrapper i {
+ font-size: 32px;
+ color: #f8f8f8;
+ margin-top: 8px;
+}
+
.case-label {
color: white;
padding-top: 10px;
diff --git a/home/page/desktop/desktop.js b/home/page/desktop/desktop.js
index f9a3b544a20..fc5f22bede8 100644
--- a/home/page/desktop/desktop.js
+++ b/home/page/desktop/desktop.js
@@ -1,74 +1,48 @@
wn.provide('erpnext.desktop');
-erpnext.desktop.gradient = ""
-
erpnext.desktop.refresh = function() {
- erpnext.desktop.add_classes();
erpnext.desktop.render();
-}
-erpnext.desktop.add_classes = function() {
- $.each(wn.module_css_classes, function(i, v) {
- v.name = i;
- $(repl(erpnext.desktop.gradient, v)).appendTo('head');
+ $("#icon-grid").sortable({
+ update: function() {
+ new_order = [];
+ $("#icon-grid .case-wrapper").each(function(i, e) {
+ new_order.push($(this).attr("data-name"));
+ });
+ wn.user.set_default("_desktop_items", new_order);
+ }
});
}
erpnext.desktop.render = function() {
- var icons = {
- 'Accounts': { sprite: 'account', label: 'Accounts'},
- 'Selling': { sprite: 'selling', label: 'Selling'},
- 'Stock': { sprite: 'stock', label: 'Stock'},
- 'Buying': { sprite: 'buying', label: 'Buying'},
- 'Support': { sprite: 'support', label: 'Support'},
- 'HR': { sprite: 'hr', label: 'Human
Resources'},
- 'Projects': { sprite: 'project', label: 'Projects'},
- 'Manufacturing': { sprite: 'manufacturing', label: 'Manufacturing'},
- 'Website': { sprite: 'website', label: 'Website'},
- 'Activity': { sprite: 'feed', label: 'Activity'},
- 'Setup': { sprite: 'setting', label: 'Setup'},
- 'To Do': { sprite: 'todo', label: 'To Do'},
- 'Messages': { sprite: 'messages', label: 'Messages'},
- 'Calendar': { sprite: 'calendar', label: 'Calendar'},
- 'Knowledge Base': { sprite: 'kb', label: 'Knowledge
Base'}
- }
-
var add_icon = function(m) {
- var icon = icons[m];
- icon.link = erpnext.modules[m];
- icon.gradient = wn.module_css_map[m];
+ var module = wn.modules[m];
+ if(!module.label)
+ module.label = m;
+ module.name = m;
+ module.gradient_css = wn.get_gradient_css(module.color, 45);
$('#icon-grid').append(repl('\
-
\
- ', module));
}
- // setup
- for(var i in wn.boot.modules_list) {
- var m = wn.boot.modules_list[i];
+ // modules
+ var modules_list = wn.user.get_desktop_items();
+ $.each(modules_list, function(i, m) {
if(!in_list(['Setup', 'Core'], m) && wn.boot.profile.allow_modules.indexOf(m)!=-1)
add_icon(m);
- }
-
+ })
+ // setup
if(user_roles.indexOf('System Manager')!=-1)
add_icon('Setup')
- // apps
+ // notifications
erpnext.desktop.show_pending_notifications();
}
@@ -100,12 +74,12 @@ erpnext.desktop.show_pending_notifications = function() {
}
- add_circle('messages', 'unread_messages', 'Unread Messages');
- add_circle('support', 'open_support_tickets', 'Open Support Tickets');
- add_circle('todo', 'things_todo', 'Things To Do');
- add_circle('calendar', 'todays_events', 'Todays Events');
- add_circle('project', 'open_tasks', 'Open Tasks');
- add_circle('kb', 'unanswered_questions', 'Unanswered Questions');
+ add_circle('module-icon-messages', 'unread_messages', 'Unread Messages');
+ add_circle('module-icon-support-home', 'open_support_tickets', 'Open Support Tickets');
+ add_circle('module-icon-todo', 'things_todo', 'Things To Do');
+ add_circle('module-icon-calendar', 'todays_events', 'Todays Events');
+ add_circle('module-icon-projects-home', 'open_tasks', 'Open Tasks');
+ add_circle('module-icon-questions', 'unanswered_questions', 'Unanswered Questions');
erpnext.update_messages();
diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js
index f996b350c48..47d08c7c854 100644
--- a/home/page/latest_updates/latest_updates.js
+++ b/home/page/latest_updates/latest_updates.js
@@ -2,6 +2,7 @@ erpnext.updates = [
["21st December 2012", [
"Manufacturing: For Material Transfer against Production Order, \
fetch quantity pending to be transferred for each item."
+ "Desktop: New Icons and now sortable by dragging."
]],
["20th December 2012", [
"Website: Create Product Search Page, Product Group Page on the website.",
diff --git a/hr/doctype/leave_application/leave_application.js b/hr/doctype/leave_application/leave_application.js
index 7253bdba0a9..63b5e6e0f63 100755
--- a/hr/doctype/leave_application/leave_application.js
+++ b/hr/doctype/leave_application/leave_application.js
@@ -47,7 +47,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
} else {
cur_frm.set_intro("This Leave Application is pending approval. Only the Leave Apporver can update status.")
cur_frm.toggle_enable("status", false);
- if(!doc.__islocal) cur_frm.frm_head.appframe.buttons.Submit.toggle(false);
+ if(!doc.__islocal) cur_frm.frm_head.appframe.buttons.Submit.remove();
}
} else {
if(doc.status=="Approved") {
diff --git a/patches/december_2012/deleted_contact_address_patch.py b/patches/december_2012/deleted_contact_address_patch.py
new file mode 100644
index 00000000000..3eb1b37eee4
--- /dev/null
+++ b/patches/december_2012/deleted_contact_address_patch.py
@@ -0,0 +1,12 @@
+import webnotes
+def execute():
+ """finds references of deleted addresses and contacts and deletes these references"""
+ import webnotes.model
+
+ for dt in ["Address", "Contact"]:
+ link_fields = webnotes.model.get_link_fields(dt)
+ for parent, lf in link_fields:
+ webnotes.conn.sql("""update `tab%s` ref set `%s`=null
+ where ifnull(`%s`, '')!='' and not exists (
+ select * from `tab%s` where name=ref.`%s`)""" % \
+ (parent, lf, lf, dt, lf))
\ No newline at end of file
diff --git a/public/images/module-icons-small.png b/public/images/module-icons-small.png
deleted file mode 100644
index c5dc26d65d1..00000000000
Binary files a/public/images/module-icons-small.png and /dev/null differ
diff --git a/public/images/module_icons/accounts.png b/public/images/module_icons/accounts.png
deleted file mode 100644
index 5a05c4dad0c..00000000000
Binary files a/public/images/module_icons/accounts.png and /dev/null differ
diff --git a/public/images/module_icons/buying.png b/public/images/module_icons/buying.png
deleted file mode 100644
index 5878748d97c..00000000000
Binary files a/public/images/module_icons/buying.png and /dev/null differ
diff --git a/public/images/module_icons/calendar.png b/public/images/module_icons/calendar.png
deleted file mode 100644
index 254ba0f84e2..00000000000
Binary files a/public/images/module_icons/calendar.png and /dev/null differ
diff --git a/public/images/module_icons/dashboard.png b/public/images/module_icons/dashboard.png
deleted file mode 100644
index 1e12ea05529..00000000000
Binary files a/public/images/module_icons/dashboard.png and /dev/null differ
diff --git a/public/images/module_icons/feed.png b/public/images/module_icons/feed.png
deleted file mode 100644
index d4d5eababa3..00000000000
Binary files a/public/images/module_icons/feed.png and /dev/null differ
diff --git a/public/images/module_icons/hr.png b/public/images/module_icons/hr.png
deleted file mode 100644
index 34fa2f88931..00000000000
Binary files a/public/images/module_icons/hr.png and /dev/null differ
diff --git a/public/images/module_icons/kb.png b/public/images/module_icons/kb.png
deleted file mode 100644
index 9ea18424bc1..00000000000
Binary files a/public/images/module_icons/kb.png and /dev/null differ
diff --git a/public/images/module_icons/messages.png b/public/images/module_icons/messages.png
deleted file mode 100644
index 77556e108f7..00000000000
Binary files a/public/images/module_icons/messages.png and /dev/null differ
diff --git a/public/images/module_icons/production.png b/public/images/module_icons/production.png
deleted file mode 100644
index 309b7bcaa3a..00000000000
Binary files a/public/images/module_icons/production.png and /dev/null differ
diff --git a/public/images/module_icons/projects.png b/public/images/module_icons/projects.png
deleted file mode 100644
index 65c87ee1a70..00000000000
Binary files a/public/images/module_icons/projects.png and /dev/null differ
diff --git a/public/images/module_icons/selling.png b/public/images/module_icons/selling.png
deleted file mode 100644
index 9e5d1f2a394..00000000000
Binary files a/public/images/module_icons/selling.png and /dev/null differ
diff --git a/public/images/module_icons/setup.png b/public/images/module_icons/setup.png
deleted file mode 100644
index 18061df9592..00000000000
Binary files a/public/images/module_icons/setup.png and /dev/null differ
diff --git a/public/images/module_icons/stock.png b/public/images/module_icons/stock.png
deleted file mode 100644
index 42c1453998c..00000000000
Binary files a/public/images/module_icons/stock.png and /dev/null differ
diff --git a/public/images/module_icons/support.png b/public/images/module_icons/support.png
deleted file mode 100644
index a4075057f42..00000000000
Binary files a/public/images/module_icons/support.png and /dev/null differ
diff --git a/public/images/module_icons/todo.png b/public/images/module_icons/todo.png
deleted file mode 100644
index b7c056b7fe7..00000000000
Binary files a/public/images/module_icons/todo.png and /dev/null differ
diff --git a/public/images/module_icons/website.png b/public/images/module_icons/website.png
deleted file mode 100644
index 11064de9f93..00000000000
Binary files a/public/images/module_icons/website.png and /dev/null differ
diff --git a/public/images/sprite-desktop.png b/public/images/sprite-desktop.png
deleted file mode 100644
index cb8fc6ecfef..00000000000
Binary files a/public/images/sprite-desktop.png and /dev/null differ
diff --git a/public/js/conf.js b/public/js/conf.js
index 8dd4cb9cb45..522de0ae1b3 100644
--- a/public/js/conf.js
+++ b/public/js/conf.js
@@ -7,7 +7,7 @@ erpnext.set_about = function() {
source: 'https://github.com/webnotes/erpnext',
publisher: 'Web Notes Technologies Pvt Ltd, Mumbai',
copyright: '© Web Notes Technologies Pvt Ltd',
- version: '2' //+ '.' + window._version_number
+ version: 'Please see git log for the release number'
});
}
diff --git a/public/js/modules.js b/public/js/modules.js
index b95b3ea3621..752d3699fd8 100644
--- a/public/js/modules.js
+++ b/public/js/modules.js
@@ -14,75 +14,86 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-erpnext.modules = {
- 'Selling': 'selling-home',
- 'Accounts': 'accounts-home',
- 'Stock': 'stock-home',
- 'Buying': 'buying-home',
- 'Support': 'support-home',
- 'Projects': 'projects-home',
- 'Manufacturing': 'manufacturing-home',
- 'Website': 'website-home',
- 'HR': 'hr-home',
- 'Setup': 'Setup',
- 'Activity': 'activity',
- 'To Do': 'todo',
- 'Calendar': 'calendar',
- 'Messages': 'messages',
- 'Knowledge Base': 'questions',
-}
-
-wn.provide('wn.modules');
-$.extend(wn.modules, erpnext.modules);
-wn.modules['Core'] = 'Setup';
-
-wn.module_css_classes = {
- 'red': { start: '#A90329', middle: '#8F0222', end: '#6D0019' },
- 'brown': { start: '#723e02', middle: '#633501', end: '#4a2700' },
- 'green': { start: '#4b5602', middle: '#3f4901', end: '#313800' },
- 'blue': { start: '#026584', middle: '#025770', end: '#004256' },
- 'yellow': { start: '#be7902', middle: '#a66a02', end: '#865500' },
- 'purple': { start: '#4d017d', middle: '#410169', end: '#310050' },
- 'ocean': { start: '#02a47e', middle: '#018d6c', end: '#006a51' },
- 'pink': { start: '#a40281', middle: '#8d016e', end: '#6a0053' },
- 'grey': { start: '#545454', middle: '#484848', end: '#363636' },
- 'dark-red': { start: '#68021a', middle: '#590116', end: '#440010' },
- 'leaf-green': { start: '#b0a400', middle: '#968c00', end: '#726a00' },
- //'dark-blue': { start: '#023bae', middle: '#013295', end: '#002672' },
- 'bright-green': { start: '#03ad1f', middle: '#02941a', end: '#007213' },
- 'bright-yellow': { start: '#ffd65e', middle: '#febf04', end: '#ed9017' },
- 'peacock': { start: '#026584', middle: '#026584', end: '#322476' },
- 'violet': { start: '#50448e', middle: '#473b7f', end: '#3a3169' },
- 'ultra-dark-green': { start: '#014333', middle: '#01372b', end: '#002a20' },
-}
-
-wn.module_css_map = {
- 'Accounts': 'blue',
- 'Selling': 'green',
- 'Stock': 'yellow',
- 'Buying': 'red',
- 'Support': 'purple',
- 'HR': 'ocean',
- 'Projects': 'violet',
- 'Manufacturing': 'dark-red',
- 'Website': 'leaf-green',
- 'Activity': 'brown',
- 'Setup': 'grey',
- 'To Do': 'bright-yellow',
- 'Messages': 'pink',
- 'Calendar': 'peacock',
- 'Knowledge Base': 'ultra-dark-green'
-}
-
-wn.get_module_color = function(module) {
- try {
- var color = wn.module_css_classes[wn.module_css_map[module]].middle;
- } catch(e) {
- var color = "#000";
- }
- return color;
-}
-
+wn.home_page = "desktop";
+$.extend(wn.modules, {
+ "Selling": {
+ link: "selling-home",
+ color: "#3f4901",
+ icon: "icon-tag"
+ },
+ "Accounts": {
+ link: "accounts-home",
+ color: "#025770",
+ icon: "icon-money"
+ },
+ "Stock": {
+ link: "stock-home",
+ color: "#a66a02",
+ icon: "icon-truck"
+ },
+ "Buying": {
+ link: "buying-home",
+ color: "#8F0222",
+ icon: "icon-shopping-cart"
+ },
+ "Support": {
+ link: "support-home",
+ color: "#410169",
+ icon: "icon-phone"
+ },
+ "Projects": {
+ link: "projects-home",
+ color: "#473b7f",
+ icon: "icon-tasks"
+ },
+ "Manufacturing": {
+ link: "manufacturing-home",
+ color: "#590116",
+ icon: "icon-magic"
+ },
+ "Website": {
+ link: "website-home",
+ color: "#968c00",
+ icon: "icon-globe"
+ },
+ "HR": {
+ link: "hr-home",
+ color: "#018d6c",
+ label: "Human Resources",
+ icon: "icon-group"
+ },
+ "Setup": {
+ link: "Setup",
+ color: "#484848",
+ icon: "icon-wrench"
+ },
+ "Activity": {
+ link: "activity",
+ color: "#633501",
+ icon: "icon-play"
+ },
+ "To Do": {
+ link: "todo",
+ color: "#febf04",
+ icon: "icon-check"
+ },
+ "Calendar": {
+ link: "calendar",
+ color: "#026584",
+ icon: "icon-calendar"
+ },
+ "Messages": {
+ link: "messages",
+ color: "#8d016e",
+ icon: "icon-comments"
+ },
+ "Knowledge Base": {
+ link: "questions",
+ color: "#01372b",
+ icon: "icon-question-sign"
+ },
+
+});
wn.provide('erpnext.module_page');
@@ -92,6 +103,8 @@ erpnext.module_page.setup_page = function(module, wrapper) {
$(wrapper).find("a[title]").tooltip({
delay: { show: 500, hide: 100 }
});
+ wrapper.appframe.add_home_breadcrumb();
+ wrapper.appframe.add_breadcrumb(wn.modules[module].icon);
}
// hide list links where the user does
diff --git a/public/js/startup.css b/public/js/startup.css
index c367cbb8f07..88ebedd250e 100644
--- a/public/js/startup.css
+++ b/public/js/startup.css
@@ -60,25 +60,4 @@ span, div, td, input, textarea, button, select {
.show-all-reports {
margin-top: 5px;
font-size: 11px;
-}
-
-.small-module-icons-accounts{ background-position: 0 0; width: 14px; height: 17px; margin-top: -2px; margin-bottom: -2px; }
-.small-module-icons-selling{ background-position: 0 -67px; width: 14px; height: 17px; margin-top: -2px; margin-bottom: -2px; }
-.small-module-icons-calendar{ background-position: 0 -134px; width: 15px; height: 17px; margin-top: -2px; margin-bottom: -2px; }
-.small-module-icons-feed{ background-position: 0 -263px; width: 14px; height: 17px; margin-top: -2px; margin-bottom: -2px; }
-.small-module-icons-hr{ background-position: 0 -330px; width: 17px; height: 14px; margin-top: -1px; }
-.small-module-icons-kb{ background-position: 0 -394px; width: 10px; height: 17px; margin-top: -2px; margin-bottom: -2px; }
-.small-module-icons-messages{ background-position: 0 -461px; width: 17px; height: 11px; }
-.small-module-icons-manufacturing{ background-position: 0 -522px; width: 17px; height: 14px; margin-top: -1px; }
-.small-module-icons-projects{ background-position: 0 -586px; width: 17px; height: 10px; }
-.small-module-icons-buying{ background-position: 0 -646px; width: 17px; height: 17px; margin-top: -2px; margin-bottom: -2px; }
-.small-module-icons-setup{ background-position: 0 -713px; width: 16px; height: 17px; margin-top: -2px; margin-bottom: -2px; }
-.small-module-icons-stock{ background-position: 0 -780px; width: 14px; height: 17px; margin-top: -2px; margin-bottom: -2px; }
-.small-module-icons-support{ background-position: 0 -847px; width: 17px; height: 17px; margin-top: -2px; margin-bottom: -2px; }
-.small-module-icons-todo{ background-position: 0 -914px; width: 17px; height: 15px; margin-top: -1px; margin-bottom: -1px; }
-.small-module-icons-website{ background-position: 0 -979px; width: 17px; height: 17px; margin-top: -2px; margin-bottom: -2px; }
-
-.small-module-icons {
- background-image: url("../app/images/module-icons-small.png");
- display: inline-block;
}
\ No newline at end of file
diff --git a/public/js/toolbar.js b/public/js/toolbar.js
index fa835692c48..71fb082c6d4 100644
--- a/public/js/toolbar.js
+++ b/public/js/toolbar.js
@@ -54,22 +54,17 @@ erpnext.toolbar.add_modules = function() {
\
').prependTo('.navbar .nav:first');
- // if no modules list then show all
- if(wn.boot.modules_list && typeof(wn.boot.modules_list) == 'string') {
- wn.boot.modules_list = JSON.parse(wn.boot.modules_list);
- }
- else
- wn.boot.modules_list = keys(erpnext.modules).sort();
+ var modules_list = wn.user.get_desktop_items();
// add to dropdown
- for(var i in wn.boot.modules_list) {
- var m = wn.boot.modules_list[i]
+ for(var i in modules_list) {
+ var m = modules_list[i]
if(m!='Setup' && wn.boot.profile.allow_modules.indexOf(m)!=-1) {
args = {
module: m,
- module_page: erpnext.modules[m],
- module_label: m=='HR' ? 'Human Resources' : m
+ module_page: wn.modules[m].link,
+ module_label: wn.modules[m].label || m
}
$('.navbar .modules').append(repl('.
pscript.onload_Setup = function(wrapper) {
- wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Setup');
+ wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'Setup');
+ wrapper.appframe.add_home_breadcrumb();
+ wrapper.appframe.add_breadcrumb(wn.modules["Setup"].icon);
+
erpnext.module_page.hide_links(wrapper);
if(wn.boot.expires_on) {
$(wrapper).find(".layout-main")
diff --git a/stock/doctype/stock_entry/stock_entry.js b/stock/doctype/stock_entry/stock_entry.js
index e4362f8e5b3..724b215d3fe 100644
--- a/stock/doctype/stock_entry/stock_entry.js
+++ b/stock/doctype/stock_entry/stock_entry.js
@@ -44,8 +44,10 @@ erpnext.stock.StockEntry = erpnext.utils.Controller.extend({
clean_up: function() {
// Clear Production Order record from locals, because it is updated via Stock Entry
- if(this.frm.doc.production_order && this.frm.doc.purpose == "Manufacture/Repack") {
- wn.model.clear_doclist("Production Order", this.frm.doc.production_order);
+ if(this.frm.doc.production_order &&
+ this.frm.doc.purpose == "Manufacture/Repack") {
+ wn.model.remove_from_locals("Production Order",
+ this.frm.doc.production_order);
}
},
diff --git a/stock/page/stock_ageing/stock_ageing.js b/stock/page/stock_ageing/stock_ageing.js
index 82ab0bc0244..c20fa929fdb 100644
--- a/stock/page/stock_ageing/stock_ageing.js
+++ b/stock/page/stock_ageing/stock_ageing.js
@@ -24,7 +24,9 @@ wn.pages['stock-ageing'].onload = function(wrapper) {
new erpnext.StockAgeing(wrapper);
- wrapper.appframe.add_module_tab("Stock");
+ wrapper.appframe.add_home_breadcrumb()
+ wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
wn.require("app/js/stock_grid_report.js");
diff --git a/stock/page/stock_analytics/stock_analytics.js b/stock/page/stock_analytics/stock_analytics.js
index 8e98de8bec5..3448035947d 100644
--- a/stock/page/stock_analytics/stock_analytics.js
+++ b/stock/page/stock_analytics/stock_analytics.js
@@ -23,7 +23,9 @@ wn.pages['stock-analytics'].onload = function(wrapper) {
new erpnext.StockAnalytics(wrapper);
- wrapper.appframe.add_module_tab("Stock");
+ wrapper.appframe.add_home_breadcrumb()
+ wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
wn.require("app/js/stock_grid_report.js");
diff --git a/stock/page/stock_ledger/stock_ledger.js b/stock/page/stock_ledger/stock_ledger.js
index f7427ab2f2a..3287bb07cac 100644
--- a/stock/page/stock_ledger/stock_ledger.js
+++ b/stock/page/stock_ledger/stock_ledger.js
@@ -23,7 +23,9 @@ wn.pages['stock-ledger'].onload = function(wrapper) {
new erpnext.StockLedger(wrapper);
- wrapper.appframe.add_module_tab("Stock");
+ wrapper.appframe.add_home_breadcrumb()
+ wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
wn.require("app/js/stock_grid_report.js");
diff --git a/utilities/page/messages/messages.js b/utilities/page/messages/messages.js
index 1da5bf4a062..4d77e16e6df 100644
--- a/utilities/page/messages/messages.js
+++ b/utilities/page/messages/messages.js
@@ -31,6 +31,9 @@ wn.pages.messages.onload = function(wrapper) {
\
\
').appendTo($(wrapper).find('.layout-main-section'));
+
+ wrapper.appframe.add_home_breadcrumb();
+ wrapper.appframe.add_breadcrumb(wn.modules["Messages"].icon);
erpnext.messages = new erpnext.Messages(wrapper);
erpnext.toolbar.set_new_comments(0);
diff --git a/utilities/page/question_view/question_view.js b/utilities/page/question_view/question_view.js
index 4b63c99e9e7..ea1a2dc70a5 100644
--- a/utilities/page/question_view/question_view.js
+++ b/utilities/page/question_view/question_view.js
@@ -17,7 +17,9 @@
pscript['onload_question-view'] = function(wrapper) {
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
wrapper.appframe.title('Question');
- wrapper.appframe.add_module_tab('Knowledge Base');
+ wrapper.appframe.add_home_breadcrumb();
+ wrapper.appframe.add_module_breadcrumb("Knowledge Base");
+ wrapper.appframe.add_breadcrumb("icon-file");
wrapper.add_answer_area = $('.add-answer-area').get(0);
}
diff --git a/utilities/page/questions/questions.js b/utilities/page/questions/questions.js
index fced563d662..0e88728d22e 100644
--- a/utilities/page/questions/questions.js
+++ b/utilities/page/questions/questions.js
@@ -18,6 +18,8 @@ pscript.onload_questions = function(wrapper) {
body = $(wrapper).find('.layout-main-section').get(0);
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
+ wrapper.appframe.add_home_breadcrumb();
+ wrapper.appframe.add_breadcrumb(wn.modules["Knowledge Base"].icon);
wrapper.appframe.title('Knowledge Base');
// kb
diff --git a/utilities/page/todo/todo.js b/utilities/page/todo/todo.js
index 0617b4e2923..cad5fbd28bd 100644
--- a/utilities/page/todo/todo.js
+++ b/utilities/page/todo/todo.js
@@ -185,6 +185,8 @@ erpnext.todo.save = function(btn) {
wn.pages.todo.onload = function(wrapper) {
// create app frame
wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'), 'To Do');
+ wrapper.appframe.add_home_breadcrumb();
+ wrapper.appframe.add_breadcrumb(wn.modules["To Do"].icon);
wrapper.appframe.add_button('Refresh', erpnext.todo.refresh, 'icon-refresh');
wrapper.appframe.add_button('Add', function() {
erpnext.todo.make_dialog({