[Mapbender-commits] r7723 - in trunk/mapbender: core http/javascripts resources/db/pgsql/UTF-8/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Mar 28 15:27:01 EDT 2011


Author: marc
Date: 2011-03-28 12:27:01 -0700 (Mon, 28 Mar 2011)
New Revision: 7723

Modified:
   trunk/mapbender/core/system.php
   trunk/mapbender/http/javascripts/mod_toggleModule.php
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7rc1_to_2.7rc2_pgsql_UTF-8.sql
Log:
fix for ticket #795

Modified: trunk/mapbender/core/system.php
===================================================================
--- trunk/mapbender/core/system.php	2011-03-28 19:16:52 UTC (rev 7722)
+++ trunk/mapbender/core/system.php	2011-03-28 19:27:01 UTC (rev 7723)
@@ -72,7 +72,7 @@
 	"md_editor_navigation,md_editor_search_data,md_editor_result_data,metadata_create_data,".
 	"metadata_create_service,metadata_create_application,mb_md_selectAction,mb_md_editMetadataByData,mb_md_path," . 
 	"mb_md_editMetadataByService,mb_md_editMetadataByApplication,md_editor_xml_import," . 
-	"muenster_setExtRequest,muenster_toolbar,csvUpload,md_editor_xml_import_service"
+	"muenster_setExtRequest,muenster_toolbar,csvUpload,md_editor_xml_import_service,toggleModule"
 );
 
 

Modified: trunk/mapbender/http/javascripts/mod_toggleModule.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_toggleModule.php	2011-03-28 19:16:52 UTC (rev 7722)
+++ trunk/mapbender/http/javascripts/mod_toggleModule.php	2011-03-28 19:27:01 UTC (rev 7723)
@@ -1,27 +1,37 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_toggleModule.php
-# Copyright (C) 2002 CCGIS 
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+/**
+ * Package: toggleModule
+ *
+ * Description:
+ * activate a module after the application has loaded (started).
+ * Just define the "id" of the module you like to trigger under the target field.
+ *
+ * Files:
+ *  - http/javascripts/mod_toggleModule.php
+ *
+ * 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('<gui_id>','toggleModule',1,1,'',
+ * > '','div','','',1,1,1,1,2,'','','div','mod_toggleModule.php','','pan1','','');
+ *
+ * Help:
+ * http://www.mapbender.org/ToggleModule
+ *
+ * Maintainer:
+ * http://www.mapbender.org/User:Marc_Manns
+ *
+ * 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
+ */
+ 
+function mod_toggleModule_init(){
+	$("#" + options.target).trigger('click');
+}
 
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-echo "var mod_toggleModule ='".$e_target[0]."';"; 
-?>
-mb_registerInitFunctions('mod_toggleModule_init()');
-function mod_toggleModule_init(){
-	mb_regButton(mod_toggleModule);
-	mb_button_click(0);	
-}
\ No newline at end of file
+Mapbender.events.afterInit.register(function (){
+	mod_toggleModule_init();
+});
\ No newline at end of file

Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7rc1_to_2.7rc2_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7rc1_to_2.7rc2_pgsql_UTF-8.sql	2011-03-28 19:16:52 UTC (rev 7722)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7rc1_to_2.7rc2_pgsql_UTF-8.sql	2011-03-28 19:27:01 UTC (rev 7723)
@@ -1774,6 +1774,10 @@
   ORDER BY f.fkey_mb_group_id, f.fkey_mb_user_id;
 --*****end of role concept****
 
+--
+-- Fix for ticket #795
+--
+UPDATE gui_element SET e_target = 'pan1' WHERE e_id = 'toggleModule';
 
 
 



More information about the Mapbender_commits mailing list