[Mapbender-commits] r3452 - branches/print_dev/http/print
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jan 14 12:17:24 EST 2009
Author: mschulz
Date: 2009-01-14 12:17:24 -0500 (Wed, 14 Jan 2009)
New Revision: 3452
Added:
branches/print_dev/http/print/mod_printPDF_div.php
Log:
initial checkin gui module
Added: branches/print_dev/http/print/mod_printPDF_div.php
===================================================================
--- branches/print_dev/http/print/mod_printPDF_div.php (rev 0)
+++ branches/print_dev/http/print/mod_printPDF_div.php 2009-01-14 17:17:24 UTC (rev 3452)
@@ -0,0 +1,50 @@
+<?php
+# $Id: mod_printPDF.php
+# http://www.mapbender.org/index.php/mod_printPDF.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.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+include(dirname(__FILE__)."/../include/dyn_js.php");
+
+echo "var myTarget = '".$e_target[0]."';";
+echo "var myId = '".$e_id."';";
+?>
+var exists = false;
+
+eventInit.register(function () {
+ mod_printPDF_init();
+});
+
+function mod_printPDF_init() {
+ /* first we'd need to read the json configuration */
+ $.get("../print/testConfigTemplate.json", function(json, status){
+ var obj = eval('(' + json + ')');
+ buildForm(obj);
+ });
+}
+
+function buildForm(json) {
+ /* first let's build some defaults then the stuff from config */
+
+ for (var element in json.controls) {
+ var element_id = myId + "_" + json.controls[element].id;
+ var str = '<label for="'+element_id+'">'+json.controls[element].label+'</label>';
+ str += '<input type="'+json.controls[element].type+'" id="'+element_id+'" size="'+json.controls[element].size+'">';
+ $("#"+myId).append(str);
+ }
+}
\ No newline at end of file
More information about the Mapbender_commits
mailing list