From 023871a02db3688efb532e354542e57f75e0905b Mon Sep 17 00:00:00 2001 From: "stuart.woodman" Date: Tue, 6 Jun 2023 10:50:07 +1000 Subject: [PATCH 1/2] Made logout button 100% width of menu panel so clicking anywhere on the row triggers it. --- src/app/menupanel/login/login-menu.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/menupanel/login/login-menu.component.html b/src/app/menupanel/login/login-menu.component.html index 30521866..3bd23fdf 100644 --- a/src/app/menupanel/login/login-menu.component.html +++ b/src/app/menupanel/login/login-menu.component.html @@ -7,8 +7,8 @@ -
-
+
  Manage Permanent Links
+
  Log Out
From 65dd97f9a28f15168728c9b16b875ea0b7e1ea7e Mon Sep 17 00:00:00 2001 From: "stuart.woodman" Date: Wed, 7 Jun 2023 09:03:19 +1000 Subject: [PATCH 2/2] * Download options for layers with WCS downloads will no longer disappear when the user presses the Clear Bounds button. * Features with no node name will no longer show a ":" in the feature window. * Node name will now also look for the XML element "gml:NAME" (Geological Provinces). * Minor NVCL tweaks to return functions when missing variables are required. --- .../downloadpanel/downloadpanel.component.ts | 2 -- .../nvcl/nvcl.datasetlist.component.ts | 2 ++ .../querier/querier.modal.component.html | 2 +- .../querier/querier.modal.component.ts | 30 +++++++++---------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/app/menupanel/common/downloadpanel/downloadpanel.component.ts b/src/app/menupanel/common/downloadpanel/downloadpanel.component.ts index e9ac01bf..e89da50e 100644 --- a/src/app/menupanel/common/downloadpanel/downloadpanel.component.ts +++ b/src/app/menupanel/common/downloadpanel/downloadpanel.component.ts @@ -387,8 +387,6 @@ export class DownloadPanelComponent implements OnInit { */ public clearBounds(): void { this.boundsService.clearBounds(); - this.wcsDownloadForm = {}; - this.wcsDownloadListOption = null; } /** diff --git a/src/app/modalwindow/querier/customanalytic/nvcl/nvcl.datasetlist.component.ts b/src/app/modalwindow/querier/customanalytic/nvcl/nvcl.datasetlist.component.ts index ccce0732..b6819df6 100644 --- a/src/app/modalwindow/querier/customanalytic/nvcl/nvcl.datasetlist.component.ts +++ b/src/app/modalwindow/querier/customanalytic/nvcl/nvcl.datasetlist.component.ts @@ -274,6 +274,7 @@ export class NVCLDatasetListComponent implements OnInit { this.selectedLogNames[datasetId] = logNames; if (logIds.length <= 0) { alert('No logs selected'); + return; } setTimeout(() => { @@ -309,6 +310,7 @@ export class NVCLDatasetListComponent implements OnInit { if (logIds.length <= 0) { alert('No logs selected'); + return; } this.nvclService.getNVCL2_0_CSVDownload(this.onlineResource.url, logIds). subscribe(response => { diff --git a/src/app/modalwindow/querier/querier.modal.component.html b/src/app/modalwindow/querier/querier.modal.component.html index b3df1423..ee5508c4 100644 --- a/src/app/modalwindow/querier/querier.modal.component.html +++ b/src/app/modalwindow/querier/querier.modal.component.html @@ -31,7 +31,7 @@

No results found, try zooming to improve accuracy

- {{doc.layer.name}} : {{doc.node_name}}  + {{doc.layer.name}}{{doc.node_name ? ': ' + doc.node_name : ''}}  {{doc.layer.name}}  diff --git a/src/app/modalwindow/querier/querier.modal.component.ts b/src/app/modalwindow/querier/querier.modal.component.ts index 7446ee50..ee182546 100644 --- a/src/app/modalwindow/querier/querier.modal.component.ts +++ b/src/app/modalwindow/querier/querier.modal.component.ts @@ -153,7 +153,6 @@ export class QuerierModalComponent implements OnInit { }); } - /** * Copy drawn polygon to clipboard * @param document polygon as document @@ -185,32 +184,37 @@ export class QuerierModalComponent implements OnInit { // Look for changes and update UI after brief delay public onDataChange(): void { - let htmldata = [] - let Expression=/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/; - let objExp=new RegExp(Expression); + const htmldata = [] + const Expression = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/; + const objExp = new RegExp(Expression); for (let i = 0; i < this.docs.length; i++) { - var doc = new DOMParser().parseFromString(this.docs[i].raw, "text/xml"); + const doc = new DOMParser().parseFromString(this.docs[i].raw, 'text/xml'); if (doc.getElementsByTagName('gml:name').length != 0) { - for (let html in doc.getElementsByTagName('gml:name')) { + for (const html in doc.getElementsByTagName('gml:name')) { if(!objExp.test(doc.getElementsByTagName('gml:name')[html].innerHTML)) { htmldata.push(doc.getElementsByTagName('gml:name')[html].innerHTML) } } + } else if (doc.getElementsByTagName('gml:NAME').length != 0) { + for (const html in doc.getElementsByTagName('gml:NAME')) { + if(!objExp.test(doc.getElementsByTagName('gml:NAME')[html].innerHTML)) { + htmldata.push(doc.getElementsByTagName('gml:NAME')[html].innerHTML) + } + } } else if (doc.getElementsByTagName('gsmlp:name').length != 0) { - for (let html in doc.getElementsByTagName('gsmlp:name')) { + for (const html in doc.getElementsByTagName('gsmlp:name')) { if(!objExp.test(doc.getElementsByTagName('gsmlp:name')[html].innerHTML)) { htmldata.push(doc.getElementsByTagName('gsmlp:name')[html].innerHTML) } } } else if (doc.getElementsByTagName('null:name').length != 0) { - for (let html in doc.getElementsByTagName('null:name')) { + for (const html in doc.getElementsByTagName('null:name')) { if(!objExp.test(doc.getElementsByTagName('null:name')[html].innerHTML)) { htmldata.push(doc.getElementsByTagName('null:name')[html].innerHTML) } } } this.docs[i]['node_name'] = htmldata[i] - } setTimeout(() => { this.changeDetectorRef.detectChanges(); @@ -223,7 +227,6 @@ export class QuerierModalComponent implements OnInit { * @param document */ public transformToHtml(document): void { - if (this.msclService.usesGMLObs(document.raw)) { this.hasMsclAnalytics = true; } @@ -269,16 +272,14 @@ export class QuerierModalComponent implements OnInit { document.loadSubComponent = true; this.transformingToHtml[document.key] = false; this.changeDetectorRef.detectChanges(); - }, - // try default XML tree display - error => { + }, () => { + // try default XML tree display this.parseTree(document); this.transformingToHtml[document.key] = false; this.changeDetectorRef.detectChanges(); }); } - /** * Parses server response and builds a document tree * @param document server response object @@ -373,7 +374,6 @@ export class QuerierModalComponent implements OnInit { return data; } - /** * Reformats labels to make them more user-friendly * @param label label string