Skip to content

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

Unsignificant changes

uggrock7b3700545bd6
diff --git a/MISC.md b/MISC.md
index bcdb1c92e..80a437c97 100644
--- a/MISC.md
+++ b/MISC.md
@@ -1,3 +1,3 @@
#########################################################################################################################################################################################################################################################
-/folder1/folder2/folder3/folder4/folder5/folder6/folder7/folder8/folder9/folder10/folder11/folder12/filename 12345567890 sdfsdff ffsdfsdf [tag1 tag2 tag3 tag4 tag5 tag6 tag7 tag8 tag9 tag10 tag11 tag12 tag13 tag14 tag15 tag16 tag17 tag18 tag19].ext4
+/folder1/folder2/folder3/folder4/folder5/folder6/folder7/folder8/folder9/folder10/folder11/folder12/filename 12345567890 sdfsdff ffsdfsdf [tag1 tag2 tag3 tag4 tag5 tag6 tag7 tag8 tag9 tag10 tag11 tag12 tag13 tag14 tag15 tag16 tag17 tag18 tag19].ext4
\ No newline at end of file
diff --git a/build.number b/build.number
index 90ed03328..465583499 100644
--- a/build.number
+++ b/build.number
@@ -1,3 +1,3 @@
-#Build Number for ANT. Do not edit!
-#Thu Jan 10 11:29:15 CET 2013
-build.number=1202
+#Build Number for ANT. Do not edit!
+#Fri Jan 11 10:59:54 CET 2013
+build.number=1211
diff --git a/chrome.manifest.tmpl.json b/chrome.manifest.tmpl.json
index 0710e5fab..a4f5def4c 100644
--- a/chrome.manifest.tmpl.json
+++ b/chrome.manifest.tmpl.json
@@ -13,18 +13,16 @@
"scripts": ["chrome/background.js"]
},
"options_page": "index.html",
- "app": {
- "launch": {
- "local_path": "index.html"
- }
- },
+ "browser_action": {
+ "default_icon": "icons/icon16.png"
+ },
"plugins": [
{"path": "chrome/npapi-fileio/npapi-file-io-32.dll", "public": false},
{"path": "chrome/npapi-fileio/npapi-file-io-32.so", "public": false},
{"path": "chrome/npapi-fileio/npapi-file-io-64.so", "public": false}
],
"permissions": [
- "tabs", "http://*/*", "file://*/*"
+ "tabs", "http://*/*", "file://*/*"
],
"content_security_policy": "script-src 'self' ; object-src 'self'",
"web_accessible_resources": [
diff --git a/data/about.html b/data/about.html
index b57dcef65..7335f08a6 100644
--- a/data/about.html
+++ b/data/about.html
@@ -16,7 +16,7 @@
</head>
<body>
<h1>@APPNAME@ @VERSION@.@BUILD@beta </h1>
-<p>TagSpaces is a open source application for managing of your local files. You can find more information on <a href="http://tagspaces.org">tagspaces.org</a>. A short video introduction in the main functionality can be found on <a target="_new" href="http://youtu.be/H60FN9Rrw64">youtube</a>.</p>
+<p>TagSpaces is a open source application for managing of your local files. You can find more information on <a href="http://tagspaces.org">tagspaces.org</a>. A short video introduction in the main functionality can be found on <a target="_new" href="http://youtu.be/H60FN9Rrw64">youtube</a>. The official changelog can be found <a target="_blank" href="https://github.com/uggrock/tagspaces/blob/master/CHANGELOG.md">here</a>.</p>
<p>Developers interesting in writing extensions for this application can reffer to the tagspaces project's on <a target="_new" href="https://github.com/uggrock/tagspaces">github</a>.</p>
<h1>Copyright</h1>
Copyright (c) 2012-2013 The Tagspaces Authors. All rights reserved. Use of this source code is governed by a AGPL3 license that can be found in the <a href="LICENSE.txt">LICENSE file</a>.
@@ -32,9 +32,10 @@ TagSpaces thankfully relays on the followings javascript libraries:
<li>JSONEditor - <a href="http://jsoneditoronline.org/" target="_new">Homepage</a>&nbsp;<a href="libs/jsoneditor/LICENSE[Apache 2.0]">License[Apache2]</a></li>
<li>RequireJS - <a href="http://requirejs.org" target="_new">Homepage</a>&nbsp;<a href="libs/requirejs/MIT-LICENSE.txt">License[MIT]</a></li>
<li>Less - <a href="http://www.lesscss.de/" target="_new">Homepage</a>&nbsp;<a href="libs/less/APACHE2.0.txt">License[Apache2]</a></li>
-<li>vold-utils-jplib - <a href="https://github.com/voldsoftware/vold-utils-jplib" target="_new">Homepage</a>&nbsp;License[MPL/MIT]</li>
-<li>menuitems-jplib - <a href="https://github.com/voldsoftware/menuitems-jplib" target="_new">Homepage</a>&nbsp;License[MIT/X11]</li>
-<li>toolbarbutton-jplib - <a href="https://github.com/voldsoftware/toolbarbutton-jplib" target="_new">Homepage</a>&nbsp;License[MIT/X11]</li>
+<li>vold-utils-jplib (firefox only)- <a href="https://github.com/voldsoftware/vold-utils-jplib" target="_new">Homepage</a>&nbsp;License[MPL/MIT]</li>
+<li>menuitems-jplib (firefox only) - <a href="https://github.com/voldsoftware/menuitems-jplib" target="_new">Homepage</a>&nbsp;License[MIT/X11]</li>
+<li>toolbarbutton-jplib (firefox only) - <a href="https://github.com/voldsoftware/toolbarbutton-jplib" target="_new">Homepage</a>&nbsp;License[MIT/X11]</li>
+<li>npapi-file-io (chrome only) - <a href="http://code.google.com/p/npapi-file-io/" target="_new">Homepage</a>&nbsp;License[New BSD]</li>
</ul>
</body>
</html>
\ No newline at end of file
diff --git a/data/chrome/background.js b/data/chrome/background.js
index 3984f4492..01f94f8f2 100644
--- a/data/chrome/background.js
+++ b/data/chrome/background.js
@@ -3,4 +3,7 @@
* can be found in the LICENSE file. */
chrome.browserAction.onClicked.addListener(function() {
chrome.tabs.create({ url: 'index.html'});
-});
\ No newline at end of file
+});
+//chrome.app.runtime.onLaunched.addListener(function() {
+// chrome.app.window.create('index.html');
+//});
\ No newline at end of file
diff --git a/data/ext/viewerImage/croppr.css b/data/ext/viewerImage/croppr.css
index 5ad2c00c2..f12dab599 100644
--- a/data/ext/viewerImage/croppr.css
+++ b/data/ext/viewerImage/croppr.css
@@ -1,48 +1,48 @@
-@charset "utf-8";
-body {
- font-size: 67%;
- font-family: Sans-Serif;
- min-height: 416px;
- -webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%;
-}
-
-#cropprMenu{
- color:#fff;
- font-size:11px;
- position:fixed;
- top:11px;
- left:11px;
- z-index:1;
- font-family:Verdana,Arial,Tahoma,sans-serif;
- border:1px solid #000;
- border-radius:5px;
- opacity:0.4;
- background:rgba(30,30,30,0.55);
- -webkit-box-shadow:0 0 5px rgba(0,0,0,0.5);
- cursor:default;
- white-space:nowrap;
- padding:2px 3px;
- text-shadow: 1px 1px 0 #000;
-}
-#cropprMenu:hover { opacity: 1; }
-
-#cropprMenu div {
- display: block;
- text-align: center;
- color: black;
- background-color: rgba(30,30,30,0.75);
- cursor: pointer;
- padding: 2px;
- border: 1px solid #000;
- height: 20px;
- width: 20px;
- margin: 0px;
- background-repeat: no-repeat;
- background-position: center center;
-}
-
-/* Color schemes */
-.croppr-white {background:#fbfbfb;color:#080000;}
-.croppr-black {background:#080000;color:#fbfbfb;}
-.croppr-blue {background:#0D3349;color:#C6FFC6;}
+@charset "utf-8";
+body {
+ font-size: 67%;
+ font-family: Sans-Serif;
+ min-height: 416px;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+}
+
+#cropprMenu{
+ color:#fff;
+ font-size:11px;
+ position:fixed;
+ top:11px;
+ left:11px;
+ z-index:1;
+ font-family:Verdana,Arial,Tahoma,sans-serif;
+ border:1px solid #000;
+ border-radius:5px;
+ opacity:0.4;
+ background:rgba(30,30,30,0.55);
+ -webkit-box-shadow:0 0 5px rgba(0,0,0,0.5);
+ cursor:default;
+ white-space:nowrap;
+ padding:2px 3px;
+ text-shadow: 1px 1px 0 #000;
+}
+#cropprMenu:hover { opacity: 1; }
+
+#cropprMenu div {
+ display: block;
+ text-align: center;
+ color: black;
+ background-color: rgba(30,30,30,0.75);
+ cursor: pointer;
+ padding: 2px;
+ border: 1px solid #000;
+ height: 20px;
+ width: 20px;
+ margin: 0px;
+ background-repeat: no-repeat;
+ background-position: center center;
+}
+
+/* Color schemes */
+.croppr-white {background:#fbfbfb;color:#080000;}
+.croppr-black {background:#080000;color:#fbfbfb;}
+.croppr-blue {background:#0D3349;color:#C6FFC6;}
diff --git a/data/ext/viewerImage/croppr.js b/data/ext/viewerImage/croppr.js
index a5fdac1a4..4acdb70c8 100644
--- a/data/ext/viewerImage/croppr.js
+++ b/data/ext/viewerImage/croppr.js
@@ -1,290 +1,290 @@
-/**
- * Croppr is a Structmedia Experiment.
- *
- * Version: 1.12
- *
- * MaWeRe - Makes the Web Readable !
- *
- *
- * Most of the icons used in this extension are from:
- * http://gentleface.com/free_icon_set.html
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var Croppr = (typeof Croppr == 'object' && Croppr != null) ? Croppr : {};
-
-Croppr.cropprColors = ['croppr-white', 'croppr-black', 'croppr-blue'];
-Croppr.cropprColor = (Croppr.cropprColor==null)?Croppr.cropprColors[1]:Croppr.cropprColor;
-
-Croppr.logger = {
- isEnabled : function() {
- return true;
- },
- debug : function(msg) {
- if (Croppr.logger.isEnabled() && typeof console == 'object' && console != null && typeof console["log"] == 'function') {
- console.log(msg);
- }
- }
-};
-
-Croppr.rotateXYStep = 180;
-Croppr.currentRotationXAngle = 0;
-Croppr.currentRotationYAngle = 0;
-
-Croppr.rotateStep = 90;
-Croppr.currentRotationAngle = 0;
-
-Croppr.zoomStep = 0.3;
-Croppr.currentZoomLevel = 1;
-
-Croppr.updateTransformations = function() {
- $('#cropprBody').attr('style', '-webkit-transform: rotate('+Croppr.currentRotationAngle+'deg) scale('+Croppr.currentZoomLevel+') rotateX('+Croppr.currentRotationXAngle+'deg) rotateY('+Croppr.currentRotationYAngle+'deg)');
-};
-
-Croppr.rotateRight = function() {
- Croppr.currentRotationAngle = Croppr.currentRotationAngle + Croppr.rotateStep;
- Croppr.updateTransformations();
-};
-
-Croppr.rotateLeft = function() {
- Croppr.currentRotationAngle = Croppr.currentRotationAngle - Croppr.rotateStep;
- Croppr.updateTransformations();
-};
-
-Croppr.flipVertically = function() {
- Croppr.currentRotationYAngle = Croppr.currentRotationYAngle + Croppr.rotateXYStep;
- Croppr.updateTransformations();
-};
-
-Croppr.flipHorizontally = function() {
- Croppr.currentRotationXAngle = Croppr.currentRotationXAngle + Croppr.rotateXYStep;
- Croppr.updateTransformations();
-};
-
-Croppr.zoomIn = function() {
- Croppr.currentZoomLevel = Croppr.currentZoomLevel + Croppr.zoomStep;
- Croppr.updateTransformations();
-};
-
-Croppr.zoomOut = function() {
- Croppr.currentZoomLevel = Croppr.currentZoomLevel - Croppr.zoomStep;
- Croppr.updateTransformations();
-};
-
-// Resize the content image to fit in the viewport
-Croppr.fitViewport = function() {
- var newWidth = null;
- var newHeight = null;
-
- if($('#imageContent').width() > window.innerWidth) {
- newWidth = window.innerWidth;
- newHeight = Math.round(newWidth * $('#imageContent').height() / $('#imageContent').width());
- }
- $('#imageContent').attr('style', 'width: '+newWidth+'px; height: '+newHeight+'px;');
-
- if($('#imageContent').height() > window.innerHeight) {
- newHeight = window.innerHeight;
- newWidth = Math.round(newHeight * $('#imageContent').width() / $('#imageContent').height());
- }
- $('#imageContent').attr('style', 'width: '+newWidth+'px; height: '+newHeight+'px;');
-// Croppr.logger.debug("W: "+newWidth+" H: "+newHeight+" Viewport: "+window.innerWidth);
-};
-
-Croppr.reset = function() {
- Croppr.currentRotationXAngle = 0;
- Croppr.currentRotationYAngle = 0;
- Croppr.currentRotationAngle = 0;
- Croppr.currentZoomLevel = 1;
- $('#cropprBody').attr('style', '-webkit-transform: rotate(0deg) scale(1) rotateX(0deg) rotateY(0deg)');
- Croppr.fitViewport();
-};
-
-Croppr.toggleColor = function() {
- $('body').removeClass(Croppr.cropprColor);
- var currentIndex = Croppr.cropprColors.indexOf(Croppr.cropprColor);
- var nextIndex = currentIndex+1;
- if (nextIndex >= Croppr.cropprColors.length) { nextIndex = 0; }
- Croppr.cropprColor = Croppr.cropprColors[nextIndex];
- $('body').addClass(Croppr.cropprColor);
-};
-
-Croppr.enableEventHandling = function() {
- $(document).ready(function(){
-
- // Fit the content to viewport
- Croppr.fitViewport();
-
- // Shows the cropper toolbox
- $("#cropprMenu").show();
-
- $(window).resize(function() {
- Croppr.fitViewport();
- });
-
- $("#cropprClose").click( function() {
- $("#cropprMenu").hide();
- });
-
- $("#cropprColors").click( function() {
- Croppr.toggleColor();
- });
-
- $("#cropprRotateRight").click( function() {
- Croppr.rotateRight();
- });
-
- $("#cropprRotateLeft").click( function() {
- Croppr.rotateLeft();
- });
-
- $("#cropprFlipVertically").click( function() {
- Croppr.flipVertically();
- });
-
- $("#cropprFlipHorizontally").click( function() {
- Croppr.flipHorizontally();
- });
-
- $("#cropprZoomIn").click( function() {
- Croppr.zoomIn();
- });
-
- $("#cropprZoomOut").click( function() {
- Croppr.zoomOut();
- });
-
- $("#cropprEvernote").click( function() {
- Evernote.doClip({contentId:'cropprBody',code:'Ilia8863'});
- });
-
- $("#cropprFacebook").click( function() {
- window.location.href="http://www.facebook.com/sharer.php?u="+encodeURIComponent(Croppr.biggestImageUrl)+"&t="+encodeURIComponent('Shared through croppr chrome extension!');
- });
-
- $("#cropprTwitter").click( function() {
- window.location.href="http://twitter.com/share?url="+encodeURIComponent(Croppr.biggestImageUrl)+"&r=cr";
- });
-
- $("#cropprReset").click( function() {
- Croppr.reset();
- });
-
- $("#cropprReload").click( function() {
- window.location.reload();
- });
-
- $("#cropprAbout").click( function() {
- window.location.href="http://mawere.com";
- });
-
- $("#cropprPrint").click( function() {
- $("#cropprMenu").hide();
- window.print();
- });
-
- });
-};
-
-Croppr.findLinksToImages = function() {
- $("a").each(function(index) {
- Croppr.logger.debug("index: " + index + " href: " + $(this).attr('href'));
- });
-};
-
-Croppr.findBiggestImage = function() {
- var indexBiggestImage = 0;
- var areaBiggestImage = 0;
- $("img").each(function(index) {
- var area = $(this).width()*$(this).height();
- if(area > areaBiggestImage) {
- indexBiggestImage = index;
- areaBiggestImage = area;
- }
- Croppr.logger.debug("index: " + index + " w: " + $(this).width() + " h: "+$(this).height() + " m2: " + area + " src: " +$("img")[index].src + " - " +indexBiggestImage);
- });
-
- Croppr.logger.debug(indexBiggestImage + " - " + $("img")[indexBiggestImage].src);
-
- return $("img")[indexBiggestImage].src;
-};
-
-Croppr.biggestImageUrl = "";
-
-Croppr.initCroppr = function() {
- Croppr.biggestImageUrl = Croppr.findBiggestImage();
-
- // ToDo
- Croppr.findLinksToImages();
-
- // Generating croppr toolbox
- var cropprToolboxDiv = document.createElement("DIV");
- cropprToolboxDiv.id = "cropprMenu";
- cropprToolboxDiv.innerHTML = '' +
-'<div id="cropprColors" style="background-image: url(./imgs/color.png);" title="Change the background color">&nbsp;</div>'+
-'<div id="cropprRotateLeft" style="background-image: url(./imgs/rotateleft.png);" title="Rotate to the left">&nbsp;</div>'+
-'<div id="cropprRotateRight" style="background-image: url(./imgs/rotateright.png);" title="Rotate to the right">&nbsp;</div>'+
-'<div id="cropprFlipHorizontally" style="background-image: url(./imgs/fliph.png);" title="Flip horizontally">&nbsp;</div>'+
-'<div id="cropprFlipVertically" style="background-image: url(./imgs/flipv.png);" title="Flip vertically">&nbsp;</div>'+
-'<div id="cropprZoomIn" style="background-image: url(./imgs/zoomin.png);" title="Zoom in">&nbsp;</div>'+
-'<div id="cropprZoomOut" style="background-image: url(./imgs/zoomout.png);" title="Zoom out">&nbsp;</div>'+
-'<div id="cropprReset" style="background-image: url(./imgs/reset.png);" title="Reset the image">&nbsp;</div>'+
-'<div id="cropprTwitter" style="background-image: url(./imgs/twitter.png);" title="Send to Twitter">&nbsp;</div>'+
-'<div id="cropprFacebook" style="background-image: url(./imgs/facebook.png);" title="Send to Facebook">&nbsp;</div>'+
-'<div id="cropprPrint" style="background-image: url(./imgs/print.png);" title="Print">&nbsp;</div>'+
-'<div id="cropprReload" style="background-image: url(./imgs/reload.png);" title="Reload the original page">&nbsp;</div>'+
-'<div id="cropprAbout" style="background-image: url(./imgs/about.png);" title="About Croppr">&nbsp;</div>'+
-'<div id="cropprClose" style="background-image: url(./imgs/close.png);" title="Closes this toolbox">&nbsp;</div>'+
- '';
-
- var contentDiv = document.createElement("DIV");
- contentDiv.id = "cropprBody";
- contentDiv.style = "";
- contentDiv.innerHTML = '' +
- // '<a href="'+biggestImageUrl+'" target="_blank" style="border: 0px;"><img id="imageContent" src="'+biggestImageUrl+'"></a>'+
- '<img id="imageContent" src="'+Croppr.biggestImageUrl+'">'+
- '';
-
- // Clears the document content
-// document.body.innerHTML = "";
-
- // Inserts the content on the page
- document.body.insertBefore(contentDiv, document.body.firstChild);
-
- // Remove all stylesheets
-// document.body.removeAttribute('style');
-// for (var i=0; i < document.styleSheets.length; i++) {
-// if (document.styleSheets[i].href !== null && document.styleSheets[i].href.lastIndexOf("croppr") == -1) {
-// document.styleSheets[i].disabled = true;
-// }
-// }
-
- // Sets the background color of the page to the default color(black)
-// $('body').attr('class', '');
-// $('body').addClass(Croppr.cropprColor);
-
- // Centers the content on the page
-// document.documentElement.style.display = 'table';
-// document.documentElement.style.width = '100%';
-// document.documentElement.style.height = '100%';
-// document.documentElement.style.background = '#000';
-// document.body.style.display = 'table-cell';
-// document.body.style.verticalAlign = 'middle';
-// document.body.style.textAlign = 'center';
-
- // Inserts the croppr's toolbox on the page
- document.body.insertBefore(cropprToolboxDiv, document.body.firstChild);
-
- Croppr.enableEventHandling();
-};
-Croppr.initCroppr();
+/**
+ * Croppr is a Structmedia Experiment.
+ *
+ * Version: 1.12
+ *
+ * MaWeRe - Makes the Web Readable !
+ *
+ *
+ * Most of the icons used in this extension are from:
+ * http://gentleface.com/free_icon_set.html
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var Croppr = (typeof Croppr == 'object' && Croppr != null) ? Croppr : {};
+
+Croppr.cropprColors = ['croppr-white', 'croppr-black', 'croppr-blue'];
+Croppr.cropprColor = (Croppr.cropprColor==null)?Croppr.cropprColors[1]:Croppr.cropprColor;
+
+Croppr.logger = {
+ isEnabled : function() {
+ return true;
+ },
+ debug : function(msg) {
+ if (Croppr.logger.isEnabled() && typeof console == 'object' && console != null && typeof console["log"] == 'function') {
+ console.log(msg);
+ }
+ }
+};
+
+Croppr.rotateXYStep = 180;
+Croppr.currentRotationXAngle = 0;
+Croppr.currentRotationYAngle = 0;
+
+Croppr.rotateStep = 90;
+Croppr.currentRotationAngle = 0;
+
+Croppr.zoomStep = 0.3;
+Croppr.currentZoomLevel = 1;
+
+Croppr.updateTransformations = function() {
+ $('#cropprBody').attr('style', '-webkit-transform: rotate('+Croppr.currentRotationAngle+'deg) scale('+Croppr.currentZoomLevel+') rotateX('+Croppr.currentRotationXAngle+'deg) rotateY('+Croppr.currentRotationYAngle+'deg)');
+};
+
+Croppr.rotateRight = function() {
+ Croppr.currentRotationAngle = Croppr.currentRotationAngle + Croppr.rotateStep;
+ Croppr.updateTransformations();
+};
+
+Croppr.rotateLeft = function() {
+ Croppr.currentRotationAngle = Croppr.currentRotationAngle - Croppr.rotateStep;
+ Croppr.updateTransformations();
+};
+
+Croppr.flipVertically = function() {
+ Croppr.currentRotationYAngle = Croppr.currentRotationYAngle + Croppr.rotateXYStep;
+ Croppr.updateTransformations();
+};
+
+Croppr.flipHorizontally = function() {
+ Croppr.currentRotationXAngle = Croppr.currentRotationXAngle + Croppr.rotateXYStep;
+ Croppr.updateTransformations();
+};
+
+Croppr.zoomIn = function() {
+ Croppr.currentZoomLevel = Croppr.currentZoomLevel + Croppr.zoomStep;
+ Croppr.updateTransformations();
+};
+
+Croppr.zoomOut = function() {
+ Croppr.currentZoomLevel = Croppr.currentZoomLevel - Croppr.zoomStep;
+ Croppr.updateTransformations();
+};
+
+// Resize the content image to fit in the viewport
+Croppr.fitViewport = function() {
+ var newWidth = null;
+ var newHeight = null;
+
+ if($('#imageContent').width() > window.innerWidth) {
+ newWidth = window.innerWidth;
+ newHeight = Math.round(newWidth * $('#imageContent').height() / $('#imageContent').width());
+ }
+ $('#imageContent').attr('style', 'width: '+newWidth+'px; height: '+newHeight+'px;');
+
+ if($('#imageContent').height() > window.innerHeight) {
+ newHeight = window.innerHeight;
+ newWidth = Math.round(newHeight * $('#imageContent').width() / $('#imageContent').height());
+ }
+ $('#imageContent').attr('style', 'width: '+newWidth+'px; height: '+newHeight+'px;');
+// Croppr.logger.debug("W: "+newWidth+" H: "+newHeight+" Viewport: "+window.innerWidth);
+};
+
+Croppr.reset = function() {
+ Croppr.currentRotationXAngle = 0;
+ Croppr.currentRotationYAngle = 0;
+ Croppr.currentRotationAngle = 0;
+ Croppr.currentZoomLevel = 1;
+ $('#cropprBody').attr('style', '-webkit-transform: rotate(0deg) scale(1) rotateX(0deg) rotateY(0deg)');
+ Croppr.fitViewport();
+};
+
+Croppr.toggleColor = function() {
+ $('body').removeClass(Croppr.cropprColor);
+ var currentIndex = Croppr.cropprColors.indexOf(Croppr.cropprColor);
+ var nextIndex = currentIndex+1;
+ if (nextIndex >= Croppr.cropprColors.length) { nextIndex = 0; }
+ Croppr.cropprColor = Croppr.cropprColors[nextIndex];
+ $('body').addClass(Croppr.cropprColor);
+};
+
+Croppr.enableEventHandling = function() {
+ $(document).ready(function(){
+
+ // Fit the content to viewport
+ Croppr.fitViewport();
+
+ // Shows the cropper toolbox
+ $("#cropprMenu").show();
+
+ $(window).resize(function() {
+ Croppr.fitViewport();
+ });
+
+ $("#cropprClose").click( function() {
+ $("#cropprMenu").hide();
+ });
+
+ $("#cropprColors").click( function() {
+ Croppr.toggleColor();
+ });
+
+ $("#cropprRotateRight").click( function() {
+ Croppr.rotateRight();
+ });
+
+ $("#cropprRotateLeft").click( function() {
+ Croppr.rotateLeft();
+ });
+
+ $("#cropprFlipVertically").click( function() {
+ Croppr.flipVertically();
+ });
+
+ $("#cropprFlipHorizontally").click( function() {
+ Croppr.flipHorizontally();
+ });
+
+ $("#cropprZoomIn").click( function() {
+ Croppr.zoomIn();
+ });
+
+ $("#cropprZoomOut").click( function() {
+ Croppr.zoomOut();
+ });
+
+ $("#cropprEvernote").click( function() {
+ Evernote.doClip({contentId:'cropprBody',code:'Ilia8863'});
+ });
+
+ $("#cropprFacebook").click( function() {
+ window.location.href="http://www.facebook.com/sharer.php?u="+encodeURIComponent(Croppr.biggestImageUrl)+"&t="+encodeURIComponent('Shared through croppr chrome extension!');
+ });
+
+ $("#cropprTwitter").click( function() {
+ window.location.href="http://twitter.com/share?url="+encodeURIComponent(Croppr.biggestImageUrl)+"&r=cr";
+ });
+
+ $("#cropprReset").click( function() {
+ Croppr.reset();
+ });
+
+ $("#cropprReload").click( function() {
+ window.location.reload();
+ });
+
+ $("#cropprAbout").click( function() {
+ window.location.href="http://mawere.com";
+ });
+
+ $("#cropprPrint").click( function() {
+ $("#cropprMenu").hide();
+ window.print();
+ });
+
+ });
+};
+
+Croppr.findLinksToImages = function() {
+ $("a").each(function(index) {
+ Croppr.logger.debug("index: " + index + " href: " + $(this).attr('href'));
+ });
+};
+
+Croppr.findBiggestImage = function() {
+ var indexBiggestImage = 0;
+ var areaBiggestImage = 0;
+ $("img").each(function(index) {
+ var area = $(this).width()*$(this).height();
+ if(area > areaBiggestImage) {
+ indexBiggestImage = index;
+ areaBiggestImage = area;
+ }
+ Croppr.logger.debug("index: " + index + " w: " + $(this).width() + " h: "+$(this).height() + " m2: " + area + " src: " +$("img")[index].src + " - " +indexBiggestImage);
+ });
+
+ Croppr.logger.debug(indexBiggestImage + " - " + $("img")[indexBiggestImage].src);
+
+ return $("img")[indexBiggestImage].src;
+};
+
+Croppr.biggestImageUrl = "";
+
+Croppr.initCroppr = function() {
+ Croppr.biggestImageUrl = Croppr.findBiggestImage();
+
+ // ToDo
+ Croppr.findLinksToImages();
+
+ // Generating croppr toolbox
+ var cropprToolboxDiv = document.createElement("DIV");
+ cropprToolboxDiv.id = "cropprMenu";
+ cropprToolboxDiv.innerHTML = '' +
+'<div id="cropprColors" style="background-image: url(./imgs/color.png);" title="Change the background color">&nbsp;</div>'+
+'<div id="cropprRotateLeft" style="background-image: url(./imgs/rotateleft.png);" title="Rotate to the left">&nbsp;</div>'+
+'<div id="cropprRotateRight" style="background-image: url(./imgs/rotateright.png);" title="Rotate to the right">&nbsp;</div>'+
+'<div id="cropprFlipHorizontally" style="background-image: url(./imgs/fliph.png);" title="Flip horizontally">&nbsp;</div>'+
+'<div id="cropprFlipVertically" style="background-image: url(./imgs/flipv.png);" title="Flip vertically">&nbsp;</div>'+
+'<div id="cropprZoomIn" style="background-image: url(./imgs/zoomin.png);" title="Zoom in">&nbsp;</div>'+
+'<div id="cropprZoomOut" style="background-image: url(./imgs/zoomout.png);" title="Zoom out">&nbsp;</div>'+
+'<div id="cropprReset" style="background-image: url(./imgs/reset.png);" title="Reset the image">&nbsp;</div>'+
+'<div id="cropprTwitter" style="background-image: url(./imgs/twitter.png);" title="Send to Twitter">&nbsp;</div>'+
+'<div id="cropprFacebook" style="background-image: url(./imgs/facebook.png);" title="Send to Facebook">&nbsp;</div>'+
+'<div id="cropprPrint" style="background-image: url(./imgs/print.png);" title="Print">&nbsp;</div>'+
+'<div id="cropprReload" style="background-image: url(./imgs/reload.png);" title="Reload the original page">&nbsp;</div>'+
+'<div id="cropprAbout" style="background-image: url(./imgs/about.png);" title="About Croppr">&nbsp;</div>'+
+'<div id="cropprClose" style="background-image: url(./imgs/close.png);" title="Closes this toolbox">&nbsp;</div>'+
+ '';
+
+ var contentDiv = document.createElement("DIV");
+ contentDiv.id = "cropprBody";
+ contentDiv.style = "";
+ contentDiv.innerHTML = '' +
+ // '<a href="'+biggestImageUrl+'" target="_blank" style="border: 0px;"><img id="imageContent" src="'+biggestImageUrl+'"></a>'+
+ '<img id="imageContent" src="'+Croppr.biggestImageUrl+'">'+
+ '';
+
+ // Clears the document content
+// document.body.innerHTML = "";
+
+ // Inserts the content on the page
+ document.body.insertBefore(contentDiv, document.body.firstChild);
+
+ // Remove all stylesheets
+// document.body.removeAttribute('style');
+// for (var i=0; i < document.styleSheets.length; i++) {
+// if (document.styleSheets[i].href !== null && document.styleSheets[i].href.lastIndexOf("croppr") == -1) {
+// document.styleSheets[i].disabled = true;
+// }
+// }
+
+ // Sets the background color of the page to the default color(black)
+// $('body').attr('class', '');
+// $('body').addClass(Croppr.cropprColor);
+
+ // Centers the content on the page
+// document.documentElement.style.display = 'table';
+// document.documentElement.style.width = '100%';
+// document.documentElement.style.height = '100%';
+// document.documentElement.style.background = '#000';
+// document.body.style.display = 'table-cell';
+// document.body.style.verticalAlign = 'middle';
+// document.body.style.textAlign = 'center';
+
+ // Inserts the croppr's toolbox on the page
+ document.body.insertBefore(cropprToolboxDiv, document.body.firstChild);
+
+ Croppr.enableEventHandling();
+};
+Croppr.initCroppr();
diff --git a/data/icons/icon128.png b/data/icons/icon128.png
index 14537f909..900d7924a 100644
Binary files a/data/icons/icon128.png and b/data/icons/icon128.png differ
diff --git a/package.json b/package.json
index e8baecff0..046217aea 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "tagspaces",
"license": "AGPL 3.0",
"author": "Ugg Rock",
- "version": "1.2.1200",
+ "version": "1.2.1210",
"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.rdf
index b0d148873..04d7d3700 100644
--- a/update.rdf
+++ b/update.rdf
@@ -7,13 +7,13 @@
<r:Seq>
<r:li>
<r:Description>
- <version>1.2.1200</version>
+ <version>1.2.1210</version>
<targetApplication>
<r:Description>
<id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
<minVersion>16.0</minVersion>
<maxVersion>*</maxVersion>
- <updateLink>http://tagspaces.com/releases/1.2/tagspaces.1.2.1200.xpi</updateLink>
+ <updateLink>http://tagspaces.com/releases/1.2/tagspaces.1.2.1210.xpi</updateLink>
<updateInfoURL>http://tagspaces.com/releases/1.2/updateInfo.xml</updateInfoURL>
</r:Description>
</targetApplication>