Fix link origin in sframe upload table
This commit is contained in:
@@ -28,6 +28,11 @@
|
|||||||
td {
|
td {
|
||||||
padding: @upload_pad_h @upload_pad_v;
|
padding: @upload_pad_h @upload_pad_v;
|
||||||
}
|
}
|
||||||
|
.cp-fileupload-table-link {
|
||||||
|
.fa {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.cp-fileupload-table-progress {
|
.cp-fileupload-table-progress {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -51,9 +51,7 @@ define([
|
|||||||
$('<td>').text(Messages.cancel).appendTo($thead);
|
$('<td>').text(Messages.cancel).appendTo($thead);
|
||||||
|
|
||||||
var createTableContainer = function ($body) {
|
var createTableContainer = function ($body) {
|
||||||
console.log($body);
|
|
||||||
File.$container = $('<div>', { id: 'cp-fileupload' }).append($table).appendTo($body);
|
File.$container = $('<div>', { id: 'cp-fileupload' }).append($table).appendTo($body);
|
||||||
console.log('done');
|
|
||||||
return File.$container;
|
return File.$container;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -114,10 +112,13 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
onComplete = function (href) {
|
onComplete = function (href) {
|
||||||
|
var mdMgr = common.getMetadataMgr();
|
||||||
|
var origin = mdMgr.getPrivateData().origin;
|
||||||
|
$link.prepend($('<span>', {'class': 'fa fa-external-link'}));
|
||||||
$link.attr('href', href)
|
$link.attr('href', href)
|
||||||
.click(function (e) {
|
.click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
window.open($link.attr('href'), '_blank');
|
window.open(origin + $link.attr('href'), '_blank');
|
||||||
});
|
});
|
||||||
var title = metadata.name;
|
var title = metadata.name;
|
||||||
Cryptpad.log(Messages._getKey('upload_success', [title]));
|
Cryptpad.log(Messages._getKey('upload_success', [title]));
|
||||||
|
|||||||
Reference in New Issue
Block a user