From 76fe79b4a71e69078330b980fe99f673159c9140 Mon Sep 17 00:00:00 2001 From: daniel Date: Sat, 13 Mar 2021 23:40:19 +0100 Subject: [PATCH 1/2] fix action not correctly shown issue #944 --- .../Preferences/BarcodeScannerConfiguration.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 src/PartKeepr/FrontendBundle/Resources/public/js/Components/SystemPreferences/Preferences/BarcodeScannerConfiguration.js diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/SystemPreferences/Preferences/BarcodeScannerConfiguration.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/SystemPreferences/Preferences/BarcodeScannerConfiguration.js old mode 100644 new mode 100755 index 6e872289c..c8b5b3764 --- a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/SystemPreferences/Preferences/BarcodeScannerConfiguration.js +++ b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/SystemPreferences/Preferences/BarcodeScannerConfiguration.js @@ -77,10 +77,10 @@ Ext.define('PartKeepr.Components.SystemPreferences.Preferences.BarcodeScannerCon }, { text: i18n("Action"), dataIndex: 'action', flex: 1, - renderer: function (v) + renderer: function (v, m, record) { - if (v instanceof Ext.data.Model) { - return v.get("name"); + if (record.get("action") instanceof Ext.data.Model) { + return record.get("action").get("name"); } else { return i18n("No action selected"); } From 3fa50de0647d5cb07f0d44984c354e2717ae30d0 Mon Sep 17 00:00:00 2001 From: daniel Date: Sun, 14 Mar 2021 14:36:09 +0100 Subject: [PATCH 2/2] fix action delete button no handler issue #1202 --- .../Preferences/ActionsConfiguration.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/SystemPreferences/Preferences/ActionsConfiguration.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/SystemPreferences/Preferences/ActionsConfiguration.js index b4229e59f..185cd0ee6 100644 --- a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/SystemPreferences/Preferences/ActionsConfiguration.js +++ b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/SystemPreferences/Preferences/ActionsConfiguration.js @@ -86,8 +86,10 @@ Ext.define('PartKeepr.Components.SystemPreferences.Preferences.ActionsConfigurat xtype: 'button', text: i18n("Delete Action"), disabled: true, - itemId: 'actionDelete' - } + itemId: 'actionDelete', + handler: this.onDeleteClick, + scope: this + } ] } ] @@ -125,6 +127,11 @@ Ext.define('PartKeepr.Components.SystemPreferences.Preferences.ActionsConfigurat grid.getPlugin("editing").startEdit(0, 0); }, + onDeleteClick: function () + { + var grid = this.down("#actionGrid"); + grid.getStore().remove(grid.getView().getSelectionModel().getSelection()); + }, onSelectionChange: function (grid, selection) { if (selection.length === 1) {