|
|
@@ -1063,17 +1063,23 @@ frappe.ui.form.GridRowForm = Class.extend({ |
|
|
|
set_form_events: function() { |
|
|
|
var me = this; |
|
|
|
this.wrapper.find(".grid-delete-row") |
|
|
|
.click(function() { me.row.remove(); return false; }) |
|
|
|
.on('click', function() { |
|
|
|
me.row.remove(); return false; |
|
|
|
}); |
|
|
|
this.wrapper.find(".grid-insert-row") |
|
|
|
.click(function() { me.row.insert(true); return false; }) |
|
|
|
.on('click', function() { |
|
|
|
me.row.insert(true); return false; |
|
|
|
}); |
|
|
|
this.wrapper.find(".grid-insert-row-below") |
|
|
|
.click(function() { me.row.insert(true, true); return false; }) |
|
|
|
.on('click', function() { |
|
|
|
me.row.insert(true, true); return false; |
|
|
|
}); |
|
|
|
this.wrapper.find(".grid-append-row") |
|
|
|
.click(function() { |
|
|
|
.on('click', function() { |
|
|
|
me.row.toggle_view(false); |
|
|
|
me.row.grid.add_new_row(me.row.doc.idx+1, null, true); |
|
|
|
return false; |
|
|
|
}) |
|
|
|
}); |
|
|
|
this.wrapper.find(".grid-form-heading, .grid-footer-toolbar").on("click", function() { |
|
|
|
me.row.toggle_view(); |
|
|
|
return false; |
|
|
|