[setup] added icons, links, fixed single
This commit is contained in:
parent
56b66e22ab
commit
44c1447b60
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-03-25 17:53:21",
|
"creation": "2013-03-25 17:53:21",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-09 10:28:29",
|
"modified": "2013-07-09 10:41:38",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -108,19 +108,12 @@
|
|||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Send Print in Body and Attachment"
|
"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.",
|
"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",
|
"doctype": "DocField",
|
||||||
"fieldname": "section_break0",
|
"fieldname": "section_break0",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Incoming Mail Setting"
|
"label": "Incoming / Support Mail Setting"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Check this to pull emails from your mailbox",
|
"description": "Check this to pull emails from your mailbox",
|
||||||
|
@ -67,10 +67,15 @@ wn.pages['Setup'].onload = function(wrapper) {
|
|||||||
+item.title+'</a></b></div>').appendTo(row);
|
+item.title+'</a></b></div>').appendTo(row);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
var col = $('<div class="col col-lg-5">\
|
var col = $(repl('<div class="col col-lg-5">\
|
||||||
<span class="badge">'+ item.count +'</span>'+
|
<span class="badge">%(count)s</span>\
|
||||||
' <b>' + (item.title || item.doctype) + '</b>'
|
<b><i class="%(icon)s"></i>\
|
||||||
+'</div>')
|
<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);
|
.appendTo(row);
|
||||||
|
|
||||||
col.find(".badge")
|
col.find(".badge")
|
||||||
@ -91,12 +96,19 @@ wn.pages['Setup'].onload = function(wrapper) {
|
|||||||
$('<div class="col col-lg-1"></div>').appendTo(row);
|
$('<div class="col col-lg-1"></div>').appendTo(row);
|
||||||
|
|
||||||
if(item.doctype) {
|
if(item.doctype) {
|
||||||
col.find(".badge")
|
var badge = col.find(".badge, .data-link")
|
||||||
.attr("data-doctype", item.doctype)
|
.attr("data-doctype", item.doctype)
|
||||||
.css({"cursor": "pointer"})
|
.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"))
|
wn.set_route(item.tree || "List", $(this).attr("data-doctype"))
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// tree
|
// tree
|
||||||
@ -108,11 +120,13 @@ wn.pages['Setup'].onload = function(wrapper) {
|
|||||||
<a class="import-link"><i class="icon-upload"></i> Import</a>')
|
<a class="import-link"><i class="icon-upload"></i> Import</a>')
|
||||||
.appendTo($links)
|
.appendTo($links)
|
||||||
|
|
||||||
$links.find(".view-link")
|
var mylink = $links.find(".view-link")
|
||||||
.attr("data-doctype", item.doctype)
|
.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) {
|
} else if(item.single) {
|
||||||
$('<a class="view-link"><i class="icon-edit"></i> Edit</a>')
|
$('<a class="view-link"><i class="icon-edit"></i> Edit</a>')
|
||||||
.appendTo($links)
|
.appendTo($links)
|
||||||
|
@ -93,6 +93,8 @@ items = [
|
|||||||
{ "doctype": "Purchase Taxes and Charges Master" },
|
{ "doctype": "Purchase Taxes and Charges Master" },
|
||||||
{ "doctype": "Shipping Rule" },
|
{ "doctype": "Shipping Rule" },
|
||||||
{ "doctype": "Currency Exchange" },
|
{ "doctype": "Currency Exchange" },
|
||||||
|
{ "title": "Accounts Settings",
|
||||||
|
"route": "Form/Accounts Settings", "type": "Link", "icon": "icon-cog" },
|
||||||
{
|
{
|
||||||
"type": "Section",
|
"type": "Section",
|
||||||
"title": "Opening Accounts and Stock",
|
"title": "Opening Accounts and Stock",
|
||||||
@ -146,7 +148,8 @@ items = [
|
|||||||
"query": "select count(*) from tabSingles where doctype='Email Settings' and field='outgoing_mail_server'"
|
"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,
|
"single": 1,
|
||||||
"query": "select count(*) from tabSingles where doctype='Email Settings' and field='support_host'"
|
"query": "select count(*) from tabSingles where doctype='Email Settings' and field='support_host'"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user