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-22 14:57:26",
"modified": "2013-01-29 14:36:53",
"modified_by": "Administrator",
"owner": "ashwini@webnotestech.com"
},
@@ -53,6 +53,7 @@
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 0,
"in_list_view": 1,
"label": "Status",
"oldfieldname": "status",
"oldfieldtype": "Select",
@@ -116,6 +117,7 @@
"doctype": "DocField",
"fieldname": "notes",
"fieldtype": "Text",
"in_list_view": 1,
"label": "Notes"
},
{

View File

@@ -1,35 +0,0 @@
// render
wn.doclistviews['Timesheet'] = wn.views.ListView.extend({
init: function(d) {
this._super(d);
this.fields = this.fields.concat([
'`tabTimesheet`.status',
'`tabTimesheet`.timesheet_date',
'`tabTimesheet`.owner',
'`tabTimesheet`.notes',
]);
},
prepare_data: function(data) {
this._super(data);
data.timesheet_date = wn.datetime.str_to_user(data.timesheet_date);
if(data.notes && data.notes.length > 50) {
data.notes = '<span title="'+data.notes+'">' +
data.notes.substr(0,50) + '...</span>';
}
},
columns: [
{width: '3%', content: 'check'},
{width: '5%', content: 'avatar'},
{width: '3%', content: 'docstatus'},
{width: '18%', content: 'name'},
{width: '12%', content: 'status'},
{width: '27%', content: 'notes+tags', css: {'color': '#777'}},
{width: '20%', content: 'owner'},
{width: '12%', content:'timesheet_date', css: {
'text-align': 'right', 'color':'#777'
}},
]
});