[Mapbender-commits] r8319 - branches/2.7/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Apr 19 03:24:36 EDT 2012
Author: verenadiewald
Date: 2012-04-19 00:24:36 -0700 (Thu, 19 Apr 2012)
New Revision: 8319
Modified:
branches/2.7/http/plugins/mb_button.js
Log:
set dialog width and height using element vars for button element
Modified: branches/2.7/http/plugins/mb_button.js
===================================================================
--- branches/2.7/http/plugins/mb_button.js 2012-04-19 07:07:33 UTC (rev 8318)
+++ branches/2.7/http/plugins/mb_button.js 2012-04-19 07:24:36 UTC (rev 8319)
@@ -33,8 +33,24 @@
* 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
+ * 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('<app_id>','<button_module_id>',2,1,'button to start some module in a dialog',
+ * > 'titel of the module to open in the dialog','img','../img/button_blink_red/preferences_off.png','',
+ * > 170,60,24,24,1,'','','','../plugins/mb_button.js','','<id of the module to open in a dialog>',
+ * > '','http://www.mapbender.org/index.php/mb_button');
+ * >
+ * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value,
+ * > context, var_type) VALUES('gui1', '<button_module_id>', 'dialogWidth', '400', '' ,'var');
+ * >
*/
+options.dialogWidth = typeof options.dialogWidth === "number" ? options.dialogWidth : "220";
+options.dialogHeight = typeof options.dialogHeight === "number" ? options.dialogHeight : "250";
+
var $button = $(this);
var ButtonApi = function (o) {
@@ -44,8 +60,6 @@
o.$target : $([]);
var dialog = target.css({
position: "static",
- width: "auto",
- height: "auto",
top: "auto",
left: "auto"
}).hide().dialog({
@@ -56,6 +70,8 @@
var openDialog = function () {
dialog.dialog("open");
+ dialog.dialog({ height: options.dialogHeight });
+ dialog.dialog({ width: options.dialogWidth });
button.stop();
};
More information about the Mapbender_commits
mailing list