setting list_views

This commit is contained in:
Rushabh Mehta
2013-01-29 17:53:29 +05:30
parent 6abb2e67e9
commit 08da1a0a3d
105 changed files with 575 additions and 1736 deletions

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:17",
"docstatus": 0,
"modified": "2013-01-23 17:11:21",
"modified": "2013-01-29 16:27:52",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -57,6 +57,7 @@
"fieldname": "subject",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Subject",
"oldfieldname": "subject",
"oldfieldtype": "Data",
@@ -94,6 +95,7 @@
"doctype": "DocField",
"fieldname": "project",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Project",
"oldfieldname": "project",
"oldfieldtype": "Link",
@@ -103,6 +105,7 @@
"doctype": "DocField",
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Status",
"no_copy": 1,
"oldfieldname": "status",
@@ -114,6 +117,7 @@
"fieldname": "priority",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Priority",
"oldfieldname": "priority",
"oldfieldtype": "Select",
@@ -171,7 +175,7 @@
"label": "Allocated Budget",
"oldfieldname": "allocated_budget",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
"options": "Company:company:default_currency"
},
{
"doctype": "DocField",
@@ -205,7 +209,7 @@
"label": "Actual Budget",
"oldfieldname": "actual_budget",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
"options": "Company:company:default_currency"
},
{
"doctype": "DocField",

View File

@@ -1,50 +0,0 @@
// render
wn.doclistviews['Task'] = wn.views.ListView.extend({
init: function(d) {
this._super(d);
this.fields = this.fields.concat([
'`tabTask`.subject',
'`tabTask`.project',
'`tabTask`.status',
'`tabTask`.opening_date',
'`tabTask`.priority',
]);
this.stats = this.stats.concat(['status']);
},
label_style: {
"status": {
"Open": "danger",
"Closed": "success",
"Hold": "info",
"Waiting for Customer": "info"
}
},
prepare_data: function(data) {
this._super(data);
data.label_style = this.label_style.status[data.status];
if(data.label_style=="danger")
data.label_style = "important"
data.status_html = repl('<span class="label \
label-%(label_style)s">%(status)s</span>', data);
// escape double quotes
data.description = cstr(data.subject)
+ " | " + cstr(data.description);
data.description = data.description.replace(/"/gi, '\"')
.replace(/</gi, '&lt;').replace(/>/gi, '&gt;');
},
columns: [
{width: '3%', content: 'check'},
{width: '5%', content: 'avatar_modified'},
{width: '20%', content:'name'},
{width: '10%', content:'status_html'},
{width: '40%', content: 'subject+tags'},
{width: '20%', content: 'project'},
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
]
});