attach fix download url

This commit is contained in:
life
2014-09-22 22:26:50 +08:00
parent 0e6f777402
commit 5a2274328b
3 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1335,12 +1335,12 @@ var Attach = {
self.attachListO.on("click", ".download-attach", function(e) {
e.stopPropagation();
var attachId = $(this).closest('li').data("id");
window.open("/attach/download?attachId=" + attachId);
window.open(UrlPrefix + "/attach/download?attachId=" + attachId);
// location.href = "/attach/download?attachId=" + attachId;
});
// 下载全部
self.downloadAllBtnO.click(function() {
window.open("/attach/downloadAll?noteId=" + Note.curNoteId);
window.open(UrlPrefix + "/attach/downloadAll?noteId=" + Note.curNoteId);
// location.href = "/attach/downloadAll?noteId=" + Note.curNoteId;
});
@ -1349,7 +1349,7 @@ var Attach = {
e.stopPropagation();
var attachId = $(this).closest('li').data("id");
var attach = self.attachsMap[attachId];
var src = "/attach/download?attachId=" + attachId;
var src = UrlPrefix + "/attach/download?attachId=" + attachId;
if(LEA.isMarkdownEditor() && MarkdownEditor) {
MarkdownEditor.insertLink(src, attach.Title);