[Mapbender-commits] r4566 - in trunk/mapbender: core
http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Aug 28 09:36:31 EDT 2009
Author: christoph
Date: 2009-08-28 09:36:31 -0400 (Fri, 28 Aug 2009)
New Revision: 4566
Added:
trunk/mapbender/http/javascripts/mod_overviewToggle.js
Modified:
trunk/mapbender/core/system.php
Log:
http://trac.osgeo.org/mapbender/ticket/521
Modified: trunk/mapbender/core/system.php
===================================================================
--- trunk/mapbender/core/system.php 2009-08-28 13:35:50 UTC (rev 4565)
+++ trunk/mapbender/core/system.php 2009-08-28 13:36:31 UTC (rev 4566)
@@ -28,7 +28,7 @@
#
define("MB_RESOLUTION", "28.35");
define("MB_FEATURE_COUNT", "100");
-define("MB_SECURITY_PROXY", "http://wms1.ccgis.de/mapbender/tools/security_proxy.php?mb_ows_security_proxy=");
+define("MB_SECURITY_PROXY", "http://wms.wheregroup.com/mapbender/tools/security_proxy.php?mb_ows_security_proxy=");
#
# available log levels
#
@@ -40,5 +40,6 @@
"dynamicOverview,FeatureInfoRedirect,highlightPOI,navFrame,sandclock," .
"scaleBar,scaleSelect,setBBOX,setPOI2Scale,reload,overview,addWMS," .
"repaint,changeEPSG,User,AdminTabs,GroupEditor,GuiEditor,UserEditor,".
- "scalebar,dialogManager"
+ "scalebar,dialogManager,addWMSfromTree,mousewheelZoom,doubleclickZoom," .
+ "overviewToggle"
);
Added: trunk/mapbender/http/javascripts/mod_overviewToggle.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_overviewToggle.js (rev 0)
+++ trunk/mapbender/http/javascripts/mod_overviewToggle.js 2009-08-28 13:36:31 UTC (rev 4566)
@@ -0,0 +1,132 @@
+/**
+ * Package: overviewToggle
+ *
+ * Description:
+ * shows and hides the overview module with a jQuery animation
+ *
+ * Files:
+ * - http/javascripts/mod_overviewToggle.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>',
+ * > 'overviewToggle',5,1,'','','div','','class="ui-widget-header" ',
+ * > -1,-1,NULL ,NULL ,NULL ,
+ * > 'display:none;height:24px;width:35px;text-align:right;vertical-align:middle',
+ * > '<img style=''position:absolute;top:0px;left:0px'' src=''../img/ovtoggle.png'' /><span style=''padding:3px''>></span>',
+ * > 'div','../javascripts/mod_overviewToggle.js','','overview','','');
+ * >
+ * > INSERT INTO gui_element_vars (fkey_gui_id, fkey_e_id, var_name,
+ * > var_value, context, var_type) VALUES ('<app_id>', 'body',
+ * > 'overviewToggle_css', '../css/dialog/jquery-ui-1.7.2.custom.css',
+ * > '' ,'file/css');
+ *
+ * Help:
+ * http://www.mapbender.org/OverviewToggle
+ *
+ * Maintainer:
+ * http://www.mapbender.org/User:Christoph_Baudson
+ *
+ * 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
+ */
+
+var ovSwitchTarget = options.target[0];
+var ovSwitchId = options.id;
+
+var overview_visible = false;
+
+
+//▶
+//◀
+
+eventInit.register(function () {
+
+ var $ov = $("#" + ovSwitchTarget);
+ var $this = $("#" + ovSwitchId);
+ var $ovToggleButton = $("#" + ovSwitchId + " > span");
+ var overviewInitialWidth = $ov.width();
+ var overviewInitialHeight = $ov.height();
+ var overviewInitialTop = parseInt($ov.css("top"), 10);
+ var overviewLeft = parseInt($ov.css("left"), 10);
+ var overviewInitialOuterWidth = $ov.outerWidth();
+
+ $ov.css({
+ display:"block",
+ top: (overviewInitialTop + 26) + "px",
+ width: "0px",
+ borderWidth: "0px",
+ borderStyle: "solid",
+ borderColor: "#176798"
+ });
+
+ if (!overview_visible) {
+ $ov.css({
+ height: 0,
+ left: overviewLeft + "px"
+ });
+ }
+
+ $this.css({
+ display:"block",
+ left: overviewLeft + "px",
+ top: overviewInitialTop + "px",
+ zIndex: $ov.css("zIndex")
+ });
+
+ //set display to block as the frame is invisible anyway (width 0)
+ $ov.show();
+ $ovToggleButton.mouseover(function () {
+ this.style.cursor = "pointer";
+ }).mouseout(function () {
+ this.style.cursor = "default";
+ }).click(function(){
+ if(overview_visible){
+ //
+ // Hide
+ //
+ $ov.animate({
+ height: 0
+ }, "fast", "linear", function () {
+ $ov.css({
+ width: "0px",
+ borderWidth: "0px",
+ borderStyle: "solid",
+ borderColor: "#176798"
+ });
+ $this.animate({
+ width: 35
+ }, "fast", "linear", function () {
+ $ovToggleButton.text(">");
+ });
+ overview_visible = false;
+ });
+ }
+ else{
+ //
+ // Show
+ //
+ $this.animate({
+ width: overviewInitialWidth
+ }, "fast", "linear", function () {
+ $ov.css({
+ width: overviewInitialWidth,
+ borderWidth: "1px",
+ borderStyle: "solid",
+ borderColor: "#176798"
+ });
+ $ov.animate({
+ height: overviewInitialHeight
+ }, "fast", "linear", function () {
+ $ovToggleButton.text("<");
+ });
+ overview_visible = true;
+ });
+ }
+ });
+});
\ No newline at end of file
More information about the Mapbender_commits
mailing list