Fix link origin in sframe upload table

pull/1/head
yflory 7 years ago
parent 92c808812a
commit 1d7683503f

@ -28,6 +28,11 @@
td {
padding: @upload_pad_h @upload_pad_v;
}
.cp-fileupload-table-link {
.fa {
margin-right: 5px;
}
}
.cp-fileupload-table-progress {
width: 200px;
position: relative;

@ -51,9 +51,7 @@ define([
$('<td>').text(Messages.cancel).appendTo($thead);
var createTableContainer = function ($body) {
console.log($body);
File.$container = $('<div>', { id: 'cp-fileupload' }).append($table).appendTo($body);
console.log('done');
return File.$container;
};
@ -114,10 +112,13 @@ define([
};
onComplete = function (href) {
var mdMgr = common.getMetadataMgr();
var origin = mdMgr.getPrivateData().origin;
$link.prepend($('<span>', {'class': 'fa fa-external-link'}));
$link.attr('href', href)
.click(function (e) {
e.preventDefault();
window.open($link.attr('href'), '_blank');
window.open(origin + $link.attr('href'), '_blank');
});
var title = metadata.name;
Cryptpad.log(Messages._getKey('upload_success', [title]));

Loading…
Cancel
Save