[setup] added icons, links, fixed single
diff --git a/setup/doctype/email_settings/email_settings.txt b/setup/doctype/email_settings/email_settings.txt
index b063b7e..292b853 100644
--- a/setup/doctype/email_settings/email_settings.txt
+++ b/setup/doctype/email_settings/email_settings.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-03-25 17:53:21",
"docstatus": 0,
- "modified": "2013-07-09 10:28:29",
+ "modified": "2013-07-09 10:41:38",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -109,18 +109,11 @@
"label": "Send Print in Body and Attachment"
},
{
- "description": "Set the POP3 email settings to pull emails directly from a mailbox and create Support Tickets",
- "doctype": "DocField",
- "fieldname": "support_ticket_mail_settings",
- "fieldtype": "Section Break",
- "label": "Support Ticket Mail Settings"
- },
- {
"description": "To automatically create Support Tickets from your incoming mail, set your POP3 settings here. You must ideally create a separate email id for the erp system so that all emails will be synced into the system from that mail id. If you are not sure, please contact your EMail Provider.",
"doctype": "DocField",
"fieldname": "section_break0",
"fieldtype": "Section Break",
- "label": "Incoming Mail Setting"
+ "label": "Incoming / Support Mail Setting"
},
{
"description": "Check this to pull emails from your mailbox",
diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js
index 9087188..1f5132c 100644
--- a/setup/page/setup/setup.js
+++ b/setup/page/setup/setup.js
@@ -67,10 +67,15 @@
+item.title+'</a></b></div>').appendTo(row);
} else {
- var col = $('<div class="col col-lg-5">\
- <span class="badge">'+ item.count +'</span>'+
- ' <b>' + (item.title || item.doctype) + '</b>'
- +'</div>')
+ var col = $(repl('<div class="col col-lg-5">\
+ <span class="badge">%(count)s</span>\
+ <b><i class="%(icon)s"></i>\
+ <a class="data-link">%(title)s</a></b>\
+ </div>', {
+ count: item.count,
+ title: wn._(item.title || item.doctype),
+ icon: wn.boot.doctype_icons[item.doctype]
+ }))
.appendTo(row);
col.find(".badge")
@@ -91,12 +96,19 @@
$('<div class="col col-lg-1"></div>').appendTo(row);
if(item.doctype) {
- col.find(".badge")
+ var badge = col.find(".badge, .data-link")
.attr("data-doctype", item.doctype)
.css({"cursor": "pointer"})
- .click(function() {
+
+ if(item.single) {
+ badge.click(function() {
+ wn.set_route("Form", $(this).attr("data-doctype"))
+ })
+ } else {
+ badge.click(function() {
wn.set_route(item.tree || "List", $(this).attr("data-doctype"))
})
+ }
}
// tree
@@ -108,11 +120,13 @@
<a class="import-link"><i class="icon-upload"></i> Import</a>')
.appendTo($links)
- $links.find(".view-link")
+ var mylink = $links.find(".view-link")
.attr("data-doctype", item.doctype)
- .click(function() {
- wn.set_route(item.tree, item.doctype);
- })
+
+ mylink.click(function() {
+ wn.set_route(item.tree, item.doctype);
+ })
+
} else if(item.single) {
$('<a class="view-link"><i class="icon-edit"></i> Edit</a>')
.appendTo($links)
diff --git a/setup/page/setup/setup.py b/setup/page/setup/setup.py
index baee676..2ca870d 100644
--- a/setup/page/setup/setup.py
+++ b/setup/page/setup/setup.py
@@ -93,6 +93,8 @@
{ "doctype": "Purchase Taxes and Charges Master" },
{ "doctype": "Shipping Rule" },
{ "doctype": "Currency Exchange" },
+ { "title": "Accounts Settings",
+ "route": "Form/Accounts Settings", "type": "Link", "icon": "icon-cog" },
{
"type": "Section",
"title": "Opening Accounts and Stock",
@@ -146,7 +148,8 @@
"query": "select count(*) from tabSingles where doctype='Email Settings' and field='outgoing_mail_server'"
},
{
- "doctype": "Support Email Settings",
+ "title": "Support Email Settings",
+ "doctype": "Email Settings",
"single": 1,
"query": "select count(*) from tabSingles where doctype='Email Settings' and field='support_host'"
},