[Mapbender-commits] r4104 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jun 23 13:54:20 EDT 2009
Author: christoph
Date: 2009-06-23 13:54:20 -0400 (Tue, 23 Jun 2009)
New Revision: 4104
Modified:
trunk/mapbender/http/javascripts/map.php
trunk/mapbender/http/javascripts/mod_copyright.php
Log:
Modified: trunk/mapbender/http/javascripts/map.php
===================================================================
--- trunk/mapbender/http/javascripts/map.php 2009-06-23 17:47:28 UTC (rev 4103)
+++ trunk/mapbender/http/javascripts/map.php 2009-06-23 17:54:20 UTC (rev 4104)
@@ -23,7 +23,7 @@
$json = new Mapbender_JSON();
// see http://trac.osgeo.org/mapbender/ticket/79
-ini_set('session.bug_compat_42',0);
+ini_set('session.bug_compat_42',0);
ini_set('session.bug_compat_warn',0);
/*
@@ -76,8 +76,8 @@
// Load external JavaScript libraries
//
$extPath = dirname(__FILE__) . "/../extensions/";
-$extFileArray = array( "jquery-1.2.6.min.js",
- "jqjson.js",
+$extFileArray = array( "jquery-1.2.6.min.js",
+ "jqjson.js",
"jquery.mousewheel.min.js",
"jquery.form.js");
@@ -96,7 +96,7 @@
?>
$(function () {
initModules();
-
+
// creates the map objects (mapframe1, overview...)
eventInitMap.trigger();
@@ -104,17 +104,17 @@
// initialisation
eventInit.trigger();
-
+
eventAfterInit.trigger();
-
+
});
<?php
//
// Load internal JavaScript libraries
//
$libPath = dirname(__FILE__) . "/../../lib/";
-$libFileArray = array( "exception.js",
- "ajax.js",
+$libFileArray = array( "exception.js",
+ "ajax.js",
"basic.js",
"div.js",
"list.js",
@@ -166,10 +166,10 @@
$modulesNotRelyingOnGlobalsArray = explode(",", MODULES_NOT_RELYING_ON_GLOBALS);
?>
-Mapbender.Modules = {};
+Mapbender.modules = {};
Mapbender.addModule = function (name, obj) {
- if (name && !Mapbender.Modules[name]) {
- Mapbender.Modules[name] = obj;
+ if (name && !Mapbender.modules[name]) {
+ Mapbender.modules[name] = obj;
return true;
}
return false;
@@ -203,20 +203,19 @@
}
if (in_array($e_id, $modulesNotRelyingOnGlobalsArray)) {
ob_start();
- echo "var options = {" .
- "id:'$e_id'," .
+ echo "var options = {" .
+ "id:'$e_id'," .
"target:" . ($e_target[0] != "" ? $json->encode($e_target) : "[]") . "," .
- "top:$e_top," .
- "left:$e_left," .
- "width:$e_width," .
- "height:$e_height," .
- "requires:'$e_require'," .
- "src:'$e_src'" .
+ "top:$e_top," .
+ "left:$e_left," .
+ "width:$e_width," .
+ "height:$e_height," .
+ "src:'$e_src'" .
"};";
include "../include/dyn_js_object.php";
echo <<<JS
-
+
$.fn.$e_id = function (options) {
return this.each(function () {
@@ -231,11 +230,12 @@
echo "$('#$e_id').$e_id(options);";
$executeJsPluginsArray[] = ob_get_contents();
ob_end_clean();
+ echo "Mapbender.modules.$e_id = {};\n";
+
echo "Mapbender.Modules.$e_id = {};\n";
-
}
else {
- echo "Mapbender.Modules." . $e_id . " = {\n";
+ echo "Mapbender.modules." . $e_id . " = {\n";
echo "id:'".$row_js["e_id"]."',";
echo "url:'".$row_js["e_url"]."',";
echo "top:'".$row_js["e_top"]."',";
Modified: trunk/mapbender/http/javascripts/mod_copyright.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_copyright.php 2009-06-23 17:47:28 UTC (rev 4103)
+++ trunk/mapbender/http/javascripts/mod_copyright.php 2009-06-23 17:54:20 UTC (rev 4104)
@@ -38,7 +38,7 @@
mod_copyright();
});
function mod_copyright(){
- var myMapObj = Mapbender.Modules[mod_copyright_target];
+ var myMapObj = Mapbender.modules[mod_copyright_target];
var str_c = "<div>";
str_c += "<img src='../img/transparent.gif' width ='"+myMapObj.width+"' height='"+myMapObj.height+"'>";
More information about the Mapbender_commits
mailing list