From eaca44ee176d7e8880ac201bdb540f0c3061d7d1 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 19 Oct 2016 16:10:05 +0530 Subject: [PATCH] [fix] [hot] fixes grid frappe/erpnext#6646 --- frappe/public/js/frappe/form/grid.js | 16 +++++++++++----- .../js/frappe/form/templates/grid_form.html | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/frappe/public/js/frappe/form/grid.js b/frappe/public/js/frappe/form/grid.js index 9128ab8a96..cde97d2759 100644 --- a/frappe/public/js/frappe/form/grid.js +++ b/frappe/public/js/frappe/form/grid.js @@ -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; diff --git a/frappe/public/js/frappe/form/templates/grid_form.html b/frappe/public/js/frappe/form/templates/grid_form.html index 532467df00..8f92d02377 100644 --- a/frappe/public/js/frappe/form/templates/grid_form.html +++ b/frappe/public/js/frappe/form/templates/grid_form.html @@ -1,4 +1,4 @@ -
+
{%= __("Editing Row") %} #