[Mapbender-commits] r5058 - branches/2.6/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Dec 2 05:03:03 EST 2009
Author: verenadiewald
Date: 2009-12-02 05:03:02 -0500 (Wed, 02 Dec 2009)
New Revision: 5058
Modified:
branches/2.6/http/javascripts/mod_digitize_tab.php
Log:
included eventFeatureInserted.trigger
Modified: branches/2.6/http/javascripts/mod_digitize_tab.php
===================================================================
--- branches/2.6/http/javascripts/mod_digitize_tab.php 2009-12-01 16:13:04 UTC (rev 5057)
+++ branches/2.6/http/javascripts/mod_digitize_tab.php 2009-12-02 10:03:02 UTC (rev 5058)
@@ -72,6 +72,7 @@
var mapWindow;
var mapDomElement;
var mapType = "";
+parent.eventFeatureInserted = new parent.MapbenderEvent();
parent.eventInit.register(function () {
var mapIndex = parent.getMapObjIndexByName(mod_digitize_target);
@@ -1771,8 +1772,9 @@
else {
wfsConf = parent.get_complete_wfs_conf();
}
+
var myconf = wfsConf[d.get(m).wfs_conf];
-
+
var mapObjInd = parent.getMapObjIndexByName(mod_digitize_target);
var proceed = true;
@@ -1844,9 +1846,19 @@
}
function wfsSubWrite(m, type, status, success, fid) {
+ wfsConf = parent.get_complete_wfs_conf();
+
if (status == "success" && success) {
if (type == 'insert' && fid) {
d.get(m).e.setElement("fid", fid);
+
+ var myGeoJson = d.featureToString(m);
+ parent.eventFeatureInserted.trigger({
+ 'fid' : fid,
+ 'wfsConfId' : wfsConf[d.get(m).wfs_conf]['wfs_conf_id'],
+ 'featureTypeName' : wfsConf[d.get(m).wfs_conf]['featuretype_name']
+ //'geoJson' : myGeoJson
+ });
}
if (type == 'delete') {
parent.mb_disableThisButton(mod_digitizeEvent);
@@ -1863,11 +1875,21 @@
executeDigitizeSubFunctions();
if (typeof(wfsWindow) != 'undefined' && !wfsWindow.closed) {
- wfsWindow.alert(wfsWriteMessage);
+ if (status !== "success" || !success) {
+ wfsWindow.alert(wfsWriteMessage);
+ }
+ else {
+ new parent.Mb_notice(wfsWriteMessage);
+ }
window.setTimeout("wfsWindow.close()",0);
}
else {
- alert(wfsWriteMessage);
+ if (status !== "success" || !success) {
+ alert(wfsWriteMessage);
+ }
+ else {
+ new parent.Mb_notice(wfsWriteMessage);
+ }
}
}
function getMultiGeometryIdsByPlacemarkId (placemarkId) {
More information about the Mapbender_commits
mailing list