Skip to content

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

merging branch TS157

uggrock09f6ab812fd2
diff --cc data/ext/editorHTML/extension.js
index e2f34f3e7,e2f34f3e7..f8f74b824
--- a/data/ext/editorHTML/extension.js
+++ b/data/ext/editorHTML/extension.js
@@@ -38,13 -38,13 +38,15 @@@ define(function(require, exports, modul
$containerElement.empty();
$containerElement.css("background-color", "white");
++ var lng = $.i18n.lng();
++
var extPath = extensionDirectory + "/index.html";
$containerElement.append($('<iframe>', {
id: "iframeViewer",
sandbox: "allow-same-origin allow-scripts",
scrolling: "no",
style: "background-color: white; overflow: hidden;",
-- src: extPath + "?cp=" + filePath,
++ src: extPath + "?cp=" + filePath + "&setLng=" + lng,
"nwdisable": "",
"nwfaketop": ""
}));
diff --cc data/ext/editorHTML/index.html
index 7797b3287,7797b3287..37ae36eaa
--- a/data/ext/editorHTML/index.html
+++ b/data/ext/editorHTML/index.html
@@@ -1,18 -1,18 +1,17 @@@
<!DOCTYPE html>
<html dir="ltr">
-- <head>
-- <meta charset="utf-8">
-- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
-- <script type="text/javascript" src="../../libs/jquery/jquery-2.1.1.min.js"></script>
-- <script type="text/javascript" src="editor.js"></script>
-- <script type="text/javascript" src="../../libs/bootstrap/js/bootstrap.min.js"></script>
-- <script type="text/javascript" src="summernote/summernote.js"></script>
-- <link rel="stylesheet" href="extension.css" />
-- <link rel="stylesheet" href="../../libs/bootstrap/css/bootstrap.css" />
-- <link rel="stylesheet" href="../../libs/font-awesome/css/font-awesome.css" />
-- <link rel="stylesheet" href="summernote/summernote.css" />
-- </head>
-- <body>
-- <div id="htmlEditor"></div>
-- </body>
++<head>
++ <meta charset="utf-8">
++ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
++ <script type="text/javascript" src="../../libs/jquery/jquery-2.1.1.min.js"></script>
++ <script type="text/javascript" src="../../libs/bootstrap/js/bootstrap.min.js"></script>
++ <script type="text/javascript" src="summernote/summernote.js"></script>
++ <script type="text/javascript" src="editor.js"></script>
++ <link rel="stylesheet" href="../../assets/tagspaces.css" />
++ <link rel="stylesheet" href="summernote/summernote.css" />
++ <link rel="stylesheet" href="extension.css" />
++</head>
++<body>
++ <div id="htmlEditor"></div>
++</body>
</html>
diff --cc data/ext/editorText/extension.js
index 296835932,296835932..c93e3fa72
--- a/data/ext/editorText/extension.js
+++ b/data/ext/editorText/extension.js
@@@ -47,6 -47,6 +47,7 @@@ define(function(require, exports, modul
extensionDirectory + "/codemirror/mode/" + mode + "/" + mode + ".js"
], function() {
var cursorBlinkRate = isViewerMode ? -1 : 530; // disabling the blinking cursor in readonly mode
++ var lineNumbers = !isViewerMode;
//var saveKB = convertMouseTrapToCodeMirrorKeyBindings(TSCORE.Config.getSaveDocumentKeyBinding());
@@@ -63,13 -63,13 +64,13 @@@
cmEditor = new CodeMirror(document.getElementById("code"), {
fixedGutter: false,
mode: mode,
-- lineNumbers: true,
++ lineNumbers: lineNumbers,
lineWrapping: true,
tabSize: 2,
collapseRange: true,
matchBrackets: true,
cursorBlinkRate: cursorBlinkRate,
-- readOnly: isViewerMode,
++ readOnly: isViewerMode ? "nocursor" : isViewerMode,
autofocus: true,
//theme: "lesser-dark",
//extraKeys: keys // workarrounded with bindGlobal plugin for mousetrap
diff --cc data/ext/perspectiveGraph/extension.js
index 3a2073ea1,88fa6e5ad..31852ea44
--- a/data/ext/perspectiveGraph/extension.js
+++ b/data/ext/perspectiveGraph/extension.js
@@@ -149,98 -151,100 +149,100 @@@ define(function(require, exports, modul
};
var initUI = function() {
-
- viewToolbar.append($("<div >", {
- class: "btn-group",
- "data-toggle": "buttons",
- })
- .append($("<button>", {
- class: "btn btn-link active",
- title: "Activate Mindmap Visualization",
- text: " Mindmap"
- })
- .click(function() {
- graphMode = "mindmap";
- TSCORE.showLoadingAnimation();
- TSCORE.IO.createDirectoryTree(TSCORE.currentPath);
- })
- .append( "<input type='radio' name='options'>")
- .prepend( "<i class='fa fa-sitemap' />")
- )
++ // Tmp disabling of the perspective
++ return;
+ viewToolbar.append($("<div >", {
+ class: "btn-group",
+ "data-toggle": "buttons",
+ })
+ .append($("<button>", {
+ class: "btn btn-link active",
+ title: "Activate Mindmap Visualization",
+ text: " Mindmap"
+ })
+ .click(function() {
+ graphMode = "mindmap";
+ TSCORE.showLoadingAnimation();
+ TSCORE.IO.createDirectoryTree(TSCORE.currentPath);
+ })
+ .append( "<input type='radio' name='options'>")
+ .prepend( "<i class='fa fa-sitemap' />")
+ )
+
+ .append($("<button>", {
+ class: "btn btn-link",
+ title: "Activate Treemap Mode",
+ text: " TreeMap"
+ })
+ .click(function() {
+ graphMode = "treeMap";
+ TSCORE.showLoadingAnimation();
+ TSCORE.IO.createDirectoryTree(TSCORE.currentPath);
+ })
+ .append( "<input type='radio' name='options'>")
+ .prepend( "<i class='fa fa-th-large' />")
+ )
+
+ .append($("<button>", {
+ class: "btn btn-link",
+ title: "Activate Tree Map Navi",
+ text: " TreeMap Navi"
+ })
+ .click(function() {
+ graphMode = "treeMap2";
+ TSCORE.showLoadingAnimation();
+ TSCORE.IO.createDirectoryTree(TSCORE.currentPath);
+ })
+ .append( "<input type='radio' name='options'>")
+ .prepend( "<i class='fa fa-th-large' />")
+ )
- .append($("<button>", {
- class: "btn btn-link",
- title: "Activate Treemap Mode",
- text: " TreeMap"
- })
- .click(function() {
- graphMode = "treeMap";
- TSCORE.showLoadingAnimation();
- TSCORE.IO.createDirectoryTree(TSCORE.currentPath);
- })
- .append( "<input type='radio' name='options'>")
- .prepend( "<i class='fa fa-th-large' />")
- )
+ .append($("<button>", {
+ class: "btn btn-link",
+ title: "Activate Tree Mode",
+ text: " Tree"
+ })
+ .click(function() {
+ graphMode = "tree";
+ TSCORE.showLoadingAnimation();
+ TSCORE.IO.createDirectoryTree(TSCORE.currentPath);
+ })
+ .append( "<input type='radio' name='options'>")
+ .prepend( "<i class='fa fa-sitemap' />")
+ )
- .append($("<button>", {
- class: "btn btn-link",
- title: "Activate Tree Map Navi",
- text: " TreeMap Navi"
- })
- .click(function() {
- graphMode = "treeMap2";
- TSCORE.showLoadingAnimation();
- TSCORE.IO.createDirectoryTree(TSCORE.currentPath);
- })
- .append( "<input type='radio' name='options'>")
- .prepend( "<i class='fa fa-th-large' />")
- )
-
- .append($("<button>", {
- class: "btn btn-link",
- title: "Activate Tree Mode",
- text: " Tree"
- })
- .click(function() {
- graphMode = "tree";
- TSCORE.showLoadingAnimation();
- TSCORE.IO.createDirectoryTree(TSCORE.currentPath);
- })
- .append( "<input type='radio' name='options'>")
- .prepend( "<i class='fa fa-sitemap' />")
- )
-
- .append($("<button>", {
- class: "btn btn-link",
- title: "Activate Bilevel Partition",
- text: " Bilevel Partition"
- })
- .click(function() {
- graphMode = "bilevelPartition";
- TSCORE.showLoadingAnimation();
- TSCORE.IO.createDirectoryTree(TSCORE.currentPath);
- })
- .append( "<input type='radio' name='options'>")
- .prepend( "<i class='fa fa-adjust' />")
- )
-
- ); // end button group
+ .append($("<button>", {
+ class: "btn btn-link",
+ title: "Activate Bilevel Partition",
+ text: " Bilevel Partition"
+ })
+ .click(function() {
+ graphMode = "bilevelPartition";
+ TSCORE.showLoadingAnimation();
+ TSCORE.IO.createDirectoryTree(TSCORE.currentPath);
+ })
+ .append( "<input type='radio' name='options'>")
+ .prepend( "<i class='fa fa-adjust' />")
+ )
+ ); // end button group
};
- // Vars
- exports.Title = extensionTitle;
- exports.ID = extensionID;
- exports.Type = extensionType;
- exports.Icon = extensionIcon;
- exports.Version = extensionVersion;
- exports.ManifestVersion = extensionManifestVersion;
- exports.License = extensionLicense;
+ // Vars
+ exports.Title = extensionTitle;
+ exports.ID = extensionID;
+ exports.Type = extensionType;
+ exports.Icon = extensionIcon;
+ exports.Version = extensionVersion;
+ exports.ManifestVersion = extensionManifestVersion;
+ exports.License = extensionLicense;
- // Methods
+ // Methods
// exports.init = init;
// exports.load = load;
- exports.clearSelectedFiles = clearSelectedFiles;
- exports.getNextFile = getNextFile;
- exports.getPrevFile = getPrevFile;
- exports.removeFileUI = removeFileUI;
- exports.updateFileUI = updateFileUI;
+ exports.clearSelectedFiles = clearSelectedFiles;
+ exports.getNextFile = getNextFile;
+ exports.getPrevFile = getPrevFile;
+ exports.removeFileUI = removeFileUI;
+ exports.updateFileUI = updateFileUI;
});
diff --cc data/ext/perspectiveGrid/perspectiveUI.js
index 04e55aac7,bd2df7d0b..082ffed1c
--- a/data/ext/perspectiveGrid/perspectiveUI.js
+++ b/data/ext/perspectiveGrid/perspectiveUI.js
@@@ -256,9 -273,22 +267,9 @@@ define(function(require, exports, modul
this.toggleThumbnails();
};
- ExtUI.prototype.switchThumbnailSize = function() {
- this.currentTmbSize = this.currentTmbSize + 1;
-
- if (this.currentTmbSize >= TMB_SIZES.length) {
- this.currentTmbSize = 0;
- }
-
- $('.thumbImgTile').css({
- "max-width": TMB_SIZES[this.currentTmbSize],
- "max-height": TMB_SIZES[this.currentTmbSize]
- });
- };
-
ExtUI.prototype.enableThumbnails = function() {
$("#" + this.extensionID + "IncreaseThumbsButton").prop('disabled', false);
- TSCORE.showLoadingAnimation();
+ /*TSCORE.showLoadingAnimation();
var $tiltleElem = $("#" + this.extensionID + "Container .thumbImgTile");
$tiltleElem.each(function(index) {
var $element = $(this);
diff --cc data/ext/perspectiveImageSwiper/perspectiveUI.js
index 4e0c1850f,74628c04b..1aae32cc0
--- a/data/ext/perspectiveImageSwiper/perspectiveUI.js
+++ b/data/ext/perspectiveImageSwiper/perspectiveUI.js
@@@ -39,15 -39,15 +39,15 @@@ define(function(require, exports, modul
title: fileInfo[TSCORE.fileListTITLE]
}
- var thumb = loadThumbnail(doc.path);
+ var metaFilePath = TSCORE.Meta.findMetaFilebyPath(filePath, "png");
+ if(metaFilePath) {
+ doc.thumbnail = encodeURI("file://" + metaFilePath);
+ }
+ /*var thumb = loadThumbnail(doc.path);
if(thumb) {
doc.thumbnail = encodeURI("file://" + thumb);
- }
- if (isCordova) {
- doc.thumbnail = doc.thumbnail.replace("file://","");
- doc.path = doc.path.replace("file://", "");
- }
- data.push(doc);
+ }*/
- data.push(doc);
++ data.push(doc);
}
});
diff --cc data/ext/viewerHTML/mainUI.html
index 33434b1f9,33434b1f9..e2bbc541b
--- a/data/ext/viewerHTML/mainUI.html
+++ b/data/ext/viewerHTML/mainUI.html
@@@ -1,12 -1,12 +1,39 @@@
--<div class="btn-toolbar" id="viewerToolbar">
-- <div class="btn-group">
-- <button class="btn btn-link btn-lg" id="changeStyleButton"><span class="fa-stack">
-- <i class="fa fa-circle fa-stack-base fa-stack-2x iconBackground"></i><i class="fa fa-adjust fa-stack-1x iconForeground"></i></span></button>
-- <button class="btn btn-link btn-lg" id="zoomOutButton"><span class="fa-stack">
-- <i class="fa fa-circle fa-stack-base fa-stack-2x iconBackground"></i><i class="fa fa-search-minus fa-stack-1x iconForeground"></i></span></button>
-- <button class="btn btn-link btn-lg" id="zoomInButton"><span class="fa-stack">
-- <i class="fa fa-circle fa-stack-base fa-stack-2x iconBackground"></i><i class="fa fa-search-plus fa-stack-1x iconForeground"></i></span></button>
-- <button class="btn btn-link btn-lg" id="printButton"><span class="fa-stack">
-- <i class="fa fa-circle fa-stack-base fa-stack-2x iconBackground"></i><i class="fa fa-print fa-stack-1x iconForeground"></i></span></button>
-- </div>
--</div>
++<div class="btn-group dropup extMainMenu">
++ <button type="button" class="btn roundButton dropdown-toggle viewerMainMenuButton" data-toggle="dropdown">
++ <i class="fa fa-ellipsis-v fa-2x"></i>
++ </button>
++ <ul class="dropdown-menu pull-right" id="viewerToolbar">
++ <!--button class="btn btn-link btn-lg" id="zoomOutButton"><span class="fa-stack">
++ <i class="fa fa-circle fa-stack-base fa-stack-2x iconBackground"></i>
++ <i class="fa fa-search-minus fa-stack-1x iconForeground"></i></span>
++ </button-->
++ <button class="btn btn-link btn-lg" id="changeStyleButton">
++ <span class="fa-stack">
++ <i class="fa fa-circle fa-stack-base fa-stack-2x iconBackground"></i>
++ <i class="fa fa-adjust fa-stack-1x iconForeground"></i>
++ </span>
++ </button>
++ <button class="btn btn-link btn-lg" id="zoomOutButton">
++ <span class="fa-stack">
++ <i class="fa fa-circle fa-stack-base fa-stack-2x iconBackground"></i>
++ <i class="fa fa-search-minus fa-stack-1x iconForeground"></i>
++ </span>
++ </button>
++ <button class="btn btn-link btn-lg" id="zoomInButton">
++ <span class="fa-stack">
++ <i class="fa fa-circle fa-stack-base fa-stack-2x iconBackground"></i>
++ <i class="fa fa-search-plus fa-stack-1x iconForeground"></i>
++ </span>
++ </button>
++ <button class="btn btn-link btn-lg" id="printButton">
++ <span class="fa-stack">
++ <i class="fa fa-circle fa-stack-base fa-stack-2x iconBackground"></i>
++ <i class="fa fa-print fa-stack-1x iconForeground"></i>
++ </span>
++ </button>
++ <!--li><a id="{{id}}ToogleSelectAll">
++ <i class="fa fa-square-o fa-lg fa-fw"></i>&nbsp;<span data-i18n="ns.perspectiveList:toggleSelectAll"></span>
++ </a></li>
++ <li class="divider"></li-->
++ </ul>
++</div>
diff --cc data/js/perspective.manager.js
index 169629479,d921e468a..90666a6e9
--- a/data/js/perspective.manager.js
+++ b/data/js/perspective.manager.js
@@@ -6,10 -6,11 +6,11 @@@ define(function(require, exports, modul
console.log('Loading perspective.manager.js ...');
var perspectives;
var TSCORE = require('tscore');
+ var TSPRO = require("tspro");
- var initPerspectives = function() {
+ var initPerspectivesOLD = function() {
perspectives = [];
- $('#viewSwitcher').empty();
+ $('#perspectiveSwitcher').empty();
$('#viewToolbars').empty();
$('#viewContainers').empty();
$('#viewFooters').empty();
diff --cc data/node-webkit/node-webkit.api.js
index 469a662e0,7cf008a14..b714afd9c
--- a/data/node-webkit/node-webkit.api.js
+++ b/data/node-webkit/node-webkit.api.js
@@@ -504,14 -506,22 +506,22 @@@ define(function(require, exports, modul
});
}
}
- TSPOSTIO.listDirectory(anotatedDirList);
-
- //watchDirecotory(dirPath, function(event, file) {
- // TSCORE.IO.listDirectory(dirPath);
- //});
+ if (readyCallback) {
+ readyCallback(anotatedDirList);
+ } else {
+ TSPOSTIO.listDirectory(anotatedDirList);
+ //TODO: find better place
- watchDirecotory(dirPath, function(event, file) {
- TSCORE.IO.listDirectory(dirPath);
- });
++ //watchDirecotory(dirPath, function(event, file) {
++ // TSCORE.IO.listDirectory(dirPath);
++ //});
+ }
});
} catch (ex) {
- TSPOSTIO.errorOpeningPath();
+ if (readyCallback) {
+ readyCallback(anotatedDirList);
+ } else {
+ TSPOSTIO.errorOpeningPath();
+ }
console.error("Listing directory " + dirPath + " failed " + ex);
}
};