Browse Source

tag style fix, clear filter implementation in adv search, datepicker improvements, main window layout styling:

master
o.moresis 2 years ago
parent
commit
c2623a19a0
  1. 827
      public/css/style.css
  2. 258
      public/js/sidebar.js
  3. 33
      public/js/tools/leaflet/L.Control.Window.js
  4. 10
      src/Views/sidebar-advancedsearch.php
  5. 9
      src/Views/tabpanel.php

827
public/css/style.css

@ -2,457 +2,384 @@
opacity:0.5; opacity:0.5;
} }
/* .olImageLoadError{display: none !important;} */
/* */
/* .column_grid_images{cursor:pointer;} */
/* */
/* .olControlScaleBar { */
/* bottom: 30px; */
/* left: 10px; */
/* font-family: sans-serif; */
/* color: #000; */
/* } */
/* */
/* .olControlScaleBarBar { */
/* height: 1px; */
/* top: 14px; */
/* background: #333; */
/* } */
/* */
/* .olControlScaleBarBarAlt { */
/* height: 1px; */
/* top: 14px; */
/* background: #333; */
/* } */
/* */
/* .olControlScaleBarMarkerMajor { */
/* height: 7px; */
/* width: 1px; */
/* top: 11px; */
/* background: #333; */
/* } */
/* */
/* .olControlScaleBarMarkerMinor { */
/* height: 5px; */
/* width: 1px; */
/* top: 12px; */
/* background: #333; */
/* } */
/* */
/* .olControlScaleBarNumbersBox { */
/* width: 40px; */
/* height: 13px; */
/* top: 21px; */
/* font-size: 0.7em; */
/* } */
/* */
/* .olControlScaleBarLabelBox { */
/* top: -2px; */
/* height: 15px; */
/* font-weight: bold; */
/* letter-spacing: 0.1em; */
/* font-size: 0.7em; */
/* font-variant: small-caps; */
/* } */
/* */
/* .olControlScaleBarLabelBoxSingleLine { */
/* height: 15px; */
/* width: 35px; */
/* top: 5px; */
/* left: 10px; */
/* font-size: 0.7em; */
/* font-variant: small-caps; */
/* } */
/* /**************** Custom ExtJS CSS ************************/ */
/* */
/* .x-grid-cell-inner { */
/* */
/* white-space: normal; */
/* } */
/* */
/* .no-wrap{ */
/* white-space: nowrap; */
/* } */
/**************** general************************/ /**************** general************************/
/**/
.maptab_accordion_icon{ /* .maptab_accordion_icon{ */
background-image: url('../img/interpolate.png'); /* background-image: url('../img/interpolate.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.map_general_add_btn{ /* .map_general_add_btn{ */
background-image: url('../img/add.png'); /* background-image: url('../img/add.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.map_general_settings_btn{ /* .map_general_settings_btn{ */
background-image: url('../img/settings.png'); /* background-image: url('../img/settings.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.map_general_copy_btn{ /* .map_general_copy_btn{ */
background-image: url('../img/copy.png'); /* background-image: url('../img/copy.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.map_general_cancel_btn{ /* .map_general_cancel_btn{ */
background-image: url('../img/cancel.png'); /* background-image: url('../img/cancel.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.map_general_remove_btn { /* .map_general_remove_btn { */
background-image: url('../img/remove.png'); /* background-image: url('../img/remove.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.map_general_setting_btn { /* .map_general_setting_btn { */
background-image: url('../img/settings.png'); /* background-image: url('../img/settings.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.map_general_clear_btn{ /* .map_general_clear_btn{ */
background-image: url('../img/clear.png'); /* background-image: url('../img/clear.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.map_general_loading{ /* .map_general_loading{ */
background-image: url('../img/loading.gif'); /* background-image: url('../img/loading.gif'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.map_general_extent{ /* .map_general_extent{ */
background-image: url('../img/map-extent-info.png'); /* background-image: url('../img/map-extent-info.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.map_general_mapedit{ /* .map_general_mapedit{ */
background-image: url('../img/map-edit.png'); /* background-image: url('../img/map-edit.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**/
.map_general_map{ /* .map_general_map{ */
background-image: url('../img/map.png'); /* background-image: url('../img/map.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**************** maptab_toolbar_general************************/ /* /**************** maptab_toolbar_general************************/ */
/**/
.maptab_toolbar_general_pan{ /* .maptab_toolbar_general_pan{ */
background-image: url('../img/mapPan.png'); /* background-image: url('../img/mapPan.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_pan_left{ /* .maptab_toolbar_general_pan_left{ */
background-image: url('../img/mapPanLeft.png'); /* background-image: url('../img/mapPanLeft.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_pan_right{ /* .maptab_toolbar_general_pan_right{ */
background-image: url('../img/mapPanRight.png'); /* background-image: url('../img/mapPanRight.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_pan_up{ /* .maptab_toolbar_general_pan_up{ */
background-image: url('../img/mapPanUp.png'); /* background-image: url('../img/mapPanUp.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_pan_down{ /* .maptab_toolbar_general_pan_down{ */
background-image: url('../img/mapPanDown.png'); /* background-image: url('../img/mapPanDown.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_extent { /* .maptab_toolbar_general_extent { */
background-image: url('../img/zoomExtent.png'); /* background-image: url('../img/zoomExtent.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_navigation { /* .maptab_toolbar_navigation { */
background-image: url('../img/mapPan.png'); /* background-image: url('../img/mapPan.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_zoomByArea { /* .maptab_toolbar_general_zoomByArea { */
background-image: url('../img/zoomRegion.png'); /* background-image: url('../img/zoomRegion.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_zoomPrevious { /* .maptab_toolbar_general_zoomPrevious { */
background-image: url('../img/zoomLast.png'); /* background-image: url('../img/zoomLast.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_zoomNext { /* .maptab_toolbar_general_zoomNext { */
background-image: url('../img/zoomNext.png'); /* background-image: url('../img/zoomNext.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_zoomIn { /* .maptab_toolbar_general_zoomIn { */
background-image: url('../img/zoomIn.png'); /* background-image: url('../img/zoomIn.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_zoomOut { /* .maptab_toolbar_general_zoomOut { */
background-image: url('../img/zoomOut.png'); /* background-image: url('../img/zoomOut.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_measureDistance { /* .maptab_toolbar_general_measureDistance { */
background-image: url('../img/distanceMeasurement.png'); /* background-image: url('../img/distanceMeasurement.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_measureArea { /* .maptab_toolbar_general_measureArea { */
background-image: url('../img/areaMeasurement.png'); /* background-image: url('../img/areaMeasurement.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_measureClear { /* .maptab_toolbar_general_measureClear { */
background-image: url('../img/clearMeasurement.png'); /* background-image: url('../img/clearMeasurement.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_setCoordinates { /* .maptab_toolbar_general_setCoordinates { */
background-image: url('../img/convertPointCoordinates.png'); /* background-image: url('../img/convertPointCoordinates.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_getCoordinates { /* .maptab_toolbar_general_getCoordinates { */
background-image: url('../img/getPointCoordinates.png'); /* background-image: url('../img/getPointCoordinates.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_print { /* .maptab_toolbar_general_print { */
background-image: url('../img/print.png'); /* background-image: url('../img/print.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_featureInfo { /* .maptab_toolbar_general_featureInfo { */
background-image: url('../img/identify.png'); /* background-image: url('../img/identify.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_general_googlestreet { /* .maptab_toolbar_general_googlestreet { */
background-image: url('../img/svhuman.png'); /* background-image: url('../img/svhuman.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**/
.maptab_toolbar_general_googleearth { /* .maptab_toolbar_general_googleearth { */
background-image: url('../img/ge.png'); /* background-image: url('../img/ge.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**/
.maptab_toolbar_general_icon{ /* .maptab_toolbar_general_icon{ */
background-image: url('../img/general.png'); /* background-image: url('../img/general.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**************** maptab_toolbar_search************************/ /* /**************** maptab_toolbar_search************************/ */
/**/
.maptab_toolbar_search { /* .maptab_toolbar_search { */
background-image: url('../img/search.png'); /* background-image: url('../img/search.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_search_polygon { /* .maptab_toolbar_search_polygon { */
background-image: url('../img/searchPolygon.png'); /* background-image: url('../img/searchPolygon.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_search_line{ /* .maptab_toolbar_search_line{ */
background-image: url('../img/searchLine.png'); /* background-image: url('../img/searchLine.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_search_rectangle{ /* .maptab_toolbar_search_rectangle{ */
background-image: url('../img/searchRectangle.png'); /* background-image: url('../img/searchRectangle.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_search_circle{ /* .maptab_toolbar_search_circle{ */
background-image: url('../img/searchCircle.png'); /* background-image: url('../img/searchCircle.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_search_clear { /* .maptab_toolbar_search_clear { */
background-image: url('../img/searchClear.png'); /* background-image: url('../img/searchClear.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
/**/
} /* } */
/**/
/**************** maptab_toolbar_edit************************/ /* /**************** maptab_toolbar_edit************************/ */
.maptab_toolbar_edit_point{ /* .maptab_toolbar_edit_point{ */
background-image: url('../img/drawPoint.png'); /* background-image: url('../img/drawPoint.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_line { /* .maptab_toolbar_edit_line { */
background-image: url('../img/drawLine.png'); /* background-image: url('../img/drawLine.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_polygon { /* .maptab_toolbar_edit_polygon { */
background-image: url('../img/drawPolygon.png'); /* background-image: url('../img/drawPolygon.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_select_by_point{ /* .maptab_toolbar_edit_select_by_point{ */
background-image: url('../img/selectbypoint.png'); /* background-image: url('../img/selectbypoint.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_select_by_box{ /* .maptab_toolbar_edit_select_by_box{ */
background-image: url('../img/selectbybox.png'); /* background-image: url('../img/selectbybox.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_unselect{ /* .maptab_toolbar_edit_unselect{ */
background-image: url('../img/unselect.png'); /* background-image: url('../img/unselect.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit { /* .maptab_toolbar_edit { */
background-image: url('../img/edit.png'); /* background-image: url('../img/edit.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_copy { /* .maptab_toolbar_edit_copy { */
background-image: url('../img/copy.png'); /* background-image: url('../img/copy.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_paste { /* .maptab_toolbar_edit_paste { */
background-image: url('../img/paste.png'); /* background-image: url('../img/paste.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_move { /* .maptab_toolbar_edit_move { */
background-image: url('../img/move.png'); /* background-image: url('../img/move.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_delete { /* .maptab_toolbar_edit_delete { */
background-image: url('../img/delete.png'); /* background-image: url('../img/delete.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_merge { /* .maptab_toolbar_edit_merge { */
background-image: url('../img/merge.png'); /* background-image: url('../img/merge.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_split { /* .maptab_toolbar_edit_split { */
background-image: url('../img/split.png'); /* background-image: url('../img/split.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_undo { /* .maptab_toolbar_edit_undo { */
background-image: url('../img/undo.png'); /* background-image: url('../img/undo.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_redo { /* .maptab_toolbar_edit_redo { */
background-image: url('../img/redo.png'); /* background-image: url('../img/redo.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_save{ /* .maptab_toolbar_edit_save{ */
background-image: url('../img/save.png'); /* background-image: url('../img/save.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_toolbar_edit_refresh{ /* .maptab_toolbar_edit_refresh{ */
background-image: url('../img/refresh.png'); /* background-image: url('../img/refresh.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**/
/**************** maptab_services_manager************************/ /* /**************** maptab_services_manager************************/ */
.maptab_services_manager_register{ /* .maptab_services_manager_register{ */
background-image: url('../img/add.png'); /* background-image: url('../img/add.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_services_manager_unregister{ /* .maptab_services_manager_unregister{ */
background-image: url('../img/remove.png'); /* background-image: url('../img/remove.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_services_issecure{ /* .maptab_services_issecure{ */
background-image: url('../img/isSecure.png'); /* background-image: url('../img/isSecure.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.maptab_services_manager_show_layers{ /* .maptab_services_manager_show_layers{ */
/**/
} /* } */
.maptab_services_manager_settings_layer{ /* .maptab_services_manager_settings_layer{ */
/**/
} /* } */
.maptab_services_manager_layer_legend_size{ /* .maptab_services_manager_layer_legend_size{ */
width: 18px!important; /* width: 18px!important; */
height: 18px!important; /* height: 18px!important; */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**/
/**************** features************************/ /* /**************** features************************/ */
.features_toolbar_showonmap { /* .features_toolbar_showonmap { */
background-image: url('../img/show.png'); /* background-image: url('../img/show.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.features_toolbar_download { /* .features_toolbar_download { */
background-image: url('../img/download.png'); /* background-image: url('../img/download.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.features_toolbar_addtoselected { /* .features_toolbar_addtoselected { */
background-image: url('../img/addToSelected.png'); /* background-image: url('../img/addToSelected.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.features_toolbar_edit{ /* .features_toolbar_edit{ */
background-image: url('../img/edit.png'); /* background-image: url('../img/edit.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.features_toolbar_save{ /* .features_toolbar_save{ */
background-image: url('../img/save.png'); /* background-image: url('../img/save.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.features_toolbar_cancel{ /* .features_toolbar_cancel{ */
background-image: url('../img/cancel.png'); /* background-image: url('../img/cancel.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.features_toolbar_showinfow { /* .features_toolbar_showinfow { */
background-image: url('../img/featureInfoWindow.png'); /* background-image: url('../img/featureInfoWindow.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.features_toolbar_highlight { /* .features_toolbar_highlight { */
background-image: url('../img/highlight.png'); /* background-image: url('../img/highlight.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**/
/**************** maptab_layer_tree************************/ /* /**************** maptab_layer_tree************************/ */
.maptab_layer_tree_opacity { /* .maptab_layer_tree_opacity { */
background-image: url('../img/layer.png'); /* background-image: url('../img/layer.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**/
.maptab_layer_tree_refresh{ /* .maptab_layer_tree_refresh{ */
background-image: url('../img/refresh.png'); /* background-image: url('../img/refresh.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**/
/**************** other************************/ /* /**************** other************************/ */
.tiff{ /* .tiff{ */
background-image: url('../img/tiff.png'); /* background-image: url('../img/tiff.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.svg{ /* .svg{ */
background-image: url('../img/svg.png'); /* background-image: url('../img/svg.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.kml{ /* .kml{ */
background-image: url('../img/kml.png'); /* background-image: url('../img/kml.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.shapefile{ /* .shapefile{ */
background-image: url('../img/shapefile.png'); /* background-image: url('../img/shapefile.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.csv{ /* .csv{ */
background-image: url('../img/csv.png'); /* background-image: url('../img/csv.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.pdf{ /* .pdf{ */
background-image: url('../img/pdf.png'); /* background-image: url('../img/pdf.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.play{ /* .play{ */
background-image: url('../img/play.png'); /* background-image: url('../img/play.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.stop{ /* .stop{ */
background-image: url('../img/stop.png'); /* background-image: url('../img/stop.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.pause{ /* .pause{ */
background-image: url('../img/pause.png'); /* background-image: url('../img/pause.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.chart{ /* .chart{ */
background-image: url('../img/chart.png'); /* background-image: url('../img/chart.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.save{ /* .save{ */
background-image: url('../img/save.png'); /* background-image: url('../img/save.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.refresh{ /* .refresh{ */
background-image: url('../img/refresh.png'); /* background-image: url('../img/refresh.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**/
.google{ /* .google{ */
background-image: url('../img/google.png'); /* background-image: url('../img/google.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
.save1{ /* .save1{ */
background-image: url('../img/save1.png'); /* background-image: url('../img/save1.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**/
/**/
/**/
.mydraw_management_window_btn{ /* .mydraw_management_window_btn{ */
background-image: url('../img/layer-edit.png'); /* background-image: url('../img/layer-edit.png'); */
background-size:16px 16px; /* background-size:16px 16px; */
} /* } */
/**/
.control-window > .content { .control-window > .content {
min-height: 20vw; min-height: 20vw;
@ -480,3 +407,5 @@ html,body {
#grid-users { #grid-users {
width: fit-content; width: fit-content;
} }

258
public/js/sidebar.js

@ -34,6 +34,12 @@ function advancedSearch() {
did: null, did: null,
cid: [], cid: [],
date: {}, date: {},
calendar: bulmaCalendar.attach('[type=date]', {dateFormat: 'dd/MM/yyyy', isRange: true,
minDate: '01/01/1990',
showButtons: false,
showFooter: false,
position: [100, 100]
})[0],
search() { search() {
generateRequest(this.did, this.cid, this.date.from, this.date.to, this.bid); generateRequest(this.did, this.cid, this.date.from, this.date.to, this.bid);
}, },
@ -75,6 +81,7 @@ function advancedSearch() {
this.submitDisabled = !(this.bid.length > 0 && this.cid.length > 0); this.submitDisabled = !(this.bid.length > 0 && this.cid.length > 0);
}, },
getDropdownData(dropdown) { getDropdownData(dropdown) {
console.debug("TAGS::: ", this.cid);
this.loading = true; this.loading = true;
let url = BASE_URL; let url = BASE_URL;
switch(dropdown) { switch(dropdown) {
@ -92,25 +99,29 @@ function advancedSearch() {
break; break;
} }
fetch(url) fetch(url)
.then(res => res.json()) .then(res => res.json())
.then(data => { .then(data => {
this.isLoading = false; this.isLoading = false;
eval('this.' + dropdown + '=data'); eval('this.' + dropdown + '=data');
console.debug(data); console.debug(data);
}); });
}, },
loadCal() { loadCal() {
const calendars = bulmaCalendar.attach('[type=date]', {dateFormat: 'dd/MM/yyyy', isRange: true, console.debug(this.calendar);
minDate: '01/01/1990'}); this.calendar.on('save', data => {
// Loop on each calendar initialized this.date = {
calendars.forEach(calendar => { from: this.calendar.startDate.toLocaleDateString(),
calendar.on('save', data => { to: this.calendar.endDate.toLocaleDateString()
this.date = { }
from: calendar.startDate.toLocaleDateString(),
to: calendar.endDate.toLocaleDateString()
}
});
}); });
},
clearFilters() {
this.gid = null;
this.bid = [];
this.did = null;
this.cid = [];
this.date = {};
this.calendar.clear();
} }
}; };
} }
@ -146,7 +157,6 @@ function downloadOneFile(fileUUID) {
} }
/** /**
* Submit a request to the server and returns the entry inserted * Submit a request to the server and returns the entry inserted
* @param {number} desc * @param {number} desc
@ -241,217 +251,3 @@ function clearRequests() {
console.log('Cancel'); console.log('Cancel');
} }
} }
// 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);
// }
// };
// }

33
public/js/tools/leaflet/L.Control.Window.js

@ -123,46 +123,33 @@ L.Control.Window = L.Control.extend({
show: function (position) { show: function (position) {
if (position){ if (position){
this.options.position = position console.debug('dsfasdfas');
this.options.position = position;
} }
L.DomUtil.addClass(this._wrapper, 'visible'); L.DomUtil.addClass(this._wrapper, 'visible');
this.setContentMaxHeight(); this.setContentMaxHeight();
// Popup dimensions
var thisWidth = this._container.offsetWidth; var thisWidth = this._container.offsetWidth;
var thisHeight = this._container.offsetHeight; var thisHeight = this._container.offsetHeight;
var margin = 8; var margin = 8;
var el = L.DomUtil.get(this.options.element); var el = L.DomUtil.get(this.options.element);
var rect = el.getBoundingClientRect(); var rect = el.getBoundingClientRect();
// Map box dimensions
var width = rect.right -rect.left || Math.max(document.documentElement.clientWidth, window.innerWidth || 0); var width = rect.right -rect.left || Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var height = rect.bottom -rect.top || Math.max(document.documentElement.clientHeight, window.innerHeight || 0); var height = rect.bottom -rect.top || Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var top = rect.top; var top = rect.top;
var left = rect.left; var left = rect.left;
var offset =0; var offset = {
x: 0,
// SET POSITION OF WINDOW y: 60
if (this.options.position == 'topLeft'){ };
this.showOn([left,top+offset])
} else if (this.options.position == 'left') { this.showOn([width/2-thisWidth/2 - offset.x, offset.y]);
this.showOn([left, top+height/2-thisHeight/2-margin+offset])
} else if (this.options.position == 'bottomLeft') {
this.showOn([left, top+height-thisHeight-margin*2-offset])
} else if (this.options.position == 'top') {
this.showOn([left+width/2-thisWidth/2-margin,top+offset])
} else if (this.options.position == 'topRight') {
this.showOn([left+width-thisWidth-margin*2,top+ offset])
} else if (this.options.position == 'right') {
this.showOn([left+width-thisWidth-margin*2, top+height/2-thisHeight/2-margin+offset])
} else if (this.options.position == 'bottomRight') {
this.showOn([left+width-thisWidth-margin*2,top+ height-thisHeight-margin*2-offset])
} else if (this.options.position == 'bottom') {
this.showOn([left+width/2-thisWidth/2-margin,top+ height-thisHeight-margin*2-offset])
} else {
this.showOn([left+width/2-thisWidth/2-margin, top+top+height/2-thisHeight/2-margin+offset])
}
return this; return this;
}, },

10
src/Views/sidebar-advancedsearch.php

@ -41,10 +41,10 @@ x-data="advancedSearch()"
</div> </div>
</div> </div>
<div id="tags-selection-g" class="tags"> <div id="tags-selection-g" class="tags">
<span class="tag" x-text="tagName('g', gid)"></span> <span x-show="gid != null" class="tag" x-text="tagName('g', gid)"></span>
</div> </div>
<div id="tags-selection-b" class="tags"> <div id="tags-selection-b" class="tags">
<template x-for="id in bid"> <template x-if="bid.length < 0" x-for="id in bid">
<span class="tag" x-text="tagName('b', id)"></span> <span class="tag" x-text="tagName('b', id)"></span>
</template> </template>
</div> </div>
@ -88,10 +88,10 @@ x-data="advancedSearch()"
</div> </div>
</div> </div>
<div id="tags-selection-d" class="tags"> <div id="tags-selection-d" class="tags">
<span class="tag" x-text="tagName('d', did)"></span> <span x-show="did != null" class="tag" x-text="tagName('d', did)"></span>
</div> </div>
<div id="tags-selection-c" class="tags"> <div id="tags-selection-c" class="tags">
<template x-for="id in cid"> <template x-if="cid.length < 0" x-for="id in cid">
<span class="tag" x-text="tagName('c', id)"></span> <span class="tag" x-text="tagName('c', id)"></span>
</template> </template>
</div> </div>
@ -102,7 +102,7 @@ x-data="advancedSearch()"
</div> </div>
<div class="p-4"> <div class="p-4">
<button class="button is-primary" @click="search()" x-bind:disabled="submitDisabled">Make Request...</button> <button class="button is-primary" @click="search()" x-bind:disabled="submitDisabled">Make Request...</button>
<button class="button" @click="clearSearch()">Clear Filters</button> <button class="button" @click="clearFilters()">Clear Filters</button>
</div> </div>
</fieldset> </fieldset>

9
src/Views/tabpanel.php

@ -10,8 +10,8 @@
downloadData() { downloadData() {
downloadRequested(); downloadRequested();
} }
}" x-init="$store.loading = true"> }" x-init="$store.loading = true" class="is-flex is-flex-direction-column">
<nav class="tabs is-centered is-boxed" > <nav class="tabs is-centered is-boxed">
<ul> <ul>
<li :class="isActiveTab(1) ? 'is-active' : ''"> <li :class="isActiveTab(1) ? 'is-active' : ''">
<a @click="setActiveTab(1)"> <a @click="setActiveTab(1)">
@ -47,7 +47,7 @@
<div id="login-status" class="mr-10 is-inline-flex is-align-items-center"><span x-text="'Welcome ' + userName"></span> <a id="btn-logout" href="logout">Log Out</a></div> <div id="login-status" class="mr-10 is-inline-flex is-align-items-center"><span x-text="'Welcome ' + userName"></span> <a id="btn-logout" href="logout">Log Out</a></div>
</nav> </nav>
<div id="main-view" class="columns"> <div id="main-view" class="columns is-flex-grow-1 px-4">
<aside class="column is-one-third pb-10"> <aside class="column is-one-third pb-10">
<?php include('sidebar-panel.php');?> <?php include('sidebar-panel.php');?>
</aside> </aside>
@ -73,6 +73,7 @@
} }
#main-view { #main-view {
height: 93%; max-height: inherit;
overflow: hidden;
} }
</style> </style>

Loading…
Cancel
Save