partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 40b3b77e79951718bfe84ce266f1b084d3fe3817
parent b3c2f2f333660f8e9fbfa991c3556807568b693a
Author: Felicitus <felicitus@felicitus.org>
Date:   Wed, 30 Sep 2015 17:25:23 +0200

Use the titleProperty field for filtering

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorComponent.js | 3++-
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorGrid.js | 7++++++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorComponent.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorComponent.js @@ -67,7 +67,8 @@ Ext.define('PartKeepr.EditorComponent', { region: 'west', width: 265, split: true, - store: this.store + store: this.store, + titleProperty: this.titleProperty }); this.navigation.on("itemAdd", this.newRecord, this); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorGrid.js @@ -66,6 +66,11 @@ Ext.define('PartKeepr.EditorGrid', { */ enableEditing: true, + /** + * @cfg {String} The title property + */ + titleProperty: null, + listeners: { 'reconfigure': 'onReconfigure' }, @@ -126,7 +131,7 @@ Ext.define('PartKeepr.EditorGrid', { this.searchField = Ext.create("PartKeepr.form.field.SearchField", { store: this.store, - targetField: 'name' + targetField: this.titleProperty }); var topToolbarItems = [];