|
@@ -37,16 +37,16 @@
|
|
<button class="fileoprSmallBtn" title="Rename" onclick="rename();"><i class="teal i cursor icon"></i> <span locale="fileopr/Rename">Rename</span></button>
|
|
<button class="fileoprSmallBtn" title="Rename" onclick="rename();"><i class="teal i cursor icon"></i> <span locale="fileopr/Rename">Rename</span></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <button class="fileOprBtn" title="Upload" onclick="upload();"><img class="opricon" src="img/opr/upload.svg"><p class="oprtxt" locale="fileopr/Upload">Upload</p></button>
|
|
|
|
- <button class="fileOprBtn" title="Download" onclick="downloadFile();"><img class="opricon" src="img/opr/download.svg"><p class="oprtxt" locale="fileopr/Download">Download</p></button>
|
|
|
|
|
|
+ <button class="fileOprBtn" title="Upload" onclick="upload(); exitMultiSelectMode();"><img class="opricon" src="img/opr/upload.svg"><p class="oprtxt" locale="fileopr/Upload">Upload</p></button>
|
|
|
|
+ <button class="fileOprBtn" title="Download" onclick="downloadFile(); exitMultiSelectMode();"><img class="opricon" src="img/opr/download.svg"><p class="oprtxt" locale="fileopr/Download">Download</p></button>
|
|
<div class="fileoprGroupDivider" style="display: inline-block; vertical-align: top; height: 80px;"></div>
|
|
<div class="fileoprGroupDivider" style="display: inline-block; vertical-align: top; height: 80px;"></div>
|
|
- <button class="twolines fileOprBtn" title="New Folder" onclick="newFolder();"><img class="opricon" src="img/opr/new_folder.svg"><p class="oprtxt" locale="fileopr/New Folder">New<br>Folder</p></button>
|
|
|
|
|
|
+ <button class="twolines fileOprBtn" title="New Folder" onclick="newFolder(); exitMultiSelectMode();"><img class="opricon" src="img/opr/new_folder.svg"><p class="oprtxt" locale="fileopr/New Folder">New<br>Folder</p></button>
|
|
<div class="fileoprGroupDivider desktopOnly" style="display: inline-block; vertical-align: top;">
|
|
<div class="fileoprGroupDivider desktopOnly" style="display: inline-block; vertical-align: top;">
|
|
<button class="fileoprSmallBtn" title="New File" onclick="newfile();"><i class="file outline icon"></i> <span locale="fileopr/New File">New File</span></button><br>
|
|
<button class="fileoprSmallBtn" title="New File" onclick="newfile();"><i class="file outline icon"></i> <span locale="fileopr/New File">New File</span></button><br>
|
|
<button class="fileoprSmallBtn" title="Create Zip" onclick="zipFile();"><i class="brown zip file icon"></i> <span locale="fileopr/Create Zip">Create Zip</span></button><br>
|
|
<button class="fileoprSmallBtn" title="Create Zip" onclick="zipFile();"><i class="brown zip file icon"></i> <span locale="fileopr/Create Zip">Create Zip</span></button><br>
|
|
<button class="fileoprSmallBtn" title="Unzip Here" onclick="unzipHere();"><i class="inbox icon"></i> <span locale="fileopr/Unzip Here">Unzip Here</span></button><br>
|
|
<button class="fileoprSmallBtn" title="Unzip Here" onclick="unzipHere();"><i class="inbox icon"></i> <span locale="fileopr/Unzip Here">Unzip Here</span></button><br>
|
|
</div>
|
|
</div>
|
|
- <div class="fileoprGroupDivider desktopOnly" style="display: inline-block; vertical-align: top;">
|
|
|
|
|
|
+ <div class="fileoprGroupDivider desktopOnly" style="display: inline-block; vertical-align: top;">
|
|
<button class="fileoprSmallBtn" title="Refresh" onclick="refreshList();"><i class="green refresh icon"></i> <span locale="fileopr/Refresh">Refresh</span></button><br>
|
|
<button class="fileoprSmallBtn" title="Refresh" onclick="refreshList();"><i class="green refresh icon"></i> <span locale="fileopr/Refresh">Refresh</span></button><br>
|
|
<button class="fileoprSmallBtn" title="Home" onclick="openHomeDir();"><i class="home icon"></i> <span locale="fileopr/Home">Home</span></button><br>
|
|
<button class="fileoprSmallBtn" title="Home" onclick="openHomeDir();"><i class="home icon"></i> <span locale="fileopr/Home">Home</span></button><br>
|
|
<button class="fileoprSmallBtn" title="File Info" onclick="showFileProperties();"><i class="blue info circle icon"></i> <span locale="fileopr/File Info">File Info</span></button><br>
|
|
<button class="fileoprSmallBtn" title="File Info" onclick="showFileProperties();"><i class="blue info circle icon"></i> <span locale="fileopr/File Info">File Info</span></button><br>
|
|
@@ -56,7 +56,7 @@
|
|
<div class="fileoprGroupDivider" style="display: inline-block; vertical-align: top; height: 80px;"></div>
|
|
<div class="fileoprGroupDivider" style="display: inline-block; vertical-align: top; height: 80px;"></div>
|
|
<button class="mobileOnly mobileFileOprMenu" onclick="toggleMobileSidebar(true);">
|
|
<button class="mobileOnly mobileFileOprMenu" onclick="toggleMobileSidebar(true);">
|
|
<i class="ui large bars icon"></i>
|
|
<i class="ui large bars icon"></i>
|
|
- </button>
|
|
|
|
|
|
+ </button>
|
|
<div style="display: inline-block; vertical-align: top;">
|
|
<div style="display: inline-block; vertical-align: top;">
|
|
<select id="sortingMethodSelector" title="Sorting Method" class="ui basic borderless mini dropdown" onchange="updateSortingMethods();" autocomplete="off" style="min-width: 10em;">
|
|
<select id="sortingMethodSelector" title="Sorting Method" class="ui basic borderless mini dropdown" onchange="updateSortingMethods();" autocomplete="off" style="min-width: 10em;">
|
|
<option value="default" locale="menu/sort/asc">Ascending</option>
|
|
<option value="default" locale="menu/sort/asc">Ascending</option>
|
|
@@ -96,6 +96,9 @@
|
|
<button class="fileoprSmallBtnMobile" title="Multi Select" onclick="toggleCtrl(); toggleMobileSidebar(false);"> <i class="mouse pointer icon"></i> <span locale="fileopr/Multi Select">Multi-select</span></button><br>
|
|
<button class="fileoprSmallBtnMobile" title="Multi Select" onclick="toggleCtrl(); toggleMobileSidebar(false);"> <i class="mouse pointer icon"></i> <span locale="fileopr/Multi Select">Multi-select</span></button><br>
|
|
<button class="fileoprSmallBtnMobile" title="Multi Select" onclick="selectAll(); toggleMobileSidebar(false);"> <i class="plus square icon"></i> <span locale="fileopr/Select All">Select All</span></button><br>
|
|
<button class="fileoprSmallBtnMobile" title="Multi Select" onclick="selectAll(); toggleMobileSidebar(false);"> <i class="plus square icon"></i> <span locale="fileopr/Select All">Select All</span></button><br>
|
|
<button class="fileoprSmallBtnMobile" title="Clear Selection" onclick="clearSelection(); toggleMobileSidebar(false, exitMultiSelectMode);"> <i class="remove icon"></i> <span locale="fileopr/Clear Select">Clear Selection</span></button><br><button class="fileoprSmallBtnMobile" title="New File" onclick="newfile();"><i class="file outline icon"></i> <span locale="fileopr/New File">New File</span></button><br>
|
|
<button class="fileoprSmallBtnMobile" title="Clear Selection" onclick="clearSelection(); toggleMobileSidebar(false, exitMultiSelectMode);"> <i class="remove icon"></i> <span locale="fileopr/Clear Select">Clear Selection</span></button><br><button class="fileoprSmallBtnMobile" title="New File" onclick="newfile();"><i class="file outline icon"></i> <span locale="fileopr/New File">New File</span></button><br>
|
|
|
|
+ <button class="fileoprSmallBtnMobile" title="Open with" onclick="openWith();"><i class="external icon"></i> <span locale="fileopr/Open with">Open With</span></button><br>
|
|
|
|
+ <button class="fileoprSmallBtnMobile" title="Cut" onclick="cut();"><i class="blue cut icon"></i> <span locale="fileopr/Cut">Cut</span></button><br>
|
|
|
|
+ <button class="fileoprSmallBtnMobile" title="Rename" onclick="rename();"><i class="teal i cursor icon"></i> <span locale="fileopr/Rename">Rename</span></button>
|
|
<button class="fileoprSmallBtnMobile" title="Create Zip" onclick="zipFile(); toggleMobileSidebar(false, exitMultiSelectMode);"><i class="brown zip file icon"></i> <span locale="fileopr/Create Zip">Create Zip</span></button><br>
|
|
<button class="fileoprSmallBtnMobile" title="Create Zip" onclick="zipFile(); toggleMobileSidebar(false, exitMultiSelectMode);"><i class="brown zip file icon"></i> <span locale="fileopr/Create Zip">Create Zip</span></button><br>
|
|
<button class="fileoprSmallBtnMobile" title="Unzip Here" onclick="unzipHere(); toggleMobileSidebar(false, exitMultiSelectMode);"><i class="inbox icon"></i> <span locale="fileopr/Unzip Here">Unzip Here</span></button><br>
|
|
<button class="fileoprSmallBtnMobile" title="Unzip Here" onclick="unzipHere(); toggleMobileSidebar(false, exitMultiSelectMode);"><i class="inbox icon"></i> <span locale="fileopr/Unzip Here">Unzip Here</span></button><br>
|
|
<button class="fileoprSmallBtnMobile" title="Refresh" onclick="refreshList(); toggleMobileSidebar(false);"><i class="green refresh icon"></i> <span locale="fileopr/Refresh">Refresh</span></button><br>
|
|
<button class="fileoprSmallBtnMobile" title="Refresh" onclick="refreshList(); toggleMobileSidebar(false);"><i class="green refresh icon"></i> <span locale="fileopr/Refresh">Refresh</span></button><br>
|
|
@@ -891,6 +894,10 @@
|
|
hideManualOpenPathInput();
|
|
hideManualOpenPathInput();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (isMobile && ctrlHold){
|
|
|
|
+ exitMultiSelectMode();
|
|
|
|
+ }
|
|
|
|
+
|
|
//Backup the current selected files if it is an refresh operation
|
|
//Backup the current selected files if it is an refresh operation
|
|
let selectedFiles = [];
|
|
let selectedFiles = [];
|
|
let currentScrollTop = JSON.parse(JSON.stringify($("#folderView").scrollTop()));
|
|
let currentScrollTop = JSON.parse(JSON.stringify($("#folderView").scrollTop()));
|
|
@@ -1170,7 +1177,7 @@
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- $("#folderList").append(`<div class="fileObject item" draggable="true" ondragstart="onFileObjectDragStart(this,event);" ondrop="dropToFolder(event)" ondragover="allowDrop(event)" fileID="${i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event);" type="folder">
|
|
|
|
|
|
+ $("#folderList").append(`<div class="fileObject item" draggable="true" ondragstart="onFileObjectDragStart(this,event);" ondrop="dropToFolder(event)" ondragover="allowDrop(event)" fileID="${i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event,true);" type="folder">
|
|
<span style="display:inline-block !important;word-break: break-all; width:100%;" class="${textclass}">
|
|
<span style="display:inline-block !important;word-break: break-all; width:100%;" class="${textclass}">
|
|
<i class="${icon} icon" style="margin-right:12px; color:#eab54e;"></i> <span class="filename">${displayName}</span> ${shareicon}
|
|
<i class="${icon} icon" style="margin-right:12px; color:#eab54e;"></i> <span class="filename">${displayName}</span> ${shareicon}
|
|
</span></div>`);
|
|
</span></div>`);
|
|
@@ -1191,7 +1198,7 @@
|
|
displayName = displayName.substring(0,16) + "...";
|
|
displayName = displayName.substring(0,16) + "...";
|
|
}
|
|
}
|
|
$("#folderList").append(`
|
|
$("#folderList").append(`
|
|
- <div class="fileObject card" draggable="true" ondragstart="onFileObjectDragStart(this,event);" ondrop="dropToFolder(event)" ondragover="allowDrop(event)" fileID="${i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event);" type="folder" style="width:${gridSize}px; display:inline-block !important;vertical-align:top; height:15em; margin-top:0px !important; overflow:hidden;">
|
|
|
|
|
|
+ <div class="fileObject card" draggable="true" ondragstart="onFileObjectDragStart(this,event);" ondrop="dropToFolder(event)" ondragover="allowDrop(event)" fileID="${i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event,true);" type="folder" style="width:${gridSize}px; display:inline-block !important;vertical-align:top; height:15em; margin-top:0px !important; overflow:hidden;">
|
|
<div class="image" style="text-align: center;">
|
|
<div class="image" style="text-align: center;">
|
|
<img draggable="true"ondragstart="disableDrag(event);" src="../../img/desktop/files_icon/${filesIconTheme}/folder.png" style="height: 148px; width: 148px; display: inline-block;">
|
|
<img draggable="true"ondragstart="disableDrag(event);" src="../../img/desktop/files_icon/${filesIconTheme}/folder.png" style="height: 148px; width: 148px; display: inline-block;">
|
|
<div class="shareOverlay ${isShared?"visible":""}">${shareicon}</div>
|
|
<div class="shareOverlay ${isShared?"visible":""}">${shareicon}</div>
|
|
@@ -1209,7 +1216,7 @@
|
|
|
|
|
|
//Convert the unix timestamp to datetime
|
|
//Convert the unix timestamp to datetime
|
|
var date = new Date(modTime * 1000);
|
|
var date = new Date(modTime * 1000);
|
|
- $("#folderList").find(".folderDetailList").append(`<tr class="fileObject details" draggable="true" ondragstart="onFileObjectDragStart(this,event);" ondrop="dropToFolder(event)" ondragover="allowDrop(event)" fileID="${i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event);" type="folder">
|
|
|
|
|
|
+ $("#folderList").find(".folderDetailList").append(`<tr class="fileObject details" draggable="true" ondragstart="onFileObjectDragStart(this,event);" ondrop="dropToFolder(event)" ondragover="allowDrop(event)" fileID="${i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event,true);" type="folder">
|
|
<td><i class="${icon} icon" style="margin-right:12px; color:#eab54e;"></i> <span class="filename">${filename}</span></td>
|
|
<td><i class="${icon} icon" style="margin-right:12px; color:#eab54e;"></i> <span class="filename">${filename}</span></td>
|
|
<td class="light-text">${date.toLocaleDateString("default") + " " + date.toLocaleTimeString("default")}</td>
|
|
<td class="light-text">${date.toLocaleDateString("default") + " " + date.toLocaleTimeString("default")}</td>
|
|
<td>${isSharedIcon}</td>
|
|
<td>${isSharedIcon}</td>
|
|
@@ -1293,7 +1300,7 @@
|
|
}
|
|
}
|
|
filename = ao_module_codec.decodeUmFilename(filename);
|
|
filename = ao_module_codec.decodeUmFilename(filename);
|
|
}
|
|
}
|
|
- $("#fileList").append(`<div class="fileObject item" draggable="true" ondragstart="onFileObjectDragStart(this,event);" fileID="${fl + i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event);" type="${fileType}" filesize="${filesize}" displaysize="${Displaysize}">
|
|
|
|
|
|
+ $("#fileList").append(`<div class="fileObject item" draggable="true" ondragstart="onFileObjectDragStart(this,event);" fileID="${fl + i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event, true);" type="${fileType}" filesize="${filesize}" displaysize="${Displaysize}">
|
|
<span style="display:inline-block !important;word-break: break-all;text-overflow: ellipsis !important;overflow: hidden;" class="${textclass}">
|
|
<span style="display:inline-block !important;word-break: break-all;text-overflow: ellipsis !important;overflow: hidden;" class="${textclass}">
|
|
<i class="${icon} icon" style="margin-right:12px;"></i>
|
|
<i class="${icon} icon" style="margin-right:12px;"></i>
|
|
<span class="filename">${displayName}</span> ${shareicon}
|
|
<span class="filename">${displayName}</span> ${shareicon}
|
|
@@ -1376,7 +1383,7 @@
|
|
|
|
|
|
var date = new Date(modTime * 1000);
|
|
var date = new Date(modTime * 1000);
|
|
|
|
|
|
- $("#fileList").find(".fileDetailList").append(`<tr class="fileObject details" draggable="true" ondragstart="onFileObjectDragStart(this,event);" ondrop="dropToFolder(event)" ondragover="allowDrop(event)" fileID="${i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event);" type="file">
|
|
|
|
|
|
+ $("#fileList").find(".fileDetailList").append(`<tr class="fileObject details" draggable="true" ondragstart="onFileObjectDragStart(this,event);" ondrop="dropToFolder(event)" ondragover="allowDrop(event)" fileID="${i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event,true);" type="file">
|
|
<td><i class="${icon} icon" style="margin-right:12px;"></i> <span class="filename">${filename}</span></td>
|
|
<td><i class="${icon} icon" style="margin-right:12px;"></i> <span class="filename">${filename}</span></td>
|
|
<td class="light-text">${ext}</td>
|
|
<td class="light-text">${ext}</td>
|
|
<td class="light-text">${Displaysize}</td>
|
|
<td class="light-text">${Displaysize}</td>
|
|
@@ -1568,6 +1575,7 @@
|
|
var lastClickedFileID = 0;
|
|
var lastClickedFileID = 0;
|
|
function bindFileObjectEvents(){
|
|
function bindFileObjectEvents(){
|
|
$(".fileObject").off("click").on("click",function(evt){
|
|
$(".fileObject").off("click").on("click",function(evt){
|
|
|
|
+ evt.stopImmediatePropagation();
|
|
if (renameMode && $(this).find(".renameinput").length == 0){
|
|
if (renameMode && $(this).find(".renameinput").length == 0){
|
|
exitRenameModeWithConfirm();
|
|
exitRenameModeWithConfirm();
|
|
return;
|
|
return;
|
|
@@ -1576,23 +1584,15 @@
|
|
evt.stopImmediatePropagation();
|
|
evt.stopImmediatePropagation();
|
|
}
|
|
}
|
|
|
|
|
|
- if (!ctrlHold && isMobile && !ctrlHold){
|
|
|
|
- //If on mobile, click means open (only on not muilti selection mode)
|
|
|
|
- evt.preventDefault();
|
|
|
|
- evt.stopImmediatePropagation();
|
|
|
|
- openthis(this,evt);
|
|
|
|
-
|
|
|
|
- //Deselect everything if in multi-select mode
|
|
|
|
- if (ctrlHold){
|
|
|
|
- ctrlHold = false;
|
|
|
|
- updateCtrlDisplay();
|
|
|
|
- }
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
if (ctrlHold == true){
|
|
if (ctrlHold == true){
|
|
if ($(this).hasClass("selected")){
|
|
if ($(this).hasClass("selected")){
|
|
$(this).removeClass("selected");
|
|
$(this).removeClass("selected");
|
|
|
|
+
|
|
|
|
+ //if there are no more selected files on the page
|
|
|
|
+ //exit multi-select mode
|
|
|
|
+ if ($(".fileObject.selected").length == 0){
|
|
|
|
+ exitMultiSelectMode();
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
$(this).addClass("selected");
|
|
$(this).addClass("selected");
|
|
}
|
|
}
|
|
@@ -1615,7 +1615,18 @@
|
|
$(this).addClass("selected");
|
|
$(this).addClass("selected");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ }else if(!ctrlHold && isMobile){
|
|
|
|
+ //If on mobile, click means open (only on not muilti selection mode)
|
|
|
|
+ evt.preventDefault();
|
|
|
|
+ evt.stopImmediatePropagation();
|
|
|
|
+ openthis(this,evt);
|
|
|
|
|
|
|
|
+ //Deselect everything if in multi-select mode
|
|
|
|
+ if (ctrlHold){
|
|
|
|
+ ctrlHold = false;
|
|
|
|
+ updateCtrlDisplay();
|
|
|
|
+ }
|
|
|
|
+ return
|
|
}else{
|
|
}else{
|
|
//Nothing is pressed. Deselect everything and add this only
|
|
//Nothing is pressed. Deselect everything and add this only
|
|
$(".fileObject.selected").removeClass("selected");
|
|
$(".fileObject.selected").removeClass("selected");
|
|
@@ -2875,11 +2886,16 @@
|
|
openFolderInNewWindow(foldersToBeOpened);
|
|
openFolderInNewWindow(foldersToBeOpened);
|
|
}
|
|
}
|
|
|
|
|
|
- function openthis(object,evt=null){
|
|
|
|
|
|
+ function openthis(object,evt=null, isDoubleClick=false){
|
|
if (evt !== null){
|
|
if (evt !== null){
|
|
evt.preventDefault();
|
|
evt.preventDefault();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (isDoubleClick && isMobile && ctrlHold){
|
|
|
|
+ //User is clicking too fast or touch screen is too sensitive! ignore this double click
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (renameMode && $(object).find(".renameinput").length > 0){
|
|
if (renameMode && $(object).find(".renameinput").length > 0){
|
|
//This object is currently under rename. Ignore input
|
|
//This object is currently under rename. Ignore input
|
|
return;
|
|
return;
|
|
@@ -3605,14 +3621,15 @@
|
|
var thisFilename = $(this).attr("filename");
|
|
var thisFilename = $(this).attr("filename");
|
|
selectedFiles.push(thisFilepath);
|
|
selectedFiles.push(thisFilepath);
|
|
selectedFileObjects.push({"filepath": thisFilepath, "filename": thisFilename});
|
|
selectedFileObjects.push({"filepath": thisFilepath, "filename": thisFilename});
|
|
-
|
|
|
|
});
|
|
});
|
|
|
|
|
|
if (selectedFiles.length == 0){
|
|
if (selectedFiles.length == 0){
|
|
|
|
+ msgbox("question", applocale.getString("message/No file selected", "No file selected"));
|
|
console.log("No file is selected for sharing");
|
|
console.log("No file is selected for sharing");
|
|
return;
|
|
return;
|
|
- }else if (selectedFiles > 1){
|
|
|
|
|
|
+ }else if (selectedFiles.length > 1){
|
|
//Try to share more than 1 files, which is not supported
|
|
//Try to share more than 1 files, which is not supported
|
|
|
|
+ msgbox("yellow exclamation", applocale.getString("message/Multiple files share is currently not supported", "Multiple files share is currently not supported"));
|
|
console.log("Multi share is current not supported");
|
|
console.log("Multi share is current not supported");
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -3710,6 +3727,7 @@
|
|
function exitMultiSelectMode(){
|
|
function exitMultiSelectMode(){
|
|
if (ctrlHold){
|
|
if (ctrlHold){
|
|
ctrlHold = false;
|
|
ctrlHold = false;
|
|
|
|
+ $(".fileObject.selected").removeClass("selected");
|
|
updateCtrlDisplay();
|
|
updateCtrlDisplay();
|
|
}
|
|
}
|
|
}
|
|
}
|