TagSpaces is an offline, open source, document manager with tagging support
Bootstrap migration
uggrock6c7486b6384a
diff --git a/data/css/tagspaces.less b/data/css/tagspaces.lessindex 23ab6fdea..6398cd2a4 100644--- a/data/css/tagspaces.less+++ b/data/css/tagspaces.less@@ -120,26 +120,6 @@ html, body {width: 600px;}-#toggleLeftPanel {- margin: 3px 3px 3px 3px;-}--#viewSwitcher {- margin: 3px 3px 3px 3px;-}--#openOptions{- margin: 3px 3px 3px 3px;-}--#openSettings {- margin: 3px 3px 3px 3px;-}--#openAboutBox {- margin: 3px 3px 3px 0px;-}-#fileTitle {font-weight: bold;font-size: 1.5em;@@ -170,19 +150,22 @@ li hr {// @baseTagColor;.tagButton {- padding: 1px 2px 1px 2px;-// background-color: #008000;-// color: white;+ padding: 0px 2px 0px 2px;+// background: #008000 !important;+ color: white !important;margin: 1px;-// border-color: transparent;-// font-weight: bold;+ border-color: transparent;+// font-weight: normal !important;// font-size: @tagFontSize;z-index: 9999;-// .arrowDownImage;+}++.tagButton:hover {+ color: white;}.tagButton:active {-// background-color: #B81900;+ color: white;}.fileButton {@@ -202,32 +185,31 @@ li hr {}.fileTitleButton {- padding: 1px;+ padding: 0px 2px 0px 2px;+ margin: 1px;+// font-weight: normal !important;+// font-size: @tagFontSize;+ z-index: 9999;+ background: @fileExtColor;+ margin: 1px;background-color: #E5E5E5;- padding-left: 1px;- padding-right: 12px;- font-weight: normal;- font-size: @tagFontSize;- color: #222222;+// font-weight: normal;+// font-size: @tagFontSize;+ color: #222222 !important;text-align: left;- margin: 1px;border: #ddd solid 1px;- .arrowDownImage;- .roundedTagCorners;}.extTagButton {- padding: 1px;- background-color: @fileExtColor;- padding-left: 1px;- padding-right: 12px;- font-weight: bold;- font-size: @tagFontSize;- color: white;+ padding: 0px 2px 0px 2px;+ color: white !important;margin: 1px;border-color: transparent;- .arrowDownImage;- .roundedTagCorners;+// font-weight: normal !important;+// font-size: @tagFontSize;+ z-index: 9999;+// background: @fileExtColor;+ margin: 1px;}#container {@@ -246,7 +228,7 @@ li hr {}.ui-layout-north {- padding: 0px;+ padding: 3px;background-color: #333333;color: #1C94C4;font-weight: bold;diff --git a/data/ext/perspectiveDefault/perspectiveUI.js b/data/ext/perspectiveDefault/perspectiveUI.jsindex 5d2074310..3358f8f0a 100644--- a/data/ext/perspectiveDefault/perspectiveUI.js+++ b/data/ext/perspectiveDefault/perspectiveUI.js@@ -45,7 +45,7 @@ console.debug("Loading UI for perspectiveDefault");title: fileName,class: "thumbImg",filepath: 'file:///'+filePath,- style: "width: 0px; height: 0px"+ style: "width: 0px; height: 0px; border: 0px"})).html();thumbHTML = thumbHTML + " ";}@@ -58,92 +58,124 @@ console.debug("Loading UI for perspectiveDefault");var buttonHTML = $('<span>').append($('<button>', {title: "Options for "+fileName,filepath: filePath,- class: 'fileTitleButton',- text: " | | | "- })).html();+ class: 'btn btn-small fileTitleButton',+ })+ .append( $("<i>", { class: "icon-file", }) )+ .append($("<span>", { class: "caret"}))+ ).html();return buttonHTML +" "+ thumbHTML + titleHTML;}ExtUI.prototype.buildUI = function() {console.debug("Init UI module");-++ var self = this;++ // <div class="btn-toolbar pull-right" style="margin: 0px;">+this.viewToolbar.append($("<a>", {class: "btn btn-small",disabled: false,title: "Create new file",id: this.extensionID+"CreateFileButton",})- .append( $("<i>", { class: "icon-file", }) )- .append("New").click(function() {$( "#dialog-filecreate" ).dialog( "open" );})+ .append( "<i class='icon-plus'>" )+ .append("New"));this.viewToolbar.append($("<button>", {- text: "Subdirs",class: "btn btn-small",disabled: false,title: "Show subfolders content. \nOn subfolder with many files, this step can take some time!",id: this.extensionID+"IncludeSubDirsButton",- }));+ })+ .click(function() {+ $( "#"+self.extensionID+"IncludeSubDirsButton" ).button( "disable" );+ TSCORE.IO.createDirectoryIndex(TSCORE.currentPath);+ })+ .append( $("<i>", { class: "icon-retweet", }) )+ .append("Subdirs")+ );this.viewToolbar.append($("<button>", {- text: "Add Tag",class: "btn btn-small",disabled: false,title: "Tag Selected Files",id: this.extensionID+"TagButton",- }));-- this.viewToolbar.append($("<input>", {- type: "checkbox",+ })+ .click(function() {+ TSCORE.showAddTagsDialog();+ })+ .append( $("<i>", { class: "icon-tag", }) )+ .append("Add Tag")+ );++ this.viewToolbar.append($("<button>", {+ class: "btn btn-small",+ "data-toggle": "button",disabled: false,- id: this.extensionID+"ShowTmbButton",- }));-- this.viewToolbar.append($("<label>", {- for: this.extensionID+"ShowTmbButton",- text: "Toggle Thumbnails",title: "Toggle file thumbnails",- }));-+ id: this.extensionID+"ShowTmbButton",+ })+ .click(function() {+ self.toggleThumbnails();+ })+ .append( $("<i>", { class: "icon-picture", }) )+ //.append("Toggle Thumbnails")+ )+this.viewToolbar.append($("<button>", {- text: "Zoom In",- disabled: true,+ class: "btn btn-small",+ disabled: false,title: "Increase Thumbnails Size",id: this.extensionID+"IncreaseThumbsButton",- }));-- this.viewToolbar.append($("<input>", {- type: "checkbox",- disabled: false,- id: this.extensionID+"ShowFileDetailsButton",- }));-- this.viewToolbar.append($("<label>", {- for: this.extensionID+"ShowFileDetailsButton",- text: "Toggle File Details",- title: "Toggle file details",- }));-- this.viewToolbar.append($("<input>", {- type: "checkbox",+ })+ .click(function() {+ self.switchThumbnailSize();+ })+ .append( $("<i>", { class: "icon-zoom-in", }) )+ //.append("Zoom In")+ )++ this.viewToolbar.append($("<div >", {+ class: "btn-group",+ "data-toggle": "buttons-checkbox",disabled: false,- id: this.extensionID+"ShowTagsButton",- }));-- this.viewToolbar.append($("<label>", {- for: this.extensionID+"ShowTagsButton",- text: "Tags",- title: "Toggle Tags",- }));-+ })+ .append($("<button>", {+ class: "btn btn-small",+ title: "Toggle File Details",+ id: this.extensionID+"ShowFileDetailsButton",+ })+ .click(function() {+ self.toggleFileDetails();+ })+ .append( $("<i>", { class: "icon-list-alt", }) )+ //.append("File Details")+ )++ .append($("<button>", {+ class: "btn btn-small",+ title: "Toggle Tags",+ id: this.extensionID+"ShowTagsButton",+ })+ .click(function() {+ self.toggleTags();+ })+ .append( $("<i>", { class: "icon-tags", }) )+ //.append("Tags")+ )+ ) // end button group++ // Filterthis.viewToolbar.append($("<span>", {- style: "float: right; margin: 0px; padding: 0px;",+ style: "float: right; margin: -1px; padding: 0px;",}).append($("<input>", {- type: "filter",+ type: "text",// autocomplete: "off", // Error: cannot call methods on autocomplete prior to initialization; attempted to call method 'off'title: "This filter applies to current directory without subdirectories.",id: this.extensionID+"FilterBox",@@ -237,7 +269,7 @@ console.debug("Loading UI for perspectiveDefault");// handle thumbnail activationthis.showThumbs = false;- $( "#"+this.extensionID+"ShowTmbButton" ).prop('checked', false).button("refresh");+ //$( "#"+this.extensionID+"ShowTmbButton" ).prop('checked', false).button("refresh");// Clearing the old datathis.fileTable.fnClearTable();@@ -379,7 +411,7 @@ console.debug("Loading UI for perspectiveDefault");this.currentTmbSize = 0;$( "#"+this.extensionID+"IncreaseThumbsButton" ).button( "disable" );$.each(this.fileTable.$('.thumbImg'), function() {- $(this).attr('style', "width: 0px; height: 0px");+ $(this).attr('style', "width: 0px; height: 0px; border: 0px");$(this).attr('src',"");});} else {@@ -403,62 +435,6 @@ console.debug("Loading UI for perspectiveDefault");ExtUI.prototype.initButtons = function() {var self = this;- // Initialize file buttons---- $( "#"+this.extensionID+"IncludeSubDirsButton" )- .click(function() {- $( "#"+self.extensionID+"IncludeSubDirsButton" ).button( "disable" );- TSCORE.IO.createDirectoryIndex(TSCORE.currentPath);- });-- $( "#"+this.extensionID+"TagButton" )- .click(function() {- TSCORE.showAddTagsDialog();- });-- $( "#"+this.extensionID+"ShowTmbButton" ).button({- text: false,- icons: {- primary: "ui-icon-image"- }- })- .click(function() {- self.toggleThumbnails();- });--- $( "#"+this.extensionID+"IncreaseThumbsButton" ).button({- text: false,- icons: {- primary: "ui-icon-zoomin"- }- })- .click(function() {- self.switchThumbnailSize();- });-- $( "#"+this.extensionID+"ShowFileDetailsButton" ).button({- text: false,- icons: {- primary: "ui-icon-contact"- }- })- .click(function() {- self.toggleFileDetails();- });-- $( "#"+this.extensionID+"ShowTagsButton" ).button({- text: false,- icons: {- primary: "ui-icon-tag"- }- })- .click(function() {- self.toggleTags();- });-$( "#clearFilterButton" ).button({text: false,disabled: false,diff --git a/data/index.html b/data/index.htmlindex 8e70b6688..1b20dd69d 100644--- a/data/index.html+++ b/data/index.html@@ -9,14 +9,15 @@<meta http-equiv="Content-type" content="text/html; charset=utf-8" /><link rel="shortcut icon" type="image/x-icon" href="icons/icon16.png"><title>TagSpaces</title>- <link rel="stylesheet" type="text/css" href="libs/bootstrap/css/bootstrap.css">+ <script type="text/javascript" data-main="loader" src="libs/requirejs/require.js"></script><link rel="stylesheet" type="text/css" href="libs/jqueryui/custom-theme/jquery-ui-1.10.2.custom.css"><link rel="stylesheet" type="text/css" href="libs/jquerylayout/layout-default-latest.css"><link rel="stylesheet" type="text/css" href="libs/jsoneditor/jsoneditor.css">- <link rel="stylesheet" type="text/css" href="libs/datatables/css/jquery.dataTables.css"><link rel="stylesheet" type="text/css" href="libs/jquerydropdown/jquery.dropdown.css">+ <link rel="stylesheet" type="text/css" href="libs/bootstrap/css/bootstrap-cosmo.css">+ <!--link rel="stylesheet" type="text/css" href="libs/bootstrap/css/bootswatch.less">+ <link rel="stylesheet" type="text/css" href="libs/bootstrap/css/cosmo.less"--><link rel="stylesheet/less" type="text/css" href="css/tagspaces.less">- <script type="text/javascript" data-main="loader" src="libs/requirejs/require.js"></script></head><body style="background-color: lightgray;"><div id="loading" style="text-align: center; width: 100%; font-size: 1.4em; position:absolute; top:50%; text-shadow: 0px 1px 1px #fff; ">Loading <a href="javascript:window.location.reload();">TagSpaces</a> ... </div>@@ -24,10 +25,12 @@<div class="ui-layout-north"><a href="http://tagspaces.org" target="_new"><span id="logo">TagSpaces<sup id="appVersion" style="font-size: 0.6em; color: #BFBFBF"></sup></span></a><span id="loadingAnimation"> </span>- <a id="openAboutBox" href="#dialogAbout" role="button" class="btn btn-small pull-right " data-toggle="modal"><i class="icon-comment"></i> About</a>- <a id="openOptions" href="#dialogOptions" role="button" class="btn btn-small pull-right" title="Options Dialog" data-toggle="modal"><i class="icon-wrench"></i> Options</a>- <div id="viewSwitcher" class="btn-group pull-right" data-toggle="buttons-radio"></div>- <!--button id="toggleLeftPanel" class="btn btn-small pull-right" title="Toggle Leftpanel"><i class="icon-list"></i> </button-->+ <div class="btn-toolbar pull-right" style="margin: 0px;">+ <div id="viewSwitcher" class="btn-group" data-toggle="buttons-radio"></div>+ <a id="openOptions" href="#dialogOptions" role="button" class="btn btn-small" title="Options Dialog" data-toggle="modal"><i class="icon-wrench"></i> Options</a>+ <a id="openAboutBox" href="#dialogAbout" role="button" class="btn btn-small" data-toggle="modal"><i class="icon-comment"></i> About</a>+ <!--button id="toggleLeftPanel" class="btn btn-small" title="Toggle Leftpanel"><i class="icon-list"></i> </button-->+ </div></div><div class="ui-layout-west" style="padding: 2px;">@@ -35,14 +38,8 @@<div id="directoryNavigatorNorth" style="padding: 0;" ><div class="btn-group" style=" width: 100%;"><button id="reloadTagSpace" style="text-align: left; width: 85%;" class="btn btn-small" >Select Location</button>- <button id="selectTagSpace" style="width: 15%;" class="btn btn-small dropdown-toggle">- <span class="caret"></span>- </button>+ <button id="selectTagSpace" style="width: 15%;" class="btn btn-small dropdown-toggle"><span class="caret"></span></button></div>- <!--button id="editLocation" title="Choose Location" class="btn btn-small"><i class="icon-hand-up"></i></button>- <button id="editLocation" title="Refresh Location" class="btn btn-small"><i class="icon-refresh"></i></button>- <button id="editLocation" title="Edit Location" class="btn btn-small"><i class="icon-edit"></i></button>- <button id="editLocation" title="Remove Location" class="btn btn-small"><i class="icon-remove"></i></button--></div><div id="dirTree" style="padding: 0; height: 100%;">diff --git a/data/js/core.api.js b/data/js/core.api.jsindex c27cd4e72..6f4184d9c 100644--- a/data/js/core.api.js+++ b/data/js/core.api.js@@ -243,10 +243,10 @@ define(function(require, exports, module) {});var dirNavigationLayout = $('#directoryNavigator').layout({- minSize: 30 // ALL panes+ minSize: 32 // ALL panes, north__paneSelector: "#directoryNavigatorNorth", center__paneSelector: "#dirTree"- , north__size: 30+ , north__size: 32, north__resizable: false, north__spacing_open: 0});diff --git a/data/js/fileopener.js b/data/js/fileopener.jsindex 491e21d3f..48ebd0dc9 100644--- a/data/js/fileopener.js+++ b/data/js/fileopener.js@@ -141,12 +141,14 @@ define(function(require, exports, module) {$( "#fileTags" ).empty();for (var i=0; i < tags.length; i++) {$( "#fileTags" ).append($("<button>", {- class: "tagButton",+ "class": "btn btn-small btn-success tagButton",tag: tags[i],filepath: filePath,title: "Opens context menu for "+tags[i],text: tags[i]- }));+ })+ .append($("<span>", { class: "caret"}))+ );};$( "#tagsContainer" ).droppable({diff --git a/data/js/tags.ui.js b/data/js/tags.ui.jsindex fc07da19d..bc3e81aef 100644--- a/data/js/tags.ui.js+++ b/data/js/tags.ui.js@@ -444,9 +444,7 @@ define(function(require, exports, module) {tagButtons.hide();for(var j=0; j < TSCORE.Config.Settings["tagGroups"][i]["children"].length; j++) {tagButtons.append($("<a>", {- // "data-toggle": "dropdown",- // "href": "#",- "class": "btn btn-small dropdown-toggle btn-success tagButton",+ "class": "btn btn-small btn-success tagButton","tag": TSCORE.Config.Settings["tagGroups"][i]["children"][j].title,"parentKey": TSCORE.Config.Settings["tagGroups"][i].key,"title": "Opens context menu for "+TSCORE.Config.Settings["tagGroups"][i]["children"][j].title,@@ -498,9 +496,11 @@ define(function(require, exports, module) {tag: fileExtension,filename: fileName,filepath: filePath,- class: "extTagButton",+ "class": "btn btn-small btn-info extTagButton",text: fileExtension- }));+ })+ .append($("<span>", { class: "caret"}))+ );}if(tagString.length > 0) {var tags = tagString.split(",");@@ -510,9 +510,11 @@ define(function(require, exports, module) {tag: tags[i],filename: fileName,filepath: filePath,- class: "tagButton",+ "class": "btn btn-small btn-success tagButton",text: tags[i]- }));+ })+ .append($("<span>", { class: "caret"}))+ );}}return wrapper.html();diff --git a/data/libs/bootstrap/css/variables.less b/data/libs/bootstrap/css/cosmo.lesssimilarity index 100%rename from data/libs/bootstrap/css/variables.lessrename to data/libs/bootstrap/css/cosmo.lessdiff --git a/data/loader.js b/data/loader.jsindex 6bd596f82..89d2974ea 100644--- a/data/loader.js+++ b/data/loader.js@@ -101,8 +101,8 @@ define(function (require, exports, module) {// Load dependent non-module scriptsrequire("jquery");- require("bootstrap");require("jqueryui");+ require("bootstrap");require("datatables");require("jsoneditor");require("jquerylayout");