Skip to content

TagSpaces is an offline, open source, document manager with tagging support

added plaform tunning

Iliand097af398995
diff --git a/data/css/tagspaces.css b/data/css/tagspaces.css
index c5b1823cf..7eb036899 100644
--- a/data/css/tagspaces.css
+++ b/data/css/tagspaces.css
@@ -24,15 +24,8 @@ user-select: none;
* */
}
-/* { outline:none; } */
+* { outline:none; }
-/* { -webkit-min-device-pixel-ratio: 2.0 } */
-
-@media screen and (-webkit-min-device-pixel-ratio: 2.0) {
- #logo {
- background: url("../icons/icon64.png") no-repeat left center;
- }
-}
#logo {
padding: 0px;
@@ -48,6 +41,14 @@ user-select: none;
display: inline-block;
}
+@media
+(-webkit-min-device-pixel-ratio: 2),
+(min-resolution: 192dpi) {
+ #logo {
+ background: url("../icons/icon64.png") no-repeat left center 28px 28px;
+ }
+}
+
.appVersion {
font-size: 1.3em;
color: #616577;
@@ -556,8 +557,8 @@ input a.resetFilter {
/* Tablet optimization */
.dropdown-menu LI > A {
- line-height: 35px !important;
- height: 35px !important;
+ line-height: 45px !important;
+ height: 45px !important;
}
* {
@@ -656,16 +657,11 @@ input a.resetFilter {
}
.fileTitleButton {
-/* margin: 0px;
- z-index: 9999;
- text-align: left;
- cursor: move;
- border-color: #eee;
- background-image: none; */
+
}
.fileTitleButton:hover {
-/* border-color: #ddd; */
+
}
.dropdown {
diff --git a/data/ext/perspectiveGraph/extension.js b/data/ext/perspectiveGraph/extension.js
index 536e69ef4..7e5689a46 100644
--- a/data/ext/perspectiveGraph/extension.js
+++ b/data/ext/perspectiveGraph/extension.js
@@ -7,7 +7,7 @@ define(function(require, exports, module) {
console.log("Loading perspectiveGraph");
- var extensionTitle = "DirectoryViz";
+ var extensionTitle = "FolderViz Perspective";
var extensionID = "perspectiveGraph"; // ID should be equal to the directory name where the ext. is located
var extensionType = "perspective";
var extensionIcon = "fa fa-sitemap";
diff --git a/data/ext/perspectiveGrid/extension.js b/data/ext/perspectiveGrid/extension.js
index c36196fce..2ab9bdabe 100644
--- a/data/ext/perspectiveGrid/extension.js
+++ b/data/ext/perspectiveGrid/extension.js
@@ -5,7 +5,7 @@
define(function(require, exports, module) {
"use strict";
- var extensionTitle = "Perspective Grid";
+ var extensionTitle = "Grid Perspective";
var extensionID = "perspectiveGrid"; // ID should be equal to the directory name where the ext. is located
var extensionType = "perspective";
var extensionIcon = "fa fa-th";
@@ -28,10 +28,17 @@ define(function(require, exports, module) {
], function(extUI) {
UI = new extUI.ExtUI(extensionID);
UI.buildUI();
+ platformTuning();
}
);
};
+ var platformTuning = function() {
+ if(isCordova) {
+ $("#"+extensionID+"IncludeSubDirsButton").hide();
+ }
+ };
+
var load = function () {
console.log("Loading perspective "+extensionID);
if(UI != undefined) {
diff --git a/data/js/core.api.js b/data/js/core.api.js
index 8fe2ef7de..336602ff4 100644
--- a/data/js/core.api.js
+++ b/data/js/core.api.js
@@ -86,6 +86,7 @@ define(function(require, exports, module) {
initLayout();
initI18N();
initKeyBindings();
+ platformTuning();
$( "#loading" ).hide();
console.log("Layout initialized");
@@ -108,6 +109,18 @@ define(function(require, exports, module) {
checkForNewVersion();
}
+ function platformTuning() {
+ if(isCordova) {
+ $("#startNewInstanceBack").hide();
+ $("#directoryMenuOpenDirectory").parent().hide();
+ $("#fileMenuOpenDirectory").parent().hide();
+ $("#fullscreenFile").parent().hide();
+ $("#openDirectory").parent().hide();
+ $("#advancedSettings").hide();
+ $("#openFileInNewWindow").hide();
+ }
+ };
+
function initI18N() {
$.i18n.init({
ns: { namespaces: ['ns.common'], defaultNs: 'ns.common'},
@@ -230,9 +243,40 @@ define(function(require, exports, module) {
location.reload();
}
+ window.addEventListener("orientationchange", function() {
+ console.log("Current orientation: "+window.orientation);
+ }, false);
+
function openFileViewer() {
- layoutContainer.open("east");
+ tsCoreUI.hideAllDropDownMenus();
+ var fullWidth = window.innerWidth;
+ var halfWidth = Math.round(fullWidth/2);
+ // In portret mode
+ if(window.innerWidth < window.innerHeight) {
+ layoutContainer.close("west");
+ layoutContainer.sizePane("east", fullWidth);
+ layoutContainer.open("east");
+ $('#toggleFullWidthButton').hide();
+ } else {
+ layoutContainer.sizePane("east", halfWidth);
+ layoutContainer.open("east");
+ }
}
+
+ function closeFileViewer() {
+ $('#toggleFullWidthButton').show();
+ var fullWidth = window.innerWidth;
+ var halfWidth = Math.round(fullWidth/2);
+ // In portret mode
+ if(window.innerWidth < window.innerHeight) {
+ layoutContainer.close("east");
+ if(isLeftPanelOpen) {
+ layoutContainer.open("west");
+ }
+ } else {
+ layoutContainer.close("east");
+ }
+ }
var isFullWidth = false;
@@ -240,13 +284,16 @@ define(function(require, exports, module) {
// TODO hide tags
var fullWidth = window.innerWidth;
var halfWidth = Math.round(fullWidth/2);
- if(!isFullWidth) {
- layoutContainer.close("west");
- layoutContainer.sizePane("east", fullWidth);
- layoutContainer.open("east");
- } else {
+ if(isFullWidth) {
layoutContainer.sizePane("east", halfWidth);
layoutContainer.open("east");
+ if(isLeftPanelOpen) {
+ layoutContainer.open("west");
+ }
+ } else {
+ layoutContainer.close("west");
+ layoutContainer.sizePane("east", fullWidth);
+ layoutContainer.open("east");
}
isFullWidth = !isFullWidth;
}
@@ -278,12 +325,11 @@ define(function(require, exports, module) {
}*/
}
- function closeFileViewer() {
- layoutContainer.close("east");
- }
+ var isLeftPanelOpen = true;
function toggleLeftPanel() {
layoutContainer.toggle("west");
+ isLeftPanelOpen = !isLeftPanelOpen;
}
function initLayout (){
diff --git a/data/js/perspective.manager.js b/data/js/perspective.manager.js
index e494a9502..c9872d3b5 100644
--- a/data/js/perspective.manager.js
+++ b/data/js/perspective.manager.js
@@ -66,7 +66,7 @@ var initViews = function () {
var initViewSwitcher = function() {
var extensions = TSCORE.Config.getPerspectives();
$("#viewSwitcher").empty();
- $("#viewSwitcher").append("<li class='dropdown-header'><span id=''>Switch Perspective</span><button type='button' class='close'>×</button></li>");
+ $("#viewSwitcher").append("<li class='dropdown-header'><span id=''>Perspective Switch</span><button type='button' class='close'>×</button></li>");
$("#viewSwitcher").append("<li class='divider'></li>");
for (var i=0; i < extensions.length; i++) {
var curPers = undefined;