lead listview
This commit is contained in:
parent
342d133a98
commit
6ac1d73731
30
erpnext/selling/doctype/lead/listview.js
Normal file
30
erpnext/selling/doctype/lead/listview.js
Normal file
@ -0,0 +1,30 @@
|
||||
wn.doclistviews['Lead'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
'tabLead.lead_name',
|
||||
'tabLead.status',
|
||||
'tabLead.source'
|
||||
]);
|
||||
this.stats = this.stats.concat(['status', 'source']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
if(data.status=='Interested') {
|
||||
data.label_type = 'success'
|
||||
}
|
||||
else if(['Open', 'Attempted to Contact', 'Contacted', 'Contact in Future'].indexOf(data.status)!=-1) {
|
||||
data.label_type = 'info'
|
||||
}
|
||||
data.status_html = repl('<span class="label label-%(label_type)s">%(status)s</span>', data);
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '20%', content:'name'},
|
||||
{width: '10%', content:'status_html'},
|
||||
{width: '15%', content:'source'},
|
||||
{width: '40%', content:'tags+lead_name', css: {color:'#aaa'}},
|
||||
{width: '10%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
||||
]
|
||||
})
|
@ -31,14 +31,13 @@ wn.doclistviews['Support Ticket'] = wn.views.ListView.extend({
|
||||
|
||||
// description
|
||||
if(data.description && data.description.length > 50) {
|
||||
data.description = '<span title="'+data.description+'">' + data.description.substr(0,30) + '...</span>';
|
||||
data.description = '<span title="'+data.description+'">' + data.description.substr(0,50) + '...</span>';
|
||||
}
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content:'docstatus'},
|
||||
{width: '15%', content:'name'},
|
||||
{width: '8%', content:'status_html'},
|
||||
{width: '20%', content:'name'},
|
||||
{width: '10%', content:'status_html'},
|
||||
{width: '60%', content:'tags+description', css: {color:'#aaa'}},
|
||||
{width: '10%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user