[minor] [fix] item price grid
This commit is contained in:
parent
2ebbe95e04
commit
6f817b58ea
@ -33,7 +33,7 @@ wn.ui.form.TableGrid = Class.extend({
|
||||
var me = this;
|
||||
// Creating table & assigning attributes
|
||||
var grid_table = document.createElement("table");
|
||||
grid_table.className = "table table-hover table-bordered grid";
|
||||
grid_table.className = "table table-hover table-bordered table-grid";
|
||||
|
||||
// Appending header & rows to table
|
||||
grid_table.appendChild(this.make_table_headers());
|
||||
@ -72,8 +72,6 @@ wn.ui.form.TableGrid = Class.extend({
|
||||
// Creating header row
|
||||
var row = document.createElement("tr");
|
||||
row.className = "active";
|
||||
// row.style = "height:50px";
|
||||
|
||||
|
||||
// Creating head first cell
|
||||
var th = document.createElement("th");
|
||||
@ -106,7 +104,6 @@ wn.ui.form.TableGrid = Class.extend({
|
||||
|
||||
// Creating table body
|
||||
var table_body = document.createElement("tbody");
|
||||
table_body.style = "cursor: pointer";
|
||||
|
||||
var item_prices = wn.model.get_children(this.table_field.options, this.frm.doc.name,
|
||||
this.table_field.fieldname, this.frm.doctype);
|
||||
@ -210,8 +207,7 @@ wn.ui.form.TableGrid = Class.extend({
|
||||
$(row).remove();
|
||||
|
||||
// Re-assign idx
|
||||
$.each($(this.parent).find(".grid tbody tr"), function(idx, data) {
|
||||
$(data).attr("data-idx", idx + 1);
|
||||
$.each($(this.parent).find("tbody tr"), function(idx, data) {
|
||||
var $td = $(data).find('td:first');
|
||||
$td.html(idx + 1);
|
||||
});
|
||||
@ -221,7 +217,6 @@ wn.ui.form.TableGrid = Class.extend({
|
||||
add_new_row: function(d) {
|
||||
var tr = document.createElement("tr");
|
||||
tr.className = "table-row";
|
||||
tr.setAttribute("data-idx", d.idx);
|
||||
tr.setAttribute("data-docname", d.name);
|
||||
|
||||
// Creating table data & appending to row
|
||||
|
Loading…
x
Reference in New Issue
Block a user