|
@@ -145,6 +145,7 @@ function listData(folder = ""){
|
|
$('[data-class=inspect]',clone).attr('href','../storage/' + fullfolder + '');
|
|
$('[data-class=inspect]',clone).attr('href','../storage/' + fullfolder + '');
|
|
$('[data-class=delete]',clone).attr('href','javascript:deleteData("' + fullfolder + '");');
|
|
$('[data-class=delete]',clone).attr('href','javascript:deleteData("' + fullfolder + '");');
|
|
$('[data-class=getLink]',clone).attr('href','javascript:copy2Clipboard("' + fullfolder + '");');
|
|
$('[data-class=getLink]',clone).attr('href','javascript:copy2Clipboard("' + fullfolder + '");');
|
|
|
|
+ $('[data-class=createSymlink]',clone).attr('href','javascript:createSymlink("' + fullfolder + '", "' + value.slice(0, - (ext.length +1)) +'");');
|
|
|
|
|
|
|
|
|
|
var queryString = window.location.search;
|
|
var queryString = window.location.search;
|
|
@@ -228,6 +229,32 @@ function copy2Clipboard(datalink) {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+function createSymlink(datalink, oldfilename) {
|
|
|
|
+
|
|
|
|
+ var filename = prompt("Please enter symlink filename");
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (filename != null && filename != "") {
|
|
|
|
+ var sendfilename = {"filename": filename, "oldfilename": oldfilename}
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "POST",
|
|
|
|
+ data: JSON.stringify(sendfilename),
|
|
|
|
+ headers: {"content-id": "list"},
|
|
|
|
+ contentType: "application/json",
|
|
|
|
+ url: "../server/data/" + datalink,
|
|
|
|
+ success: function(res) {
|
|
|
|
+ },
|
|
|
|
+ error: function (request, status, error) {
|
|
|
|
+ alert(request.responseText + status + error);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
function getAllFolders(folder = ""){ //Get DB 2 HTML //has to be synchronus in order to update before loading the rest
|
|
function getAllFolders(folder = ""){ //Get DB 2 HTML //has to be synchronus in order to update before loading the rest
|
|
$('#selectfolders').find('option').remove()
|
|
$('#selectfolders').find('option').remove()
|
|
$('#selectfolders').append("<option>.</option>")
|
|
$('#selectfolders').append("<option>.</option>")
|