[Mapbender-commits] r7927 - in trunk/mapbender: http/plugins
resources/db/pgsql/UTF-8/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jul 11 08:54:01 EDT 2011
Author: verenadiewald
Date: 2011-07-11 05:54:01 -0700 (Mon, 11 Jul 2011)
New Revision: 7927
Modified:
trunk/mapbender/http/plugins/mb_button.js
trunk/mapbender/http/plugins/mb_print.php
trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.1_to_2.7.2_pgsql_UTF-8.sql
Log:
http://trac.osgeo.org/mapbender/ticket/827 + remove printbox if print dialog is closed + change scale in textfield (always became 0)
Modified: trunk/mapbender/http/plugins/mb_button.js
===================================================================
--- trunk/mapbender/http/plugins/mb_button.js 2011-07-11 12:43:46 UTC (rev 7926)
+++ trunk/mapbender/http/plugins/mb_button.js 2011-07-11 12:54:01 UTC (rev 7927)
@@ -50,8 +50,9 @@
left: "auto"
}).hide().dialog({
autoOpen: false,
- position: o.position
- });
+ position: o.position,
+ dialogClass: o.target + "-dialog"
+ });
var openDialog = function () {
dialog.dialog("open");
Modified: trunk/mapbender/http/plugins/mb_print.php
===================================================================
--- trunk/mapbender/http/plugins/mb_print.php 2011-07-11 12:43:46 UTC (rev 7926)
+++ trunk/mapbender/http/plugins/mb_print.php 2011-07-11 12:54:01 UTC (rev 7927)
@@ -26,8 +26,24 @@
* > var_value, context, var_type) VALUES('<appId>', 'printPDF',
* > 'mbPrintConfig', '{"Standard": "mapbender_template.json"}', '' ,'var');
* >
- * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name,
- * > var_value, context, var_type) VALUES('<appId>', 'body',
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name,
+ * > var_value, context, var_type) VALUES('<appId>', 'printPDF',
+ * > 'unlink', 'true', 'delete print pngs after pdf creation' ,'php_var');
+ * >
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name,
+ * > var_value, context, var_type) VALUES('<appId>', 'printPDF',
+ * > 'logRequests', 'false', 'log wms requests for debugging' ,'php_var');
+ * >
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name,
+ * > var_value, context, var_type) VALUES('<appId>', 'printPDF',
+ * > 'logType', 'file', 'log mode can be set to file or db' ,'php_var');
+ * >
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name,
+ * > var_value, context, var_type) VALUES('<appId>', 'printPDF',
+ * > 'timeout', '90000', 'define maximum seconds to wait for print request finished' ,'var');
+ * >
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name,
+ * > var_value, context, var_type) VALUES('<appId>', 'body',
* > 'print_css', '../css/print_div.css', '' ,'file/css');
*
* Help:
@@ -211,6 +227,11 @@
that.loadConfig(mbPrintConfigFilenames[0]);
/* than we need the translation of the print button */
$("#submit").val("<?php echo htmlentities(_mb("print"), ENT_QUOTES, "UTF-8");?>");
+
+ //destroy printBox if printDialog is closed
+ $("."+myId+"-dialog").bind("dialogclose", function () {
+ destroyPrintBox();
+ });
};
/**
@@ -244,7 +265,13 @@
type: 'post',
dataType: 'json',
beforeSubmit: validate,
- success: showResult
+ success: showResult,
+ timeout: options.timeout ? options.timeout : 90000,
+ error: function() {
+ showHideWorking("hide");
+ alert("Timeout of " + Math.round(options.timeout/1000) + " seconds reached. Print was aborted.");
+ destroyPrintBox();
+ }
};
$("#"+myId+"_form").ajaxForm(o);
};
@@ -532,7 +559,7 @@
if (e.keyCode === 13) {
return false;
}
- }).keyup(function (e) {
+ }).blur(function (e) {
if (e.keyCode === 13) {
return false;
}
Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.1_to_2.7.2_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.1_to_2.7.2_pgsql_UTF-8.sql 2011-07-11 12:43:46 UTC (rev 7926)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.1_to_2.7.2_pgsql_UTF-8.sql 2011-07-11 12:54:01 UTC (rev 7927)
@@ -102,14 +102,21 @@
NOT IN (SELECT fkey_gui_id FROM gui_element_vars
WHERE var_name = 'logRequests' AND fkey_e_id = 'printPDF');
--- new element var logRequests for gui element template printPDF
+-- new element var logType for gui element template printPDF
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type)
SELECT gui_element.fkey_gui_id, 'printPDF', 'logType', 'file', 'log mode can be set to file or db' ,'php_var'
FROM gui_element WHERE gui_element.e_id = 'printPDF' AND gui_element.e_js_file = '../plugins/mb_print.php' AND gui_element.fkey_gui_id
NOT IN (SELECT fkey_gui_id FROM gui_element_vars
WHERE var_name = 'logType' AND fkey_e_id = 'printPDF');
+-- new element var timeout for gui element template printPDF
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type)
+SELECT gui_element.fkey_gui_id, 'printPDF', 'timeout', '90000', 'define maximum seconds to wait for print request finished' ,'var'
+FROM gui_element WHERE gui_element.e_id = 'printPDF' AND gui_element.e_js_file = '../plugins/mb_print.php' AND gui_element.fkey_gui_id
+NOT IN (SELECT fkey_gui_id FROM gui_element_vars
+WHERE var_name = 'timeout' AND fkey_e_id = 'printPDF');
+
--
-- mb_metadata
-- new column responsible_party_name
More information about the Mapbender_commits
mailing list