|
@@ -40,6 +40,7 @@
|
|
-moz-transition: opacity 2s ease-in-out;
|
|
-moz-transition: opacity 2s ease-in-out;
|
|
-o-transition: opacity 2s ease-in-out;
|
|
-o-transition: opacity 2s ease-in-out;
|
|
transition: opacity 2s ease-in-out;
|
|
transition: opacity 2s ease-in-out;
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
.background-wrapper {
|
|
.background-wrapper {
|
|
@@ -4474,7 +4475,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- }else if (keycode == "112"){
|
|
|
|
|
|
+ }else if (keycode == "112" ){
|
|
//Enter key
|
|
//Enter key
|
|
if (!renameMode){
|
|
if (!renameMode){
|
|
//Open selected object by emulating double click
|
|
//Open selected object by emulating double click
|
|
@@ -4488,6 +4489,76 @@
|
|
exitRenameMode();
|
|
exitRenameMode();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ }else if (keycode == "67" && ctrlHold){
|
|
|
|
+ //Ctrl + C, copy
|
|
|
|
+ var clipboard = [];
|
|
|
|
+ $(".launchIconWrapper.selected").each(function(){
|
|
|
|
+ var object = $(this).parent();
|
|
|
|
+ var fd = JSON.parse(decodeURIComponent($(object).attr("filedata")));
|
|
|
|
+ clipboard.push(fd.Filepath);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ localStorage.setItem("ao/file_system/clipboard",JSON.stringify(clipboard));
|
|
|
|
+ localStorage.setItem("ao/file_system/cutmode","false");
|
|
|
|
+ }else if (keycode == "88" && ctrlHold){
|
|
|
|
+ //Ctrl + X, cut
|
|
|
|
+ var clipboard = [];
|
|
|
|
+ $(".launchIconWrapper.selected").each(function(){
|
|
|
|
+ var object = $(this).parent();
|
|
|
|
+ var fd = JSON.parse(decodeURIComponent($(object).attr("filedata")));
|
|
|
|
+ clipboard.push(fd.Filepath);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ localStorage.setItem("ao/file_system/clipboard",JSON.stringify(clipboard));
|
|
|
|
+ localStorage.setItem("ao/file_system/cutmode","true");
|
|
|
|
+ }else if (keycode == "86" && ctrlHold){
|
|
|
|
+ //Ctrl + V, Paste
|
|
|
|
+
|
|
|
|
+ //Check if there are files in clipboard
|
|
|
|
+ var crossFrameClipboard = localStorage.getItem("ao/file_system/clipboard");
|
|
|
|
+ var useCutMode = localStorage.getItem("ao/file_system/cutmode");
|
|
|
|
+ var fileList = [];
|
|
|
|
+ if (crossFrameClipboard !== "" && crossFrameClipboard !== undefined && crossFrameClipboard !== null){
|
|
|
|
+ fileList = JSON.parse(crossFrameClipboard);
|
|
|
|
+ }
|
|
|
|
+ if (useCutMode !== "" && useCutMode !== undefined && useCutMode !== null){
|
|
|
|
+ thisOprCutMode = (useCutMode == "true");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var mode = "copy";
|
|
|
|
+ var title = "Copying "
|
|
|
|
+ if (thisOprCutMode){
|
|
|
|
+ mode = "move";
|
|
|
|
+ title = "Moving "
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (fileList.length > 0){
|
|
|
|
+ //There are something to move. Start the file operation dialog
|
|
|
|
+ var oprConfig = {
|
|
|
|
+ opr: mode,
|
|
|
|
+ src: fileList,
|
|
|
|
+ dest: "user:/Desktop/",
|
|
|
|
+ overwriteMode: "ask"
|
|
|
|
+ }
|
|
|
|
+ var configHash = encodeURIComponent(JSON.stringify(oprConfig));
|
|
|
|
+
|
|
|
|
+ //Genreate window title
|
|
|
|
+ var title = title + fileList.length;
|
|
|
|
+ if (fileList.length > 1){
|
|
|
|
+ title += " files";
|
|
|
|
+ }else{
|
|
|
|
+ title += " file";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ newFloatWindow({
|
|
|
|
+ url: "SystemAO/file_system/file_operation.html#" + configHash,
|
|
|
|
+ width: 400,
|
|
|
|
+ height: 220,
|
|
|
|
+ appicon: "SystemAO/file_system/img/selector.png",
|
|
|
|
+ title: title
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
}else{
|
|
}else{
|
|
//console.log(event.which);
|
|
//console.log(event.which);
|
|
}
|
|
}
|
|
@@ -5222,11 +5293,6 @@
|
|
</div>`);
|
|
</div>`);
|
|
}
|
|
}
|
|
|
|
|
|
- function downloadURL() {
|
|
|
|
- alert("WIP");
|
|
|
|
- hideAllContextMenus();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
function background(target, evt) {
|
|
function background(target, evt) {
|
|
$("#subcontextmenu").html('<div class="item"><i class="loading spinning icon"></i> Loading</div>');
|
|
$("#subcontextmenu").html('<div class="item"><i class="loading spinning icon"></i> Loading</div>');
|
|
$.get("system/desktop/theme", function(data) {
|
|
$.get("system/desktop/theme", function(data) {
|
|
@@ -5309,23 +5375,6 @@
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
- /*
|
|
|
|
- //Open new folder creation window
|
|
|
|
- var existsingFileList = [];
|
|
|
|
- for (var i =0; i < desktopFileList.length; i++){
|
|
|
|
- existsingFileList.push({
|
|
|
|
- filename: desktopFileList[i],
|
|
|
|
- filepath: "user:/Desktop/" + desktopFileList[i]
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- newFloatWindow({
|
|
|
|
- url: "SystemAO/file_system/newFolder.html#" + encodeURIComponent(JSON.stringify(existsingFileList)),
|
|
|
|
- appicon: "SystemAO/file_system/img/new folder.png",
|
|
|
|
- width:560,
|
|
|
|
- height:340,
|
|
|
|
- title: "New Folder"
|
|
|
|
- });
|
|
|
|
- */
|
|
|
|
hideAllContextMenus();
|
|
hideAllContextMenus();
|
|
}
|
|
}
|
|
|
|
|