TagSpaces is an offline, open source, document manager with tagging support
Improving check for new versoin functionality
uggrock236d123f0c9b
diff --git a/build.number b/build.numberindex 9cb5943dc..25dc312fa 100644--- a/build.number+++ b/build.number@@ -1,4 +1,4 @@#Build Number for ANT. Do not edit!-#Fri May 31 17:13:49 CEST 2013-build.number=1339+#Sat Jun 01 13:09:36 CEST 2013+build.number=13513=diff --git a/build.xml b/build.xmlindex 7105c8cfd..f62567dde 100644--- a/build.xml+++ b/build.xml@@ -59,6 +59,10 @@ found in the LICENSE file.<fileset dir="data/ext"><include name="perspectiveDefault/**/*"/><include name="perspectiveThumb/**/*"/>+ <include name="perspectiveGraph/**/*"/>+ <include name="editorHTML/*"/>+ <include name="editorText/*"/>+ <include name="viewerMD/*"/></fileset></copy><copy todir="${buildFirefoxExt.dir}/data/css" >@@ -92,10 +96,7 @@ found in the LICENSE file.<target name="build-mozilla-full-extension" depends="prepare-mozilla-extension" description="Creates a simple zip(not xpi) of the mozilla extension"><copy todir="${buildFirefoxExt.dir}/data/ext" ><fileset dir="data/ext">- <include name="perspectiveGraph/**/*"/>- <include name="editorHTML/**"/>- <!--include name="editorText/**/*"/-->- <include name="viewerMD/**/*"/>+ <include name="editorText/**/*"/></fileset></copy><zip destfile="${builds.dir}/${appname} [v${version}.${build.number} ${DSTAMP}${TSTAMP} mozilla].zip">@@ -126,11 +127,11 @@ found in the LICENSE file.<copy todir="${buildChrome.dir}/chrome" ><fileset dir="data/chrome" includes="**/*"/></copy>- <copy todir="${buildFirefoxExt.dir}/data/ext" >+ <copy todir="${buildChrome.dir}/ext" ><fileset dir="data/ext">- <include name="perspectiveBasic/*"/>- <include name="perspectiveSearch/*"/>- <include name="perspectiveThumb/*"/>+ <include name="perspectiveDefault/**/*"/>+ <include name="perspectiveThumb/**/*"/>+ <include name="perspectiveGraph/**/*"/><include name="editorHTML/*"/><include name="editorText/*"/><include name="viewerMD/*"/>diff --git a/data/css/tagspaces.less b/data/css/tagspaces.lessindex 274238b8c..06acfc714 100644--- a/data/css/tagspaces.less+++ b/data/css/tagspaces.less@@ -15,6 +15,7 @@}}+.roundedTagCorners (@radius: 2px) {border-radius: @radius;-webkit-border-radius: @radius;@@ -448,4 +449,8 @@ input a.resetFilter {-webkit-border-radius: 0px;-moz-border-radius: 0px;border-radius: 0px;+}++.icon-leaf:hover {+ color: green;}\ No newline at end of filediff --git a/data/index.html b/data/index.htmlindex bce5f7338..dca622a19 100644--- a/data/index.html+++ b/data/index.html@@ -25,7 +25,7 @@<div class="ui-layout-north" style="padding: 3px"><a href="http://tagspaces.org" target="_new"><span id="logo">TagSpaces<sup id="appVersion"></sup></span></a><span id="loadingAnimation"></span>- <button id="newVersionAvailable" class="btn btn-link" style="color: white; display: none" title="New TagSpaces version available" data-dropdown="#newVersionMenu">+ <button id="newVersionAvailable" class="btn btn-link" style="color: white; display: none;" title="New TagSpaces version available" data-dropdown="#newVersionMenu"><i class="icon-leaf icon-large"></i></button><div id="mainMenu" class="pull-right" style="margin: 0px;">@@ -413,13 +413,7 @@<ul id="fileActionsMenu" class="dropdown-menu has-tip anchor-right"></ul>- <ul id="newVersionMenu" class="dropdown-menu has-tip">- <p style="padding: 15px" id="newVersionMessageContent">- New TagSpaces version available on- <a href="https://addons.mozilla.org/firefox/addon/tagspaces/" target="_blank">addons.mozilla.org/firefox/addon/tagspaces</a> or- <a href="http://tagspaces.org/download/" target="_blank">tagspaces.org/download</a>- </p>- </ul>+ <div id="newVersionMenu" class="dropdown-menu has-tip"></div></div></body>diff --git a/data/js/core.api.js b/data/js/core.api.jsindex dca5b3852..22cc1b10a 100644--- a/data/js/core.api.js+++ b/data/js/core.api.js@@ -110,9 +110,29 @@ define(function(require, exports, module) {}function updateNewVersionData(data) {- console.log("Version JSON"+data)- // TODO Analyse JSON- //$("#newVersionAvailable").css('display', "inline");+ console.log("Version Information: "+data)+ var versioningData = JSON.parse(data);++ // Analysing Version Information+ var availableBuild = parseInt(versioningData['appBuild']);+ var availableVersion = parseFloat(versioningData['appVersion']);++ var currentBuild = parseInt(tsSettings.DefaultSettings["appBuild"]);+ var currentVersion = parseFloat(tsSettings.DefaultSettings["appVersion"]);++ if(availableVersion > currentVersion) {+ $("#newVersionMenu").html('<p style="padding: 15px" id="newVersionMessageContent">'++ 'New TagSpaces major version available on '++ '<a href="https://addons.mozilla.org/firefox/addon/tagspaces/" target="_blank">addons.mozilla.org</a> or '++ '<a href="http://tagspaces.org/download/" target="_blank">tagspaces.org</a></p>');+ $("#newVersionAvailable").css('display', "inline");+ } else if ((availableVersion == currentVersion) && (availableBuild > currentBuild)) {+ $("#newVersionMenu").html('<p style="padding: 15px" id="newVersionMessageContent">'++ 'New TagSpaces build available on '++ '<a href="https://addons.mozilla.org/firefox/addon/tagspaces/" target="_blank">addons.mozilla.org</a> or '++ '<a href="http://tagspaces.org/download/" target="_blank">tagspaces.org</a></p>');+ $("#newVersionAvailable").css('display', "inline");+ }}function updateLogger(message) {diff --git a/data/js/ioapi.mozilla.receiver.js b/data/js/ioapi.mozilla.receiver.jsindex d9d4859df..8906f1514 100644--- a/data/js/ioapi.mozilla.receiver.js+++ b/data/js/ioapi.mozilla.receiver.js@@ -5,7 +5,7 @@define(function(require, exports, module) {"use strict";-console.debug("Loading messaging.mozilla.js..");+console.debug("Loading mozilla's messaging ..");var TSCORE = require("tscore");diff --git a/data/js/settings.api.js b/data/js/settings.api.jsindex 998d09bb4..01dcfc5d7 100644--- a/data/js/settings.api.js+++ b/data/js/settings.api.js@@ -41,8 +41,8 @@ define(function(require, exports, module) {exports.DefaultSettings = {"appName": "@APPNAME@",- "appVersion": "@VERSION@beta",- "appBuild": "@VERSION@.@BUILD@",+ "appVersion": "@VERSION@",+ "appBuild": "@BUILD@","settingsVersion": 2,"newTextFileContent": "Text file created with tagspaces!","newHTMLFileContent": "<html><head><title>Tagspaces File</title></head><body>HTML file created with tagspaces!</body></html>",@@ -59,9 +59,6 @@ define(function(require, exports, module) {{"id": "perspectiveThumb", // ID should be equal to the directory name where the extension is located},- {- "id": "perspectiveGraph", // ID should be equal to the directory name where the extension is located- },],"supportedFileTypes": [{ "type": "jpg", "viewer": "viewerBrowser", "editor": "false" },diff --git a/data/manifest.json b/data/manifest.jsonindex 0adcc18a9..d705f0229 100644--- a/data/manifest.json+++ b/data/manifest.json@@ -1,6 +1,6 @@{"name": "TagSpaces",- "version": "1.4.1337",+ "version": "1.4.1349","manifest_version": 2,"description": "TagSpaces Explorer","icons": {diff --git a/package.json b/package.jsonindex ea83f04b5..3ef7c65b1 100644--- a/package.json+++ b/package.json@@ -2,7 +2,7 @@"name": "tagspaces","license": "AGPL 3.0","author": "Ugg Rock",- "version": "1.4.1337",+ "version": "1.4.1349","fullName": "TagSpaces","id": "jid1-FBaMKxTifTSahQ","description": "TagSpaces is a firefox addon, which allows you to browse your local file system and add tags to your files.",diff --git a/update.rdf b/update.rdfindex d878ce0f1..71cbe8bc0 100644--- a/update.rdf+++ b/update.rdf@@ -7,13 +7,13 @@<r:Seq><r:li><r:Description>- <version>1.4.1337</version>+ <version>1.4.1349</version><targetApplication><r:Description><id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id><minVersion>16.0</minVersion><maxVersion>*</maxVersion>- <updateLink>http://tagspaces.com/releases/1.4/tagspaces.1.4.1337.xpi</updateLink>+ <updateLink>http://tagspaces.com/releases/1.4/tagspaces.1.4.1349.xpi</updateLink><updateInfoURL>http://tagspaces.com/releases/1.4/updateInfo.xml</updateInfoURL></r:Description></targetApplication>