TagSpaces is an offline, open source, document manager with tagging support
style check
kristiyandddbc8be7f3c52
diff --git a/data/js/calendar.ui.js b/data/js/calendar.ui.jsindex adee5f510..68b367809 100644--- a/data/js/calendar.ui.js+++ b/data/js/calendar.ui.js@@ -13,7 +13,7 @@ define(function(require, exports, module) {require('moment');- function initCalendarUI(){+ function initCalendarUI() {$('#dateCalendarInput').click(function() {$('#dateTimeCalendar').hide();$('#dateTimeRange').hide();@@ -99,8 +99,8 @@ define(function(require, exports, module) {});$('#dateTimeRangeCalendar').on('dp.change', function(e) {- var d = e.date._d;- var currentMinDate = TSCORE.Utils.parseDate(d);+ var d = e.date._d;+ var currentMinDate = TSCORE.Utils.parseDate(d);var oldValue = $('#newTagName').val();oldValue = oldValue.split('-');oldValue = oldValue[1];@@ -246,11 +246,11 @@ define(function(require, exports, module) {console.log(range);var viewMode = '', format = '';if ((range[0].toString().length === 6 || range[0].length === 6) &&- (range[1].toString().length === 6 || range[1].length === 6)) {+ (range[1].toString().length === 6 || range[1].length === 6)) {viewMode = 'months';format = 'YYYY-MM';} else if (range[0].toString().length === 4 &&- range[1].toString().length === 4) {+ range[1].toString().length === 4) {viewMode = 'years';format = 'YYYY';} else {@@ -332,11 +332,11 @@ define(function(require, exports, module) {var currentDateTime = dataTag;var year = parseInt(currentDateTime) && !isNaN(currentDateTime) &&- currentDateTime.length === 4;+ currentDateTime.length === 4;var month = parseInt(currentDateTime) && !isNaN(currentDateTime) &&- currentDateTime.length === 6;+ currentDateTime.length === 6;var date = parseInt(currentDateTime) && !isNaN(currentDateTime) &&- currentDateTime.length === 8;+ currentDateTime.length === 8;var convertToDateTime = TSCORE.Utils.convertToDateTime(currentDateTime);@@ -352,18 +352,18 @@ define(function(require, exports, module) {var firstInt = parseInt(character[0]);var secondInt = parseInt(character[1]);yearRange = monthRange = dateRange =- typeof firstInt === 'number' && !isNaN(firstInt) &&- typeof secondInt === 'number' && !isNaN(secondInt);+ typeof firstInt === 'number' && !isNaN(firstInt) &&+ typeof secondInt === 'number' && !isNaN(secondInt);}}var dateRegExp = yearRange || monthRange || dateRange ||- currentDateTime.match(dateTimeRegExp) ||- currentDateTime.match(dateTimeWinRegExp) ||- year || month || date || convertToDateTime;+ currentDateTime.match(dateTimeRegExp) ||+ currentDateTime.match(dateTimeWinRegExp) ||+ year || month || date || convertToDateTime;if (geoLocationRegExp.exec(currentCoordinate) || geoTag === dataTag) {- if(TSCORE.PRO) {+ if (TSCORE.PRO) {$('.nav-tabs a[href="#geoLocation"]').tab('show');} else {$('.nav-tabs a[href="#formEditTag"]').tab('show');@@ -372,9 +372,9 @@ define(function(require, exports, module) {var dateTab = year || month || date;var dateTimeTab = currentDateTime.match(dateTimeRegExp) ||- currentDateTime.match(dateTimeWinRegExp) || convertToDateTime;+ currentDateTime.match(dateTimeWinRegExp) || convertToDateTime;var dateRangeTab = currentDateTime.match(dateRangeRegExp) ||- yearRange || monthRange || dateRange;+ yearRange || monthRange || dateRange;if (dateTab) {$('.nav-tabs a[href="#dateCalendarTab"]').tab('show');diff --git a/data/js/directories.ui.js b/data/js/directories.ui.jsindex 5be04674a..2861fedfa 100644--- a/data/js/directories.ui.js+++ b/data/js/directories.ui.js@@ -19,32 +19,32 @@ define(function(require, exports, module) {var alternativeDirectoryNavigatorTmpl = Handlebars.compile('{{#each dirHistory}}' +'<div class="btn-group">' +- '<button class="btn btn-link dropdown-toggle" data-menu="{{@index}}">' +- '<div class="altNavFolderTitle">{{name}} <i class="fa fa-angle-right" style="font-size: 16px;"></i></div>' +- '</button>' +- '<div class="dropdown clearfix dirAltNavMenu" id="dirMenu{{@index}}" data-path="{{path}}">' +- '<ul role="menu" class="dropdown-menu">' +- '<li class="dropdown-header"><button class="close">×</button><span data-i18n="ns.common:actionsForDirectory2"></span> "{{name}}"</li>' +- '<li><a class="btn btn-link reloadCurrentDirectory" data-path="{{path}}" style="text-align: left"><i class="fa fa-refresh fa-fw fa-lg"></i><span data-i18n="ns.common:reloadCurrentDirectory"></span></a></li>' +- '<li><a class="btn btn-link createSubdirectory" data-path="{{path}}" style="text-align: left"><i class="fa fa-folder-o fa-fw fa-lg"></i><span data-i18n="ns.common:createSubdirectory"></span></a></li>' +- '<li><a class="btn btn-link renameDirectory" data-path="{{path}}" style="text-align: left"><i class="fa fa-paragraph fa-fw fa-lg"></i><span data-i18n="ns.common:renameDirectory"></span></a></li>' +- '<li class="divider" style="width: 100%"></li>' +- '<li class="dropdown-header"><span data-i18n="ns.common:subfodersOfDirectory2"></span> "{{name}}"</li>' +- '<div class="dirButtonContainer">' +- //'<button class="btn dirButton parentDirectoryButton" data-path="{{path}}/.." title="Go to parent folder">' +- //'<i class="fa fa-level-up"></i></button>' +- '{{#if children}}' +- '{{#each children}}' +- '<button class="btn dirButton" data-path="{{path}}" title="{{path}}">' +- '<i class="fa fa-folder-o"></i> {{name}}</button>' +- '{{/each}}' +- '{{else}}' +- '<div> <span data-i18n="ns.common:noSubfoldersFound"></span></div>' +- '{{/if}}' +- '</div>' +- '<li class="dropdown-header"><span data-i18n="ns.common:tagsOfDirectory2">Directory Tags</span></li>' +- '</ul>' +- '</div>' ++ '<button class="btn btn-link dropdown-toggle" data-menu="{{@index}}">' ++ '<div class="altNavFolderTitle">{{name}} <i class="fa fa-angle-right" style="font-size: 16px;"></i></div>' ++ '</button>' ++ '<div class="dropdown clearfix dirAltNavMenu" id="dirMenu{{@index}}" data-path="{{path}}">' ++ '<ul role="menu" class="dropdown-menu">' ++ '<li class="dropdown-header"><button class="close">×</button><span data-i18n="ns.common:actionsForDirectory2"></span> "{{name}}"</li>' ++ '<li><a class="btn btn-link reloadCurrentDirectory" data-path="{{path}}" style="text-align: left"><i class="fa fa-refresh fa-fw fa-lg"></i><span data-i18n="ns.common:reloadCurrentDirectory"></span></a></li>' ++ '<li><a class="btn btn-link createSubdirectory" data-path="{{path}}" style="text-align: left"><i class="fa fa-folder-o fa-fw fa-lg"></i><span data-i18n="ns.common:createSubdirectory"></span></a></li>' ++ '<li><a class="btn btn-link renameDirectory" data-path="{{path}}" style="text-align: left"><i class="fa fa-paragraph fa-fw fa-lg"></i><span data-i18n="ns.common:renameDirectory"></span></a></li>' ++ '<li class="divider" style="width: 100%"></li>' ++ '<li class="dropdown-header"><span data-i18n="ns.common:subfodersOfDirectory2"></span> "{{name}}"</li>' ++ '<div class="dirButtonContainer">' ++ //'<button class="btn dirButton parentDirectoryButton" data-path="{{path}}/.." title="Go to parent folder">' ++ //'<i class="fa fa-level-up"></i></button>' ++ '{{#if children}}' ++ '{{#each children}}' ++ '<button class="btn dirButton" data-path="{{path}}" title="{{path}}">' ++ '<i class="fa fa-folder-o"></i> {{name}}</button>' ++ '{{/each}}' ++ '{{else}}' ++ '<div> <span data-i18n="ns.common:noSubfoldersFound"></span></div>' ++ '{{/if}}' ++ '</div>' ++ '<li class="dropdown-header"><span data-i18n="ns.common:tagsOfDirectory2">Directory Tags</span></li>' ++ '</ul>' ++ '</div>' +'</div>' +'{{/each}}');@@ -52,31 +52,31 @@ define(function(require, exports, module) {var mainDirectoryNavigatorTmpl = Handlebars.compile('<div>{{#each dirHistory}}' +'<div class="accordion-group disableTextSelection">' +- '<div class="accordion-heading btn-group flexLayout" key="{{path}}">' +- '<button class="btn btn-link btn-lg directoryIcon" data-toggle="collapse" data-target="#dirButtons{{@index}}" key="{{path}}" title="{{../toggleDirectory}}">' +- '<i class="fa fa-folder fa-fw"></i>' +- '</button>' +- '<button class="btn btn-link directoryTitle ui-droppable flexMaxWidth" key="{{path}}" title="{{path}}">{{name}}</button>' +- '<button class="btn btn-link btn-lg directoryActions" key="{{path}}" title="{{../directoryOperations}}">' +- '<b class="fa fa-ellipsis-v"></b>' +- '</button>' +- '</div>' +- '<div class="accordion-body collapse in" id="dirButtons{{@index}}">' +- '<div class="accordion-inner" id="dirButtonsContent{{@index}}" style="padding: 4px;">' +- '<div class="dirButtonContainer">' +- '<button class="btn btn-sm btn-default dirButton parentDirectoryButton" key="{{path}}/.." title="Go to parent folder">' +- '<i class="fa fa-level-up"></i></button>' +- '{{#if children}}' +- '{{#each children}}' +- '<button class="btn btn-sm btn-default dirButton ui-droppable" key="{{path}}" title="{{path}}">' +- '<div><i class="fa fa-folder-o"></i> {{name}}</div></button>' +- '{{/each}}' +- '{{else}}' +- '<div> {{../../noSubfoldersFound}}</div>' +- '{{/if}}' +- '</div>' +- '</div>' +- '</div>' ++ '<div class="accordion-heading btn-group flexLayout" key="{{path}}">' ++ '<button class="btn btn-link btn-lg directoryIcon" data-toggle="collapse" data-target="#dirButtons{{@index}}" key="{{path}}" title="{{../toggleDirectory}}">' ++ '<i class="fa fa-folder fa-fw"></i>' ++ '</button>' ++ '<button class="btn btn-link directoryTitle ui-droppable flexMaxWidth" key="{{path}}" title="{{path}}">{{name}}</button>' ++ '<button class="btn btn-link btn-lg directoryActions" key="{{path}}" title="{{../directoryOperations}}">' ++ '<b class="fa fa-ellipsis-v"></b>' ++ '</button>' ++ '</div>' ++ '<div class="accordion-body collapse in" id="dirButtons{{@index}}">' ++ '<div class="accordion-inner" id="dirButtonsContent{{@index}}" style="padding: 4px;">' ++ '<div class="dirButtonContainer">' ++ '<button class="btn btn-sm btn-default dirButton parentDirectoryButton" key="{{path}}/.." title="Go to parent folder">' ++ '<i class="fa fa-level-up"></i></button>' ++ '{{#if children}}' ++ '{{#each children}}' ++ '<button class="btn btn-sm btn-default dirButton ui-droppable" key="{{path}}" title="{{path}}">' ++ '<div><i class="fa fa-folder-o"></i> {{name}}</div></button>' ++ '{{/each}}' ++ '{{else}}' ++ '<div> {{../../noSubfoldersFound}}</div>' ++ '{{/if}}' ++ '</div>' ++ '</div>' ++ '</div>' +'</div>' +'{{/each}}</div>');@@ -84,24 +84,24 @@ define(function(require, exports, module) {var locationChooserTmpl = Handlebars.compile('<li class="dropdown-header"><button class="close">×</button></li>' +'<li class="flexLayout">' +- '<button style="text-align: left;" class="btn btn-link flexMaxWidth" id="createNewLocation">' +- '<i class="fa fa-plus"></i> <span data-i18n="[title]ns.common:connectNewLocationTooltip;ns.common:connectNewLocationTooltip">{{connectLocation}}</span>' +- '</button>' ++ '<button style="text-align: left;" class="btn btn-link flexMaxWidth" id="createNewLocation">' ++ '<i class="fa fa-plus"></i> <span data-i18n="[title]ns.common:connectNewLocationTooltip;ns.common:connectNewLocationTooltip">{{connectLocation}}</span>' ++ '</button>' +'</li>' +'<li class="divider"></li>' +'<li class="dropdown-header" data-i18n="ns.common:yourLocations">{{yourLocations}}</li>' +'{{#each locations}}' +'<li class="flexLayout">' +- '<button title="{{path}}" path="{{path}}" name="{{name}}" class="btn btn-link openLocation">' +- '{{#if isDefault}}' +- '<i style="color: darkred" class="fa fa-bookmark" data-i18n="[title]ns.dialogs:startupLocation"></i> {{name}}' +- '{{else}}' +- '<i class="fa fa-bookmark"></i> {{name}}' +- '{{/if}}' +- '</button>' +- '<button type="button" data-i18n="[title]ns.common:editLocation" title="{{editLocationTitle}}" location="{{name}}" path="{{path}}" class="btn btn-link pull-right editLocation">' +- '<i class="fa fa-pencil fa-lg"></i>' +- '</button>' ++ '<button title="{{path}}" path="{{path}}" name="{{name}}" class="btn btn-link openLocation">' ++ '{{#if isDefault}}' ++ '<i style="color: darkred" class="fa fa-bookmark" data-i18n="[title]ns.dialogs:startupLocation"></i> {{name}}' ++ '{{else}}' ++ '<i class="fa fa-bookmark"></i> {{name}}' ++ '{{/if}}' ++ '</button>' ++ '<button type="button" data-i18n="[title]ns.common:editLocation" title="{{editLocationTitle}}" location="{{name}}" path="{{path}}" class="btn btn-link pull-right editLocation">' ++ '<i class="fa fa-pencil fa-lg"></i>' ++ '</button>' +'</li>' +'{{/each}}');@@ -132,14 +132,14 @@ define(function(require, exports, module) {// Saving the last opened location path in the settingsTSCORE.Config.setLastOpenedLocation(path);-+if ($('#defaultLocation').prop('checked') === true || $('#defaultLocationEdit').prop('checked') === true) {console.log("set default path " + path);TSCORE.Config.setDefaultLocation(path);$('#defaultLocation').prop('checked', false);$('#defaultLocationEdit').prop('checked', false);}-+TSCORE.Config.saveSettings();}// Clear search query@@ -203,12 +203,12 @@ define(function(require, exports, module) {$tagsElement.attr('id', tagId);var $el = element.parent().find('.accordion-body');if ($el.length > 0) {- $el.prepend($tagsElement);+ $el.prepend($tagsElement);}} else {$tagsElement.empty();}- }+ }else if (menuItem) {menuItem.empty();$tagsElement = $('<div id style="padding: 4px;"></div>');@@ -433,9 +433,9 @@ define(function(require, exports, module) {directoryPath = TSCORE.TagUtils.extractParentDirectoryPath(directoryPath.substring(0, indexOfDots));}-// if (directoryPath.length < 2) {-// return;-// }+ //if (directoryPath.length < 2) {+ // return;+ //}// Clearing search results on directory changeTSCORE.clearSearchFilter();@@ -841,8 +841,7 @@ define(function(require, exports, module) {$('#renameDirectoryButton').on('click', function() {var dirPath = $('#renameDirectoryButton').attr('path');var newDirPath = $('#directoryNewName').val();- TSCORE.IO.renameDirectoryPromise(dirPath, newDirPath)- .then(function(newDirName) {+ TSCORE.IO.renameDirectoryPromise(dirPath, newDirPath).then(function(newDirName) {TSCORE.showSuccessDialog("Directory renamed successfully.");TSCORE.navigateToDirectory(newDirName);TSCORE.hideLoadingAnimation();@@ -887,7 +886,7 @@ define(function(require, exports, module) {return (TSCORE.Config.getDefaultLocation() === path);}-+function deleteLocation(name) {console.log('Deleting folder connection..');TSCORE.Config.deleteLocation(name);@@ -936,7 +935,7 @@ define(function(require, exports, module) {element.isDefault = true;} else {element.isDefault = false;- }+ }});$locationsList.html(locationChooserTmpl({'locations': TSCORE.Config.Settings.tagspacesList,diff --git a/data/js/gettingstarted.js b/data/js/gettingstarted.jsindex 05e02af63..d90b6c92d 100644--- a/data/js/gettingstarted.js+++ b/data/js/gettingstarted.js@@ -10,7 +10,8 @@ define(function(require, exports, module) {require(["css!libs/hopscotch/dist/css/hopscotch.min.css",- ], function() {});+ ], function() {+ });function closeTour() {$('#openLeftPanel').click();@@ -31,178 +32,178 @@ define(function(require, exports, module) {exports.startTour = function() {var tour = {- id: "gettingstarted",- steps: [- {- title: $.i18n.t('ns.common:welcomeTitle'),- content: $.i18n.t('ns.common:welcomeContent'),- target: "locationName",- placement: "bottom",- onNext: function() {- $("#locationsList").css("display", "block");- $("#createNewLocation").addClass("uiEmphasizer");- }- },- {- title: $.i18n.t('ns.common:connectingLocationTitle'),- content: $.i18n.t('ns.common:createNewLocationContent'),- target: "createNewLocation",- placement: "bottom",- onNext: function() {- $("#createNewLocation").removeClass("uiEmphasizer");- $("#locationsList").css("display", "");- $('#tagGroupsContent').hide();- $('#contactUsContent').hide();- $('#locationContent').show();- $('#showTagGroups').removeClass('active');- $('#contactUs').removeClass('active');- $('#showLocations').addClass('active');- $('.col1 .row2').addClass("uiEmphasizer");- }- },- {- title: $.i18n.t('ns.common:folderNavigatorTitle'),- content: $.i18n.t('ns.common:showLocationsContent'),- target: "showLocations",- placement: "top",- onNext: function() {- $('#locationContent').hide();- $('#contactUsContent').hide();- $('#tagGroupsContent').show();- $('#showLocations').removeClass('active');- $('#contactUs').removeClass('active');- $('#showTagGroups').addClass('active');- $('.col1 .row2').removeClass("uiEmphasizer");- $('#tagGroupsContent').addClass("uiEmphasizer");+ id: "gettingstarted",+ steps: [+ {+ title: $.i18n.t('ns.common:welcomeTitle'),+ content: $.i18n.t('ns.common:welcomeContent'),+ target: "locationName",+ placement: "bottom",+ onNext: function() {+ $("#locationsList").css("display", "block");+ $("#createNewLocation").addClass("uiEmphasizer");+ }},- xOffset: -60,- arrowOffset: 60,- },- {- title: $.i18n.t('ns.common:taglibraryTitle'),- content: $.i18n.t('ns.common:tagGroupsContent'),- target: "showTagGroups",- placement: "top",- onNext: function() {- $('#tagGroupsContent').removeClass("uiEmphasizer");- $('#contactUsContent').addClass("uiEmphasizer");- $('#locationContent').hide();- $('#tagGroupsContent').hide();- $('#contactUsContent').show();- $('#showLocations').removeClass('active');- $('#showTagGroups').removeClass('active');- $('#contactUs').addClass('active');- }- },- {- title: $.i18n.t('ns.common:aboutTitle'),- content: $.i18n.t('ns.common:usefulinformationContent'),- target: "contactUs",- placement: "top",- onNext: function() {- $('#contactUsContent').removeClass("uiEmphasizer");- $('#openOptions').addClass("uiEmphasizer");+ {+ title: $.i18n.t('ns.common:connectingLocationTitle'),+ content: $.i18n.t('ns.common:createNewLocationContent'),+ target: "createNewLocation",+ placement: "bottom",+ onNext: function() {+ $("#createNewLocation").removeClass("uiEmphasizer");+ $("#locationsList").css("display", "");+ $('#tagGroupsContent').hide();+ $('#contactUsContent').hide();+ $('#locationContent').show();+ $('#showTagGroups').removeClass('active');+ $('#contactUs').removeClass('active');+ $('#showLocations').addClass('active');+ $('.col1 .row2').addClass("uiEmphasizer");+ }},- xOffset: -120,- arrowOffset: 120,- },- {- title: $.i18n.t('ns.common:settingsTitle'),- content: $.i18n.t('ns.common:settingsdialogContent'),- target: "openOptions",- placement: "top",- onNext: function() {- $('#closeLeftPanel').addClass("uiEmphasizer");- $('#openOptions').removeClass("uiEmphasizer");+ {+ title: $.i18n.t('ns.common:folderNavigatorTitle'),+ content: $.i18n.t('ns.common:showLocationsContent'),+ target: "showLocations",+ placement: "top",+ onNext: function() {+ $('#locationContent').hide();+ $('#contactUsContent').hide();+ $('#tagGroupsContent').show();+ $('#showLocations').removeClass('active');+ $('#contactUs').removeClass('active');+ $('#showTagGroups').addClass('active');+ $('.col1 .row2').removeClass("uiEmphasizer");+ $('#tagGroupsContent').addClass("uiEmphasizer");+ },+ xOffset: -60,+ arrowOffset: 60,},- xOffset: -220,- arrowOffset: 220,- },- {- title: $.i18n.t('ns.common:closingpanelTitle'),- content: $.i18n.t('ns.common:leftpanelContent'),- target: "closeLeftPanel",- placement: "bottom",- onNext: function() {- $('#closeLeftPanel').removeClass("uiEmphasizer");- $('#closeLeftPanel').click();- $('#viewContainers').addClass("uiEmphasizer");+ {+ title: $.i18n.t('ns.common:taglibraryTitle'),+ content: $.i18n.t('ns.common:tagGroupsContent'),+ target: "showTagGroups",+ placement: "top",+ onNext: function() {+ $('#tagGroupsContent').removeClass("uiEmphasizer");+ $('#contactUsContent').addClass("uiEmphasizer");+ $('#locationContent').hide();+ $('#tagGroupsContent').hide();+ $('#contactUsContent').show();+ $('#showLocations').removeClass('active');+ $('#showTagGroups').removeClass('active');+ $('#contactUs').addClass('active');+ }},- xOffset: -220,- arrowOffset: 220,- },- {- title: $.i18n.t('ns.common:perspectiveTitle'),- content: $.i18n.t('ns.common:perspectiveviewContent'),- target: "viewContainers",- placement: "top",- onNext: function() {- $('#viewContainers').removeClass("uiEmphasizer");- $('#perspectiveSwitcherButton').addClass("uiEmphasizer");+ {+ title: $.i18n.t('ns.common:aboutTitle'),+ content: $.i18n.t('ns.common:usefulinformationContent'),+ target: "contactUs",+ placement: "top",+ onNext: function() {+ $('#contactUsContent').removeClass("uiEmphasizer");+ $('#openOptions').addClass("uiEmphasizer");+ },+ xOffset: -120,+ arrowOffset: 120,},- yOffset: 220,- xOffset: 'center',- arrowOffset: 'center',- },- {- title: $.i18n.t('ns.common:perspectiveswitchTitle'),- content: $.i18n.t('ns.common:supportedperspectivesContent'),- target: "perspectiveSwitcherButton",- placement: "bottom",- onNext: function() {- $('#perspectiveSwitcherButton').removeClass("uiEmphasizer");- $('#showSearchButton').addClass("uiEmphasizer");+ {+ title: $.i18n.t('ns.common:settingsTitle'),+ content: $.i18n.t('ns.common:settingsdialogContent'),+ target: "openOptions",+ placement: "top",+ onNext: function() {+ $('#closeLeftPanel').addClass("uiEmphasizer");+ $('#openOptions').removeClass("uiEmphasizer");+ },+ xOffset: -220,+ arrowOffset: 220,},- xOffset: -220,- arrowOffset: 220,- },- {- title: $.i18n.t('ns.common:searchTitle'),- content: $.i18n.t('ns.common:searchareaContent'),- target: "showSearchButton",- placement: "bottom",- onNext: function() {- $('#showSearchButton').removeClass("uiEmphasizer");- $('#openLeftPanel').addClass("uiEmphasizer");+ {+ title: $.i18n.t('ns.common:closingpanelTitle'),+ content: $.i18n.t('ns.common:leftpanelContent'),+ target: "closeLeftPanel",+ placement: "bottom",+ onNext: function() {+ $('#closeLeftPanel').removeClass("uiEmphasizer");+ $('#closeLeftPanel').click();+ $('#viewContainers').addClass("uiEmphasizer");+ },+ xOffset: -220,+ arrowOffset: 220,},- xOffset: -275,- arrowOffset: 275,- },- {- title: $.i18n.t('ns.common:openingleftpanelTitle'),- content: $.i18n.t('ns.common:openingleftpanelagainContent'),- target: "openLeftPanel",- placement: "bottom",- onNext: function() {- $('#openLeftPanel').removeClass("uiEmphasizer");- $('#openLeftPanel').click();+ {+ title: $.i18n.t('ns.common:perspectiveTitle'),+ content: $.i18n.t('ns.common:perspectiveviewContent'),+ target: "viewContainers",+ placement: "top",+ onNext: function() {+ $('#viewContainers').removeClass("uiEmphasizer");+ $('#perspectiveSwitcherButton').addClass("uiEmphasizer");+ },+ yOffset: 220,+ xOffset: 'center',+ arrowOffset: 'center',},- },- {- title: $.i18n.t('ns.common:enjoyTitle'),- content: $.i18n.t('ns.common:thankyouContent'),- target: "startNewInstanceBack",- placement: "bottom",- onNext: function() {+ {+ title: $.i18n.t('ns.common:perspectiveswitchTitle'),+ content: $.i18n.t('ns.common:supportedperspectivesContent'),+ target: "perspectiveSwitcherButton",+ placement: "bottom",+ onNext: function() {+ $('#perspectiveSwitcherButton').removeClass("uiEmphasizer");+ $('#showSearchButton').addClass("uiEmphasizer");+ },+ xOffset: -220,+ arrowOffset: 220,+ },+ {+ title: $.i18n.t('ns.common:searchTitle'),+ content: $.i18n.t('ns.common:searchareaContent'),+ target: "showSearchButton",+ placement: "bottom",+ onNext: function() {+ $('#showSearchButton').removeClass("uiEmphasizer");+ $('#openLeftPanel').addClass("uiEmphasizer");+ },+ xOffset: -275,+ arrowOffset: 275,},+ {+ title: $.i18n.t('ns.common:openingleftpanelTitle'),+ content: $.i18n.t('ns.common:openingleftpanelagainContent'),+ target: "openLeftPanel",+ placement: "bottom",+ onNext: function() {+ $('#openLeftPanel').removeClass("uiEmphasizer");+ $('#openLeftPanel').click();+ },+ },+ {+ title: $.i18n.t('ns.common:enjoyTitle'),+ content: $.i18n.t('ns.common:thankyouContent'),+ target: "startNewInstanceBack",+ placement: "bottom",+ onNext: function() {+ },+ },+ ],+ onEnd: function() {+ closeTour();},- ],- onEnd: function() {- closeTour();- },- onClose: function() {- closeTour();- },- showCloseButton: true,- showNextButton: true,- showPrevButton: true, // disable in production- i18n: {- nextBtn: $.i18n.t('ns.common:next'),- prevBtn: $.i18n.t('ns.common:prev'),- doneBtn: $.i18n.t('ns.common:done'),- closeTooltip: $.i18n.t('ns.common:closeTooltip'),- }- };+ onClose: function() {+ closeTour();+ },+ showCloseButton: true,+ showNextButton: true,+ showPrevButton: true, // disable in production+ i18n: {+ nextBtn: $.i18n.t('ns.common:next'),+ prevBtn: $.i18n.t('ns.common:prev'),+ doneBtn: $.i18n.t('ns.common:done'),+ closeTooltip: $.i18n.t('ns.common:closeTooltip'),+ }+ };// PreparationsTSCORE.clearSearchFilter();diff --git a/data/js/search.js b/data/js/search.jsindex 13ef7f979..290228b2e 100644--- a/data/js/search.js+++ b/data/js/search.js@@ -150,8 +150,8 @@ define(function(require, exports, module) {// Searching in file names while skipping paths containing '/.ts/'if (indexOfMetaDirectory < 1 &&- filterFileObject(fileEntry, queryObj) &&- queryObj.fileTypeFilter(fileEntry.name.toLowerCase())) {+ filterFileObject(fileEntry, queryObj) &&+ queryObj.fileTypeFilter(fileEntry.name.toLowerCase())) {searchResults.push(fileEntry);resolve();}@@ -223,14 +223,14 @@ define(function(require, exports, module) {}if (!fileEntry.isDirectory) { // TODO check if the main file exists- // TSCORE.IO.getPropertiesPromise(fileEntry.path).then(function(mainFileEntry) {- // searchResults.push(mainFileEntry);+ // TSCORE.IO.getPropertiesPromise(fileEntry.path).then(function(mainFileEntry) {+ // searchResults.push(mainFileEntry);searchResults.push(fileEntry);resolve();- // }, function() {- // console.log("main file does not exist anymore " + fileEntry.path);- // resolve();- // })+ // }, function() {+ // console.log("main file does not exist anymore " + fileEntry.path);+ // resolve();+ // })} else { // by tsm.json filesfileEntry.size = 0;fileEntry.lmdt = 0;diff --git a/data/js/search.ui.js b/data/js/search.ui.jsindex e408a982e..a6cc7881e 100644--- a/data/js/search.ui.js+++ b/data/js/search.ui.js@@ -11,23 +11,21 @@ define(function(require, exports, module) {var initUI = function() {// Search UI- $('#searchBox')- .keyup(function(e) {- if (e.keyCode === 13) { // Start the search on ENTER- startSearch();- } else if (e.keyCode == 27) { // Hide search on ESC- cancelSearch();- } else {- TSCORE.Search.nextQuery = this.value;- }- if (this.value.length === 0) {- TSCORE.Search.nextQuery = this.value;- TSCORE.PerspectiveManager.redrawCurrentPerspective();- }- })- .focus(function(e) {- $("#searchOptions").hide();- });+ $('#searchBox').keyup(function(e) {+ if (e.keyCode === 13) { // Start the search on ENTER+ startSearch();+ } else if (e.keyCode == 27) { // Hide search on ESC+ cancelSearch();+ } else {+ TSCORE.Search.nextQuery = this.value;+ }+ if (this.value.length === 0) {+ TSCORE.Search.nextQuery = this.value;+ TSCORE.PerspectiveManager.redrawCurrentPerspective();+ }+ }).focus(function(e) {+ $("#searchOptions").hide();+ });$('#showSearchButton').on('click', function() {// Showing the expanded search area@@ -162,7 +160,7 @@ define(function(require, exports, module) {TSCORE.IO.stopWatchingDirectories();}if ($('#searchBox').val().length > 0) {- var origSearchVal = $('#searchBox').val();+ var origSearchVal = $('#searchBox').val();origSearchVal = origSearchVal.trim();if ($('#searchRecursive').prop('checked')) {diff --git a/data/js/utils.js b/data/js/utils.jsindex d350469a6..7a7df52f7 100644--- a/data/js/utils.js+++ b/data/js/utils.js@@ -47,7 +47,7 @@ define(function(require, exports, module) {function arrayBufferToStr(buf) {var str = '',- bytes = new Uint8Array(buf);+ bytes = new Uint8Array(buf);for (var i = 0; i < bytes.length; i++) {str += String.fromCharCode(bytes[i]);}@@ -93,10 +93,10 @@ define(function(require, exports, module) {function isVisibleOnScreen(element) {var rectangle = element.getBoundingClientRect();var isVisible = (- rectangle.top >= 0 &&- rectangle.left >= 0 &&- rectangle.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&- rectangle.right <= (window.innerWidth || document.documentElement.clientWidth)+ rectangle.top >= 0 &&+ rectangle.left >= 0 &&+ rectangle.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&+ rectangle.right <= (window.innerWidth || document.documentElement.clientWidth));return isVisible;}@@ -156,8 +156,8 @@ define(function(require, exports, module) {var dateTimeWinRegExp = /^(([0-1]?[0-9])|([2][0-3]))!([0-5]?[0-9])(!([0-5]?[0-9]))?$/g;var dateTimeWin1RegExp = /^(([0-1]?[0-9])|([2][0-3]))~([0-5]?[0-9])(!([0-5]?[0-9]))?$/g;if (dateTime.match(dateTimeRegExp) || dateTime.match(dateTimeWinRegExp) ||- dateTime.match(dateTimeWin1RegExp) || dateTime.search('!') ||- dateTime.search(':') || dateTime.search('~')) {+ dateTime.match(dateTimeWin1RegExp) || dateTime.search('!') ||+ dateTime.search(':') || dateTime.search('~')) {var time, firstTime, secondTime;if (dateTime.indexOf('!')) {@@ -242,9 +242,9 @@ define(function(require, exports, module) {// Format Sun May 11, 2014 to 2014-05-11function formatDate(date) {var d = new Date(date),- month = '' + (d.getMonth() + 1),- day = '' + d.getDate(),- year = d.getFullYear();+ month = '' + (d.getMonth() + 1),+ day = '' + d.getDate(),+ year = d.getFullYear();if (month.length < 2) {month = '0' + month;@@ -255,11 +255,12 @@ define(function(require, exports, module) {return [year, month, day].join('-');}+// Format Sun May 11, 2014 to 2014-05function formatDateMonth(date) {var d = new Date(date),- month = '' + (d.getMonth() + 1),- year = d.getFullYear();+ month = '' + (d.getMonth() + 1),+ year = d.getFullYear();if (month.length < 2) {month = '0' + month;@@ -297,9 +298,9 @@ define(function(require, exports, module) {// Format Sun May 11, 2014 to 2014-05-11function parseDate(date) {var d = new Date(date),- month = '' + (d.getMonth() + 1),- day = '' + d.getDate(),- year = d.getFullYear();+ month = '' + (d.getMonth() + 1),+ day = '' + d.getDate(),+ year = d.getFullYear();if (month.length < 2) {month = '0' + month;@@ -310,11 +311,12 @@ define(function(require, exports, module) {return [year, month, day].join('');}+// Format Sun May 11, 2014 to 2014-05function parseDateMonth(date) {var d = new Date(date),- month = '' + (d.getMonth() + 1),- year = d.getFullYear();+ month = '' + (d.getMonth() + 1),+ year = d.getFullYear();if (month.length < 2) {month = '0' + month;@@ -323,8 +325,8 @@ define(function(require, exports, module) {}function splitValue(value, index) {- var currentLat = value.substring(0, index);- var currentLng = value.substring(index);+ var currentLat = value.substring(0, index);+ var currentLng = value.substring(index);return parseFloat(currentLat) + "," + parseFloat(currentLng);}diff --git a/data/web/web.api.js b/data/web/web.api.jsindex 1cad10cc0..fc3663477 100644--- a/data/web/web.api.js+++ b/data/web/web.api.js@@ -34,37 +34,37 @@ define(function(require, exports, module) {});}-/* // Offline notification- Offline.options = {- checkOnLoad: true,- //interceptRequests: true,- reconnect: {- initialDelay: 3- },- requests: true,- game: false,- checks: {xhr: {url: 'assets/icon16.png'}}- };-- Offline.check();-- Offline.on('confirmed-up', function() {- $('#dialogLostConnection').modal('hide');- });- Offline.on('confirmed-down', showLostConnectionDialog);*/--/* var run = function() {- if (Offline.state === 'up') {- $('#dialogLostConnection').modal('hide');- Offline.check();- //});- } else if (Offline.state === 'down') {- Offline.check();- showLostConnectionDialog();- console.log("Server is down");- }- };- setInterval(run, 5000);*/+ /* // Offline notification+ Offline.options = {+ checkOnLoad: true,+ //interceptRequests: true,+ reconnect: {+ initialDelay: 3+ },+ requests: true,+ game: false,+ checks: {xhr: {url: 'assets/icon16.png'}}+ };++ Offline.check();++ Offline.on('confirmed-up', function() {+ $('#dialogLostConnection').modal('hide');+ });+ Offline.on('confirmed-down', showLostConnectionDialog);*/++ /* var run = function() {+ if (Offline.state === 'up') {+ $('#dialogLostConnection').modal('hide');+ Offline.check();+ //});+ } else if (Offline.state === 'down') {+ Offline.check();+ showLostConnectionDialog();+ console.log("Server is down");+ }+ };+ setInterval(run, 5000);*/var davClient;//exact copy of getAjax with timeout added@@ -208,9 +208,9 @@ define(function(require, exports, module) {lmdt = undefined;//console.log(dirList[entry]._namespaces["DAV:"]);if (typeof dirList[entry]._namespaces["DAV:"].getcontentlength === 'undefined' ||- dirList[entry]._namespaces["DAV:"].getcontentlength._xmlvalue.length === 0 ||- (dirList[entry]._namespaces["DAV:"].resourcetype._xmlvalue.length === 1 &&- dirList[entry]._namespaces["DAV:"].resourcetype._xmlvalue[0].localName === 'collection')+ dirList[entry]._namespaces["DAV:"].getcontentlength._xmlvalue.length === 0 ||+ (dirList[entry]._namespaces["DAV:"].resourcetype._xmlvalue.length === 1 &&+ dirList[entry]._namespaces["DAV:"].resourcetype._xmlvalue[0].localName === 'collection')) {isDir = true;} else {@@ -236,9 +236,9 @@ define(function(require, exports, module) {dirPath = encodeURI(dirPath);davClient.propfind(- dirPath,- davSuccess,- 1 //1 , davClient.INFINITY+ dirPath,+ davSuccess,+ 1 //1 , davClient.INFINITY);});}@@ -333,17 +333,17 @@ define(function(require, exports, module) {}if (isNewFile || overWrite === true || mode === "text") {davClient.put(- encodeURI(filePath),- function(status, data, headers) {- console.log("Creating File Status/Content/Headers: " + status + " / " + data + " / " + headers);- if (checkStatusCode(status)) {- resolve(isNewFile);- } else {- reject("saveFilePromise: " + filePath + " failed " + status);- }- },- content,- 'application/octet-stream'+ encodeURI(filePath),+ function(status, data, headers) {+ console.log("Creating File Status/Content/Headers: " + status + " / " + data + " / " + headers);+ if (checkStatusCode(status)) {+ resolve(isNewFile);+ } else {+ reject("saveFilePromise: " + filePath + " failed " + status);+ }+ },+ content,+ 'application/octet-stream');} else {reject("File Already Exists.");@@ -394,15 +394,15 @@ define(function(require, exports, module) {console.log("Creating directory: " + dirPath);return new Promise(function(resolve, reject) {davClient.mkcol(- encodeURI(dirPath),- function(status, data, headers) {- console.log("Directory Creation Status/Content/Headers: " + status + " / " + data + " / " + headers);- if (checkStatusCode(status)) {- resolve(dirPath);- } else {- reject("createDirectory " + dirPath + " failed " + status);- }- }+ encodeURI(dirPath),+ function(status, data, headers) {+ console.log("Directory Creation Status/Content/Headers: " + status + " / " + data + " / " + headers);+ if (checkStatusCode(status)) {+ resolve(dirPath);+ } else {+ reject("createDirectory " + dirPath + " failed " + status);+ }+ });});}@@ -425,17 +425,17 @@ define(function(require, exports, module) {reject($.i18n.t("ns.common:fileTheSame"));} else {davClient.copy(- encodeURI(filePath),- function(status, data, headers) {- console.log("Copy File Status/Content/Headers: " + status + " / " + data + " / " + headers);- if (checkStatusCode(status)) {- resolve(filePath, newFilePath);- } else {- reject("copyFile " + filePath + " failed " + status);- }- },- encodeURI(newFilePath),- davClient.FAIL_ON_OVERWRITE+ encodeURI(filePath),+ function(status, data, headers) {+ console.log("Copy File Status/Content/Headers: " + status + " / " + data + " / " + headers);+ if (checkStatusCode(status)) {+ resolve(filePath, newFilePath);+ } else {+ reject("copyFile " + filePath + " failed " + status);+ }+ },+ encodeURI(newFilePath),+ davClient.FAIL_ON_OVERWRITE);}});@@ -459,17 +459,17 @@ define(function(require, exports, module) {reject($.i18n.t("ns.common:fileTheSame"));} else {davClient.move(- encodeURI(filePath),- function(status, data, headers) {- console.log("Rename File Status/Content/Headers: " + status + " / " + data + " / " + headers);- if (checkStatusCode(status)) {- resolve([filePath, newFilePath]);- } else {- reject("rename: " + filePath + " failed " + status);- }- },- encodeURI(newFilePath),- davClient.FAIL_ON_OVERWRITE+ encodeURI(filePath),+ function(status, data, headers) {+ console.log("Rename File Status/Content/Headers: " + status + " / " + data + " / " + headers);+ if (checkStatusCode(status)) {+ resolve([filePath, newFilePath]);+ } else {+ reject("rename: " + filePath + " failed " + status);+ }+ },+ encodeURI(newFilePath),+ davClient.FAIL_ON_OVERWRITE);}});@@ -494,17 +494,17 @@ define(function(require, exports, module) {reject($.i18n.t("ns.common:fileTheSame"));} else {davClient.move(- encodeURI(dirPath),- function(status, data, headers) {- console.log("Rename Directory Status/Content/Headers: " + status + " / " + data + " / " + headers);- if (checkStatusCode(status)) {- resolve(newDirPath);- } else {- reject("rename: " + dirPath + " failed " + status);- }- },- encodeURI(newDirPath),- davClient.FAIL_ON_OVERWRITE+ encodeURI(dirPath),+ function(status, data, headers) {+ console.log("Rename Directory Status/Content/Headers: " + status + " / " + data + " / " + headers);+ if (checkStatusCode(status)) {+ resolve(newDirPath);+ } else {+ reject("rename: " + dirPath + " failed " + status);+ }+ },+ encodeURI(newDirPath),+ davClient.FAIL_ON_OVERWRITE);}});@@ -534,15 +534,15 @@ define(function(require, exports, module) {function deleteDirectoryPromise(path) {return new Promise(function(resolve, reject) {davClient.remove(- encodeURI(path),- function(status, data, headers) {- console.log("Directory/File Deletion Status/Content/Headers: " + status + " / " + data + " / " + headers);- if (checkStatusCode(status)) {- resolve(path);- } else {- reject("delete " + path + " failed " + status);- }- }+ encodeURI(path),+ function(status, data, headers) {+ console.log("Directory/File Deletion Status/Content/Headers: " + status + " / " + data + " / " + headers);+ if (checkStatusCode(status)) {+ resolve(path);+ } else {+ reject("delete " + path + " failed " + status);+ }+ });});}