diff --git a/package.json b/package.json index 821450b0..997144b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "deep-see-web", - "version": "3.2.2", + "version": "3.2.3", "scripts": { "ng": "ng", "start": "ng serve --proxy-config=proxy.conf.json --port 4007", diff --git a/src/app/components/screens/dashboard-screen/dashboard-screen.component.ts b/src/app/components/screens/dashboard-screen/dashboard-screen.component.ts index 4681a99d..d2d555c8 100644 --- a/src/app/components/screens/dashboard-screen/dashboard-screen.component.ts +++ b/src/app/components/screens/dashboard-screen/dashboard-screen.component.ts @@ -111,6 +111,7 @@ export class DashboardScreenComponent extends DashboardEditingClass implements O constructor(@Inject(Injector) protected inj: Injector) { super(inj); + this.checkRestrictions(); this.hs.resetSearch(); this.hs.hideMobileFilterButton(); @@ -977,4 +978,13 @@ export class DashboardScreenComponent extends DashboardEditingClass implements O enabled: false }; } + + private checkRestrictions() { + if (this.route.snapshot.queryParamMap.get('nodrag') === '1') { + this.tilesOptions.draggable.enabled = false; + } + if (this.route.snapshot.queryParamMap.get('noresize') === '1') { + this.tilesOptions.resizable.enabled = false; + } + } } diff --git a/src/app/components/widgets/base/widget-header/widget-header.component.html b/src/app/components/widgets/base/widget-header/widget-header.component.html index 84fa080d..f4143d0e 100644 --- a/src/app/components/widgets/base/widget-header/widget-header.component.html +++ b/src/app/components/widgets/base/widget-header/widget-header.component.html @@ -25,7 +25,7 @@
- + diff --git a/src/app/components/widgets/base/widget-header/widget-header.component.scss b/src/app/components/widgets/base/widget-header/widget-header.component.scss index 56fd641a..53a9dad1 100644 --- a/src/app/components/widgets/base/widget-header/widget-header.component.scss +++ b/src/app/components/widgets/base/widget-header/widget-header.component.scss @@ -40,7 +40,6 @@ border-bottom: var(--cl-widget-header-border); & > .drag-handle { - position: absolute; position: absolute; left: -20px; right: -20px; @@ -115,6 +114,10 @@ justify-content: center; align-items: center; + &.no-drag { + cursor: default; + } + // Disable drag when widget is expanded to fullscreen &.expanded { cursor: default; diff --git a/src/app/components/widgets/base/widget-header/widget-header.component.ts b/src/app/components/widgets/base/widget-header/widget-header.component.ts index 217061d2..20b78167 100644 --- a/src/app/components/widgets/base/widget-header/widget-header.component.ts +++ b/src/app/components/widgets/base/widget-header/widget-header.component.ts @@ -28,6 +28,7 @@ export class WidgetHeaderComponent implements OnInit, OnDestroy { hasFilters = false; filtersTooltip = ''; private subFiltersChanged: Subscription; + noDrag = false; constructor(private ss: StorageService, private us: UtilService, @@ -38,6 +39,7 @@ export class WidgetHeaderComponent implements OnInit, OnDestroy { private hs: HeaderService, private eds: EditorService, private route: ActivatedRoute) { + this.noDrag = this.route.snapshot.queryParamMap.get('nodrag') === '1'; } ngOnInit() { diff --git a/src/app/lib/lightPivotTable.js b/src/app/lib/lightPivotTable.js index e3fd301a..6371240c 100644 --- a/src/app/lib/lightPivotTable.js +++ b/src/app/lib/lightPivotTable.js @@ -3901,7 +3901,8 @@ PivotView.prototype.renderRawData = function (data) { }; // top left header setup - header.textContent = info.leftHeaderColumnsNumber ? rawData[0][0].value : ""; + // Request by Shvarov, make top left cell empty (DSW repo #391) + header.textContent = ''; if (rawData[0][0].style && !LISTING) header.setAttribute("style", rawData[0][0].style); if (this.tablesStack.length > 1 && !this.controller.CONFIG["hideButtons"]) { header.className += "back "; diff --git a/src/app/services/filter.service.ts b/src/app/services/filter.service.ts index af2e7aca..3a0dee12 100644 --- a/src/app/services/filter.service.ts +++ b/src/app/services/filter.service.ts @@ -166,6 +166,18 @@ export class FilterService { loadFiltersFromUrl() { + /* + let query = window.location.hash.split('?')[1]; + query = query.replace(/&\.%5B/g, '%26.%5B'); + query = query.replace(/&\.\[/g, '%26.%5B'); + const p = query.split('&'); + let param = ''; + p.forEach(q => { + if (q.split('=')[0].toLowerCase() === 'filters') { + param = q.split('=')[1]; + }; + }); + */ let param = this.route.snapshot.queryParamMap.get('FILTERS'); if (!param) { // Workaround for invalid escaped links where "=" char is escaped. Requested by Shvarov diff --git a/src/changelog.md b/src/changelog.md index 1f565353..82b6cc4f 100644 --- a/src/changelog.md +++ b/src/changelog.md @@ -1,5 +1,9 @@ +#### 3.2.3 +* added support for dragging and resizing restrictions for widgets by URL parameters: `nodrag=1` and `noresize=1` (#392) +* pivot top left cell now empty (#391) + #### 3.2.2 -* fixed issues with filter URLs on shared dashboard (interval filters/multiple filters) +* fixed issues with filter URLs on the shared dashboard (interval filters/multiple filters) * added support for wrong escaped dashboard links. when "=" character has been escaped, but it shouldn't #### 3.2.1