TagSpaces is an offline, open source, document manager with tagging support
Small cosmetical changes
uggrock10a08c013245
diff --git a/build.number b/build.numberindex 6d7468d95..d5ba5feb3 100644--- a/build.number+++ b/build.number@@ -1,3 +1,3 @@-#Build Number for ANT. Do not edit!-#Wed Nov 28 21:55:45 CET 2012-build.number=1137+#Build Number for ANT. Do not edit!+#Thu Nov 29 17:16:56 CET 2012+build.number=1140diff --git a/build.properties b/build.propertiesindex d352cd36f..b3a2f40e9 100644--- a/build.properties+++ b/build.properties@@ -1,7 +1,7 @@-addonsdk.dir = ../addonsdk[1.11]+addonsdk.dir = ../addonsdk[1.11]backup.dir = ../backupsbuilds.dir = ../buildsbuildFirefoxExt.dir = ../builds/firefoxbuildChrome.dir = ../builds/chromecordovaDev.dir = ../cordova/assets/www-cordovaJSLib.file = ../cordova/assets/cordova-2.0.0.js\ No newline at end of file+cordovaJSLib.file = ../cordova/assets/cordova-2.0.0.jsdiff --git a/build.xml b/build.xmlindex e756b25f3..62f6356cb 100644--- a/build.xml+++ b/build.xml@@ -42,12 +42,17 @@ found in the LICENSE file.<fileset dir="lib" includes="**/*"/></copy><copy todir="${buildFirefoxExt.dir}/data/libs" >- <fileset dir="data/libs">- <include name="**/*"/>- <exclude name="ckeditor/**"/>- </fileset>+ <fileset dir="data/libs">+ <include name="**/*"/>+ </fileset></copy>- <copy todir="${buildFirefoxExt.dir}/data/css" >+ <copy todir="${buildFirefoxExt.dir}/data/ext" >+ <fileset dir="data/ext">+ <include name="viewerBrowser/*"/>+ <include name="viewerImage/*"/>+ </fileset>+ </copy>+ <copy todir="${buildFirefoxExt.dir}/data/css" ><fileset dir="data/css" includes="**/*"/></copy><copy todir="${buildFirefoxExt.dir}/data/js" >@@ -88,6 +93,12 @@ found in the LICENSE file.<copy todir="${buildChrome.dir}/chrome" ><fileset dir="data/chrome" includes="**/*"/></copy>+ <copy todir="${buildChrome.dir}/data/ext" >+ <fileset dir="data/ext">+ <include name="viewerBrowser/*"/>+ <include name="viewerImage/*"/>+ </fileset>+ </copy><copy todir="${buildChrome.dir}/libs" ><fileset dir="data/libs" includes="**/*"/></copy>@@ -125,6 +136,11 @@ found in the LICENSE file.<copy todir="${cordovaDev.dir}/libs" ><fileset dir="data/libs" includes="**/*"/></copy>+ <copy todir="${cordovaDev.dir}/data/ext" >+ <fileset dir="data/ext">+ <include name="**/*"/>+ </fileset>+ </copy><copy todir="${cordovaDev.dir}/css" ><fileset dir="data/css" includes="**/*"/></copy>diff --git a/data/js/fileviewer.ui.js b/data/js/fileviewer.ui.jsindex 3bcf5f08b..6ee2f4981 100644--- a/data/js/fileviewer.ui.js+++ b/data/js/fileviewer.ui.js@@ -1,234 +1,234 @@-/* Copyright (c) 2012 The Tagspaces Authors. All rights reserved.- * 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";--console.debug("Loading FileViewer...");--var tsEditor = undefined;--exports.updateTextEditorContent = function(fileContent) {- console.debug("Updating edtitor"); // with data: "+fileContent);- tsEditor.setContent(fileContent);-}--exports.openFile = function(fileName) {- console.debug("Opening file: "+fileName);-- var openedFilePath = UIAPI.currentPath+UIAPI.getDirSeparator()+fileName;- // TODO replace \\ to \ in filenames- openedFilePath.replace("\\\\","\\");- $("#selectedFilePath").val(openedFilePath);-- var fileExt = fileName.substring(fileName.lastIndexOf(".")+1,fileName.length).toLowerCase();- var filePath = "file:///"+UIAPI.currentPath+UIAPI.getDirSeparator()+fileName;-- this.constructFileViewerUI(fileName, filePath);-- // Getting the viewer for the file extension/type- var viewerExt = TSSETTINGS.getFileTypeViewer(fileExt);- console.debug("File Viewer: "+viewerExt);-- // TODO Consider page width by opening, e.g. responsive design- layoutContainer.open("east");- // layoutContainer.close("west");-- UIAPI.isFileOpened = true;-- $( "#viewer" ).empty();- if(!viewerExt) {- $( "#viewer" ).html("File type not supported for viewing.");- return;- } else {- require(["ext/"+viewerExt+"/extension"], function(viewer) {- tsEditor = viewer;- tsEditor.init("viewer");- // tsEditor.setFileType(fileExt);- tsEditor.setContent(filePath);- });-// IOAPI.loadTextFile(filePath);- }-}--exports.editFile = function(fileName) {- console.debug("Editing file: "+filePath);- var filePath = UIAPI.currentPath+UIAPI.getDirSeparator()+fileName;- var fileExt = fileName.substring(fileName.lastIndexOf(".")+1,fileName.length).toLowerCase();-- // Getting the editor for the file extension/type- var editorExt = TSSETTINGS.getFileTypeEditor(fileExt);- console.debug("File Editor: "+editorExt);-- $( "#viewer" ).empty();- if(!editorExt) {- $( "#viewer" ).html("File type not supported for editing.");- return;- } else {- $( "#viewer" ).html('<div id="generalEditor" style="width: 100%; height: 100%"></div>');- require(["ext/"+editorExt+"/extension"], function(editr) {- tsEditor = editr;- tsEditor.init("generalEditor");- tsEditor.setFileType(fileExt);- });- IOAPI.loadTextFile(filePath);- }-}--this.constructFileViewerUI = function(fileName, filePath) {- // Adding tag buttons to the filetoolbox- var tags = TSAPI.extractTags(fileName);-- $( "#fileTitle" ).html(TSAPI.extractTitle(fileName));-- // Generate tag buttons- $( "#fileTags" ).html("");- for (var i=0; i < tags.length; i++) {- $( "#fileTags" ).append('<button title="Opens context menu for '+tags[i]+'" tag="'+tags[i]+'" filename="'+fileName+'" class="tagButton">'+tags[i]+'</button>');- };-- // Activate tagButtons in file view- $('.tagButton', $( "#fileTags" )).click( function() {- TagsUI.openTagMenu(this, $(this).attr("tag"), $(this).attr("filename"));- });-- // Clear filetoolbox- $( "#filetoolbox" ).html("");-- // TODO Fullscreen disabled due a fullscreen issue- //this.addFullScreenButton("#filetoolbox");-- this.addEditButton("#filetoolbox", fileName);-- this.addOpenInWindowButton("#filetoolbox", filePath);-- // TODO Tag suggestion disabled due menu init issue- //this.initTagSuggestionMenu(fileName, tags);- //this.addTagSuggestionButton("#filetoolbox");-- this.addCloseButton("#filetoolbox");-}---this.initTagSuggestionMenu = function(fileName, tags) {- // Adding buttons for creating tags according to the suggested tags- var suggTags = TSAPI.suggestTags(fileName);-- // $( "#tagSuggestionsMenu" ).menu();- // $( "#tagSuggestionsMenu" ).menu("disable");- $( "#tagSuggestionsMenu" ).html("");-- for (var i=0; i < suggTags.length; i++) {- // Ignoring the tags already assigned to a file- if(tags.indexOf(suggTags[i]) < 0) {- $( "#tagSuggestionsMenu" ).append('<li name="'+suggTags[i]+'" title="Add tag '+suggTags[i]+' to current file">Tag with "'+suggTags[i]+'"</li>');- }- };-- // TODO menu does not initialize- $( "#tagSuggestionsMenu" ).menu({ // menu("destroy").- select: function( event, ui ) {- var tagName = ui.item.attr( "name" );- TSAPI.writeTagsToFile(fileName, [tagName]);- IOAPI.listDirectory(UIAPI.currentPath);- }- });-}--this.addEditButton = function(container, fileName) {- // TODO implement disabled check- var buttonDisabled = false;- $( ""+container ).append('<button id="editDocument">Edit</button>');- $( "#editDocument" ).button({- text: true,- icons: {- primary: "ui-icon-wrench"- },- disabled: buttonDisabled- })- .click(function() {- exports.editFile(fileName);- });-}--this.addOpenInWindowButton = function(container, filePath) {- $( ""+container ).append('<button id="openInNewWindow">Open in new tab</button>');- $( "#openInNewWindow" ).button({- text: false,- icons: {- primary: "ui-icon-newwin"- },- disabled: false- })- .click(function() {- window.open(filePath);- });-}--this.addCloseButton = function(container) {- $( ""+container ).append('<button id="closeOpenedFile">Close</button>');- $( "#closeOpenedFile" ).button({- text: false,- icons: {- primary: "ui-icon-circle-close"- },- disabled: false- })- .click(function() {- UIAPI.isFileOpened = false;- layoutContainer.open("west");- layoutContainer.close("east");- });-}---this.addFullScreenButton = function(container) {- $( ""+container ).append('<button id="startFullscreen">Fullscreen</button>');- $( "#startFullscreen" ).button({- text: false,- icons: {- primary: "ui-icon-arrow-4-diag"- },- disabled: false- })- .click(function() {- var docElm = $("#container");- docElm.mozRequestFullScreen();-/* alert(docElm.webkitRequestFullScreen);- if (docElm.requestFullscreen) {- docElm.requestFullscreen();- }- else if (docElm.mozRequestFullScreen) {- docElm.mozRequestFullScreen();- }- else if (docElm.webkitRequestFullScreen) {- alert(docElm);- docElm.webkitRequestFullScreen();- }*/- });-}--this.addTagSuggestionButton = function(container) {- $( ""+container ).append('<button id="openTagSuggestionMenu">Tag Suggestion</button>');- $( "#openTagSuggestionMenu" ).button({- text: false,- icons: {- primary: "ui-icon-suitcase"- },- disabled: false- })- .click(function() {- UIAPI.selectedTag = this.id;- var menu = $("#tagSuggestionsMenu").show().position({- my: "left top",- at: "left bottom",- of: $( this )- });- $( document ).one( "click", function() {- menu.hide();- });- return false;- });-}-+/* Copyright (c) 2012 The Tagspaces Authors. All rights reserved.+ * 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";++console.debug("Loading FileViewer...");++var tsEditor = undefined;++exports.updateTextEditorContent = function(fileContent) {+ console.debug("Updating edtitor"); // with data: "+fileContent);+ tsEditor.setContent(fileContent);+}++exports.openFile = function(fileName) {+ console.debug("Opening file: "+fileName);++ var openedFilePath = UIAPI.currentPath+UIAPI.getDirSeparator()+fileName;+ // TODO replace \\ to \ in filenames+ openedFilePath.replace("\\\\","\\");+ $("#selectedFilePath").val(openedFilePath);++ var fileExt = fileName.substring(fileName.lastIndexOf(".")+1,fileName.length).toLowerCase();+ var filePath = "file:///"+UIAPI.currentPath+UIAPI.getDirSeparator()+fileName;++ this.constructFileViewerUI(fileName, filePath);++ // Getting the viewer for the file extension/type+ var viewerExt = TSSETTINGS.getFileTypeViewer(fileExt);+ console.debug("File Viewer: "+viewerExt);++ // TODO Consider page width by opening, e.g. responsive design+ layoutContainer.open("east");+ // layoutContainer.close("west");++ UIAPI.isFileOpened = true;++ $( "#viewer" ).empty();+ if(!viewerExt) {+ $( "#viewer" ).html("File type not supported for viewing.");+ return;+ } else {+ require(["ext/"+viewerExt+"/extension"], function(viewer) {+ tsEditor = viewer;+ tsEditor.init("viewer");+ // tsEditor.setFileType(fileExt);+ tsEditor.setContent(filePath);+ });+// IOAPI.loadTextFile(filePath);+ }+}++exports.editFile = function(fileName) {+ console.debug("Editing file: "+filePath);+ var filePath = UIAPI.currentPath+UIAPI.getDirSeparator()+fileName;+ var fileExt = fileName.substring(fileName.lastIndexOf(".")+1,fileName.length).toLowerCase();++ // Getting the editor for the file extension/type+ var editorExt = TSSETTINGS.getFileTypeEditor(fileExt);+ console.debug("File Editor: "+editorExt);++ $( "#viewer" ).empty();+ if(!editorExt) {+ $( "#viewer" ).html("File type not supported for editing.");+ return;+ } else {+ $( "#viewer" ).html('<div id="generalEditor" style="width: 100%; height: 100%"></div>');+ require(["ext/"+editorExt+"/extension"], function(editr) {+ tsEditor = editr;+ tsEditor.init("generalEditor");+ tsEditor.setFileType(fileExt);+ });+ IOAPI.loadTextFile(filePath);+ }+}++this.constructFileViewerUI = function(fileName, filePath) {+ // Adding tag buttons to the filetoolbox+ var tags = TSAPI.extractTags(fileName);++ $( "#fileTitle" ).html(TSAPI.extractTitle(fileName));++ // Generate tag buttons+ $( "#fileTags" ).html("");+ for (var i=0; i < tags.length; i++) {+ $( "#fileTags" ).append('<button title="Opens context menu for '+tags[i]+'" tag="'+tags[i]+'" filename="'+fileName+'" class="tagButton">'+tags[i]+'</button>');+ };++ // Activate tagButtons in file view+ $('.tagButton', $( "#fileTags" )).click( function() {+ TagsUI.openTagMenu(this, $(this).attr("tag"), $(this).attr("filename"));+ });++ // Clear filetoolbox+ $( "#filetoolbox" ).html("");++ // TODO Fullscreen disabled due a fullscreen issue+ //this.addFullScreenButton("#filetoolbox");++ this.addEditButton("#filetoolbox", fileName);++ this.addOpenInWindowButton("#filetoolbox", filePath);++ // TODO Tag suggestion disabled due menu init issue+ //this.initTagSuggestionMenu(fileName, tags);+ //this.addTagSuggestionButton("#filetoolbox");++ this.addCloseButton("#filetoolbox");+}+++this.initTagSuggestionMenu = function(fileName, tags) {+ // Adding buttons for creating tags according to the suggested tags+ var suggTags = TSAPI.suggestTags(fileName);++ // $( "#tagSuggestionsMenu" ).menu();+ // $( "#tagSuggestionsMenu" ).menu("disable");+ $( "#tagSuggestionsMenu" ).html("");++ for (var i=0; i < suggTags.length; i++) {+ // Ignoring the tags already assigned to a file+ if(tags.indexOf(suggTags[i]) < 0) {+ $( "#tagSuggestionsMenu" ).append('<li name="'+suggTags[i]+'" title="Add tag '+suggTags[i]+' to current file">Tag with "'+suggTags[i]+'"</li>');+ }+ };++ // TODO menu does not initialize+ $( "#tagSuggestionsMenu" ).menu({ // menu("destroy").+ select: function( event, ui ) {+ var tagName = ui.item.attr( "name" );+ TSAPI.writeTagsToFile(fileName, [tagName]);+ IOAPI.listDirectory(UIAPI.currentPath);+ }+ });+}++this.addEditButton = function(container, fileName) {+ // TODO implement disabled check+ var buttonDisabled = false;+ $( ""+container ).append('<button id="editDocument">Edit</button>');+ $( "#editDocument" ).button({+ text: true,+ icons: {+ primary: "ui-icon-wrench"+ },+ disabled: buttonDisabled+ })+ .click(function() {+ exports.editFile(fileName);+ });+}++this.addOpenInWindowButton = function(container, filePath) {+ $( ""+container ).append('<button id="openInNewWindow">Open in new tab</button>');+ $( "#openInNewWindow" ).button({+ text: false,+ icons: {+ primary: "ui-icon-newwin"+ },+ disabled: false+ })+ .click(function() {+ window.open(filePath);+ });+}++this.addCloseButton = function(container) {+ $( ""+container ).append('<button id="closeOpenedFile">Close</button>');+ $( "#closeOpenedFile" ).button({+ text: false,+ icons: {+ primary: "ui-icon-circle-close"+ },+ disabled: false+ })+ .click(function() {+ UIAPI.isFileOpened = false;+ layoutContainer.open("west");+ layoutContainer.close("east");+ });+}+++this.addFullScreenButton = function(container) {+ $( ""+container ).append('<button id="startFullscreen">Fullscreen</button>');+ $( "#startFullscreen" ).button({+ text: false,+ icons: {+ primary: "ui-icon-arrow-4-diag"+ },+ disabled: false+ })+ .click(function() {+ var docElm = $("#container");+ docElm.mozRequestFullScreen();+/* alert(docElm.webkitRequestFullScreen);+ if (docElm.requestFullscreen) {+ docElm.requestFullscreen();+ }+ else if (docElm.mozRequestFullScreen) {+ docElm.mozRequestFullScreen();+ }+ else if (docElm.webkitRequestFullScreen) {+ alert(docElm);+ docElm.webkitRequestFullScreen();+ }*/+ });+}++this.addTagSuggestionButton = function(container) {+ $( ""+container ).append('<button id="openTagSuggestionMenu">Tag Suggestion</button>');+ $( "#openTagSuggestionMenu" ).button({+ text: false,+ icons: {+ primary: "ui-icon-suitcase"+ },+ disabled: false+ })+ .click(function() {+ UIAPI.selectedTag = this.id;+ var menu = $("#tagSuggestionsMenu").show().position({+ my: "left top",+ at: "left bottom",+ of: $( this )+ });+ $( document ).one( "click", function() {+ menu.hide();+ });+ return false;+ });+}+});\ No newline at end of filediff --git a/data/js/ioapi.chrome.js b/data/js/ioapi.chrome.jsindex 687858b41..3b288fcb7 100644--- a/data/js/ioapi.chrome.js+++ b/data/js/ioapi.chrome.js@@ -37,7 +37,6 @@ if(navigator.userAgent.indexOf("Chrom") > 0) {}// Determine the directory separator-// TODO add this functionality to the ioAPIMozillaIOAPI.pathSeparator = IOAPI.plugin.getPlatform() == 'windows' ? "\\" : '/';// Test if plugin worksdiff --git a/data/js/ioapi.cordova.js b/data/js/ioapi.cordova.jsindex 9e6fae1f0..784bfb423 100644--- a/data/js/ioapi.cordova.js+++ b/data/js/ioapi.cordova.js@@ -1,14 +1,7 @@/* Copyright (c) 2012 The Tagspaces Authors. All rights reserved.* Use of this source code is governed by a AGPL3 license that* can be found in the LICENSE file. */-console.debug("Loading ioAPIDummy.js..");+console.debug("Loading ioAPICordova.js..");var IOAPI = (typeof IOAPI == 'object' && IOAPI != null) ? IOAPI : {};-IOAPI.sampleVar = 1;--IOAPI.renameFile = function(filepath, newname) {- console.debug("Renaming "+filepath+" to "+newname);-}--diff --git a/data/js/layout.ui.js b/data/js/layout.ui.jsindex c597cd1e3..a7dd55fde 100644--- a/data/js/layout.ui.js+++ b/data/js/layout.ui.js@@ -1,97 +1,97 @@-/* Copyright (c) 2012 The Tagspaces Authors. All rights reserved.- * Use of this source code is governed by a AGPL3 license that- * can be found in the LICENSE file. */-console.debug("Loading LayoutUI...");--$(document).ready(function () {- layoutContainer = $('#container').layout(- {- fxName: "none"-- // some resizing/toggling settings- , north__resizable: false // OVERRIDE the pane-default of 'slidable=true'- , north__spacing_open: 0 // no resizer-bar when open (zero height)- // , north__togglerLength_closed: '100%' // toggle-button is full-width of resizer-bar- // , north__spacing_closed: 20 // big resizer-bar when open (zero height)- , north__size: 33-- , south__resizable: false // OVERRIDE the pane-default of 'resizable=true'- , south__spacing_open: 0 // no resizer-bar when open (zero height)- // , south__spacing_closed: 20 // big resizer-bar when open (zero height)-- // west settings- , west__resizable: true- , west__minSize: .1-// , west__maxSize: .4- , west__size: 200- , west__spacing_open: 3-- // east settings- , east__resizable: true- , east__size: .45- , east__minSize: .2-// , east__maxSize: .8 // 80% of layout width- , east__spacing_open: 3-- // center settings- , center__resizable: true- , center__minSize: 0.5-- // enable showOverflow on west-pane so CSS popups will overlap north pane- , west__showOverflowOnHover: true-- // enable state management- , stateManagement__enabled: false // automatic cookie load & save enabled by default-- , showDebugMessages: true // log and/or display messages from debugging & testing code- }-- );-- var westLayout = $('div.ui-layout-west').layout({- minSize: 50 // ALL panes- , center__paneSelector: ".west-center"- , south__paneSelector: ".west-south"- , south__size: .5- , south__spacing_open: 3- });-- var centerLayout = $('div.ui-layout-center').layout({- name: "middle"- , north__paneSelector: ".middle-north"- , center__paneSelector: ".middle-center"- , south__paneSelector: ".middle-south"- , minSize: 0 // ALL panes- , center__minSize: 300- , north__size: 32- , north__resizable: false- , north__spacing_open: 0- , south__spacing_open: 0- , south__size: 1- });-- // File Viewer / Editor- var eastLayout = $('div.ui-layout-east').layout({- minSize: 30 // ALL panes- , north__paneSelector: ".east-north"- , center__paneSelector: ".east-center"- , south__paneSelector: ".east-south"- , north__size: 80- , north__resizable: false- , north__spacing_open: 0- , south__size: 25- , south__spacing_open: 0- });-- var dirNavigationLayout = $('#directoryNavigator').layout({- minSize: 30 // ALL panes- , north__paneSelector: "#directoryNavigatorNorth"- , center__paneSelector: "#dirTree"- , north__size: 30- , north__resizable: false- , north__spacing_open: 0- });-- // Hide Document Viewer by default- layoutContainer.toggle("east");+/* Copyright (c) 2012 The Tagspaces Authors. All rights reserved.+ * Use of this source code is governed by a AGPL3 license that+ * can be found in the LICENSE file. */+console.debug("Loading LayoutUI...");++$(document).ready(function () {+ layoutContainer = $('#container').layout(+ {+ fxName: "none"++ // some resizing/toggling settings+ , north__resizable: false // OVERRIDE the pane-default of 'slidable=true'+ , north__spacing_open: 0 // no resizer-bar when open (zero height)+ // , north__togglerLength_closed: '100%' // toggle-button is full-width of resizer-bar+ // , north__spacing_closed: 20 // big resizer-bar when open (zero height)+ , north__size: 33++ , south__resizable: false // OVERRIDE the pane-default of 'resizable=true'+ , south__spacing_open: 0 // no resizer-bar when open (zero height)+ // , south__spacing_closed: 20 // big resizer-bar when open (zero height)++ // west settings+ , west__resizable: true+ , west__minSize: .1+// , west__maxSize: .4+ , west__size: 200+ , west__spacing_open: 3++ // east settings+ , east__resizable: true+ , east__size: .45+ , east__minSize: .2+// , east__maxSize: .8 // 80% of layout width+ , east__spacing_open: 3++ // center settings+ , center__resizable: true+ , center__minSize: 0.5++ // enable showOverflow on west-pane so CSS popups will overlap north pane+ , west__showOverflowOnHover: true++ // enable state management+ , stateManagement__enabled: false // automatic cookie load & save enabled by default++ , showDebugMessages: true // log and/or display messages from debugging & testing code+ }++ );++ var westLayout = $('div.ui-layout-west').layout({+ minSize: 50 // ALL panes+ , center__paneSelector: ".west-center"+ , south__paneSelector: ".west-south"+ , south__size: .5+ , south__spacing_open: 3+ });++ var centerLayout = $('div.ui-layout-center').layout({+ name: "middle"+ , north__paneSelector: ".middle-north"+ , center__paneSelector: ".middle-center"+ , south__paneSelector: ".middle-south"+ , minSize: 0 // ALL panes+ , center__minSize: 300+ , north__size: 32+ , north__resizable: false+ , north__spacing_open: 0+ , south__spacing_open: 0+ , south__size: 1+ });++ // File Viewer / Editor+ var eastLayout = $('div.ui-layout-east').layout({+ minSize: 30 // ALL panes+ , north__paneSelector: ".east-north"+ , center__paneSelector: ".east-center"+ , south__paneSelector: ".east-south"+ , north__size: 80+ , north__resizable: false+ , north__spacing_open: 0+ , south__size: 25+ , south__spacing_open: 0+ });++ var dirNavigationLayout = $('#directoryNavigator').layout({+ minSize: 30 // ALL panes+ , north__paneSelector: "#directoryNavigatorNorth"+ , center__paneSelector: "#dirTree"+ , north__size: 30+ , north__resizable: false+ , north__spacing_open: 0+ });++ // Hide Document Viewer by default+ layoutContainer.toggle("east");});\ No newline at end of filediff --git a/data/js/messaging.mozilla.js b/data/js/messaging.mozilla.jsindex 492a9e3bd..ccdf4bb50 100644--- a/data/js/messaging.mozilla.js+++ b/data/js/messaging.mozilla.js@@ -1,106 +1,106 @@-/* Copyright (c) 2012 The Tagspaces Authors. All rights reserved.- * Use of this source code is governed by a AGPL3 license that- * can be found in the LICENSE file. */-// Activating browser specific IOAPI modul-define(function(require, exports, module) {-"use strict";--console.debug("Loading messaging.mozilla.js..");-document.documentElement.addEventListener("addon-message1", function(event) {- console.debug("Message received in page script from content script: "+JSON.stringify(event.detail));- UIAPI.hideLoadingAnimation();- var message = event.detail;- switch (message.command) {- case "loadSettings":- if(message.success) {- try {- console.debug("Loading settings...: "+JSON.stringify(message.content));- TSSETTINGS.updateSettingMozillaPreferences(message.content);- } catch (ex) {- console.debug("Exception while getting setting from firefox failed "+ex)- }- } else {- console.debug("Getting setting from firefox failed")- }- break;- case "saveSettings":- if(message.success) {- console.debug("Saving setting as native mozilla preference successfull!")- } else {- console.debug("Saving setting as native mozilla preference failed!")- }- break;- case "updateDefaultPath":- if(message.content.length > 1) {- UIAPI.setCurrentPath(message.content);- }- break;- case "rename":- if(message.success){- UIAPI.updateLogger("Rename success");- // message.content contains the name of the file after the rename- UIAPI.selectedFiles[0] = message.content;- if(UIAPI.isFileOpened) {- FileViewer.openFile(UIAPI.selectedFiles[0]);- }- } else {- UIAPI.updateLogger("Rename failed");- }- break;- case "saveTextFile":- if(message.success){- UIAPI.updateLogger("Save success");- } else {- UIAPI.updateLogger("Save failed");- }- break;- case "createDirectory":- if(message.success){- UIAPI.updateLogger("Create dir success");- DirectoriesUI.openFavorite(TSSETTINGS.Settings["tagspacesList"][0].path, TSSETTINGS.Settings["tagspacesList"][0].name);- } else {- UIAPI.updateLogger("Create dir failed");- }- break;- case "loadTextFile":- if(message.success){- UIAPI.updateTextEditorContent(message.content);- } else {- UIAPI.updateLogger("File loading failed");- }- break;- case "listDirectory":- if(message.success){- UIAPI.updateFileBrowserData(message.content);- } else {- UIAPI.updateLogger("List directory failed");- }- break;- case "getSubdirs":- if(message.success){- var dirListing = [];- for (var i=0; i < message.content.length; i++) {- dirListing.push(message.content[i]);- }- // TODO JSON functions are a workarround for a bug....- UIAPI.updateTree(JSON.parse( JSON.stringify(dirListing)));- //if(!extConnected) {- // initUI();- //}- //extConnected = true;- } else {- UIAPI.updateLogger("Getting subdirs failed");- }- break;- case "delete":- if(message.success){- UIAPI.updateLogger("Delete success");- } else {- UIAPI.updateLogger("Delete failed");- }- break;- default:- break;- }-}, false);+/* Copyright (c) 2012 The Tagspaces Authors. All rights reserved.+ * Use of this source code is governed by a AGPL3 license that+ * can be found in the LICENSE file. */+// Activating browser specific IOAPI modul+define(function(require, exports, module) {+"use strict";++console.debug("Loading messaging.mozilla.js..");+document.documentElement.addEventListener("addon-message1", function(event) {+ console.debug("Message received in page script from content script: "+JSON.stringify(event.detail));+ UIAPI.hideLoadingAnimation();+ var message = event.detail;+ switch (message.command) {+ case "loadSettings":+ if(message.success) {+ try {+ console.debug("Loading settings...: "+JSON.stringify(message.content));+ TSSETTINGS.updateSettingMozillaPreferences(message.content);+ } catch (ex) {+ console.debug("Exception while getting setting from firefox failed "+ex)+ }+ } else {+ console.debug("Getting setting from firefox failed")+ }+ break;+ case "saveSettings":+ if(message.success) {+ console.debug("Saving setting as native mozilla preference successfull!")+ } else {+ console.debug("Saving setting as native mozilla preference failed!")+ }+ break;+ case "updateDefaultPath":+ if(message.content.length > 1) {+ UIAPI.setCurrentPath(message.content);+ }+ break;+ case "rename":+ if(message.success){+ UIAPI.updateLogger("Rename success");+ // message.content contains the name of the file after the rename+ UIAPI.selectedFiles[0] = message.content;+ if(UIAPI.isFileOpened) {+ FileViewer.openFile(UIAPI.selectedFiles[0]);+ }+ } else {+ UIAPI.updateLogger("Rename failed");+ }+ break;+ case "saveTextFile":+ if(message.success){+ UIAPI.updateLogger("Save success");+ } else {+ UIAPI.updateLogger("Save failed");+ }+ break;+ case "createDirectory":+ if(message.success){+ UIAPI.updateLogger("Create dir success");+ DirectoriesUI.openFavorite(TSSETTINGS.Settings["tagspacesList"][0].path, TSSETTINGS.Settings["tagspacesList"][0].name);+ } else {+ UIAPI.updateLogger("Create dir failed");+ }+ break;+ case "loadTextFile":+ if(message.success){+ UIAPI.updateTextEditorContent(message.content);+ } else {+ UIAPI.updateLogger("File loading failed");+ }+ break;+ case "listDirectory":+ if(message.success){+ UIAPI.updateFileBrowserData(message.content);+ } else {+ UIAPI.updateLogger("List directory failed");+ }+ break;+ case "getSubdirs":+ if(message.success){+ var dirListing = [];+ for (var i=0; i < message.content.length; i++) {+ dirListing.push(message.content[i]);+ }+ // TODO JSON functions are a workarround for a bug....+ UIAPI.updateTree(JSON.parse( JSON.stringify(dirListing)));+ //if(!extConnected) {+ // initUI();+ //}+ //extConnected = true;+ } else {+ UIAPI.updateLogger("Getting subdirs failed");+ }+ break;+ case "delete":+ if(message.success){+ UIAPI.updateLogger("Delete success");+ } else {+ UIAPI.updateLogger("Delete failed");+ }+ break;+ default:+ break;+ }+}, false);});\ No newline at end of filediff --git a/data/manifest.json b/data/manifest.jsonindex 26f279606..a7a2a4c30 100644--- a/data/manifest.json+++ b/data/manifest.json@@ -1,6 +1,6 @@{"name": "TagSpaces",- "version": "1.1.1136",+ "version": "1.1.1137","manifest_version": 2,"description": "TagSpaces Explorer","icons": {diff --git a/package.json b/package.jsonindex ed9fc9b37..93c8ac2cf 100644--- a/package.json+++ b/package.json@@ -2,7 +2,7 @@"name": "tagspaces","license": "AGPL 3.0","author": "Ugg Rock",- "version": "1.1.1133",+ "version": "1.1.1139","fullName": "TagSpaces","id": "jid1-FBaMKxTifTSahQ","description": "TagSpaces is a firefox extension, which allows you to browse your local file system and add tags to your files.",diff --git a/update.rdf b/update.rdfindex e5a732a22..08ddcff3f 100644--- a/update.rdf+++ b/update.rdf@@ -7,13 +7,13 @@<r:Seq><r:li><r:Description>- <version>1.1.1133</version>+ <version>1.1.1139</version><targetApplication><r:Description><id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id><minVersion>15.0</minVersion><maxVersion>*</maxVersion>- <updateLink>http://tagspaces.com/releases/1.1/tagspaces.1.1.1133.xpi</updateLink>+ <updateLink>http://tagspaces.com/releases/1.1/tagspaces.1.1.1139.xpi</updateLink><updateInfoURL>http://tagspaces.com/releases/1.1/updateInfo.xml</updateInfoURL></r:Description></targetApplication>