[Mapbender-commits] r5078 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Dec 8 06:34:49 EST 2009


Author: christoph
Date: 2009-12-08 06:34:48 -0500 (Tue, 08 Dec 2009)
New Revision: 5078

Modified:
   trunk/mapbender/http/plugins/mb_wmsTimeSliderYear.js
Log:


Modified: trunk/mapbender/http/plugins/mb_wmsTimeSliderYear.js
===================================================================
--- trunk/mapbender/http/plugins/mb_wmsTimeSliderYear.js	2009-12-08 07:49:59 UTC (rev 5077)
+++ trunk/mapbender/http/plugins/mb_wmsTimeSliderYear.js	2009-12-08 11:34:48 UTC (rev 5078)
@@ -14,7 +14,7 @@
  * > e_mb_mod, e_target, e_requires, e_url) VALUES('<appId>',
  * > 'wmsTimeSliderYear',5,1,'sets the TIME parameter for all activated WMS (years only)',
  * > '','div','','',500,700,500,10,NULL ,'','','div',
- * > '../plugins/mb_wmsTimeSliderYear.js','','','jq_ui_slider','');
+ * > '../plugins/mb_wmsTimeSliderYear.js','','mapframe1','jq_ui_slider','');
  * >
  * > 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, 
@@ -91,14 +91,19 @@
 		max: options.yearMax,
 		value: options.yearDefault,
 		step: 1,
-		slide: function (event, ui) {
+		change: function (event, ui) {
 			Mapbender.modules[options.id].updated.trigger({
 				year: ui.value
 			});
+		},
+		slide: function (event, ui) {
+			Mapbender.modules[options.id].slided.trigger({
+				year: ui.value
+			});
 		}
 	});
 	
-	Mapbender.modules[options.id].updated.trigger({
+	Mapbender.modules[options.id].slided.trigger({
 		year: options.yearDefault
 	});
 });
@@ -131,10 +136,16 @@
 		}
 		return "TIME=" + formatDate(currentDate);
 	};
+	this.slided = new Mapbender.Event();
+	this.slided.register(function (obj) {
+		currentDate = new Date(obj.year, 1, 1);
+		$("#" + textId).text(obj.year);
+	});
 	this.updated = new Mapbender.Event();
 	this.updated.register(function (obj) {
 		currentDate = new Date(obj.year, 1, 1);
 		$("#" + textId).text(obj.year);
+		Mapbender.modules[options.target[0]].setMapRequest();
 	});
 };
 



More information about the Mapbender_commits mailing list