TagSpaces is an offline, open source, document manager with tagging support
Cleaning up perspective default
uggrock539d3d1f00c2
diff --git a/data/ext/perspectiveDefault/perspectiveUI.js b/data/ext/perspectiveDefault/perspectiveUI.jsindex a195607f6..43e1f1fc4 100644--- a/data/ext/perspectiveDefault/perspectiveUI.js+++ b/data/ext/perspectiveDefault/perspectiveUI.js@@ -77,31 +77,6 @@ console.log("Loading UI for perspectiveDefault");return checkboxHTML+" "+buttonHTML +" " + titleHTML + thumbHTML;}-- function table2csv(oTable, tableElm) {- var csv = '';- var headers = [];- var rows = [];- var numberOfTagColumns = 20; // max. estimated to 40 ca. 5 symbols per tag _[er], max. path length 25x chars-- headers.push("path");- headers.push("title");- headers.push("size");- for(var i = 0; i < numberOfTagColumns; i++) {- headers.push("tag"+i);- }- csv += headers.join(',') + "\n";-- var total = oTable.fnSettings().fnRecordsTotal()- for(var i = 0; i < total; i++) {- var row = oTable.fnGetData(i);- row = row[TSCORE.fileListFILEPATH]+","+row[TSCORE.fileListTITLE]+","+row[TSCORE.fileListFILESIZE]+","+row[TSCORE.fileListTAGS];- rows.push(row);- }-- csv += rows.join("\n");- return csv;- }ExtUI.prototype.buildUI = function() {console.log("Init UI module");@@ -249,34 +224,12 @@ console.log("Loading UI for perspectiveDefault");.click(function() {var dialogContent = $('<textarea>', {style: "width: 500px; height: 350px;",- text: table2csv(self.fileTable, 'table.display')+ text: TSCORE.PerspectiveManager.csvExport()});TSCORE.showAlertDialog(dialogContent,"Export to CSV Dialog");}).append( $("<i>", { class: "icon-download-alt", }) ))-- .append($("<button>", {- class: "btn",- title: "Show Quantified Yourself Graphic",- id: this.extensionID+"AnalyzeButton",- })- .click(function() {- require([- extensionDirectory+'/quantifiedSelfGraph.js',- extensionDirectory+'/d3/d3.v3.js'- ], function(ui) {- ui.init(self.viewFooter, table2csv(self.fileTable, 'table.display'));- viewFooter.append($('<link>', {- "rel": "stylesheet",- "type": "text/css",- "href": extensionDirectory+"/styles.css"- }));- });- TSCORE.togglePerspectiveFooter();- })- .append( $("<i>", { class: "icon-bar-chart", }) )- )); // end toolbar@@ -525,9 +478,13 @@ console.log("Loading UI for perspectiveDefault");"appendTo": "body","helper": "clone","revert": true,- "start": function() { self.selectFile(this, $(this).attr("filepath")); }+ "start": function() {+ TSCORE.selectedTag = $(this).attr("tag");+ self.selectFile(this, $(this).attr("filepath"));+ }}).click( function() {+ TSCORE.selectedTag = $(this).attr("tag");self.selectFile(this, $(this).attr("filepath"));TSCORE.openTagMenu(this, $(this).attr("tag"), $(this).attr("filepath"));} )diff --git a/data/ext/perspectiveDefault/styles.css b/data/ext/perspectiveDefault/styles.cssindex 0e9ba67aa..e69de29bb 100644--- a/data/ext/perspectiveDefault/styles.css+++ b/data/ext/perspectiveDefault/styles.css@@ -1,15 +0,0 @@-#viewContainers .node circle {- fill: #fff;- stroke: steelblue;- stroke-width: 1.5px;-}--#viewContainers .node {- fill: #ddd;- stroke: #fff;-}--#viewContainers .label {- font: 10px sans-serif;- text-anchor: middle;-}\ No newline at end of file