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:25",
"docstatus": 0,
"modified": "2013-01-22 14:55:57",
"modified": "2013-01-29 13:40:32",
"modified_by": "Administrator",
"owner": "harshada@webnotestech.com"
},
@@ -40,15 +40,6 @@
"doctype": "DocType",
"name": "Batch"
},
{
"doctype": "DocField",
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
"oldfieldtype": "Small Text",
"read_only": 1
},
{
"doctype": "DocField",
"fieldname": "batch_id",
@@ -59,15 +50,36 @@
"oldfieldtype": "Data",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "item",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Item",
"oldfieldname": "item",
"oldfieldtype": "Link",
"options": "Item",
"reqd": 1
},
{
"doctype": "DocField",
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"width": "300px"
},
{
"doctype": "DocField",
"fieldname": "expiry_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Expiry Date",
"oldfieldname": "expiry_date",
"oldfieldtype": "Date"
},
{
"doctype": "DocField",
"fieldname": "start_date",
@@ -86,21 +98,12 @@
},
{
"doctype": "DocField",
"fieldname": "expiry_date",
"fieldtype": "Date",
"label": "Expiry Date",
"oldfieldname": "expiry_date",
"oldfieldtype": "Date"
},
{
"doctype": "DocField",
"fieldname": "item",
"fieldtype": "Link",
"label": "Item",
"oldfieldname": "item",
"oldfieldtype": "Link",
"options": "Item",
"reqd": 1
"fieldname": "trash_reason",
"fieldtype": "Small Text",
"label": "Trash Reason",
"oldfieldname": "trash_reason",
"oldfieldtype": "Small Text",
"read_only": 1
},
{
"doctype": "DocPerm"

View File

@@ -1,28 +0,0 @@
// render
wn.doclistviews['Batch'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
"`tabBatch`.item",
"`tabBatch`.description",
]);
this.stats = this.stats.concat(['company']);
},
prepare_data: function(data) {
this._super(data);
if(data.description && data.description.length > 50) {
data.description = '<span title="'+data.description+'">' +
data.description.substr(0,50) + '...</span>';
}
},
columns: [
{width: '3%', content:'check'},
{width: '5%', content:'avatar'},
{width: '15%', content:'name'},
{width: '15%', content:'item'},
{width: '50%', content:'description+tags'},
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
]
});