Skip to content

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

Merge with develop branch reopening dialogs

kristiyandd70ce13e4ad09
diff --git a/.gitignore b/.gitignore
index 0dd68626a..a909e78d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,11 +5,11 @@ CHANGELOG.TXT
runfirefox
runfirefoxbeta
/node_modules
-
+extensions
docs
data/pro
data/tsprofile
-
+data/ext
nwjsdata
data/electron/data
data/node-webkit/locales
diff --git a/data/assets/general.css b/data/assets/general.css
index ef169304e..a418c7c18 100644
--- a/data/assets/general.css
+++ b/data/assets/general.css
@@ -257,6 +257,12 @@ li hr {
border: 3px dashed #1DD19F;
}
+div.hopscotch-bubble {
+ z-index: 1030 !important;
+}
+/* END Used in the tours for hapscotch */
+
+
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
.appBackgroundTile {
diff --git a/data/chromium/popup.html b/data/chromium/popup.html
index ca8dcee08..1aedf1386 100644
--- a/data/chromium/popup.html
+++ b/data/chromium/popup.html
@@ -10,7 +10,7 @@ can be found in the LICENSE file.
<title></title>
<link rel="stylesheet" type="text/css" href="../assets/tagspaces.css">
</head>
-<body style="width: 520px; height: 400px; padding:0; font-size: 14px; background-color: #f9f9f9;">
+<body style="width: 520px; height: 420px; padding:0; font-size: 14px; background-color: #f9f9f9;">
<div class="well" style="margin: 0; border: 0px; background-color: transparent;">
<div style="white-space: nowrap;" class="text-center">
<img src="../assets/icon128.png" class="pull-left" style="margin-left: 20px; max-height: 32px; max-width: 32px;"/>&nbsp;&nbsp;
diff --git a/data/chromium/popup.js b/data/chromium/popup.js
index b078f67f9..ee5e20e77 100644
--- a/data/chromium/popup.js
+++ b/data/chromium/popup.js
@@ -13,6 +13,8 @@
var htmlTemplate;
var tagLibrary;
var fileExt;
+ var currentTabURL;
+ var currentTabID;
function init() {
$("#startTagSpaces").on("click", function(e) {
@@ -25,7 +27,9 @@
var tagList = extractAllTags(tagLibrary);
chrome.tabs.getSelected(null, function(tab) {
- fileExt = getFileExt(tab.url);
+ currentTabURL = tab.url;
+ currentTabID = tab.id;
+ fileExt = getFileExt(currentTabURL);
$('#title').val(tab.title.substring(tab.title.lastIndexOf("/") + 1, tab.title.length));
$("#saveSelectionAsHtml").attr("disabled", (fileExt !== 'mhtml'));
});
@@ -91,18 +95,16 @@
}
function saveAsBookmark() {
- chrome.tabs.getSelected(null, function(tab) {
- var filename;
- tags = document.getElementById("tags").value;
- if (tags) {
- tags = tags.split(",").join(" ");
- filename = $('#title').val() + ' [' + tags + '].url';
- } else {
- filename = $('#title').val() + '.url';
- }
- var content = '[InternetShortcut]\r\nURL=' + tab.url;
- saveAs(content, filename);
- });
+ var filename;
+ tags = document.getElementById("tags").value;
+ if (tags) {
+ tags = tags.split(",").join(" ");
+ filename = $('#title').val() + ' [' + tags + '].url';
+ } else {
+ filename = $('#title').val() + '.url';
+ }
+ var content = '[InternetShortcut]\r\nURL=' + currentTabURL + '';
+ saveAs(content, filename);
}
function saveAsMHTML() {
@@ -115,22 +117,19 @@
filename = $('#title').val() + '.' + fileExt;
}
- chrome.tabs.getSelected(null, function(tab) {
-
- if (fileExt === 'mhtml') {
- chrome.pageCapture.saveAsMHTML({
- tabId: tab.id
- }, function(mhtml) {
- saveAs(mhtml, filename);
- });
- } else {
- chrome.downloads.download({
- url: tab.url,
- filename: filename,
- saveAs: true
- });
- }
- });
+ if (fileExt === 'mhtml') {
+ chrome.pageCapture.saveAsMHTML({
+ tabId: currentTabID
+ }, function(mhtml) {
+ saveAs(mhtml, filename);
+ });
+ } else {
+ chrome.downloads.download({
+ url: currentTabURL,
+ filename: filename,
+ saveAs: true
+ });
+ }
}
function saveScreenshot() {
@@ -205,7 +204,7 @@
});
// end saving all images*/
- cleanedHTML = "<body>" + cleanedHTML + "</body>";
+ cleanedHTML = "<body data-sourceUrl='" + currentTabURL + "' data-scrapedOn='" + (new Date()) + "' >" + cleanedHTML + "</body>";
if (htmlTemplate) {
cleanedHTML = htmlTemplate.replace(/\<body[^>]*\>([^]*)\<\/body>/m, cleanedHTML); // jshint ignore:line
}
diff --git a/data/cordova/cordova.api.js b/data/cordova/cordova.api.js
index 042a80bce..ba0af486a 100644
--- a/data/cordova/cordova.api.js
+++ b/data/cordova/cordova.api.js
@@ -323,7 +323,11 @@ define(function(require, exports, module) {
function sendFile(filePath) {
console.log("Sending file: " + filePath);
- window.plugins.fileOpener.send(filePath);
+ if (filePath.indexOf("file://") === 0) {
+ window.plugins.fileOpener.send(filePath);
+ } else {
+ window.plugins.fileOpener.send("file://" + filePath);
+ }
}
// Platform API
@@ -993,8 +997,10 @@ define(function(require, exports, module) {
console.log("Opening natively: " + filePath);
if (filePath.indexOf("http://") === 0 || filePath.indexOf("https://") === 0) {
window.open(filePath, '_system');
- } else {
+ } else if (filePath.indexOf("file://") === 0) {
window.plugins.fileOpener.open(filePath);
+ } else {
+ window.plugins.fileOpener.open("file://" + filePath);
}
}
diff --git a/data/electron/electron.api.js b/data/electron/electron.api.js
index 26a00f7c3..d24e58485 100644
--- a/data/electron/electron.api.js
+++ b/data/electron/electron.api.js
@@ -157,7 +157,14 @@ define(function(require, exports, module) {
click: function() {
TSCORE.UI.showAboutDialog();
}
- }
+ },
+ {
+ label: $.i18n.t("ns.common:license"),
+ //accelerator: "bind key",
+ click: function() {
+ TSCORE.UI.showLicenseDialog();
+ }
+ },
]
},
];
diff --git a/data/index.html b/data/index.html
index f4ba53614..614471e5d 100644
--- a/data/index.html
+++ b/data/index.html
@@ -349,7 +349,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
- <a type="button" id="closeDialog" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></a>
+ <a type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></a>
<h4 class="modal-title" id="myModalLabel1" data-i18n="ns.dialogs:aboutTitle"></h4>
</div>
<div class="modal-body">
@@ -357,7 +357,28 @@
</div>
<div class="modal-footer">
<button class="btn pull-left" id="aboutDialogBack" title="Go Back"><i class="fa fa-arrow-left fa-lg"></i></button>
- <button class="btn btn-primary" id="confirmButtonDialog" data-dismiss="modal" aria-hidden="true"><i class="fa fa-check fa-lg"></i></button>
+ <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true"><i class="fa fa-check fa-lg"></i></button>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="modal fullScreenMobile" id="aboutLicenseModal" tabindex="-1" role="dialog" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h4 class="modal-title" data-i18n="ns.common:license"></h4>
+ </div>
+ <div class="modal-body">
+ <iframe id="eulaIframe" sandbox="allow-same-origin allow-scripts" nwdisable style="width: 100%; height: 100%; min-height: 350px; border: 0;"></iframe>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-default pull-left" id="disagreeLicenseButton" aria-hidden="true">
+ <i class="fa fa-close fa-lg"></i>&nbsp;<span data-i18n="ns.common:disagreeLicense"></span>
+ </button>
+ <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">
+ <i class="fa fa-check fa-lg"></i>&nbsp;<span data-i18n="ns.common:agreeLicense"></span>
+ </button>
</div>
</div>
</div>
diff --git a/data/js/core.api.js b/data/js/core.api.js
index 8b5e0d213..99eac0ede 100644
--- a/data/js/core.api.js
+++ b/data/js/core.api.js
@@ -29,6 +29,7 @@ define(function(require, exports, module) {
var tsMeta = require('tsmeta');
var tsExt = require('tsextapi');
var tsExtManager = require('tsextmanager');
+ var TSCORE = require('tscore');
// Defining variables
var currentPath;
@@ -106,6 +107,10 @@ define(function(require, exports, module) {
var language = tsSettings.getInterfaceLanguage();
if (tsSettings.isFirstRun()) {
+ // Showing license dialog
+ tsCoreUI.showLicenseDialog();
+
+ // Setting the language
var browserLang = navigator.language || navigator.userLanguage;
var languageMatched;
@@ -212,7 +217,9 @@ define(function(require, exports, module) {
tsSearchUI.showSearchArea();
});
Mousetrap.bind(tsSettings.getRenamingFileKeyBinding(), function() {
- tsCoreUI.showRenameFileDialog();
+ if (TSCORE.selectedFiles[0]) {
+ tsCoreUI.showFileRenameDialog(TSCORE.selectedFiles[0]);
+ }
});
}
@@ -250,16 +257,16 @@ define(function(require, exports, module) {
var currentVersion = parseFloat(verC[0] + '.' + verC[1]);
/* Testing the new version notifications
- availableVersion = 2;
- currentVersion = 1;
- availableBuild = 2;
- currentBuild = 1; */
+ availableVersion = 2;
+ currentVersion = 1;
+ availableBuild = 2;
+ currentBuild = 1; */
if (availableVersion > currentVersion || availableVersion == currentVersion && availableBuild > currentBuild) {
$('#newVersionAvailable').css('display', 'block');
/*$('#whatsNewModal iframe').attr('src', 'http://tagspaces.org/whatsnew/');
- $('#whatsNewModal').on('show.bs.modal', function(e) {
- $('#whatsNewModal iframe').attr('src', 'http://tagspaces.org/whatsnew/');
- });*/
+ $('#whatsNewModal').on('show.bs.modal', function(e) {
+ $('#whatsNewModal iframe').attr('src', 'http://tagspaces.org/whatsnew/');
+ });*/
}
}
@@ -287,8 +294,8 @@ define(function(require, exports, module) {
function updateFileModel(model, oldPath, newPath) {
console.log('Removing file from model');
var title = tsTagUtils.extractTitle(newPath),
- fileExt = tsTagUtils.extractFileExtension(newPath),
- fileTags = tsTagUtils.extractTags(newPath);
+ fileExt = tsTagUtils.extractFileExtension(newPath),
+ fileTags = tsTagUtils.extractTags(newPath);
for (var i = 0; i < model.length; i++) {
if (model[i].path == oldPath) {
model[i].path = newPath;
diff --git a/data/js/core.ui.js b/data/js/core.ui.js
index 90e117985..812fed04b 100644
--- a/data/js/core.ui.js
+++ b/data/js/core.ui.js
@@ -183,7 +183,7 @@ define(function(require, exports, module) {
}
});
- function eulaVersion() {
+ function reloadAboutContent() {
if (TSCORE.PRO) {
$('#aboutIframe').attr('src', 'pro/about.html');
} else {
@@ -192,13 +192,10 @@ define(function(require, exports, module) {
}
$('#aboutDialogBack').click(function() {
- eulaVersion();
+ reloadAboutContent();
});
- $('#confirmButtonDialog').click(function() {
- eulaVersion();
- });
- $('#closeDialog').click(function() {
- eulaVersion();
+ $('#dialogAboutTS').on('show.bs.modal', function() {
+ reloadAboutContent()
});
// Open About Dialog
@@ -255,10 +252,16 @@ define(function(require, exports, module) {
});
// End File Menu
- $('#showLocations').click(function() {
+ $('#showLocations').on('click', function() {
showLocationsPanel();
});
+ $('#disagreeLicenseButton').on('click', function() {
+ TSCORE.Config.Settings.firstRun = true;
+ TSCORE.Config.saveSettings();
+ window.close();
+ });
+
$('#showTagGroups').click(function() {
showTagsPanel();
});
@@ -655,37 +658,6 @@ define(function(require, exports, module) {
});
}
- function showRenameFileDialog() {
- if (TSCORE.selectedFiles[0]) {
- $('#renamedFileName').val(TSCORE.selectedFiles[0]);
- $('#formFileRename').validator();
- $('#formFileRename').submit(function(e) {
- e.preventDefault();
- if ($('#renameFileButton').prop('disabled') === false) {
- $('#renameFileButton').click();
- }
- });
- $('#formFileRename').on('invalid.bs.validator', function() {
- $('#renameFileButton').prop('disabled', true);
- });
- $('#formFileRename').on('valid.bs.validator', function() {
- $('#renameFileButton').prop('disabled', false);
- });
- $('#dialogFileRename').on('shown.bs.modal', function() {
- $('#renamedFileName').focus();
- });
- $('#dialogFileRename').modal({
- backdrop: 'static',
- show: true
- });
- $('#dialogFileRename').draggable({
- handle: ".modal-header"
- });
- } else {
- TSCORE.showAlertDialog("Renaming file failed. Please select a file.");
- }
- }
-
function showDirectoryBrowserDialog(path) {
require([
'text!templates/DirectoryBrowserDialog.html',
@@ -818,6 +790,33 @@ define(function(require, exports, module) {
});
}
+ function showLicenseDialog() {
+ if (TSCORE.PRO) {
+ $('#eulaIframe').attr('src', 'pro/EULA.txt');
+ } else {
+ $('#eulaIframe').attr('src', 'LICENSE.txt');
+ }
+ $('#aboutLicenseModal').modal({
+ backdrop: 'static',
+ show: true
+ });
+ $('#aboutLicenseModal').draggable({
+ handle: ".modal-header"
+ });
+ }
+
+ function reloadLicenseDialog() {
+ if (TSCORE.PRO) {
+ $('#eulaIframe').attr('src', 'pro/EULA.txt');
+ } else {
+ $('#eulaIframe').attr('src', 'LICENSE.txt');
+ }
+ }
+
+ $('#aboutLicenseModal').on('show.bs.modal', function() {
+ reloadLicenseDialog();
+ });
+
function disableTopToolbar() {
$('#perspectiveSwitcherButton').prop('disabled', true);
$('#searchBox').prop('disabled', true);
@@ -987,7 +986,6 @@ define(function(require, exports, module) {
exports.showSuccessDialog = showSuccessDialog;
exports.showConfirmDialog = showConfirmDialog;
exports.showFileRenameDialog = showFileRenameDialog;
- exports.showRenameFileDialog = showRenameFileDialog;
exports.showFileCreateDialog = showFileCreateDialog;
exports.showFileDeleteDialog = showFileDeleteDialog;
exports.showDeleteFilesDialog = showDeleteFilesDialog;
@@ -996,6 +994,7 @@ define(function(require, exports, module) {
exports.showTagEditDialog = showTagEditDialog;
exports.showOptionsDialog = showOptionsDialog;
exports.showAboutDialog = showAboutDialog;
+ exports.showLicenseDialog = showLicenseDialog;
exports.showLocationsPanel = showLocationsPanel;
exports.showTagsPanel = showTagsPanel;
exports.showContactUsPanel = showContactUsPanel;
diff --git a/data/js/options.ui.js b/data/js/options.ui.js
index b33a43591..9c64f3344 100644
--- a/data/js/options.ui.js
+++ b/data/js/options.ui.js
@@ -14,10 +14,7 @@ define(function(require, exports, module) {
if (!helpI18NString) {
helpI18NString = "";
}
- parent.append($('<option>')
- .text('')
- .attr("data-i18n", helpI18NString)
- .val('false'));
+ parent.append($('<option>').text('').attr("data-i18n", helpI18NString).val('false'));
data.forEach(function(extension) {
if (selectedId === extension.id) {
parent.append($('<option>').attr('selected', 'selected').text(extension.name).val(extension.id));
@@ -28,34 +25,24 @@ define(function(require, exports, module) {
}
function addPerspective(parent, perspectiveId) {
- var perspectiveControl = $('<div class="form-inline">')
- .append($('<div class="flexLayout">')
- .append($('<select class="form-control flexMaxWidth"></select>'))
- .append($('<button class="btn btn-link" style="width: 40px" data-i18n="[title]ns.dialogs:removePerspectiveTooltip"><i class="fa fa-times"></button>')
- .click(function() {
- var row4Remove = $(this).parent().parent();
- TSCORE.showConfirmDialog($.i18n.t('ns.dialogs:titleConfirm'), "Do you really want to remove this perspective?", function() {
- row4Remove.remove();
- });
- })));
+ var perspectiveControl = $('<div class="form-inline">').append($('<div class="flexLayout">').append($('<select class="form-control flexMaxWidth"></select>')).append($('<button class="btn btn-link" style="width: 40px" data-i18n="[title]ns.dialogs:removePerspectiveTooltip"><i class="fa fa-times"></button>').click(function() {
+ var row4Remove = $(this).parent().parent();
+ TSCORE.showConfirmDialog($.i18n.t('ns.dialogs:titleConfirm'), "Do you really want to remove this perspective?", function() {
+ row4Remove.remove();
+ });
+ })));
generateSelectOptions(perspectiveControl.find('select'), TSCORE.Config.getPerspectiveExtensions(), perspectiveId, "ns.dialogs:choosePerspective");
perspectiveControl.i18n();
parent.append(perspectiveControl);
}
function addFileType(parent, fileext, viewerId, editorId) {
- var fileTypeControl = $('<div class="form-inline">')
- .append($('<div class="flexLayout" >')
- .append($('<input style="width: 80px" type="text" class="form-control" data-i18n="[placeholder]ns.dialogs:fileExtensionPlaceholder">').val(fileext))
- .append($('<select class="ftviewer form-control flexMaxWidth"></select>'))
- .append($('<select class="fteditor form-control flexMaxWidth"></select>'))
- .append($('<button style="width: 30px" class="btn btn-link" data-i18n="[title]ns.dialogs:removeFileTypeTooltip"><i class="fa fa-times"></button>')
- .click(function() {
- var row4Remove = $(this).parent().parent();
- TSCORE.showConfirmDialog($.i18n.t('ns.dialogs:titleConfirm'), "Do you really want to remove this file type?", function() {
- row4Remove.remove();
- });
- })));
+ var fileTypeControl = $('<div class="form-inline">').append($('<div class="flexLayout" >').append($('<input style="width: 80px" type="text" class="form-control" data-i18n="[placeholder]ns.dialogs:fileExtensionPlaceholder">').val(fileext)).append($('<select class="ftviewer form-control flexMaxWidth"></select>')).append($('<select class="fteditor form-control flexMaxWidth"></select>')).append($('<button style="width: 30px" class="btn btn-link" data-i18n="[title]ns.dialogs:removeFileTypeTooltip"><i class="fa fa-times"></button>').click(function() {
+ var row4Remove = $(this).parent().parent();
+ TSCORE.showConfirmDialog($.i18n.t('ns.dialogs:titleConfirm'), "Do you really want to remove this file type?", function() {
+ row4Remove.remove();
+ });
+ })));
generateSelectOptions(fileTypeControl.find('.ftviewer'), TSCORE.Config.getViewerExtensions(), viewerId, "ns.dialogs:chooseFileViewer");
generateSelectOptions(fileTypeControl.find('.fteditor'), TSCORE.Config.getEditorExtensions(), editorId, "ns.dialogs:chooseFileEditor");
@@ -69,7 +56,7 @@ define(function(require, exports, module) {
return;
}
var isMetaEnabled = $('#enableMetaData').is(':checked');
- if (!isMetaEnabled) {
+ if (!isMetaEnabled) {
$('#writeMetaToSidecarFile').attr('checked', false);
$('#useOCR').attr('checked', false);
$('#useTextExtraction').attr('checked', false);
@@ -104,18 +91,18 @@ define(function(require, exports, module) {
});
$('#defaultSettingsButton').click(function() {
TSCORE.showConfirmDialog(
- $.i18n.t('ns.dialogs:restoreDefaulSettingTitleConfirm'),
- $.i18n.t('ns.dialogs:restoreDefaulSettingMessageConfirm'), function() {
- TSCORE.Config.loadDefaultSettings();
- });
+ $.i18n.t('ns.dialogs:restoreDefaulSettingTitleConfirm'),
+ $.i18n.t('ns.dialogs:restoreDefaulSettingMessageConfirm'), function() {
+ TSCORE.Config.loadDefaultSettings();
+ });
});
$('#keyBindingInstructions').toggle();
$('#keyBindingInstructionsToggle').on('click', function() {
$('#keyBindingInstructions').toggle();
return false;
});
-
- if (!isElectron) {
+
+ if (!isElectron) {
$('#watchCurrentDirectoryControls').hide();
}
if (isCordova) {
@@ -125,10 +112,10 @@ define(function(require, exports, module) {
}
$('#exportTagGroupsButton').click(function() {
var jsonFormat = '{ "appName": "' + TSCORE.Config.DefaultSettings.appName +
- '", "appVersion": "' + TSCORE.Config.DefaultSettings.appVersion +
- '", "appBuild": "' + TSCORE.Config.DefaultSettings.appBuild +
- '", "settingsVersion": ' + TSCORE.Config.DefaultSettings.settingsVersion +
- ', "tagGroups": ';
+ '", "appVersion": "' + TSCORE.Config.DefaultSettings.appVersion +
+ '", "appBuild": "' + TSCORE.Config.DefaultSettings.appBuild +
+ '", "settingsVersion": ' + TSCORE.Config.DefaultSettings.settingsVersion +
+ ', "tagGroups": ';
var blob = new Blob([jsonFormat + JSON.stringify(TSCORE.Config.getAllTagGroupData()) + '}'], {
type: 'application/json'
});
@@ -149,7 +136,7 @@ define(function(require, exports, module) {
$('#calculateTagsCheckbox').attr('checked', TSCORE.Config.getCalculateTags());
$('#loadLocationMetaData').attr('checked', TSCORE.Config.getLoadLocationMeta());
$('#useSearchInSubfolders').attr('checked', TSCORE.Config.getUseSearchInSubfolders());
- $('#maxSearchResultCount').val(TSCORE.Config.getMaxSearchResultCount());
+ $('#maxSearchResultCount').val(TSCORE.Config.getMaxSearchResultCount());
$('#watchCurrentDirectory').attr('checked', TSCORE.Config.getWatchCurrentDirectory());
$('#tagsDelimiterInput').val(TSCORE.Config.getTagDelimiter());
$('#prefixTagContainerInput').val(TSCORE.Config.getPrefixTagContainer());
@@ -175,7 +162,7 @@ define(function(require, exports, module) {
$('#useGenerateThumbnails').attr('checked', TSCORE.Config.getUseGenerateThumbnails());
enableMetaData();
}
-
+
var $languagesDropdown = $('#languagesList');
$languagesDropdown.empty();
TSCORE.Config.getSupportedLanguages().forEach(function(value) {
@@ -230,7 +217,7 @@ define(function(require, exports, module) {
TSCORE.Config.setPrefixTagContainer($('#prefixTagContainerInput').val());
TSCORE.Config.setLoadLocationMeta($('#loadLocationMetaData').is(':checked'));
TSCORE.Config.setUseSearchInSubfolders($('#useSearchInSubfolders').is(':checked'));
- TSCORE.Config.setMaxSearchResultCount($('#maxSearchResultCount').val());
+ TSCORE.Config.setMaxSearchResultCount($('#maxSearchResultCount').val());
TSCORE.Config.setWatchCurrentDirectory($('#watchCurrentDirectory').is(':checked'));
TSCORE.Config.setNextDocumentKeyBinding(parseKeyBinding($('#nextDocumentKeyBinding').val()));
TSCORE.Config.setPrevDocumentKeyBinding(parseKeyBinding($('#prevDocumentKeyBinding').val()));
@@ -245,10 +232,10 @@ define(function(require, exports, module) {
TSCORE.Config.setRenamingFileKeyBinding(parseKeyBinding($('#renamingFileKeyBinding').val()));
if (TSCORE.PRO) {
TSCORE.Config.setEnableMetaData($('#enableMetaData').is(':checked'));
- TSCORE.Config.setUseTrashCan($('#useTrashCan').is(':checked'));
- TSCORE.Config.setUseOCR($('#useOCR').is(':checked'));
- TSCORE.Config.setUseTextExtraction($('#useTextExtraction').is(':checked'));
- TSCORE.Config.setUseGenerateThumbnails($('#useGenerateThumbnails').is(':checked'));
+ TSCORE.Config.setUseTrashCan($('#useTrashCan').is(':checked'));
+ TSCORE.Config.setUseOCR($('#useOCR').is(':checked'));
+ TSCORE.Config.setUseTextExtraction($('#useTextExtraction').is(':checked'));
+ TSCORE.Config.setUseGenerateThumbnails($('#useGenerateThumbnails').is(':checked'));
}
var interfaceLang = $('#languagesList').val();
TSCORE.Config.setInterfaceLanguage(interfaceLang);
diff --git a/data/js/settings.api.js b/data/js/settings.api.js
index cf4bee89c..e8e9b11d6 100644
--- a/data/js/settings.api.js
+++ b/data/js/settings.api.js
@@ -17,19 +17,19 @@ define(function(require, exports, module) {
'title': undefined,
'type': 'plain'
/*
- "pattern":"yyyymmddhhmmss-yyyymmddhhmmss",
- "example":"20120114123456-20120823231235",
- "regex":"",
- "maxlength":17,
- "chainedTags":[
- "isbn","autor"
- ],
- "url": "http://example.com",
- "action":"showDatePicker",
- "prefixes":[
- "EUR", "USD", "BGN"
- ]
- */
+ "pattern":"yyyymmddhhmmss-yyyymmddhhmmss",
+ "example":"20120114123456-20120823231235",
+ "regex":"",
+ "maxlength":17,
+ "chainedTags":[
+ "isbn","autor"
+ ],
+ "url": "http://example.com",
+ "action":"showDatePicker",
+ "prefixes":[
+ "EUR", "USD", "BGN"
+ ]
+ */
};
var locationTemplate = {
@@ -245,7 +245,7 @@ define(function(require, exports, module) {
var perspectives = [];
getExtensions().forEach(function(extension) {
if (extension.type === "perspective") {
- perspectives.push({ 'id': extension.id, 'name': extension.name });
+ perspectives.push({'id': extension.id, 'name': extension.name});
}
});
return perspectives;
@@ -255,7 +255,7 @@ define(function(require, exports, module) {
var viewers = [];
getExtensions().forEach(function(extension) {
if (extension.type === "viewer" || extension.type === "editor") {
- viewers.push({ 'id': extension.id, 'name': extension.name });
+ viewers.push({'id': extension.id, 'name': extension.name});
}
});
return viewers;
@@ -265,7 +265,7 @@ define(function(require, exports, module) {
var editors = [];
getExtensions().forEach(function(extension) {
if (extension.type === "editor") {
- editors.push({ 'id': extension.id, 'name': extension.name });
+ editors.push({'id': extension.id, 'name': extension.name});
}
});
return editors;
@@ -313,17 +313,18 @@ define(function(require, exports, module) {
if (!exports.Settings.extensions || exports.Settings.extensions.length < 1) {
exports.Settings.extensions = [];
exports.DefaultSettings.ootbPerspectives.forEach(function(extensionId) {
- exports.Settings.extensions.push({ 'id': extensionId, 'name': extensionId, 'type': 'perspective' });
+ exports.Settings.extensions.push({'id': extensionId, 'name': extensionId, 'type': 'perspective'});
});
exports.DefaultSettings.ootbViewers.forEach(function(extensionId) {
- exports.Settings.extensions.push({ 'id': extensionId, 'name': extensionId, 'type': 'viewer' });
+ exports.Settings.extensions.push({'id': extensionId, 'name': extensionId, 'type': 'viewer'});
});
exports.DefaultSettings.ootbEditors.forEach(function(extensionId) {
- exports.Settings.extensions.push({ 'id': extensionId, 'name': extensionId, 'type': 'editor' });
+ exports.Settings.extensions.push({'id': extensionId, 'name': extensionId, 'type': 'editor'});
});
}
return exports.Settings.extensions;
}
+
function setExtensions(extensions) {
exports.Settings.extensions = extensions;
@@ -335,6 +336,7 @@ define(function(require, exports, module) {
}
return exports.Settings.extensionsPath;
}
+
function setExtensionPath(value) {
exports.Settings.extensionsPath = value;
@@ -346,6 +348,7 @@ define(function(require, exports, module) {
}
return exports.Settings.isWindowMaximized;
}
+
function setIsWindowMaximized(value) {
exports.Settings.isWindowMaximized = value;
@@ -357,6 +360,7 @@ define(function(require, exports, module) {
}
return exports.Settings.lastOpenedLocation;
}
+
function setLastOpenedLocation(value) {
exports.Settings.lastOpenedLocation = value;
@@ -366,6 +370,7 @@ define(function(require, exports, module) {
return exports.Settings.defaultLocation || "";
}
+
function setDefaultLocation(value) {
exports.Settings.defaultLocation = value;
@@ -384,6 +389,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.closeViewer;
}
+
function setCloseViewerKeyBinding(value) {
exports.Settings.keyBindings.closeViewer = value;
@@ -397,6 +403,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.editDocument;
}
+
function setEditDocumentKeyBinding(value) {
exports.Settings.keyBindings.editDocument = value;
@@ -410,6 +417,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.saveDocument;
}
+
function setSaveDocumentKeyBinding(value) {
exports.Settings.keyBindings.saveDocument = value;
@@ -426,6 +434,7 @@ define(function(require, exports, module) {
//}
return exports.DefaultSettings.keyBindings.reloadApplication;
}
+
function setReloadApplicationKeyBinding(value) {
consolo.log('Not supported command'); //exports.Settings.keyBindings.reloadApplication = value;
@@ -439,6 +448,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.toggleFullScreen;
}
+
function setToggleFullScreenKeyBinding(value) {
exports.Settings.keyBindings.toggleFullScreen = value;
@@ -452,6 +462,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.addRemoveTags;
}
+
function setAddRemoveTagsKeyBinding(value) {
exports.Settings.keyBindings.addRemoveTags = value;
@@ -465,6 +476,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.reloadDocument;
}
+
function setReloadDocumentKeyBinding(value) {
exports.Settings.keyBindings.reloadDocument = value;
@@ -474,6 +486,7 @@ define(function(require, exports, module) {
exports.Settings.keyBindings.selectAll = value;
}
+
function getSelectAllKeyBinding() {
updateKeyBindingsSetting();
if (exports.Settings.keyBindings.selectAll === undefined) {
@@ -485,12 +498,13 @@ define(function(require, exports, module) {
function getRenamingFileKeyBinding() {
updateKeyBindingsSetting;
- if(exports.Settings.keyBindings.renameFile === undefined){
+ if (exports.Settings.keyBindings.renameFile === undefined) {
exports.Settings.keyBindings.renameFile = exports.DefaultSettings.keyBindings.renameFile;
saveSettings();
}
return exports.Settings.keyBindings.renameFile;
}
+
function setRenamingFileKeyBinding(value) {
exports.Settings.keyBindings.renameFile = value;
}
@@ -503,6 +517,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.deleteDocument;
}
+
function setDeleteDocumentKeyBinding(value) {
exports.Settings.keyBindings.deleteDocument = value;
@@ -516,6 +531,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.propertiesDocument;
}
+
function setPropertiesDocumentKeyBinding(value) {
exports.Settings.keyBindings.propertiesDocument = value;
@@ -529,6 +545,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.nextDocument;
}
+
function setNextDocumentKeyBinding(value) {
exports.Settings.keyBindings.nextDocument = value;
@@ -542,6 +559,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.prevDocument;
}
+
function setShowTagLibraryKeyBinding(value) {
exports.Settings.keyBindings.showTagLibrary = value;
@@ -555,6 +573,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.showTagLibrary;
}
+
function setShowFolderNavigatorKeyBinding(value) {
exports.Settings.keyBindings.showFolderNavigator = value;
@@ -568,6 +587,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.showFolderNavigator;
}
+
function setPrevDocumentKeyBinding(value) {
exports.Settings.keyBindings.prevDocument = value;
@@ -581,6 +601,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.openDevTools;
}
+
function setOpenDevToolsScreenKeyBinding(value) {
exports.Settings.keyBindings.openDevTools = value;
@@ -594,6 +615,7 @@ define(function(require, exports, module) {
}
return exports.Settings.keyBindings.openSearch;
}
+
function setSearchKeyBinding(value) {
exports.Settings.keyBindings.openSearch = value;
@@ -606,6 +628,7 @@ define(function(require, exports, module) {
}
return exports.Settings.interfaceLanguage;
}
+
function setInterfaceLanguage(value) {
exports.Settings.interfaceLanguage = value;
@@ -618,6 +641,7 @@ define(function(require, exports, module) {
}
return exports.Settings.showWarningRecursiveScan;
}
+
function setShowWarningRecursiveScan(value) {
exports.Settings.showWarningRecursiveScan = value;
saveSettings();
@@ -629,6 +653,7 @@ define(function(require, exports, module) {
}
return exports.Settings.showMainMenu;
}
+
function setShowMainMenu(value) {
exports.Settings.showMainMenu = value;
@@ -640,6 +665,7 @@ define(function(require, exports, module) {
}
return exports.Settings.webDavPath;
}
+
function setWebDavPath(value) {
exports.Settings.webDavPath = value;
@@ -651,6 +677,7 @@ define(function(require, exports, module) {
}
return exports.Settings.showUnixHiddenEntries;
}
+
function setShowUnixHiddenEntries(value) {
exports.Settings.showUnixHiddenEntries = value;
@@ -662,6 +689,7 @@ define(function(require, exports, module) {
}
return exports.Settings.checkForUpdates;
}
+
function setCheckForUpdates(value) {
exports.Settings.checkForUpdates = value;
@@ -673,6 +701,7 @@ define(function(require, exports, module) {
}
return exports.Settings.prefixTagContainer;
}
+
function setPrefixTagContainer(value) {
exports.Settings.prefixTagContainer = value;
@@ -684,6 +713,7 @@ define(function(require, exports, module) {
}
return exports.Settings.tagDelimiter;
}
+
function setTagDelimiter(value) {
exports.Settings.tagDelimiter = value;
@@ -695,6 +725,7 @@ define(function(require, exports, module) {
}
return exports.Settings.calculateTags;
}
+
function setCalculateTags(value) {
exports.Settings.calculateTags = value;
@@ -706,50 +737,55 @@ define(function(require, exports, module) {
}
return exports.Settings.loadLocationMeta;
}
+
function setLoadLocationMeta(value) {
exports.Settings.loadLocationMeta = value;
}
function getUseSearchInSubfolders() {
- if (exports.Settings.useSearchInSubfolders === undefined) {
+ if (exports.Settings.useSearchInSubfolders === undefined) {
exports.Settings.useSearchInSubfolders = exports.DefaultSettings.useSearchInSubfolders;
}
return exports.Settings.useSearchInSubfolders;
}
+
function setUseSearchInSubfolders(value) {
exports.Settings.useSearchInSubfolders = value;
}
-
+
function getMaxSearchResultCount() {
- if (exports.Settings.maxSearchResultCount === undefined) {
+ if (exports.Settings.maxSearchResultCount === undefined) {
exports.Settings.maxSearchResultCount = exports.DefaultSettings.maxSearchResultCount;
}
return exports.Settings.maxSearchResultCount;
}
+
function setMaxSearchResultCount(value) {
if (isNaN(value) || value < 0 || value > 2000) {
value = 0;
}
exports.Settings.maxSearchResultCount = value;
}
-
+
function getWatchCurrentDirectory() {
- if (exports.Settings.watchCurrentDirectory === undefined) {
+ if (exports.Settings.watchCurrentDirectory === undefined) {
exports.Settings.watchCurrentDirectory = exports.DefaultSettings.watchCurrentDirectory;
}
return exports.Settings.watchCurrentDirectory;
}
+
function setWatchCurrentDirectory(value) {
exports.Settings.watchCurrentDirectory = value;
}
-
+
function getEnableMetaData() {
if (exports.Settings.enableMetaData === undefined) {
exports.Settings.enableMetaData = exports.DefaultSettings.enableMetaData;
}
return exports.Settings.enableMetaData;
}
+
function setEnableMetaData(value) {
exports.Settings.enableMetaData = value;
@@ -761,6 +797,7 @@ define(function(require, exports, module) {
}
return exports.Settings.supportedFileTypes;
}
+
function setSupportedFileTypes(value) {
exports.Settings.supportedFileTypes = value;
@@ -770,10 +807,12 @@ define(function(require, exports, module) {
return exports.DefaultSettings.newTextFileContent;
}
+
function getNewHTMLFileContent() {
return exports.DefaultSettings.newHTMLFileContent;
}
+
function getNewMDFileContent() {
return exports.DefaultSettings.newMDFileContent;
@@ -785,6 +824,7 @@ define(function(require, exports, module) {
}
return exports.Settings.useTrashCan;
}
+
function setUseTrashCan(value) {
exports.Settings.useTrashCan = value;
@@ -796,6 +836,7 @@ define(function(require, exports, module) {
}
return exports.Settings.useOCR;
}
+
function setUseOCR(value) {
exports.Settings.useOCR = value;
@@ -807,6 +848,7 @@ define(function(require, exports, module) {
}
return exports.Settings.useTextExtraction;
}
+
function setUseTextExtraction(value) {
exports.Settings.useTextExtraction = value;
@@ -818,6 +860,7 @@ define(function(require, exports, module) {
}
return exports.Settings.useGenerateThumbnails;
}
+
function setUseGenerateThumbnails(value) {
exports.Settings.useGenerateThumbnails = value;
@@ -830,6 +873,7 @@ define(function(require, exports, module) {
}
return exports.Settings.writeMetaToSidecarFile;
}
+
function setWriteMetaToSidecarFile(value) {
exports.Settings.writeMetaToSidecarFile = value;
@@ -842,6 +886,7 @@ define(function(require, exports, module) {
}
return exports.Settings.useDefaultLocation;
}
+
function setUseDefaultLocation(value) {
exports.Settings.useDefaultLocation = value;
@@ -1100,9 +1145,9 @@ define(function(require, exports, module) {
var editLoc = true;
exports.Settings.tagspacesList.forEach(function(value) {
/* if(value.path == newLocation) {
- TSCORE.showAlertDialog("Selected path is already used by a location!","Duplicated Location Path");
- editLocation = false;
- } */
+ TSCORE.showAlertDialog("Selected path is already used by a location!","Duplicated Location Path");
+ editLocation = false;
+ } */
if (value.name === newName && value.name !== oldName) {
TSCORE.showAlertDialog($.i18n.t('ns.dialogs:selectedLocationNameExistContentAlert'), $.i18n.t('ns.dialogs:selectedLocationNameExistTitleAlert'));
editLoc = false;
@@ -1174,7 +1219,7 @@ define(function(require, exports, module) {
if (appStorageTagGroups) {
tmpSettings.tagGroups = appStorageTagGroups.tagGroups;
}
- }
+ }
//console.log("Settings: "+JSON.stringify(tmpSettings));
if (tmpSettings !== null) {
exports.Settings = tmpSettings;
@@ -1248,7 +1293,7 @@ define(function(require, exports, module) {
exports.getMaxSearchResultCount = getMaxSearchResultCount;
exports.setMaxSearchResultCount = setMaxSearchResultCount;
exports.getWatchCurrentDirectory = getWatchCurrentDirectory;
- exports.setWatchCurrentDirectory = setWatchCurrentDirectory;
+ exports.setWatchCurrentDirectory = setWatchCurrentDirectory;
exports.setEnableMetaData = setEnableMetaData;
exports.getEnableMetaData = getEnableMetaData;
exports.getIsWindowMaximized = getIsWindowMaximized;
diff --git a/data/js/settings.default.js b/data/js/settings.default.js
index a286940d5..bc9ab225c 100644
--- a/data/js/settings.default.js
+++ b/data/js/settings.default.js
@@ -1,5 +1,5 @@
/* Copyright (c) 2012-2015 The TagSpaces Authors. All rights reserved.
- * Use of this source code is governed by a AGPL3 license that
+ * Use of this source code is governed by a AGPL3 license that
* can be found in the LICENSE file. */
define(function (require, exports, module) {
"use strict";
@@ -7,17 +7,17 @@ define(function (require, exports, module) {
exports.defaultSettings = {
"appName": "TagSpaces",
"appVersion": "2.3",
- "appBuild": "0",
- "appBuildID": "20160429112036",
+ "appBuild": "1",
+ "appBuildID": "20160511220451",
"settingsVersion": 2,
"newTextFileContent": "",
- "newHTMLFileContent": "<!DOCTYPE html><html><head><!-- Created with TagSpaces 2.3.0 --><meta http-equiv='Content-Type' content='text/html; charset=utf-8'><style type='text/css'>body{overflow:auto;width:100%;height:100%;font:13.34px Ubuntu,arial,clean,sans-serif;color:#000;line-height:1.4em;background-color:#fff;padding:15px}p{margin:1em 0;line-height:1.5em}table{font:100%;margin:1em}table th{border-bottom:1px solid #bbb;padding:.2em 1em}table td{border-bottom:1px solid #ddd;padding:.2em 1em}input[type=image],input[type=password],input[type=text],textarea{font:99% helvetica,arial,freesans,sans-serif}option,select{padding:0 .25em}optgroup{margin-top:.5em}code,pre{font:12px Monaco,'Courier New','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace}pre{margin:1em 0;font-size:12px;background-color:#eee;border:1px solid #ddd;padding:5px;line-height:1.5em;color:#444;overflow:auto;-webkit-box-shadow:rgba(0,0,0,.07) 0 1px 2px inset;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}pre code{padding:0;font-size:12px;background-color:#eee;border:none}code{font-size:12px;background-color:#f8f8ff;color:#444;padding:0 .2em;border:1px solid #dedede}img{border:0;max-width:100%}abbr{border-bottom:none}a{color:#4183c4;text-decoration:none}a:hover{text-decoration:underline}a code,a:link code,a:visited code{color:#4183c4}h2,h3{margin:1em 0}h1,h2,h3,h4,h5,h6{border:0}h1{font-size:170%;border-top:4px solid #aaa;padding-top:.5em;margin-top:1.5em}h1:first-child{margin-top:0;padding-top:.25em;border-top:none}h2{font-size:150%;margin-top:1.5em;border-top:4px solid #e0e0e0;padding-top:.5em}h3{font-size:130%;margin-top:1em}h4{font-size:120%;margin-top:1em}h5{font-size:115%;margin-top:1em}h6{font-size:110%;margin-top:1em}hr{border:1px solid #ddd}ol,ul{margin:1em 0 1em 2em}ol li,ul li{margin-top:.5em;margin-bottom:.5em}ol ol,ol ul,ul ol,ul ul{margin-top:0;margin-bottom:0}blockquote{margin:1em 0;border-left:5px solid #ddd;padding-left:.6em;color:#555}dt{font-weight:700;margin-left:1em}dd{margin-left:2em;margin-bottom:1em}</style></head><body></body></html>",
+ "newHTMLFileContent": "<!DOCTYPE html><html><head><!-- Created with TagSpaces 2.3.1 --><meta http-equiv='Content-Type' content='text/html; charset=utf-8'><style type='text/css'>body{overflow:auto;width:100%;height:100%;font:13.34px Ubuntu,arial,clean,sans-serif;color:#000;line-height:1.4em;background-color:#fff;padding:15px}p{margin:1em 0;line-height:1.5em}table{font:100%;margin:1em}table th{border-bottom:1px solid #bbb;padding:.2em 1em}table td{border-bottom:1px solid #ddd;padding:.2em 1em}input[type=image],input[type=password],input[type=text],textarea{font:99% helvetica,arial,freesans,sans-serif}option,select{padding:0 .25em}optgroup{margin-top:.5em}code,pre{font:12px Monaco,'Courier New','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace}pre{margin:1em 0;font-size:12px;background-color:#eee;border:1px solid #ddd;padding:5px;line-height:1.5em;color:#444;overflow:auto;-webkit-box-shadow:rgba(0,0,0,.07) 0 1px 2px inset;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}pre code{padding:0;font-size:12px;background-color:#eee;border:none}code{font-size:12px;background-color:#f8f8ff;color:#444;padding:0 .2em;border:1px solid #dedede}img{border:0;max-width:100%}abbr{border-bottom:none}a{color:#4183c4;text-decoration:none}a:hover{text-decoration:underline}a code,a:link code,a:visited code{color:#4183c4}h2,h3{margin:1em 0}h1,h2,h3,h4,h5,h6{border:0}h1{font-size:170%;border-top:4px solid #aaa;padding-top:.5em;margin-top:1.5em}h1:first-child{margin-top:0;padding-top:.25em;border-top:none}h2{font-size:150%;margin-top:1.5em;border-top:4px solid #e0e0e0;padding-top:.5em}h3{font-size:130%;margin-top:1em}h4{font-size:120%;margin-top:1em}h5{font-size:115%;margin-top:1em}h6{font-size:110%;margin-top:1em}hr{border:1px solid #ddd}ol,ul{margin:1em 0 1em 2em}ol li,ul li{margin-top:.5em;margin-bottom:.5em}ol ol,ol ul,ul ol,ul ul{margin-top:0;margin-bottom:0}blockquote{margin:1em 0;border-left:5px solid #ddd;padding-left:.6em;color:#555}dt{font-weight:700;margin-left:1em}dd{margin-left:2em;margin-bottom:1em}</style></head><body></body></html>",
"newMDFileContent": '',
"showUnixHiddenEntries": false,
"checkForUpdates": true,
"firstRun": true,
"lastOpenedDirectory": "",
- "tagspacesList": [], // [{"name":"Demo","path":"/owncloud/remote.php/webdav/Demo","perspective":"perspectiveList"}],
+ "tagspacesList": [], // [{"name":"Demo","path":"/owncloud/remote.php/webdav/Demo","perspective":"perspectiveList","isDefault":true}],
"searchQueryList": [],
"extensionsPath": "ext",
"showWarningRecursiveScan": true,
@@ -29,7 +29,7 @@ define(function (require, exports, module) {
"maxSearchResultCount": 400,
"isWindowMaximized": false,
"showMainMenu": false,
- "lastOpenedLocation": "",
+ "lastOpenedLocation": "", // "/owncloud/remote.php/webdav/Demo"
"useDefaultLocation": false,
"writeMetaToSidecarFile": false,
"enableMetaData": false,
@@ -41,8 +41,8 @@ define(function (require, exports, module) {
"interfaceLanguage": "en_US",
"writeTagsToFile": false,
"useTrashCan": true,
- "useOCR": false,
- "useTextExtraction": false,
+ "useOCR": false,
+ "useTextExtraction": false,
"useGenerateThumbnails": false,
"watchCurrentDirectory": false,
"supportedLanguages": [
diff --git a/data/locales/en_US/ns.common.json b/data/locales/en_US/ns.common.json
index 7c0aed8f3..21f4790b8 100644
--- a/data/locales/en_US/ns.common.json
+++ b/data/locales/en_US/ns.common.json
@@ -170,6 +170,9 @@
"selectAll": "Select All",
"view": "View",
"help": "Help",
+ "license": "License Agreement",
+ "disagreeLicense": "Disagree",
+ "agreeLicense": "Agree",
"settings": "Settings",
"confirmApplicationClose": "There is unsaved file. Do you really want to quit the application?",
"waitDialogDiectoryIndexing": "TagSpaces is indexing the current directory with subdirectories.",
diff --git a/data/manifest.json b/data/manifest.json
index 12bb82ffd..550809ee2 100644
--- a/data/manifest.json
+++ b/data/manifest.json
@@ -1,6 +1,6 @@
{
"name": "TagSpaces",
- "version": "2.3.0",
+ "version": "2.3.1",
"manifest_version": 2,
"description": "__MSG_appDesc__",
"default_locale": "en_US",
diff --git a/data/mozilla/main.js b/data/mozilla/main.js
index 507518c0c..4a9c94dd9 100644
--- a/data/mozilla/main.js
+++ b/data/mozilla/main.js
@@ -107,9 +107,10 @@ function initToobarButton() {
data.url('mozilla/popup.js')
],
onShow: function() {
- var contextExt = capture.getFileExt(tabs.activeTab.url.toString());
- tagspacesPanel.port.emit("show", selection.html,
- tabs.activeTab.title.toString(), contextExt);
+ var currentURL = tabs.activeTab.url.toString();
+ var contextExt = capture.getFileExt(currentURL);
+ tagspacesPanel.port.emit("show", selection.html,
+ tabs.activeTab.title.toString(), contextExt, currentURL);
},
onHide: function() {
tagspacesPanel.port.emit("hide");
diff --git a/data/mozilla/popup.js b/data/mozilla/popup.js
index 4cd97b3aa..0df7413aa 100644
--- a/data/mozilla/popup.js
+++ b/data/mozilla/popup.js
@@ -9,6 +9,7 @@
var htmlTemplate;
var tagLibrary;
var currentSelection;
+ var currentURL;
var currentExt;
function init() {
@@ -61,8 +62,7 @@
function prepareContent(uncleanedHTML) {
//console.log("uncleaned "+uncleanedHTML);
var cleanedHTML = DOMPurify.sanitize(uncleanedHTML);
-
- cleanedHTML = "<body>" + cleanedHTML + "</body>";
+ cleanedHTML = "<body data-sourceUrl='" + currentURL + "' data-scrapedOn='" + (new Date()) + ">" + cleanedHTML + "</body>";
cleanedHTML = htmlTemplate.replace(/\<body[^>]*\>([^]*)\<\/body>/m, cleanedHTML); // jshint ignore:line
return cleanedHTML;
}
@@ -99,11 +99,12 @@
//$(document).ready(init);
init();
- self.port.on("show", function(selection, title, ext) {
+ self.port.on("show", function(selection, title, ext, cURL) {
//self.postMessage('show', "ddd1");
loadSettingsLocalStorage();
currentSelection = selection;
+ currentURL = cURL;
currentExt = ext;
var tagList = extractAllTags(tagLibrary);
diff --git a/data/package.json b/data/package.json
index 798195744..26b5ec7fa 100644
--- a/data/package.json
+++ b/data/package.json
@@ -2,7 +2,7 @@
"name": "TagSpaces",
"description": "Offline document organizer and browser for your local files, supporting easy file tagging and document editing.",
"author": "@@AUTHOR",
- "version": "2.3.0",
+ "version": "2.3.1",
"main": "electron/main.js",
"dependencies": {
"fs-extra": "~0.24.0"