commit 058a31596763946e5d538bb62e160a62c895dcb6
parent 92094d62563ecffb82de279583ed91a56bd0f230
Author: Felicitus <felicitus@felicitus.org>
Date: Fri, 6 Nov 2015 16:45:27 +0100
Removed editing of the package price, related to #469
Diffstat:
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartDistributorGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartDistributorGrid.js
@@ -16,22 +16,7 @@ Ext.define('PartKeepr.PartDistributorGrid', {
});
this.editing = Ext.create('Ext.grid.plugin.CellEditing', {
- clicksToEdit: 1,
- listeners: {
- beforeedit: function (editor, e, eOpts)
- {
- if (e.field == "packagePrice") {
- e.record.set("packagePrice", e.record.get("price") * e.record.get("packagingUnit"));
- }
- },
- edit: function (editor, e, eOpts)
- {
- if (e.field == "packagePrice" && e.record.get("packagingUnit")) {
- e.record.set("price", e.value / e.record.get("packagingUnit"));
- }
- },
- scope: this
- }
+ clicksToEdit: 1
});
this.plugins = [this.editing];
@@ -114,10 +99,6 @@ Ext.define('PartKeepr.PartDistributorGrid', {
renderer: function (val, p, rec)
{
return PartKeepr.getApplication().formatCurrency(rec.get("price") * rec.get("packagingUnit"));
- },
- editor: {
- xtype: 'CurrencyField',
- allowBlank: true
}
}, {
header: i18n("SKU"),