diff --git a/public/js/extras.js b/public/js/extras.js index 6cdf8aa..49a706d 100644 --- a/public/js/extras.js +++ b/public/js/extras.js @@ -346,7 +346,8 @@ function mruPopup(props) { // Fetches html from elements folder async function getPagePartial(partialName, target=null) { - const url = BASE_URL + `/src/Views/${partialName}.php`; + // const url = BASE_URL + `/src/Views/${partialName}.php`; + const url = BASE_URL + `/interface/partial/${partialName}`; const res = await fetch(url) .then((response) => {return response.text();}) .then((content) => { @@ -595,14 +596,13 @@ async function getFisheriesProduct() { const group = L.layerGroup(); // load contours in JSON const bgLayer = L.tileLayer.betterWms(BASE_URL + '/geoserver/wms', { layers: 'nssg_areas', transparent: true, format: "image/png"}); - // let productLayer = L.featureGroup(); const url = BASE_URL + "/interface/charts/afppy"; + try { const response = await fetch(url); const data = await response.json(); let pies; // Add the custom control to the map - // slider.addTo(mapL); pies = createPie(data, 1990).addTo(group); layerControls['AFPPY'] = L.control.slider(value => { @@ -622,7 +622,5 @@ async function getFisheriesProduct() { } bgLayer.addTo(group); - group.addLayer(bgLayer); - return group; } diff --git a/public/js/loader.js b/public/js/loader.js index 98a155a..2e2e06e 100644 --- a/public/js/loader.js +++ b/public/js/loader.js @@ -197,7 +197,9 @@ var loader_script_files=[ "js/config_functions.js", "js/modules/layersmetadata/layersmetadata.js", "js/modules/poseidon/poseidon.js", - "js/modules/configuration/configuration.js" + "js/modules/configuration/configuration.js", + "js/mru-info.js", + "js/more-info.js" ]; /***(var) loader_css_files: stores all the internal css (styles) urls to be included*****/ diff --git a/public/js/more-info.js b/public/js/more-info.js index dc9c20e..49cdbd0 100644 --- a/public/js/more-info.js +++ b/public/js/more-info.js @@ -49,7 +49,8 @@ function moreInfo() { } }, getDropdownData(dropdown) { - this.loading = true; + Alpine.store('loading', true); + let url = BASE_URL; let gridCode; if (this.isGrid) { @@ -58,17 +59,17 @@ function moreInfo() { switch(dropdown) { case 'd': - url += '/interface/dropdowns/descriptors?entityid=' + this.entityId + '&cellcode=' + gridCode; + url += '/interface/dropdowns/descriptors?entity_id=' + this.entityId + '&cellcode=' + gridCode; break; case 'c': - url += '/interface/dropdowns/criterias?descriptor_id=' + this.did + '&cellcode=' + gridCode; + url += '/interface/dropdowns/criterias?desc_id=' + this.did + '&cellcode=' + gridCode; break; } fetch(url) .then(res => res.json()) .then(data => { - this.isLoading = false; + Alpine.store('loading', false); eval('this.' + dropdown + '=data'); }); }, @@ -95,13 +96,14 @@ function moreInfo() { }).render(grid); }, drawDataChart() { + Alpine.store('loading', true); if (this.entityGroup != 'POSEIDON') return; const url = `/data/external/POSEIDON/${Alpine.store('entity').tspr}_${Alpine.store('entity').type}_${Alpine.store('entity').pid}`; fetch(url) .then(res => res.json()) .then(data => { - this.isLoading = false; + Alpine.store('loading', false); console.debug(data); }); diff --git a/public/js/mru-info.js b/public/js/mru-info.js index e14976f..8c46397 100644 --- a/public/js/mru-info.js +++ b/public/js/mru-info.js @@ -41,20 +41,20 @@ function mruInfo() { } }, getDropdownData(dropdown) { - this.loading = true; + Alpine.store('loading', true); let url = BASE_URL; switch(dropdown) { case 'd': - url += '/interface/dropdowns/descriptors?bodyid=' + this.bid; + url += '/interface/dropdowns/descriptors?body_id=' + this.bid; break; case 'c': - url += '/interface/dropdowns/criterias?descriptor_id=' + this.did; + url += '/interface/dropdowns/criterias?desc_id=' + this.did; break; } fetch(url) .then(res => res.json()) .then(data => { - this.isLoading = false; + Alpine.store('loading', false); eval('this.' + dropdown + '=data'); }); }, diff --git a/public/js/sidebar.js b/public/js/sidebar.js index c82e215..6b7c5e7 100644 --- a/public/js/sidebar.js +++ b/public/js/sidebar.js @@ -276,215 +276,215 @@ function clearRequests() { } -function moreInfo() { - return { - entityGroup: selectedEntityGroup, - entityId: selectedEntityId || Alpine.store('entity').id, - dopen: false, - copen: false, - loading: false, - isGrid: Alpine.store('entity').hasOwnProperty('cellcode'), - d: {}, - c: {}, - tagName(type, id) { - if (id == null) - return; - if (type === 'd') { - return this.d.find(i => i.id == id).code; - } else if (type === 'c') { - return this.c.find(i => i.id == id).code; - } - }, - did: null, - cid: [], - date: {}, - search() { - this.drawDataChart(); - // check if entity has an external source - if (this.$store.entity.hasOwnProperty('ctStationCode')) { - requestExternalData(this.did, this.cid, this.date.from, this.date.to, this.entityGroup, this.entityId); - } else { - requestEntityData(this.did, this.cid, this.date.from, this.date.to, this.entityGroup, this.entityId); - } - }, - selectEntry(element, entry) { - console.debug(element.text.substr(0, element.text.indexOf(' '))); - if (element.id.split('-')[1] === 'desc') { - // highlight - element.parentElement.querySelectorAll('a').forEach(el => el.classList.remove('is-active')); - element.classList.add('is-active'); - // update variables; - this.cid = []; - this.did = entry; - this.dopen = false; - } else if (element.id.split('-')[1] === 'crit') { - // toggle - element.classList.toggle('is-active'); - // update variables; - this.cid.indexOf(entry) === -1 ? this.cid.push(entry) : this.cid = this.cid.filter(function(id) { return id !== entry}); - this.copen = false; - // add tag - } - }, - getDropdownData(dropdown) { - this.loading = true; - let url = BASE_URL; - let gridCode; - if (this.isGrid) { - gridCode = Alpine.store('entity').cellcode.substr(0,4); - } - - switch(dropdown) { - case 'd': - url += '/interface/dropdowns/descriptors?entity_id=' + this.entityId + '&cellcode=' + gridCode; - break; - case 'c': - url += '/interface/dropdowns/criterias?desc_id=' + this.did + '&cellcode=' + gridCode; - break; - } - - fetch(url) - .then(res => res.json()) - .then(data => { - this.isLoading = false; - eval('this.' + dropdown + '=data'); - }); - }, - loadCal() { - const calendars = bulmaCalendar.attach('[type=date]', {dateFormat: 'dd/MM/yyyy', isRange: true}); - // Loop on each calendar initialized - calendars.forEach(calendar => { - calendar.on('save', data => { - this.date = { - from: calendar.startDate.toLocaleDateString(), - to: calendar.endDate.toLocaleDateString() - } - }); - }); - }, - populateFeatureGrid(grid) { - const features = Alpine.store('entity'); - console.debug(features); - const featureCols = Object.getOwnPropertyNames(Alpine.store('entity')).filter(name => aliasMap.has(name)); - const featureVals = featureCols.map(col => {return {feature: aliasMap.get(col), value: features[col]}}); - console.debug(featureVals); - new gridjs.Grid({ - data: featureVals - }).render(grid); - }, - drawDataChart() { - if (this.entityGroup != 'POSEIDON') - return; - const url = `/data/external/POSEIDON/${Alpine.store('entity').tspr}_${Alpine.store('entity').type}_${Alpine.store('entity').pid}`; - fetch(url) - .then(res => res.json()) - .then(data => { - this.isLoading = false; - console.debug(data); - }); - - const config = { - type: 'line', - data: data, - options: { - responsive: true, - plugins: { - legend: { - position: 'top', - }, - title: { - display: true, - text: 'Chart.js Line Chart' - } - } - }, - }; - } - }; -} +// function moreInfo() { +// return { +// entityGroup: selectedEntityGroup, +// entityId: selectedEntityId || Alpine.store('entity').id, +// dopen: false, +// copen: false, +// loading: false, +// isGrid: Alpine.store('entity').hasOwnProperty('cellcode'), +// d: {}, +// c: {}, +// tagName(type, id) { +// if (id == null) +// return; +// if (type === 'd') { +// return this.d.find(i => i.id == id).code; +// } else if (type === 'c') { +// return this.c.find(i => i.id == id).code; +// } +// }, +// did: null, +// cid: [], +// date: {}, +// search() { +// this.drawDataChart(); +// // check if entity has an external source +// if (this.$store.entity.hasOwnProperty('ctStationCode')) { +// requestExternalData(this.did, this.cid, this.date.from, this.date.to, this.entityGroup, this.entityId); +// } else { +// requestEntityData(this.did, this.cid, this.date.from, this.date.to, this.entityGroup, this.entityId); +// } +// }, +// selectEntry(element, entry) { +// console.debug(element.text.substr(0, element.text.indexOf(' '))); +// if (element.id.split('-')[1] === 'desc') { +// // highlight +// element.parentElement.querySelectorAll('a').forEach(el => el.classList.remove('is-active')); +// element.classList.add('is-active'); +// // update variables; +// this.cid = []; +// this.did = entry; +// this.dopen = false; +// } else if (element.id.split('-')[1] === 'crit') { +// // toggle +// element.classList.toggle('is-active'); +// // update variables; +// this.cid.indexOf(entry) === -1 ? this.cid.push(entry) : this.cid = this.cid.filter(function(id) { return id !== entry}); +// this.copen = false; +// // add tag +// } +// }, +// getDropdownData(dropdown) { +// this.loading = true; +// let url = BASE_URL; +// let gridCode; +// if (this.isGrid) { +// gridCode = Alpine.store('entity').cellcode.substr(0,4); +// } +// +// switch(dropdown) { +// case 'd': +// url += '/interface/dropdowns/descriptors?entity_id=' + this.entityId + '&cellcode=' + gridCode; +// break; +// case 'c': +// url += '/interface/dropdowns/criterias?desc_id=' + this.did + '&cellcode=' + gridCode; +// break; +// } +// +// fetch(url) +// .then(res => res.json()) +// .then(data => { +// this.isLoading = false; +// eval('this.' + dropdown + '=data'); +// }); +// }, +// loadCal() { +// const calendars = bulmaCalendar.attach('[type=date]', {dateFormat: 'dd/MM/yyyy', isRange: true}); +// // Loop on each calendar initialized +// calendars.forEach(calendar => { +// calendar.on('save', data => { +// this.date = { +// from: calendar.startDate.toLocaleDateString(), +// to: calendar.endDate.toLocaleDateString() +// } +// }); +// }); +// }, +// populateFeatureGrid(grid) { +// const features = Alpine.store('entity'); +// console.debug(features); +// const featureCols = Object.getOwnPropertyNames(Alpine.store('entity')).filter(name => aliasMap.has(name)); +// const featureVals = featureCols.map(col => {return {feature: aliasMap.get(col), value: features[col]}}); +// console.debug(featureVals); +// new gridjs.Grid({ +// data: featureVals +// }).render(grid); +// }, +// drawDataChart() { +// if (this.entityGroup != 'POSEIDON') +// return; +// const url = `/data/external/POSEIDON/${Alpine.store('entity').tspr}_${Alpine.store('entity').type}_${Alpine.store('entity').pid}`; +// fetch(url) +// .then(res => res.json()) +// .then(data => { +// this.isLoading = false; +// console.debug(data); +// }); +// +// const config = { +// type: 'line', +// data: data, +// options: { +// responsive: true, +// plugins: { +// legend: { +// position: 'top', +// }, +// title: { +// display: true, +// text: 'Chart.js Line Chart' +// } +// } +// }, +// }; +// } +// }; +// } -function mruInfo() { - return { - dopen: false, - copen: false, - loading: false, - d: {}, - c: {}, - tagName(type, id) { - if (id == null) - return; - if (type === 'd') { - return this.d.find(i => i.id == id).code; - } else if (type === 'c') { - return this.c.find(i => i.id == id).code; - } - }, - bid: Alpine.store('mru').objectid, - did: null, - cid: [], - date: {}, - search() { - generateRequest(this.did, this.cid, this.date.from, this.date.to, this.bid); - }, - selectEntry(element, entry) { - console.debug(element.text.substr(0, element.text.indexOf(' '))); - if (element.id.split('-')[1] === 'desc') { - // highlight - element.parentElement.querySelectorAll('a').forEach(el => el.classList.remove('is-active')); - element.classList.add('is-active'); - // update variables; - this.cid = []; - this.did = entry; - this.dopen = false; - } else if (element.id.split('-')[1] === 'crit') { - // toggle - element.classList.toggle('is-active'); - // update variables; - this.cid.indexOf(entry) === -1 ? this.cid.push(entry) : this.cid = this.cid.filter(function(id) { return id !== entry}); - this.copen = false; - // add tag - } - }, - getDropdownData(dropdown) { - this.loading = true; - let url = BASE_URL; - switch(dropdown) { - case 'd': - url += '/interface/dropdowns/descriptors?body_id=' + this.bid; - break; - case 'c': - url += '/interface/dropdowns/criterias?desc_id=' + this.did; - break; - } - fetch(url) - .then(res => res.json()) - .then(data => { - this.isLoading = false; - eval('this.' + dropdown + '=data'); - }); - }, - loadCal() { - const calendars = bulmaCalendar.attach('[type=date]', {dateFormat: 'dd/MM/yyyy', isRange: true}); - // Loop on each calendar initialized - calendars.forEach(calendar => { - calendar.on('save', data => { - this.date = { - from: calendar.startDate.toLocaleDateString(), - to: calendar.endDate.toLocaleDateString() - } - }); - }); - }, - populateFeatureGrid(grid) { - console.debug(grid); - const features = Alpine.store('mru'); - const featureCols = Object.getOwnPropertyNames(Alpine.store('mru')).filter(name => aliasMap.has(name)); - const featureVals = featureCols.map(col => {return {feature: aliasMap.get(col), value: features[col]}}); - console.debug(featureVals); - new gridjs.Grid({ - data: featureVals - }).render(grid); - } - }; -} +// function mruInfo() { +// return { +// dopen: false, +// copen: false, +// loading: false, +// d: {}, +// c: {}, +// tagName(type, id) { +// if (id == null) +// return; +// if (type === 'd') { +// return this.d.find(i => i.id == id).code; +// } else if (type === 'c') { +// return this.c.find(i => i.id == id).code; +// } +// }, +// bid: Alpine.store('mru').objectid, +// did: null, +// cid: [], +// date: {}, +// search() { +// generateRequest(this.did, this.cid, this.date.from, this.date.to, this.bid); +// }, +// selectEntry(element, entry) { +// console.debug(element.text.substr(0, element.text.indexOf(' '))); +// if (element.id.split('-')[1] === 'desc') { +// // highlight +// element.parentElement.querySelectorAll('a').forEach(el => el.classList.remove('is-active')); +// element.classList.add('is-active'); +// // update variables; +// this.cid = []; +// this.did = entry; +// this.dopen = false; +// } else if (element.id.split('-')[1] === 'crit') { +// // toggle +// element.classList.toggle('is-active'); +// // update variables; +// this.cid.indexOf(entry) === -1 ? this.cid.push(entry) : this.cid = this.cid.filter(function(id) { return id !== entry}); +// this.copen = false; +// // add tag +// } +// }, +// getDropdownData(dropdown) { +// this.loading = true; +// let url = BASE_URL; +// switch(dropdown) { +// case 'd': +// url += '/interface/dropdowns/descriptors?body_id=' + this.bid; +// break; +// case 'c': +// url += '/interface/dropdowns/criterias?desc_id=' + this.did; +// break; +// } +// fetch(url) +// .then(res => res.json()) +// .then(data => { +// this.isLoading = false; +// eval('this.' + dropdown + '=data'); +// }); +// }, +// loadCal() { +// const calendars = bulmaCalendar.attach('[type=date]', {dateFormat: 'dd/MM/yyyy', isRange: true}); +// // Loop on each calendar initialized +// calendars.forEach(calendar => { +// calendar.on('save', data => { +// this.date = { +// from: calendar.startDate.toLocaleDateString(), +// to: calendar.endDate.toLocaleDateString() +// } +// }); +// }); +// }, +// populateFeatureGrid(grid) { +// console.debug(grid); +// const features = Alpine.store('mru'); +// const featureCols = Object.getOwnPropertyNames(Alpine.store('mru')).filter(name => aliasMap.has(name)); +// const featureVals = featureCols.map(col => {return {feature: aliasMap.get(col), value: features[col]}}); +// console.debug(featureVals); +// new gridjs.Grid({ +// data: featureVals +// }).render(grid); +// } +// }; +// } diff --git a/public/src/Views/404.php b/public/src/Views/404.php deleted file mode 100644 index d51a8b3..0000000 --- a/public/src/Views/404.php +++ /dev/null @@ -1,4 +0,0 @@ - - -
-
-
-
-
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - - - -
-
- -
- -
- - - - - - - -
-

This email is invalid

-
- -
- -
-
- -
-
-
- - - - - - -
-
- -
-
- -
-
-
- - -
-
- -
-
- - - diff --git a/public/src/Views/download-button.php b/public/src/Views/download-button.php deleted file mode 100644 index ffde2b8..0000000 --- a/public/src/Views/download-button.php +++ /dev/null @@ -1,4 +0,0 @@ - - diff --git a/public/src/Views/home.php b/public/src/Views/home.php deleted file mode 100644 index e81c0a6..0000000 --- a/public/src/Views/home.php +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/src/Views/login.php b/public/src/Views/login.php deleted file mode 100644 index 87487ac..0000000 --- a/public/src/Views/login.php +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - -
-
-
Enter as a registered user
-
-
- -
-
-
-
- -
-
- -
-

OR

-
Enter as guest
-
-
-
- -
-
- -
-
- -
-
- - diff --git a/public/src/Views/main-about.php b/public/src/Views/main-about.php deleted file mode 100644 index 1a53c8a..0000000 --- a/public/src/Views/main-about.php +++ /dev/null @@ -1,5 +0,0 @@ -
-

COMING SOON


-
- - diff --git a/public/src/Views/main.php b/public/src/Views/main.php deleted file mode 100644 index 02656bd..0000000 --- a/public/src/Views/main.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/public/src/Views/map.php b/public/src/Views/map.php deleted file mode 100644 index aaf426e..0000000 --- a/public/src/Views/map.php +++ /dev/null @@ -1,8 +0,0 @@ -
-
-
- diff --git a/public/src/Views/metadata.php b/public/src/Views/metadata.php deleted file mode 100644 index f502e1d..0000000 --- a/public/src/Views/metadata.php +++ /dev/null @@ -1,4 +0,0 @@ -
-
-
- diff --git a/public/src/Views/modal-downloadlayer.php b/public/src/Views/modal-downloadlayer.php deleted file mode 100644 index fb7a408..0000000 --- a/public/src/Views/modal-downloadlayer.php +++ /dev/null @@ -1,38 +0,0 @@ - - diff --git a/public/src/Views/more-info.php b/public/src/Views/more-info.php deleted file mode 100644 index e55608b..0000000 --- a/public/src/Views/more-info.php +++ /dev/null @@ -1,63 +0,0 @@ - -

You may request the whole entity (cruise/station etc.) without selecting search criteria or be more specific by doing so.

-
- -
- - -
- -
-
- -
- -
- -
-
- -
-
diff --git a/public/src/Views/mru-info.php b/public/src/Views/mru-info.php deleted file mode 100644 index 9c37f5f..0000000 --- a/public/src/Views/mru-info.php +++ /dev/null @@ -1,62 +0,0 @@ - -

You may request the whole water body without selecting search criteria or be more specific by doing so.

-
-
- - -
- -
-
- -
- -
- -
-
- -
-
diff --git a/public/src/Views/register.php b/public/src/Views/register.php deleted file mode 100644 index c034941..0000000 --- a/public/src/Views/register.php +++ /dev/null @@ -1,87 +0,0 @@ -
-
- -
- -
-
- -
- -
- - - - - - - -
-

This username is available

-
- -
- -
- - - - - - - -
-

This email is invalid

-
- -
- -
-
- -
-
-
- -
- -
- -
-
- -
-
- -
-
- -
-
- - -
-
- -
-
- -
-
- -
-
- -
diff --git a/public/src/Views/sidebar-advancedsearch.php b/public/src/Views/sidebar-advancedsearch.php deleted file mode 100644 index 4870747..0000000 --- a/public/src/Views/sidebar-advancedsearch.php +++ /dev/null @@ -1,111 +0,0 @@ - - - diff --git a/public/src/Views/sidebar-layerview.php b/public/src/Views/sidebar-layerview.php deleted file mode 100644 index 8bc816f..0000000 --- a/public/src/Views/sidebar-layerview.php +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/public/src/Views/sidebar-panel.php b/public/src/Views/sidebar-panel.php deleted file mode 100644 index af5d0f7..0000000 --- a/public/src/Views/sidebar-panel.php +++ /dev/null @@ -1,34 +0,0 @@ - - diff --git a/public/src/Views/sidebar-requests.php b/public/src/Views/sidebar-requests.php deleted file mode 100644 index 62152ad..0000000 --- a/public/src/Views/sidebar-requests.php +++ /dev/null @@ -1,7 +0,0 @@ - - diff --git a/public/src/Views/spinner.php b/public/src/Views/spinner.php deleted file mode 100644 index 6ec398f..0000000 --- a/public/src/Views/spinner.php +++ /dev/null @@ -1,32 +0,0 @@ -
- -
- - diff --git a/public/src/Views/tabpanel.php b/public/src/Views/tabpanel.php deleted file mode 100644 index fb30580..0000000 --- a/public/src/Views/tabpanel.php +++ /dev/null @@ -1,64 +0,0 @@ -
- -
- -
- - - - -
-
-
- diff --git a/src/Controllers/HomeController.php b/src/Controllers/HomeController.php index 6c2f983..0dabfb1 100644 --- a/src/Controllers/HomeController.php +++ b/src/Controllers/HomeController.php @@ -9,7 +9,6 @@ class HomeController { ); $view = new ViewController(); $view->render('home', $data); - } } ?> diff --git a/src/Controllers/InterfaceController.php b/src/Controllers/InterfaceController.php index b31fd59..519c465 100644 --- a/src/Controllers/InterfaceController.php +++ b/src/Controllers/InterfaceController.php @@ -80,6 +80,19 @@ class InterfaceController { echo json_encode($obj); } } + + + public function getPartial($input) { + $data = $_GET; + $page = $input['partial']; + $view = new ViewController(); + $view->render($page, $data); + } + + + public function getPage($input) { + return 0; + } } diff --git a/src/Data/descriptors.php b/src/Data/descriptors.php index ce05f85..6ea2f4d 100644 --- a/src/Data/descriptors.php +++ b/src/Data/descriptors.php @@ -2,7 +2,7 @@ use MSFD\Services\PgSql; $body_id = $_GET['body_id']; -$entity_id = $_GET['entityid']; +$entity_id = $_GET['entity_id']; /* $cellcode = $_GET['cellcode']; */ $cellcode = $_GET['cellcode'] === 'undefined' ? '' : $_GET['cellcode']; $query = ''; diff --git a/src/Routing/routes.php b/src/Routing/routes.php index 476100c..22219cd 100644 --- a/src/Routing/routes.php +++ b/src/Routing/routes.php @@ -12,16 +12,12 @@ $router->map('GET', '/', 'MSFD\Controllers\HomeController@index', 'home'); $router->map('GET', '/login', 'MSFD\Controllers\AuthController@index', 'login'); $router->map('POST', '/login', 'MSFD\Controllers\AuthController@signin', 'signin'); -/* $router->map('GET', '/login', 'App\Controllers\Auth\LoginController@show', 'login'); */ $router->map('GET', '/logout', 'MSFD\Controllers\AuthController@logout', 'logout'); $router->map('GET', '/fetch_request_list', 'MSFD\Controllers\DataController@fetch', 'fetch'); $router->map('GET', '/geoserver/wms', 'MSFD\Controllers\GeoserverController@wms', 'wms'); $router->map('GET', '/geoserver/shapefile/[:layer]/[:srs]', 'MSFD\Controllers\GeoserverController@downloadShapefile', 'shapefile'); - - $router->map('GET', '/data/external/[:layer]/[:platform]', 'MSFD\Controllers\DataController@fetchExternalData', 'fetch_external'); -/* $router->map('GET', '/register', 'App\Controllers\Auth\RegisterController@show', 'register'); */ -/* $router->map('GET', '/forgot', 'App\Controllers\Auth\ForgotPasswordController@show', 'forgot'); */ -/* $router->map('GET', '/reset', 'App\Controllers\Auth\ResetPasswordController@show', 'reset'); */ +$router->map('GET', '/interface/partial/[:partial]', 'MSFD\Controllers\InterfaceController@getPartial', 'fetch_partial'); +// $router->map('GET', '/interface/page/[a:page]', 'MSFD\Controllers\InterfaceController@getPage', 'fetch_page'); diff --git a/src/Views/main-map.php b/src/Views/main-map.php index 5bfaf73..c889c84 100644 --- a/src/Views/main-map.php +++ b/src/Views/main-map.php @@ -13,8 +13,10 @@ function init_leaflet_map() }).addTo(mapL); _map_config_object = new _config_init_map(); // hide spinner after base map loads - baseLayer.on('load', function(event) { - document.getElementById('spinner').classList.add('is-hidden'); + baseLayer.on('load', function(event) { + // console.debug(Alpine.store('isLoading')); + Alpine.store('loading', false); + // document.getElementById('spinner').classList.add('is-hidden'); }) // hide attribution document.getElementsByClassName( 'leaflet-control-attribution' )[0].style.display = 'none'; diff --git a/src/Views/spinner.php b/src/Views/spinner.php index f738cfd..9f7e554 100644 --- a/src/Views/spinner.php +++ b/src/Views/spinner.php @@ -1,4 +1,4 @@ -
+
diff --git a/src/Views/tabpanel.php b/src/Views/tabpanel.php index 2a73006..a50e4e7 100644 --- a/src/Views/tabpanel.php +++ b/src/Views/tabpanel.php @@ -1,14 +1,16 @@ -
+