MediaPicker: Fix routes wrt creating folders at the default path

--HG--
branch : dev
This commit is contained in:
Dave Reed
2011-02-22 11:50:21 -08:00
parent 1c09a89280
commit 1b1f57b6c4
2 changed files with 2 additions and 2 deletions

View File

@@ -57,7 +57,7 @@
});
$("#createFolder").live("click", function () {
$.post("MediaPicker/Admin/CreateFolder", { path: query("mediaPath"), folderName: $("#folderName").val(), __RequestVerificationToken: $("#__requesttoken").val() },
$.post("MediaPicker/CreateFolder", { path: query("mediaPath") || "", folderName: $("#folderName").val(), __RequestVerificationToken: $("#__requesttoken").val() },
function (response) {
if (typeof response === "string") {
alert(response);

View File

@@ -16,7 +16,7 @@
var adminIndex = location.href.toLowerCase().indexOf("/admin/");
if (adminIndex === -1) return;
var url = location.href.substr(0, adminIndex)
+ "/MediaPicker/Admin?uploadpath=" + (data.uploadMediaPath || "")
+ "/Admin/MediaPicker?uploadpath=" + (data.uploadMediaPath || "")
+ "&callback=" + callbackName
+ "&editmode=" + (!!(data.img && data.img.src))
+ "&" + (new Date() - 0);