[Mapbender-commits] r7684 - in branches/marc_dev: core http/javascripts resources/db/pgsql/UTF-8/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Mar 3 16:54:06 EST 2011


Author: marc
Date: 2011-03-03 13:54:06 -0800 (Thu, 03 Mar 2011)
New Revision: 7684

Modified:
   branches/marc_dev/core/system.php
   branches/marc_dev/http/javascripts/mod_toggleModule.php
   branches/marc_dev/resources/db/pgsql/UTF-8/update/update_2.7rc1_to_2.7rc2_pgsql_UTF-8.sql
Log:
rewritten toggleModule. #795

Modified: branches/marc_dev/core/system.php
===================================================================
--- branches/marc_dev/core/system.php	2011-03-03 15:05:37 UTC (rev 7683)
+++ branches/marc_dev/core/system.php	2011-03-03 21:54:06 UTC (rev 7684)
@@ -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: branches/marc_dev/http/javascripts/mod_toggleModule.php
===================================================================
--- branches/marc_dev/http/javascripts/mod_toggleModule.php	2011-03-03 15:05:37 UTC (rev 7683)
+++ branches/marc_dev/http/javascripts/mod_toggleModule.php	2011-03-03 21:54:06 UTC (rev 7684)
@@ -1,27 +1,31 @@
-<?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
+ */
 
-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
+	$("#" + options.target).trigger('click') ;
+}
+
+Mapbender.events.afterInit.register(function (){
+	mod_toggleModule_init();
+});
\ No newline at end of file

Modified: branches/marc_dev/resources/db/pgsql/UTF-8/update/update_2.7rc1_to_2.7rc2_pgsql_UTF-8.sql
===================================================================
--- branches/marc_dev/resources/db/pgsql/UTF-8/update/update_2.7rc1_to_2.7rc2_pgsql_UTF-8.sql	2011-03-03 15:05:37 UTC (rev 7683)
+++ branches/marc_dev/resources/db/pgsql/UTF-8/update/update_2.7rc1_to_2.7rc2_pgsql_UTF-8.sql	2011-03-03 21:54:06 UTC (rev 7684)
@@ -1684,7 +1684,7 @@
 
 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('admin1','deleteCategory',2,1,'Delete application category','Delete application category','a','','href = "../php/mod_deleteCategory.php?sessionID" target = "AdminFrame" ',8,1065,190,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Delete application category','a','','','','AdminFrame','http://www.mapbender.org/GUI_Category');
 
-------
+--
 -- Insert deleteCategory into new Administration
 --
 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('Administration_DE','deleteCategory',2,1,'Anwendungskategorie löschen','Anwendungskategorie löschen','a','','href = "../php/mod_deleteCategory.php?sessionID"',80,15,210,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Anwendungskategorie löschen','a','','','','','http://www.mapbender.org/GUI_Category');
@@ -1704,3 +1704,8 @@
 
 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('Administration','deleteCategory_icon',2,1,'icon','','img','../img/gnome/deleteCategories.png','',0,0,NULL ,NULL ,2,'','','','','','','','');
 
+--
+-- Fix for ticket #795
+--
+UPDATE gui_element SET e_target = 'pan1' WHERE e_id = 'toggleModule';
+



More information about the Mapbender_commits mailing list