[Mapbender-commits] r8267 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Feb 27 05:14:58 EST 2012
Author: armin11
Date: 2012-02-27 02:14:58 -0800 (Mon, 27 Feb 2012)
New Revision: 8267
Modified:
trunk/mapbender/http/plugins/mb_button.js
Log:
Extent the button module for open another element in an jquery dialog with predifined width and height sizes.
Modified: trunk/mapbender/http/plugins/mb_button.js
===================================================================
--- trunk/mapbender/http/plugins/mb_button.js 2012-02-27 10:13:55 UTC (rev 8266)
+++ trunk/mapbender/http/plugins/mb_button.js 2012-02-27 10:14:58 UTC (rev 8267)
@@ -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 : "auto";
+options.dialogHeight = typeof options.dialogHeight === "number" ? options.dialogHeight : "auto";
+
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();
};
@@ -69,4 +85,4 @@
});
};
-$button.mapbender(new ButtonApi(options));
\ No newline at end of file
+$button.mapbender(new ButtonApi(options));
More information about the Mapbender_commits
mailing list