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. 789
      public/css/style.css
  2. 242
      public/js/sidebar.js
  3. 33
      public/js/tools/leaflet/L.Control.Window.js
  4. 10
      src/Views/sidebar-advancedsearch.php
  5. 7
      src/Views/tabpanel.php

789
public/css/style.css

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

242
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) {
@ -100,17 +107,21 @@ function advancedSearch() {
}); });
}, },
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
calendars.forEach(calendar => {
calendar.on('save', data => {
this.date = { this.date = {
from: calendar.startDate.toLocaleDateString(), from: this.calendar.startDate.toLocaleDateString(),
to: calendar.endDate.toLocaleDateString() to: this.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>

7
src/Views/tabpanel.php

@ -10,7 +10,7 @@
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' : ''">
@ -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