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:12",
"docstatus": 0,
"modified": "2013-01-22 14:55:57",
"modified": "2013-01-29 17:50:21",
"modified_by": "Administrator",
"owner": "ashwini@webnotestech.com"
},
@@ -76,6 +76,7 @@
"fieldname": "employee_name",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "For Employee Name",
"oldfieldname": "employee_name",
"oldfieldtype": "Data",
@@ -96,6 +97,7 @@
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Status",
"no_copy": 1,
"oldfieldname": "status",
@@ -111,6 +113,7 @@
"fieldname": "start_date",
"fieldtype": "Date",
"in_filter": 1,
"in_list_view": 1,
"label": "Start Date",
"oldfieldname": "start_date",
"oldfieldtype": "Date",
@@ -159,6 +162,7 @@
"doctype": "DocField",
"fieldname": "total_score",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Total Score (Out of 5)",
"no_copy": 1,
"oldfieldname": "total_score",

View File

@@ -1,32 +0,0 @@
// render
wn.doclistviews['Appraisal'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
"`tabAppraisal`.employee_name",
"`tabAppraisal`.start_date",
"`tabAppraisal`.end_date",
"`tabAppraisal`.total_score",
"`tabAppraisal`.status",
]);
this.stats = this.stats.concat(['company']);
},
prepare_data: function(data) {
this._super(data);
data.start_date = wn.datetime.str_to_user(data.start_date);
data.end_date = wn.datetime.str_to_user(data.end_date);
data.date_range = data.start_date + " to " + data.end_date;
},
columns: [
{width: '3%', content: 'check'},
{width: '3%', content: 'docstatus'},
{width: '15%', content: 'name'},
{width: '25%', content: 'employee_name'},
{width: '12%', content: 'status+tags'},
{width: '12%', content: 'total_score', css: {'text-align': 'right'}},
{width: '30%', content:'date_range',
css: {'text-align': 'right', 'color': '#777'}},
]
});