|
@@ -4,6 +4,7 @@
|
|
|
<meta charset="UTF-8">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no">
|
|
|
<link rel="stylesheet" href="../../script/tocas/tocas.css">
|
|
|
+ <link rel="icon" type="image/png" href="./img/small_icon.png">
|
|
|
<link rel="manifest" crossorigin="use-credentials" href="manifest.json">
|
|
|
<script type="text/javascript" src="../../script/tocas/tocas.js"></script>
|
|
|
<script type="text/javascript" src="../../script/jquery.min.js"></script>
|
|
@@ -1522,7 +1523,10 @@
|
|
|
}
|
|
|
//Define the grid size for the interface
|
|
|
var gridSize = 150 ;
|
|
|
+
|
|
|
if (isMobile){
|
|
|
+ //Update 3/5/2021: Optimize the width calculation method to best fit
|
|
|
+ /*
|
|
|
if (window.innerWidth > window.innerHeight){
|
|
|
//Screen using in horizontal mode
|
|
|
gridSize = window.innerWidth /4 - 20 ;
|
|
@@ -1530,7 +1534,17 @@
|
|
|
//Screen using in vertical mode
|
|
|
gridSize = window.innerWidth /2 - 20 ;
|
|
|
}
|
|
|
-
|
|
|
+ */
|
|
|
+
|
|
|
+ //A hack to align the divs to center of the container
|
|
|
+ $("#folderView").attr("align", "center");
|
|
|
+ $("#folderList").attr("align", "left");
|
|
|
+ $("#fileList").attr("align", "left");
|
|
|
+
|
|
|
+ //Calculate the best width to fit all the grids
|
|
|
+ var bestCount = Math.floor(parseFloat($("#folderView").width()) / parseFloat(gridSize));
|
|
|
+ var bestOffset = $("#folderView").width() % gridSize;
|
|
|
+ gridSize = gridSize + (bestOffset / bestCount) - (window.innerWidth - $("#folderView").width()) / bestCount;
|
|
|
}
|
|
|
|
|
|
//List all folders
|
|
@@ -1874,7 +1888,7 @@
|
|
|
$(".fileObject").off("contextmenu").on("contextmenu", function(evt){
|
|
|
evt.preventDefault();
|
|
|
|
|
|
- if (isFirefox && isMobile){
|
|
|
+ if (isMobile){
|
|
|
//Firefox Mobile. Fix select with context menu not working bug
|
|
|
var selectedObject = $(evt.target);
|
|
|
|