[Mapbender-commits] r8268 - in trunk/mapbender/http: javascripts
plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Feb 27 07:51:51 EST 2012
Author: armin11
Date: 2012-02-27 04:51:51 -0800 (Mon, 27 Feb 2012)
New Revision: 8268
Modified:
trunk/mapbender/http/javascripts/mod_WMSpreferencesDiv.php
trunk/mapbender/http/plugins/mb_button.js
Log:
Some bugfixes.
Modified: trunk/mapbender/http/javascripts/mod_WMSpreferencesDiv.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_WMSpreferencesDiv.php 2012-02-27 10:14:58 UTC (rev 8267)
+++ trunk/mapbender/http/javascripts/mod_WMSpreferencesDiv.php 2012-02-27 12:51:51 UTC (rev 8268)
@@ -204,7 +204,12 @@
visibleWmsIndexArray[visibleWmsIndexArray.length] = i;
}
}
- //loop over all visible wms
+ //loop over all visible wms if reversed layer order is wished, reverse visibleWmsIndexArray
+ options.reversePreferences = true;
+ if (options.reversePreferences) {
+ visibleWmsIndexArray.reverse();
+ }
+ //
for (var i = 0 ; i < visibleWmsIndexArray.length ; i++) {
z = visibleWmsIndexArray[i];
@@ -273,7 +278,7 @@
this.wmsDown.attr({'src':'../img/button_gray/down.png'});
this.wmsDown.attr({'id':'wmsDown_'+i});
//this.wmsDown.attr({'style':'filter:Chroma(color=#C2CBCF);'});
- this.wmsDown.attr({'onclick':'alert("move up");'});
+ //this.wmsDown.attr({'onclick':'alert("move up");'});
this.wmsDown.attr({'value':'down'});
this.wmsDown.attr({'title':'move WMS down'});
$("#" + "wmsDown" + "_" + i).click((function (i,z) {
@@ -287,7 +292,7 @@
this.wmsRemove = $(document.createElement('img')).appendTo(this.columnContainer);
this.wmsRemove.attr({'src':'../img/button_gray/del.png'});
this.wmsRemove.attr({'id':'wmsRemove_'+i});
- this.wmsRemove.attr({'onclick':'alert("remove");'});
+ //this.wmsRemove.attr({'onclick':'alert("remove");'});
this.wmsRemove.attr({'value':'remove'});
this.wmsRemove.attr({'title':'remove WMS from GUI'});
$("#" + "wmsRemove" + "_" + i).click((function (z) {
@@ -349,7 +354,14 @@
this.transparencyValue = $(document.createElement('input')).appendTo(this.columnContainer);
this.transparencyValue.attr({'type':'text'});
this.transparencyValue.attr({'id':'transparency_'+wmsId});
- this.transparencyValue.attr({'value':100-(my.wms[visibleWmsIndexArray[i]].gui_wms_mapopacity*100)});
+
+ if (isNaN(my.wms[visibleWmsIndexArray[i]].gui_wms_mapopacity)) {
+ thisWmsOpacity = 0;
+ } else {
+ thisWmsOpacity = 100-(my.wms[visibleWmsIndexArray[i]].gui_wms_mapopacity*100);
+ }
+
+ this.transparencyValue.attr({'value':thisWmsOpacity});
this.transparencyValue.attr({'style':'border:0; color:#f6931f; font-weight:bold;'});
this.columnContainer = $(document.createElement('td')).appendTo(this.rowContainer);
@@ -361,7 +373,7 @@
min: 0,
max: 100,
step: 10,
- value: 100-(my.wms[visibleWmsIndexArray[i]].gui_wms_mapopacity*100),
+ value: thisWmsOpacity,
change: function( event, ui) {
that.refreshTransparency(visibleWmsIndexArray);
}
Modified: trunk/mapbender/http/plugins/mb_button.js
===================================================================
--- trunk/mapbender/http/plugins/mb_button.js 2012-02-27 10:14:58 UTC (rev 8267)
+++ trunk/mapbender/http/plugins/mb_button.js 2012-02-27 12:51:51 UTC (rev 8268)
@@ -48,8 +48,8 @@
* >
*/
-options.dialogWidth = typeof options.dialogWidth === "number" ? options.dialogWidth : "auto";
-options.dialogHeight = typeof options.dialogHeight === "number" ? options.dialogHeight : "auto";
+options.dialogWidth = typeof options.dialogWidth === "number" ? options.dialogWidth : "220";
+options.dialogHeight = typeof options.dialogHeight === "number" ? options.dialogHeight : "250";
var $button = $(this);
More information about the Mapbender_commits
mailing list