partkeepr

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

commit 7ef0c66c1cdf7f94c674060f0bd04fcf8e2db37f
parent d8419505b85001d057e4c1df0ad05ff505a27773
Author: Felicia Hummel <felicia@partkeepr.com>
Date:   Fri,  2 Jun 2017 13:32:56 +0200

Only make rows expandable which are a meta part

Diffstat:
Asrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/MetaPartRowExpander.js | 18++++++++++++++++++
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectReport.js | 12+++++++-----
Msrc/PartKeepr/FrontendBundle/Resources/views/index.html.twig | 1+
3 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/MetaPartRowExpander.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/MetaPartRowExpander.js @@ -0,0 +1,17 @@ +Ext.define("PartKeepr.Components.ProjectReport.MetaPartRowExpander", { + extend: "Ext.grid.plugin.RowWidget", + + getHeaderConfig: function() { + var config = this.callParent(arguments); + + config.renderer = function (v,p,rec) { + if (rec.get("metaPart")) { + return '<div class="' + Ext.baseCSSPrefix + 'grid-row-expander" role="presentation" tabIndex="0"></div>'; + } else { + return ''; + } + }; + + return config; + } +});+ \ No newline at end of file diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectReport.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectReport.js @@ -1,3 +1,4 @@ + /** * Represents the project report view */ @@ -70,15 +71,15 @@ Ext.define('PartKeepr.ProjectReportView', { }); + this.rowExpander = new PartKeepr.Components.ProjectReport.MetaPartRowExpander({ + widget: this.subGrid + }); + this.reportResult = Ext.create("PartKeepr.Components.Project.ProjectReportResultGrid", { flex: 1, plugins: [ - { - ptype: 'rowwidget', - widget: this.subGrid - - }, this.editing + this.rowExpander, this.editing ], store: this.projectReportStore, @@ -313,6 +314,7 @@ Ext.define('PartKeepr.ProjectReportView', { { this.waitMessage = Ext.MessageBox.show({ msg: text, + title: i18n("Applying distributors…"), progressText: description, progress: true, width: 300 diff --git a/src/PartKeepr/FrontendBundle/Resources/views/index.html.twig b/src/PartKeepr/FrontendBundle/Resources/views/index.html.twig @@ -288,6 +288,7 @@ '@PartKeeprFrontendBundle/Resources/public/js/Components/StorageLocation/StorageLocationMultiAddDialog.js' '@PartKeeprFrontendBundle/Resources/public/js/Components/StorageLocation/StorageLocationNavigation.js' '@PartKeeprFrontendBundle/Resources/public/js/Components/Project/MetaPartSubgrid.js' + '@PartKeeprFrontendBundle/Resources/public/js/Components/Project/MetaPartRowExpander.js' '@PartKeeprFrontendBundle/Resources/public/js/Components/Project/ProjectReportList.js' '@PartKeeprFrontendBundle/Resources/public/js/Components/Project/ProjectReport.js' '@PartKeeprFrontendBundle/Resources/public/js/Components/Project/ProjectReportResultGrid.js'