|
@@ -998,7 +998,7 @@
|
|
var movingWindow = false;
|
|
var movingWindow = false;
|
|
var resizingWindow = false;
|
|
var resizingWindow = false;
|
|
var resizingEdgeID = 0; //Resizing edge. {0, 1, 2, 3, 4, 5} => None, Right, Right Bottom Corner, Bottom, Left Bottom Corner, Left
|
|
var resizingEdgeID = 0; //Resizing edge. {0, 1, 2, 3, 4, 5} => None, Right, Right Bottom Corner, Bottom, Left Bottom Corner, Left
|
|
- var stackedFloatWindowListShwon = false;
|
|
|
|
|
|
+ var stackedFloatWindowListShown = false;
|
|
|
|
|
|
//Laucnh icon related
|
|
//Laucnh icon related
|
|
var multiSelecting = false;
|
|
var multiSelecting = false;
|
|
@@ -1662,7 +1662,7 @@
|
|
var targetFW = getFloatWindowByID(windowIdList[0]);
|
|
var targetFW = getFloatWindowByID(windowIdList[0]);
|
|
$(targetFW).fadeIn(100);
|
|
$(targetFW).fadeIn(100);
|
|
MoveFloatWindowToTop(targetFW);
|
|
MoveFloatWindowToTop(targetFW);
|
|
- stackedFloatWindowListShwon = false;
|
|
|
|
|
|
+ stackedFloatWindowListShown = false;
|
|
$("#stackedWindowList").hide();
|
|
$("#stackedWindowList").hide();
|
|
} else {
|
|
} else {
|
|
//Get icon for each windows and build the list objects
|
|
//Get icon for each windows and build the list objects
|
|
@@ -1673,7 +1673,7 @@
|
|
$("#stackedWindowList").append(`<div class="item clickable" windowId="${windowIdList[i]}" onclick="bringFloatWindowToFrontByFWB(this,event);" ontouchstart="bringFloatWindowToFrontByFWB(this,event);"><span><img src="${iconURL}"></img>${title}</span><div class="closebtn" onclick="closeFWviaFWB(this,event);"><img src="img/system/close.png"></img></div></div>`);
|
|
$("#stackedWindowList").append(`<div class="item clickable" windowId="${windowIdList[i]}" onclick="bringFloatWindowToFrontByFWB(this,event);" ontouchstart="bringFloatWindowToFrontByFWB(this,event);"><span><img src="${iconURL}"></img>${title}</span><div class="closebtn" onclick="closeFWviaFWB(this,event);"><img src="img/system/close.png"></img></div></div>`);
|
|
}
|
|
}
|
|
$("#stackedWindowList").show();
|
|
$("#stackedWindowList").show();
|
|
- stackedFloatWindowListShwon = true;
|
|
|
|
|
|
+ stackedFloatWindowListShown = true;
|
|
}
|
|
}
|
|
|
|
|
|
});
|
|
});
|
|
@@ -1721,7 +1721,7 @@
|
|
}
|
|
}
|
|
$(targetFW).fadeIn(100);
|
|
$(targetFW).fadeIn(100);
|
|
MoveFloatWindowToTop(targetFW);
|
|
MoveFloatWindowToTop(targetFW);
|
|
- stackedFloatWindowListShwon = false;
|
|
|
|
|
|
+ stackedFloatWindowListShown = false;
|
|
$("#stackedWindowList").hide();
|
|
$("#stackedWindowList").hide();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1738,7 +1738,7 @@
|
|
$(object).parent().remove();
|
|
$(object).parent().remove();
|
|
if ($("#stackedWindowList").find(".item").length == 0) {
|
|
if ($("#stackedWindowList").find(".item").length == 0) {
|
|
//There are no more things in this tab. Close this list as well.
|
|
//There are no more things in this tab. Close this list as well.
|
|
- stackedFloatWindowListShwon = false;
|
|
|
|
|
|
+ stackedFloatWindowListShown = false;
|
|
$("#stackedWindowList").hide();
|
|
$("#stackedWindowList").hide();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1877,10 +1877,10 @@
|
|
|
|
|
|
//Hook body clicke vents
|
|
//Hook body clicke vents
|
|
$("body").on("click", function(evt) {
|
|
$("body").on("click", function(evt) {
|
|
- if (stackedFloatWindowListShwon == true) {
|
|
|
|
|
|
+ if (stackedFloatWindowListShown == true) {
|
|
//Hide the stacked Float Window list if it is shown
|
|
//Hide the stacked Float Window list if it is shown
|
|
$("#stackedWindowList").hide();
|
|
$("#stackedWindowList").hide();
|
|
- stackedFloatWindowListShwon = false;
|
|
|
|
|
|
+ stackedFloatWindowListShown = false;
|
|
}
|
|
}
|
|
|
|
|
|
if (renameMode == true){
|
|
if (renameMode == true){
|
|
@@ -4060,18 +4060,20 @@
|
|
}
|
|
}
|
|
|
|
|
|
$(window).on("resize", function(event) {
|
|
$(window).on("resize", function(event) {
|
|
- redrawDesktopGrids();
|
|
|
|
- resizeAllFloatWindowButtons();
|
|
|
|
- })
|
|
|
|
- // ======================= DOCUMENT KEY BINDING =====================
|
|
|
|
- $(document).keydown(function(event) {
|
|
|
|
- if (event.which == "17") {
|
|
|
|
|
|
+ redrawDesktopGrids();
|
|
|
|
+ resizeAllFloatWindowButtons();
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ // ======================= DOCUMENT KEY BINDING =====================
|
|
|
|
+ document.addEventListener('keydown', function(event) {
|
|
|
|
+ let keycode = event.which || event.keyCode;
|
|
|
|
+ if (keycode == "17") {
|
|
//Pressdown of Ctrl key
|
|
//Pressdown of Ctrl key
|
|
ctrlHold = true;
|
|
ctrlHold = true;
|
|
- } else if (event.which == "16") {
|
|
|
|
|
|
+ } else if (keycode == "16") {
|
|
//Pressdown of Shift key
|
|
//Pressdown of Shift key
|
|
shiftHold = true;
|
|
shiftHold = true;
|
|
- }else if (event.which == "27"){
|
|
|
|
|
|
+ }else if (keycode == "27"){
|
|
//Cancel all floatwindow events and key events
|
|
//Cancel all floatwindow events and key events
|
|
$("#fwdragpanel").hide();
|
|
$("#fwdragpanel").hide();
|
|
$("#tfwdragpanel").hide();
|
|
$("#tfwdragpanel").hide();
|
|
@@ -4082,7 +4084,7 @@
|
|
multiSelecting = false;
|
|
multiSelecting = false;
|
|
ctrlHold = false;
|
|
ctrlHold = false;
|
|
shiftHold = false;
|
|
shiftHold = false;
|
|
- }else if (event.which == "46"){
|
|
|
|
|
|
+ }else if (keycode == "46"){
|
|
//Delete key
|
|
//Delete key
|
|
|
|
|
|
if (renameMode){
|
|
if (renameMode){
|
|
@@ -4129,7 +4131,7 @@
|
|
});
|
|
});
|
|
})
|
|
})
|
|
|
|
|
|
- }else if (event.which == "13"){
|
|
|
|
|
|
+ }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
|
|
@@ -4149,10 +4151,17 @@
|
|
});
|
|
});
|
|
|
|
|
|
$(document).keyup(function(event) {
|
|
$(document).keyup(function(event) {
|
|
- if (event.which == "17") {
|
|
|
|
|
|
+ let keycode = event.which || event.keyCode;
|
|
|
|
+ if (keycode == "17") {
|
|
ctrlHold = false;
|
|
ctrlHold = false;
|
|
- } else if (event.which == "16") {
|
|
|
|
|
|
+ } else if (keycode == "16") {
|
|
shiftHold = false;
|
|
shiftHold = false;
|
|
|
|
+ }else if (keycode == "27"){
|
|
|
|
+ //ESC key, stop all floatWindow operations
|
|
|
|
+ console.log("%c[Desktop] Dragging function killed. Restarting all dragging elements.", 'color: #e64747');
|
|
|
|
+ movingWindow = false;
|
|
|
|
+ resizingWindow = false;
|
|
|
|
+ event.preventDefault();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
@@ -5507,7 +5516,7 @@
|
|
//Check if ramsize > 1.8 GB (2GB). If yes, switch to large memory upload mode
|
|
//Check if ramsize > 1.8 GB (2GB). If yes, switch to large memory upload mode
|
|
var memsize = JSON.parse(data);
|
|
var memsize = JSON.parse(data);
|
|
if (parseFloat(memsize)/ 1024 / 1024 / 1024 >= 3.8){
|
|
if (parseFloat(memsize)/ 1024 / 1024 / 1024 >= 3.8){
|
|
- console.log("[Desktop] Setting upload mode to large memory mode")
|
|
|
|
|
|
+ console.log("%c[Desktop] Setting upload mode to large memory mode", 'color: #2ba16e');
|
|
lowMemoryMode = false;
|
|
lowMemoryMode = false;
|
|
}
|
|
}
|
|
}
|
|
}
|