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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Feb 25 08:25:58 EST 2010


Author: kmq
Date: 2010-02-25 08:25:57 -0500 (Thu, 25 Feb 2010)
New Revision: 5672

Modified:
   trunk/mapbender/http/plugins/jq_upload.js
Log:
made upload url of jq_upload configurable

Modified: trunk/mapbender/http/plugins/jq_upload.js
===================================================================
--- trunk/mapbender/http/plugins/jq_upload.js	2010-02-25 13:19:19 UTC (rev 5671)
+++ trunk/mapbender/http/plugins/jq_upload.js	2010-02-25 13:25:57 UTC (rev 5672)
@@ -1,5 +1,6 @@
 $.fn.upload = function (args) {
 	return this.each(function () {
+
 		var options = args || {};
 		var $this = $(this);
 		$this.append();
@@ -9,9 +10,11 @@
 		var timeinterval = options.interval || 200;
 		// we want the default to be true, and we want the user to be able to write {displaySubmit: false}
 		var displaySubmit = options.displaySubmit? true : false;
+		var url = options.url || "../plugins/jq_upload.php";
 
 		var startUpload = function () {
 			var t = setInterval(function () {
+				console.log("checking...");
 				var returnValue = window.frames[id + "_target"].id;
 				time += timeinterval;
 				if (typeof returnValue !== "undefined") {
@@ -55,7 +58,7 @@
 		};
 
 		var $form = $(
-			"<form action='../plugins/jq_upload.php?id=" + id + "' method='post' " + 
+			"<form action='"+ url  +"?id=" + id + "' method='post' " + 
 			"enctype='multipart/form-data' target='" + id + "_target'>" + 
 			"</form>"
 		).submit(function () {



More information about the Mapbender_commits mailing list