list in listview and sales order fix
diff --git a/erpnext/accounts/doctype/sales_invoice/listview.js b/erpnext/accounts/doctype/sales_invoice/listview.js
index c8030ef..b9f4686 100644
--- a/erpnext/accounts/doctype/sales_invoice/listview.js
+++ b/erpnext/accounts/doctype/sales_invoice/listview.js
@@ -9,8 +9,6 @@
"`tabSales Invoice`.currency",
"ifnull(`tabSales Invoice`.grand_total_export,0) as grand_total_export"
]);
-
- this.stats = this.stats.concat(['company']);
},
prepare_data: function(data) {
this._super(data);
diff --git a/erpnext/stock/doctype/delivery_note/listview.js b/erpnext/stock/doctype/delivery_note/listview.js
new file mode 100644
index 0000000..0cce341
--- /dev/null
+++ b/erpnext/stock/doctype/delivery_note/listview.js
@@ -0,0 +1,18 @@
+// render
+wn.doclistviews['Delivery Note'] = wn.views.ListView.extend({
+ init: function(d) {
+ this._super(d);
+ this.fields = this.fields.concat([
+ "`tabDelivery Note`.customer_name",
+ "`tabDelivery Note`.sales_order_no"
+ ]);
+ },
+ columns: [
+ {width: '5%', content:'avatar'},
+ {width: '3%', content:'docstatus'},
+ {width: '15%', content:'name'},
+ {width: '50%', content:'tags+customer_name', css: {color:'#aaa'}},
+ {width: '15%', content:'sales_order_no', type:'link', doctype:'Sales Order'},
+ {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ ]
+});
diff --git a/erpnext/utilities/page/question_view/question_view.js b/erpnext/utilities/page/question_view/question_view.js
index bcae010..b646cf6 100644
--- a/erpnext/utilities/page/question_view/question_view.js
+++ b/erpnext/utilities/page/question_view/question_view.js
@@ -84,12 +84,13 @@
// text area + add button
this.make_answer_box = function() {
$ds(w.add_answer_area);
- $a(w.add_answer_area, 'h3', '', {}, 'Add Your Answer')
+ $(w.add_answer_area, '<h3>Add your Answer</h3>\
+ <div class="help">In markdown format</div>');
this.input = $a(w.add_answer_area, 'textarea');
- wn.tinymce.add_simple(this.input);
+ //wn.tinymce.add_simple(this.input);
this.btn = $btn($a(w.add_answer_area, 'div'), 'Post', function() {
- var v = wn.tinymce.get_value(me.input);
+ var v = $(me.input).val();
if(!v) { msgprint('Write something!'); return; }
me.btn.set_working();
$c_page('utilities', 'question_view', 'add_answer', {qid: qid, answer:v},
diff --git a/js/all-app.js b/js/all-app.js
index df27288..cbeb77a 100644
--- a/js/all-app.js
+++ b/js/all-app.js
@@ -448,6 +448,8 @@
<span class="bar-inner %(fully_delivered)s" \
style="width: %(percent)s%;"></span>\
</span>',args));}
+else if(opts.type=='link'&&opts.doctype){$(parent).append(repl('<a href="#!Form/'+opts.doctype+'/'
++data[opts.content]+'">'+data[opts.content]+'</a>',data));}
else if(data[opts.content]){$(parent).append(' '+data[opts.content]);}},render:function(row,data){var me=this;this.prepare_data(data);rowhtml='';$.each(this.columns,function(i,v){rowhtml+=repl('<td style="width: %(width)s"></td>',v);});var tr=$(row).html('<table><tbody><tr>'+rowhtml+'</tr></tbody></table>').find('tr').get(0);$.each(this.columns,function(i,v){me.render_column(data,tr.cells[i],v);});},prepare_data:function(data){data.fullname=wn.user_info(data.owner).fullname;data.avatar=wn.user_info(data.owner).image;data.when=dateutil.str_to_user(data.modified).split(' ')[0];var diff=dateutil.get_diff(dateutil.get_today(),data.modified.split(' ')[0]);if(diff==0){data.when='Today'}
if(diff==1){data.when='Yesterday'}
if(diff==2){data.when='2 days ago'}
diff --git a/js/all-web.js b/js/all-web.js
index ae63769..a33cd0f 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -335,6 +335,8 @@
<span class="bar-inner %(fully_delivered)s" \
style="width: %(percent)s%;"></span>\
</span>',args));}
+else if(opts.type=='link'&&opts.doctype){$(parent).append(repl('<a href="#!Form/'+opts.doctype+'/'
++data[opts.content]+'">'+data[opts.content]+'</a>',data));}
else if(data[opts.content]){$(parent).append(' '+data[opts.content]);}},render:function(row,data){var me=this;this.prepare_data(data);rowhtml='';$.each(this.columns,function(i,v){rowhtml+=repl('<td style="width: %(width)s"></td>',v);});var tr=$(row).html('<table><tbody><tr>'+rowhtml+'</tr></tbody></table>').find('tr').get(0);$.each(this.columns,function(i,v){me.render_column(data,tr.cells[i],v);});},prepare_data:function(data){data.fullname=wn.user_info(data.owner).fullname;data.avatar=wn.user_info(data.owner).image;data.when=dateutil.str_to_user(data.modified).split(' ')[0];var diff=dateutil.get_diff(dateutil.get_today(),data.modified.split(' ')[0]);if(diff==0){data.when='Today'}
if(diff==1){data.when='Yesterday'}
if(diff==2){data.when='2 days ago'}