[Mapbender-commits] r9536 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jul 11 02:15:26 PDT 2016


Author: armin11
Date: 2016-07-11 02:15:25 -0700 (Mon, 11 Jul 2016)
New Revision: 9536

Modified:
   trunk/mapbender/http/javascripts/mod_addWMS.php
   trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js
Log:
Fix for wrong commit

Modified: trunk/mapbender/http/javascripts/mod_addWMS.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_addWMS.php	2016-07-11 09:12:29 UTC (rev 9535)
+++ trunk/mapbender/http/javascripts/mod_addWMS.php	2016-07-11 09:15:25 UTC (rev 9536)
@@ -45,7 +45,6 @@
     return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900
 -\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
 }
 
-<<<<<<< .mine
 function paramterbuild(url){
     if(url.indexOf("?") == -1){
         url += '?';
@@ -90,52 +89,6 @@
     dialogContainer.dialog({title: "WebMapService hinzufügen"});
 }
 
-=======
-function paramterbuild(url){
-    if(url.indexOf("?") == -1){
-        url += '?';
-    }
-    //if (url.indexOf("VERSION=") == -1) {
-      //  url += '&VERSION=9.9.9';
-    //}
-    if(url.indexOf("REQUEST=") == -1){
-        url += '&REQUEST=GetCapabilities';
-    }
-    if (url.indexOf("SERVICE=") == -1){
-        url += '&SERVICE=WMS';
-    }
-
-    return url;
-}
-
-function mod_addWMS() {
-    var dialogContainer = $("<form/>")
-    var input = $("<input type='text' name='test'/>");
-    var label = "<div>Capabilities - URL:</div>";
-    var submitButton = $("<input type='submit' title='Speichern'/>");
-
-    submitButton.click(function ( event ) {
-        dialogContainer.dialog("close");
-        event.preventDefault();
-        var url = input.val().trim();
-        if (validateUrl(url)) {
-            mod_addWMS_load(paramterbuild(url));
-        } else {
-            input.css({border: '1px solid #FF435C'});
-            //input.addClass()
-            //debugger;
-            dialogContainer.dialog({title: "Es handelt sich nicht um eine URL."});
-        }
-    });
-
-    dialogContainer.append(label);
-    dialogContainer.append(input);
-    dialogContainer.append(submitButton);
-
-    dialogContainer.dialog({title: "WebMapService hinzufügen"});
-}
-
->>>>>>> .r9534
 function base64_encode(data) {
    // Encodes string using MIME base64 algorithm
    //

Modified: trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js	2016-07-11 09:12:29 UTC (rev 9535)
+++ trunk/mapbender/http/javascripts/mod_addWMSgeneralFunctions.js	2016-07-11 09:15:25 UTC (rev 9536)
@@ -102,7 +102,6 @@
     return url;
 }
 var mod_addWms_general = function (js, param) {
-<<<<<<< .mine
     var ind = getMapObjIndexByName('mapframe1');
     var map = mb_mapObj[ind];
     var success = false;
@@ -169,74 +168,6 @@
     mb_execloadWmsSubFunctions({
         wms: map.wms.length > 0 ? map.wms[map.wms.length - 1] : null
     });
-=======
-    var ind = getMapObjIndexByName('mapframe1');
-    var map = mb_mapObj[ind];
-    var success = false;
-    if (js) {
-        var oldWmsCount = wms.length;
-        eval(js);
-        if (errorcall) {
-            var errorcall = errorcall.split("|");
-            var dialogContainer = $("<form/>");
-            if (errorcall[0] == "null") {
-                errorcall[0] = "Fehler";
-            }
-            var input = $("<input type='text' value='" + errorcall[1] + "' name='test'/>");
-            var label = "<div>" + errorcall[0] + "</div>";
-            var submitButton = $("<input type='submit' title='Speichern'/>");
-            submitButton.click(function (event) {
-                dialogContainer.dialog("close");
-                event.preventDefault();
-                var urlError = input.val();
-                if (validateUrl(urlError)) {
-                    mod_addWMS_load(paramterbuild(url));
-                } else {
-                    input.css({border: '1px solid #FF435C'});
-                    dialogContainer.dialog({title: "Es handelt sich nicht um eine URL."});
-                }
-            });
-            dialogContainer.append(label);
-            dialogContainer.append(input);
-            dialogContainer.append(submitButton);
-            dialogContainer.dialog({title: "WebMapService konnte nicht geladen werden"});
-        }
-        var newWmsCount = wms.length;
-        if (newWmsCount > oldWmsCount) {
-            success = true;
-            mb_mapObjaddWMS('mapframe1');
-            var lastwms = map.wms[map.wms.length - 1];
-            if (param && param.options && typeof param.options.zoomToExtent === "number" && param.options.zoomToExtent === 1) {
-                // zoom to bbox
-                var bbox_minx, bbox_miny, bbox_maxx, bbox_maxy;
-                for (var i = 0; i < lastwms.gui_epsg.length; i++) {
-                    if (map.epsg == lastwms.gui_epsg[i]) {
-                        bbox_minx = parseFloat(lastwms.gui_minx[i]);
-                        bbox_miny = parseFloat(lastwms.gui_miny[i]);
-                        bbox_maxx = parseFloat(lastwms.gui_maxx[i]);
-                        bbox_maxy = parseFloat(lastwms.gui_maxy[i]);
-                        if (bbox_minx === null || bbox_miny === null || bbox_maxx === null || bbox_maxy === null) {
-                            continue;
-                        }
-                        map.calculateExtent(new Mapbender.Extent(bbox_minx, bbox_miny, bbox_maxx, bbox_maxy));
-                        map.setMapRequest();
-                        break;
-                    }
-                }
-            }
-        }
-    }
-    if (typeof param === "object"
-        && typeof param.callback === "function"
-        && typeof param.options === "object"
-    ) {
-        param.options.success = success;
-        param.callback(param.options);
-    }
-    mb_execloadWmsSubFunctions({
-        wms: map.wms.length > 0 ? map.wms[map.wms.length - 1] : null
-    });
->>>>>>> .r9534
 };
 function mod_addWMSById_ajax(gui_id, wms_id, param) {
     var options = {



More information about the Mapbender_commits mailing list