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) { 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"); }