[Mapbender-commits] r6144 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon May 10 07:53:01 EDT 2010
Author: christoph
Date: 2010-05-10 07:53:01 -0400 (Mon, 10 May 2010)
New Revision: 6144
Added:
trunk/mapbender/http/plugins/mb_metadata_submit.js
Log:
Added: trunk/mapbender/http/plugins/mb_metadata_submit.js
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_submit.js (rev 0)
+++ trunk/mapbender/http/plugins/mb_metadata_submit.js 2010-05-10 11:53:01 UTC (rev 6144)
@@ -0,0 +1,32 @@
+var $submit = $(this);
+
+var MetadataSubmitApi = function () {
+ var that = this;
+ var formData = {};
+
+ var serializeCallback = function (data) {
+ formData = $.extend(formData, data);
+ };
+
+ this.submit = function () {
+ formData = {};
+ this.events.submit.trigger({
+ callback: serializeCallback
+ });
+ console.log(formData);
+ };
+
+ this.events = {
+ submit: new Mapbender.Event()
+ };
+
+ var init = function () {
+ $submit.find("input[type='submit']").bind("click", function () {
+ that.submit();
+ });
+ };
+
+ init();
+};
+
+$submit.mapbender(new MetadataSubmitApi());
More information about the Mapbender_commits
mailing list