diff --git a/bower.json b/bower.json index 35a37e9..ed0d4b1 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "strolch-wc-reports", "description": "Strolch WebComponent Reports", - "version": "0.2.12", + "version": "0.3.0", "authors": [ "Robert von Burg" ], diff --git a/strolch-wc-reports-facet.html b/strolch-wc-reports-facet.html index 0d2b203..58eb47e 100644 --- a/strolch-wc-reports-facet.html +++ b/strolch-wc-reports-facet.html @@ -145,7 +145,8 @@ handle-as="json" method="GET" on-response="onPostFieldResponse" - on-error="onAjaxErrorCustom"> + on-error="onAjaxError" + loading="{{facetLoading}}"> @@ -234,9 +235,10 @@ value: [], notify: true }, - filter: { - type: Array, - value: [] + facetLoading: { + type: Boolean, + value: false, + observer: 'facetLoadingChanged' } }, @@ -253,25 +255,23 @@ limit: this.facetLimit }; this.$.ajaxGetFields.generateRequest(); - this.fire('ajax-running', {running: true}); + } + }, + facetLoadingChanged: function (newValue, oldValue) { + if (newValue != null && oldValue != null && newValue !== oldValue) { + this.fire('facet-loading', {loading: newValue}); } }, /* Listeners */ listeners: {}, - onAjaxErrorCustom: function (e) { - this.onAjaxError(e); - this.fire('ajax-running', {running: false}); - }, - onPostFieldResponse: function (event) { // get the response var response = event.detail.response; // directly set this as the available types this.set("fields", response.data); - this.fire('ajax-running', {running: false}); }, onItemsTapped: function (event) { // get the tapped filter diff --git a/strolch-wc-reports-table.html b/strolch-wc-reports-table.html index 1b55e9b..34b0018 100644 --- a/strolch-wc-reports-table.html +++ b/strolch-wc-reports-table.html @@ -13,127 +13,78 @@ - - - - -
-
- -
- diff --git a/strolch-wc-reports.html b/strolch-wc-reports.html index a5ca3c3..87d4042 100644 --- a/strolch-wc-reports.html +++ b/strolch-wc-reports.html @@ -34,48 +34,48 @@ @media screen { :host { --box-space: 12px; + --facet-width-opened: 300px; + --facet-width-closed: 22px; + --facet-width: var(--facet-width-opened); + --table-width: calc(100vw - var(--facet-width) - 30px); } .content { - @apply(--layout-vertical); - height: calc(100vh - var(--app-header-height) - (2 * var(--app-pages-content-padding))); + display: flex; + flex-direction: column; } .row { - @apply(--layout-horizontal); + display: flex; + flex-direction: row; } .row:not(:first-of-type) { padding-top: var(--box-space); } - .row.fill-parent { - height: 100%; - } - .row.no-shrink { flex-shrink: 0; } - #targetContainer { + #actionBar { @apply(--layout-horizontal); width: 100%; - min-height: 58px; padding: 0 12px; background-color: white; } - #targetContainer > paper-dropdown-menu { + #actionBar > paper-dropdown-menu { margin-right: auto; } - #targetContainer > paper-dropdown-menu, + #actionBar > paper-dropdown-menu, #dateContainer { @apply(--layout-horizontal); @apply(--layout-end); } - #targetContainer > paper-dropdown-menu, + #actionBar > paper-dropdown-menu, #dateContainer > vaadin-date-picker { height: 100%; @@ -109,10 +109,17 @@ } #facetContainer { - @apply(--layout-flex); + display: flex; + flex-direction: column; + flex-basis: var(--facet-width); + flex-grow: 0; + flex-shrink: 0; + margin-left: 10px; margin-right: calc(var(--box-space) * 0.5); - overflow-x: visible; - overflow-y: scroll; + } + + strolch-wc-reports-facet { + width: 300px; } #facetContainer > strolch-wc-reports-facet:not(:last-of-type) { @@ -120,17 +127,31 @@ } #tableContainer { - @apply(--layout-flex-3); margin-left: calc(var(--box-space) * 0.5); - overflow-x: visible; - overflow-y: scroll; + } + + strolch-wc-reports-table { + height: calc(100vh - 190px); + width: var(--table-width); + } + + .footer { + padding-left: 10px; + padding-right: 10px; + padding-top: 5px; + display: flex; + flex-direction: row; + justify-content: space-between; + } + + .footer p { + color: #b5b5b5; } .light-border { border-style: solid; border-width: 0.5px; border-color: var(--google-grey-300); - box-sizing: border-box; } paper-dropdown-menu paper-item { @@ -198,6 +219,10 @@ margin-left: auto; margin-right: auto; } + + .limitBtn { + min-width: inherit; + } } @@ -208,21 +233,32 @@ handle-as="json" method="GET" on-response="onGetReportResponse" - on-error="onAjaxErrorCustom"> + on-error="onAjaxError" + loading="{{loadingGetReports}}"> + on-error="onAjaxError" + loading="{{loadingGetFacets}}"> + on-error="onAjaxError" + loading="{{loadingPostCsv}}"> +
@@ -231,7 +267,7 @@
- +