[Mapbender-commits] r8634 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri May 31 00:56:50 PDT 2013
Author: armin11
Date: 2013-05-31 00:56:50 -0700 (Fri, 31 May 2013)
New Revision: 8634
Modified:
trunk/mapbender/http/javascripts/mod_loadwmc.js
Log:
Alter loadwmc to delete divs when new divs are opened.
Modified: trunk/mapbender/http/javascripts/mod_loadwmc.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_loadwmc.js 2013-05-30 12:47:12 UTC (rev 8633)
+++ trunk/mapbender/http/javascripts/mod_loadwmc.js 2013-05-31 07:56:50 UTC (rev 8634)
@@ -238,6 +238,7 @@
this.hideWmcXml = function () {
if($('.wmcDisplayPopup').size() > 0) {
$('.wmcDisplayPopup').dialog('destroy');
+ $('.wmcDisplayPopup').remove();
}
};
//next function is obsolete
@@ -263,8 +264,8 @@
};
//following is added to give a window with an integrated link which can be included in external applications
this.showApiUrl = function (url) {
- this.hideApiUrl();
- var $wmcApiUrlPopup = $('<div id="api_url"><input size="35" type="text" value="' + url + '"/></div>');
+ that.hideApiUrl();
+ var $wmcApiUrlPopup = $('<div class="wmcApiUrlPopup" id="api_url"><input size="35" type="text" value="' + url + '"/></div>');
$wmcApiUrlPopup.dialog({
title: translatedI18nObject.labelOpenLayersUrl,
bgiframe: true,
@@ -278,8 +279,8 @@
this.hideApiUrl = function () {
if($('.wmcApiUrlPopup').size() > 0) {
- $('.wmcApiUrlUrlPopup').dialog('destroy');
- $('#api_url').remove();
+ $('.wmcApiUrlPopup').dialog('destroy');
+ $('.wmcApiUrlPopup').remove();
}
};
@@ -292,7 +293,7 @@
olUrl = mobileUrl + "php/mod_wmc2ol.php?wmc_id=" + id ;
mobileUrl = mobileUrl + "extensions/mobilemap/map.php?wmcid=" + id ;
//initialize dialog
- var $wmcApiDialog = $('<div id="api_dialog"></div>');
+ var $wmcApiDialog = $('<div class="wmcApiDialog" id="api_dialog"></div>');
$wmcApiDialog.dialog({
title: translatedI18nObject.labelApi,
bgiframe: true,
@@ -300,7 +301,10 @@
modal: false,
width: 350,
height: 90,
- pos: [600,40]
+ pos: [600,40],
+ close: function (){
+ that.hideDependendWindows();
+ }
});
//generate API options
$apiTable = $('<table>');
@@ -360,9 +364,8 @@
this.hideApiList = function () {
if($('.wmcApiDialog').size() > 0) {
$('.wmcApiDialog').dialog('destroy');
+ $('.wmcApiDialog').remove();//
}
- $('#api_dialog').remove();//link to url
- this.hideApiUrl();
};
//end of the link-handle popup
More information about the Mapbender_commits
mailing list