Skip to content

Commit

Permalink
Fixing:
Browse files Browse the repository at this point in the history
- set text from result in SearchCombo when clicked on any result
- removing yellow selection when zooming to record from table or search results from panel. It coused double call to server
- clearing opacities parameter because it is handled differently in QGIS3 and is not needed since client has disabled opacities changes for layers
- allow global configuration for settings in project.json file (which is still used to override global client setting)
  • Loading branch information
uprel committed Nov 23, 2018
1 parent 4dc7f7d commit ee44830
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
2 changes: 2 additions & 0 deletions client/site/js/GeocodingSearchCombo.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ GeoExt.ux.GeocodingSearchCombo = Ext.extend(Ext.form.ComboBox, {
},

beforeselectHandler: function(combo,record,index) {
combo.setValue(record.data[this.displayField]);

if (record.get('selectable') == "1") {
this.collapse();
}
Expand Down
12 changes: 7 additions & 5 deletions client/site/js/LayerActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,15 @@ function zoomHandler(grid, rowIndex, colIndex, item, e) {

function showRecordSelected(args) {

var layer = args["layer"] == null ? args["fid"].split('.')[0] : args["layer"];
var layerId = wmsLoader.layerTitleNameMapping[layer];
//var layer = args["layer"] == null ? args["fid"].split('.')[0] : args["layer"];
//var layerId = wmsLoader.layerTitleNameMapping[layer];

// select feature in layer
thematicLayer.mergeNewParams({
"SELECTION": layerId + ":" + args["id"]
});
//this is yellow selection, problem is that we get double request to server, one for selection + another to zoom mao
//currently disabled
//thematicLayer.mergeNewParams({
// "SELECTION": layerId + ":" + args["id"]
//});

if (args["doZoomToExtent"]) {
geoExtMap.map.zoomToExtent(args["bbox"]);
Expand Down
7 changes: 4 additions & 3 deletions client/site/js/WebgisInit_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function postLoading() {

thematicLayer.mergeNewParams({
LAYERS: selectedLayers.join(","),
OPACITIES: layerOpacities(selectedLayers),
//OPACITIES: layerOpacities(selectedLayers),
FORMAT: format
});
if (identificationMode != 'activeLayers') {
Expand Down Expand Up @@ -576,7 +576,7 @@ function postLoading() {
thematicLayer = new OpenLayers.Layer.WMS(layerTree.root.firstChild.text,
wmsURI, {
layers: selectedLayers.join(","),
opacities: layerOpacities(selectedLayers),
//opacities: layerOpacities(selectedLayers),
format: format,
transparent: qgisLayerTransparency,
dpi: screenDpi,
Expand Down Expand Up @@ -615,7 +615,7 @@ function postLoading() {
thematicLayer.url = wmsURI;
thematicLayer.mergeNewParams({
"LAYERS": selectedLayers.join(","),
"OPACITIES": layerOpacities(selectedLayers),
//"OPACITIES": layerOpacities(selectedLayers),
"FORMAT": format
});
}
Expand Down Expand Up @@ -1035,6 +1035,7 @@ function postLoading() {
tpl: '<tpl for="."><div class="x-combo-list-item"><h3>{text}</h3>{place_name}</div></tpl>',
layers: projectData.geoCode.layers,
provider: projectData.geoCode.provider,
displayField: 'text',
maxRows: 10
});
} else {
Expand Down
15 changes: 15 additions & 0 deletions client_common/eqwc_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
*
*/

//Set projectData from settings if set and if project values are empty
//Way to set up things in general and still be possible to override it with project.json
if(projectData.search === null && Eqwc.settings.search) {
projectData.search = Eqwc.settings.search;
}
if(projectData.geoCode === null && Eqwc.settings.geoCode) {
projectData.geoCode = Eqwc.settings.geoCode;
}
if(projectData.wsgi === null && Eqwc.settings.wsgi) {
projectData.wsgi = Eqwc.settings.wsgi;
}
if(projectData.locationServices === null && Eqwc.settings.locationServices) {
projectData.locationServices = Eqwc.settings.locationServices;
}

Eqwc.common = {};

Eqwc.common.createHyperlink = function(att, val, pattern) {
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1.8.0 - Application
1.8.1 - Application
19 - Database

0 comments on commit ee44830

Please sign in to comment.