[Mapbender-commits] r6647 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jul 28 08:48:38 EDT 2010
Author: verenadiewald
Date: 2010-07-28 12:48:38 +0000 (Wed, 28 Jul 2010)
New Revision: 6647
Removed:
trunk/mapbender/http/plugins/mb_checkDigitizeDataDialog.js
Log:
removed mb_checkDigitizeDataDialog.js
Deleted: trunk/mapbender/http/plugins/mb_checkDigitizeDataDialog.js
===================================================================
--- trunk/mapbender/http/plugins/mb_checkDigitizeDataDialog.js 2010-07-27 14:21:46 UTC (rev 6646)
+++ trunk/mapbender/http/plugins/mb_checkDigitizeDataDialog.js 2010-07-28 12:48:38 UTC (rev 6647)
@@ -1,127 +0,0 @@
-/**
- * Package: checkDigitizeDataDialog
- *
- * Description:
- * Shows dialog for controlling inserted attribute data
- * before saving new digitize object
- *
- * Files:
- * - http/plugins/mb_checkDigitizeDataDialog.js
- *
- * SQL:
- * > INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment,
- * > e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height,
- * > e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod,
- * > e_target, e_requires, e_url) VALUES('<app_id>','checkDigitizeDataDialog',3,1,
- * > 'shows dialog before saving new digitize object','','div','','',NULL ,
- * > NULL ,NULL ,NULL ,NULL ,'','','div','../plugins/mb_checkDigitizeDataDialog.js',
- * > '','digitize','','');
- * >
- *
- *
- * Help:
- * http://www.mapbender.org/
- *
- * Maintainer:
- * http://www.mapbender.org/User:Verena_Diewald
- *
- * Parameters:
- *
- * License:
- * Copyright (c) 2009, Open Source Geospatial Foundation
- * This program is dual licensed under the GNU General Public License
- * and Simplified BSD license.
- * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
- */
-
-Mapbender.events.init.register(function () {
- var attachEventsToDigitize = function () {
-
- Mapbender.modules[options.target].dataCheck = true;
-
- Mapbender.modules[options.target].events.beforeUpdateOrInsert.register(function (obj) {
- var currentFeature = obj.feature;
- var currentWfsConf = obj.wfsConf;
- var digitizeData = [];
-
- for (var i=0; i < currentWfsConf.element.length; i++) {
- if (currentWfsConf.element[i].f_edit != 1) {
- continue;
- }
- var featureAttr = currentFeature.e.getElementValueByName(currentWfsConf.element[i].element_name);
- if(featureAttr === false) {
- var attrValue = "";
- }
- else{
- var attrValue = featureAttr;
- }
- digitizeData.push({
- key: currentWfsConf.element[i].f_label,
- value: attrValue
- });
- }
-
- if(Mapbender.modules[options.target].dataCheck) {
- var tableHtml = "<table>";
- for (var j=0; j < digitizeData.length; j++) {
- tableHtml += "<tr>";
- tableHtml += "<td>" + digitizeData[j].key + "</td>";
- tableHtml += "<td>" + digitizeData[j].value + "</td>";
- tableHtml += "</tr>";
- }
- tableHtml += "</table>";
- $("<div>" + tableHtml + "</div>").dialog({
- bgiframe: true,
- autoOpen: true,
- title: 'Kontrolle der eingegebenen Sachdaten:',
- modal: true,
- width: 400,
- height: 400,
- position: [600,600],
- buttons: {
- Speichern: function() {
- Mapbender.modules[options.target].dataCheck = false;
-
- var currentFeatureId = currentFeature.e.getElementValueByName("fid");
- var featureGIndex = -1;
-
- if (currentFeature !== null && currentFeatureId !== false && currentFeatureId !== undefined) {
- featureGIndex = obj.geometryIndex;
- currentFeature.e.setElement("fid", currentFeatureId);
- }
-
- window.frames[options.target].dbGeom(obj.method, featureGIndex, function () {}, currentWfsConf.wfs_conf_id);
- $(this).dialog('close');
- },
- Korrektur: function() {
- if (obj.method == "insert") {
- window.frames[options.target].wfsWindow.document.getElementById("featureTypeElementForm").saveButton.disabled = false;
- }
- else {
- window.frames[options.target].wfsWindow.document.getElementById("featureTypeElementForm").updateButton.disabled = false;
- }
- $(this).dialog('close');
- }
- }
- });
- }
- return false;
- });
-
- Mapbender.modules[options.target].events.afterWfs.register(function (obj) {
- Mapbender.modules[options.target].dataCheck = true;
- });
- };
-
- var tryToAttachEventsToDigitize = function () {
- if (typeof Mapbender.modules[options.target].events === "undefined") {
- setTimeout(tryToAttachEventsToDigitize, 3000);
- }
- else {
- attachEventsToDigitize();
- }
- };
-
- tryToAttachEventsToDigitize();
-
-});
\ No newline at end of file
More information about the Mapbender_commits
mailing list