Skip to content

Commit

Permalink
-- bugs fixed
Browse files Browse the repository at this point in the history
- contentviewer bug
- processing bug
  • Loading branch information
matthiasstein committed Nov 13, 2015
1 parent c73326a commit 761358b
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 20 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ target/*
.idea/*
*.iml
nbactions.xml
/build.properties
18 changes: 18 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Copyright (C) 2015 con terra GmbH ([email protected])
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# URL to the remote map.apps instance
mapapps.remote.base=http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.conterra.devnet</groupId>
<artifactId>ct-mapapps-query-builder</artifactId>
<version>3.1.2-SNAPSHOT</version>
<version>3.1.2</version>
<packaging>jar</packaging>
<!-- DISABLE repositories and pluginRepositories if inside the con terra! -->
<repositories>
Expand Down Expand Up @@ -251,7 +251,7 @@
<!-- add here properties which are used in plugin configuration resolution -->
<properties>
<!-- deployment of map.apps installation -->
<mapapps.remote.base>http://vsdev1114.esri-de.com/ct-mapapps-webapp-3.3.0</mapapps.remote.base>
<mapapps.remote.base>http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%</mapapps.remote.base>
</properties>
</configuration>
</plugin>
Expand Down
20 changes: 11 additions & 9 deletions src/main/js/bundles/dn_querybuilder/EditableQueryBuilderWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ define([
this._createGUISettings();
this._createGUIFields();
},
_setProcessing: function (processing) {
var tool = this.tool;
_setProcessing: function (tool, processing) {
if (tool) {
tool.set("processing", processing);
}
Expand Down Expand Up @@ -248,38 +247,41 @@ define([
}
},
_onDone: function () {
this._setProcessing(true);
this._setProcessing(this.tool, true);
var complexQuery = this._getComplexQuery();
var geom;
if(complexQuery.geometry) {
if (complexQuery.geometry) {
geom = complexQuery.geometry;
}
var customQueryString = JSON.stringify(complexQuery);
customQueryString = this.replacer.replace(customQueryString);
complexQuery = JSON.parse(customQueryString);
if(complexQuery.geometry) {
if (complexQuery.geometry) {
complexQuery["geometry"] = geom;
}
var store = this.store;
var options = {};
options.count = this.properties.options.count;
var count = this.properties.options.count;
if (count >= 0) {
options.count = count;
}
options.ignoreCase = this.properties.options.ignoreCase;
options.locale = this.properties.options.locale;
var filter = new Filter(store, complexQuery, options);

ct_when(filter.query({}, {count: 0}).total, function (total) {
if (total) {
this.dataModel.setDatasource(filter);
this._setProcessing(false);
this._setProcessing(this.tool, false);
} else {
this.logService.warn({
id: 0,
message: this.i18n.no_results_error
});
this._setProcessing(false);
this._setProcessing(this.tool, false);
}
}, function (e) {
this._setProcessing(false);
this._setProcessing(this.tool, false);
this.logService.warn({
id: e.code,
message: e
Expand Down
15 changes: 9 additions & 6 deletions src/main/js/bundles/dn_querybuilder/Query.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ define([
});
window.show();
} else {
this._setProcessing(event.tool, true);
var geom;
if (customquery.geometry) {
geom = customquery.geometry;
Expand All @@ -77,7 +78,10 @@ define([
customquery["geometry"] = geom;
}
var options = {};
options.count = event.options.count;
var count = event.options.count;
if (count >= 0) {
options.count = count;
}
options.ignoreCase = event.options.ignoreCase;
options.locale = event.options.locale;
/*this._eventService.postEvent(topic, {
Expand All @@ -90,25 +94,24 @@ define([
ct_when(filter.query({}, {count: 0}).total, function (total) {
if (total) {
this._dataModel.setDatasource(filter);
this._setProcessing(false);
this._setProcessing(event.tool, false);
} else {
this._logService.warn({
id: 0,
message: this._i18n.get().wizard.no_results_error
});
this._setProcessing(false);
this._setProcessing(event.tool, false);
}
}, function (e) {
this._setProcessing(false);
this._setProcessing(event.tool, false);
this._logService.warn({
id: e.code,
message: e
});
}, this);
}
},
_setProcessing: function (processing) {
var tool = this.tool;
_setProcessing: function (tool, processing) {
if (tool) {
tool.set("processing", processing);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_querybuilder/config/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Bundle-SymbolicName": "querybuilder-config",
"Bundle-Version": "3.1.0",
"Bundle-Version": "3.1.2",
"Bundle-Name": "${bundleName}",
"Bundle-Description": "${bundleDescription}",
"Bundle-Vendor": "con terra GmbH",
Expand Down
8 changes: 7 additions & 1 deletion src/main/js/bundles/dn_querybuilder/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Bundle-SymbolicName": "dn_querybuilder",
"Bundle-Version": "3.1.2-SNAPSHOT",
"Bundle-Version": "3.1.2",
"Bundle-Name": "${bundleName}",
"Bundle-Description": "${bundleDescription}",
"Bundle-Vendor": "con terra GmbH",
Expand Down Expand Up @@ -96,6 +96,12 @@
{
"name": "_replacer",
"providing": "dn_replacer.Replacer"
},
{
"name": "_tool",
"providing": "ct.tools.Tool",
"cardinality": "0..n",
"filter": "(toolRole=toolset)"
}]
}, {
"name": "UserQueryBuilderWidgetFactory",
Expand Down

0 comments on commit 761358b

Please sign in to comment.