From eb8753e8b6419d6d50765d42975d3fcf800db078 Mon Sep 17 00:00:00 2001 From: Akhilesh Darjee Date: Mon, 30 Sep 2013 15:56:36 +0530 Subject: [PATCH] [fix] [minor] new grid to hide delete button on new row & added description --- setup/doctype/price_list/price_list.js | 6 +++--- setup/doctype/price_list/price_list.txt | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/setup/doctype/price_list/price_list.js b/setup/doctype/price_list/price_list.js index cbca413f0ce..397e9826ad6 100644 --- a/setup/doctype/price_list/price_list.js +++ b/setup/doctype/price_list/price_list.js @@ -164,7 +164,7 @@ wn.ui.form.TableGrid = Class.extend({ if (row) this.dialog.set_values(this.make_dialog_values(row)); - $a(this.dialog.body, 'div', '', '', this.make_dialog_buttons()); + $a(this.dialog.body, 'div', '', '', this.make_dialog_buttons(row)); this.dialog.show(); this.dialog.$wrapper.find('button.update').on('click', function() { @@ -186,12 +186,12 @@ wn.ui.form.TableGrid = Class.extend({ return dialog_values; }, - make_dialog_buttons: function() { + make_dialog_buttons: function(row) { var me = this; var buttons = ''; // if user can delete then only add the delete button in dialog - if (wn.model.can_delete(me.frm.doc.doctype)) + if (wn.model.can_delete(me.frm.doc.doctype) && row) buttons += ' '; return buttons; diff --git a/setup/doctype/price_list/price_list.txt b/setup/doctype/price_list/price_list.txt index 46905a65918..343331dd0c6 100644 --- a/setup/doctype/price_list/price_list.txt +++ b/setup/doctype/price_list/price_list.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-25 11:35:09", "docstatus": 0, - "modified": "2013-09-06 15:03:38", + "modified": "2013-09-30 15:50:52", "modified_by": "Administrator", "owner": "Administrator" }, @@ -85,6 +85,7 @@ "reqd": 1 }, { + "description": "To change row values, click on the respective row", "doctype": "DocField", "fieldname": "item_prices_section", "fieldtype": "Section Break",