Skip to content

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

Bootstrap migration

uggrockd3baa11dd793
diff --git a/build.number b/build.number
index 5de18cf1f..1d44fe6b9 100644
--- a/build.number
+++ b/build.number
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
-#Mon Apr 22 20:44:15 CEST 2013
-build.number=1310
+#Tue May 07 16:47:27 CEST 2013
+build.number=1313
diff --git a/data/about.html b/data/about.html
index 79f9f53be..ca3ee7570 100644
--- a/data/about.html
+++ b/data/about.html
@@ -32,6 +32,7 @@ TagSpaces thankfully relays on the followings javascript libraries:
<li>jQueryUI - <a href="http://jqueryui.com" target="_new">Homepage</a>&nbsp;<a href="libs/jqueryui/MIT-LICENSE.txt">License[MIT]</a></li>
<li>jQuery Layout - <a href="http://layout.jquery-dev.net" target="_new">Homepage</a>&nbsp;<a href="libs/jquerylayout/MIT-LICENSE.txt">License[MIT]</a></li>
<li>jQuery Dropdown - <a href="http://labs.abeautifulsite.net/jquery-dropdown" target="_new">Homepage</a>&nbsp;<a href="libs/jquerydropdown/MIT-LICENSE.txt">License[MIT]</a></li>
+<li>Bootstrap - <a href="http://twitter.github.io/bootstrap" target="_new">Homepage</a>&nbsp;<a href="libs/bootstrap/LICENSE.txt">License[Apache2]</a></li>
<li>DataTables - <a href="http://datatables.net/" target="_new">Homepage</a>&nbsp;<a href="libs/datatables/license-bsd.txt">License[BSD]</a></li>
<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>
diff --git a/data/css/tagspaces.less b/data/css/tagspaces.less
index 6398cd2a4..faa27779b 100644
--- a/data/css/tagspaces.less
+++ b/data/css/tagspaces.less
@@ -350,44 +350,22 @@ span.dynatree-icon {
}
.tagGroupTitle {
- padding-left: 15px;
- background-image: url('arrow-down.png');
- background-repeat: no-repeat;
- background-position: left;
+ padding-left: 5px;
+ text-decoration: none;
+ color: gray;
+ font-size: 12px;
+ font-family: Geneva, Arial, Helvetica, sans-serif;
}
-/* 4 Remove */
-.tagGroupSettings {
- float: right;
- width: 20px;
- background-image: url('settings.png');
- background-repeat: no-repeat;
- background-position: left;
-}
-
-.tagGroupSettings:hover {
- background-image: url('settingsHover.png');
+.tagGroupTitle:hover {
+ text-decoration: none;
+ color: gray;
}
#tagGroups {
overflow: auto;
}
-#tagGroups ul.dynatree-container a, #tagGroups ul.dynatree-container a:hover {
- padding: 1px;
- background-color: @baseTagColor;
- padding-right: 12px;
- font-weight: bold;
- font-size: @tagFontSize;
- color: white;
- margin: 1px;
- border-color: transparent;
- .arrowDownImage;
- .roundedTagCorners;
-}
-
-
-/* End Dynatree css*/
/* JSON Editor */
div.jsoneditor-menu {
diff --git a/data/ext/perspectiveBasic/extension.js b/data/ext/perspectiveBasic/extension.js
deleted file mode 100644
index 3ffed6b7f..000000000
--- a/data/ext/perspectiveBasic/extension.js
+++ /dev/null
@@ -1,401 +0,0 @@
-/* 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 perspectiveBasic");
-
- exports.Title = "List"
- exports.ID = "perspectiveBasic"; // ID should be equal to the directory name where the ext. is located
- exports.Type = "view";
- exports.Icon = "ui-icon-note";
-
- var TSCORE = require("tscore");
- require('datatables');
- // 'jqueryuidraggable',
-
- var viewContainer = undefined;
- var viewToolbar = undefined;
- var viewFooter = undefined;
-
- var fileTable = undefined;
- var viewMode = "tags" // tags | files
-
- exports.init = function init() {
- console.debug("Initializing View "+exports.ID);
-
- viewContainer = $("#"+exports.ID+"Container");
- viewToolbar = $("#"+exports.ID+"Toolbar");
- viewFooter = $("#"+exports.ID+"Footer");
-
- viewContainer.empty();
- viewToolbar.empty();
- viewFooter.empty();
-
- viewToolbar.append($("<button>", {
- text: "New",
- disabled: true,
- title: "Create new file",
- id: exports.ID+"CreateFileButton",
- }));
-
- viewToolbar.append($("<span>", {
- id: exports.ID+"ModeSwitcher",
- }));
-
- var modeSwitcher = $("#"+exports.ID+"ModeSwitcher");
-
- modeSwitcher.append($("<input>", {
- type: "radio",
- name: "modeSwitcher",
- checked: "checked",
- id: exports.ID+"TagsMode",
- }));
-
- modeSwitcher.append($("<label>", {
- for: exports.ID+"TagsMode",
- text: "Tags",
- }));
-
- modeSwitcher.append($("<input>", {
- type: "radio",
- name: "modeSwitcher",
- id: exports.ID+"FilesMode",
- }));
-
- modeSwitcher.append($("<label>", {
- for: exports.ID+"FilesMode",
- text: "Files",
- }));
-
- modeSwitcher.buttonset();
-
- // Adding event listener & icon to the radio button
- $( "#"+exports.ID+"TagsMode" ).button({
- text: true,
- icons: {
- primary: "ui-icon-tag"
- }
- })
- .click(function() {
- viewMode = "tags"
- exports.load();
- })
-
- $( "#"+exports.ID+"FilesMode" ).button({
- text: true,
- icons: {
- primary: "ui-icon-document-b"
- }
- })
- .click(function() {
- viewMode = "files"
- exports.load();
- })
-
- viewToolbar.append($("<button>", {
- text: "Tag",
- disabled: true,
- title: "TagSelectedFiles",
- id: exports.ID+"TagButton",
- }));
-
- viewToolbar.append($("<span>", {
- style: "float: right; margin: 0px; padding: 0px;",
- }).append($("<input>", {
- type: "filter",
- // 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: exports.ID+"FilterBox",
- })));
-
- viewContainer.append($("<table>", {
- cellpadding: "0",
- cellspacing: "0",
- border: "0",
- style: "width: 100%",
- id: exports.ID+"FileTable",
- }));
-
- fileTable = $('#'+exports.ID+"FileTable").dataTable( {
- "bJQueryUI": false,
- "bPaginate": false,
- "bLengthChange": false,
- "bFilter": true,
- "bSort": true,
- "bInfo": false,
- "bAutoWidth": false,
- "aoColumns": [
- { "sTitle": "Filename", "sClass": "right" },
- { "sTitle": "Size(bytes)" },
- { "sTitle": "Date Modified" },
- { "sTitle": "Title" },
- { "sTitle": "Tags" },
- { "sTitle": "Ext" },
- // { "sTitle": "Selection", "mData": null }
- ],
- "aoColumnDefs": [
- { // Filename column
- "mRender": function ( data, type, row ) { return TSCORE.buttonizeFileName(data) },
- "aTargets": [ 0 ]
- },
- { // Title column
- "mRender": function ( data, type, row ) { return TSCORE.buttonizeTitle(data,row[0]) },
- "aTargets": [ 3 ]
- },
- { // Tags column
- "mRender": function ( data, type, row ) { return TSCORE.generateTagButtons(data,row[5],row[0]) },
- "aTargets": [ 4 ]
- },
- { // Last changed date column
- "mRender": function ( data, type, row ) { return TSCORE.TagUtils.formatDateTime(data, true) },
- "aTargets": [ 2 ]
- },
- { "bVisible": false, "aTargets": [ 5 ] },
- // { "bSearchable": false, "aTargets": [ 0 ] },
- // { "sClass": "center", "aTargets": [ 0 ] }
- ]
- } );
-
- // Disable alerts in datatable
- fileTable.dataTableExt.sErrMode = 'throw';
-
- // Makes the body of the fileTable selectable
- $("tbody", $(fileTable)).selectable({
- filter: 'tr',
- start: function() {
- console.debug("Start selecting");
-
- //Hiding all dropdown menus
- $('BODY')
- .find('.dropdown-menu').hide().end()
- .find('[data-dropdown]').removeClass('dropdown-open');
-
- exports.clearSelectedFiles();
- },
- stop: function(){
- $(".ui-selected", this).each(function(){
- var rowData = fileTable.fnGetData( this );
- // Add the filename which is located in the first column to the list of selected filenames
- TSCORE.selectedFiles.push(TSCORE.currentPath + TSCORE.TagUtils.DIR_SEPARATOR + rowData[0]);
- handleElementActivation();
- });
- console.debug("Selected files: "+TSCORE.selectedFiles);
- }
- })
-
- // Filter functionality
- $("#"+exports.ID+"FilterBox").keyup(function() {
- fileTable.fnFilter(this.value);
- console.debug("Filter to value: "+this.value);
- });
-
- $('#'+exports.ID+"FilterBox").wrap('<span id="resetFilter" />').after($('<span/>').click(function() {
- $(this).prev('input').val('').focus();
- fileTable.fnFilter( "" );
- }));
-
- initButtons();
- }
-
- exports.load = function load() {
- console.debug("Loading View "+exports.ID);
-
- $('#'+exports.ID+"FileTable_wrapper").hide();
-
- // Purging file table
- fileTable.fnClearTable();
-
- fileTable.fnAddData( TSCORE.fileList );
-
- fileTable.fnSetColumnVis(0, true);
- fileTable.fnSetColumnVis(1, true);
- fileTable.fnSetColumnVis(2, true);
- fileTable.fnSetColumnVis(3, true);
- fileTable.fnSetColumnVis(4, true);
-
- fileTable.$('tr')
- .droppable({
- accept: ".tagButton",
- hoverClass: "activeRow",
- drop: function( event, ui ) {
- var tagName = ui.draggable.attr("tag");
- var targetFile = fileTable.fnGetData( this )[0];
- console.log("Tagging file: "+tagName+" to "+targetFile);
-
- $(this).toggleClass("ui-selected");
-
- var targetFilePath = TSCORE.currentPath + TSCORE.TagUtils.DIR_SEPARATOR + targetFile;
-
- exports.clearSelectedFiles();
- TSCORE.selectedFiles.push(targetFilePath);
- handleElementActivation();
-
- TSCORE.TagUtils.addTag(TSCORE.selectedFiles, [tagName]);
- }
- })
- .dblclick( function() {
- console.debug("Opening file...");
- var rowData = fileTable.fnGetData( this );
-
- TSCORE.FileOpener.openFile(TSCORE.currentPath+TSCORE.TagUtils.DIR_SEPARATOR+rowData[0]);
- } );
-
- fileTable.$('.fileButton')
- .draggable({
- cancel:false,
- appendTo: "body",
- helper: "clone",
- revert: true,
- start: function() {
- selectFile(this, $(this).attr("filepath"));
- }
- })
- .click( function() {
- selectFile(this, $(this).attr("filepath"));
- } )
- .dropdown( 'attach' , '#fileMenu' );
-
- fileTable.$('.fileTitleButton')
- .draggable({
- cancel:false,
- appendTo: "body",
- helper: "clone",
- revert: true,
- start: function() {
- selectFile(this, $(this).attr("filepath"));
- }
- })
- .click( function() {
- selectFile(this, $(this).attr("filepath"));
- } )
- .dropdown( 'attach' , '#fileMenu' );
-
- fileTable.$('.extTagButton')
- .click( function() {
- selectFile(this, $(this).attr("filepath"));
- TSCORE.openTagMenu(this, $(this).attr("tag"), $(this).attr("filepath"));
- } )
- .dropdown( 'attach' , '#extensionMenu' );
-
- fileTable.$('.tagButton')
- .draggable({
- cancel:false,
- appendTo: "body",
- helper: "clone",
- revert: true,
- start: function() {
- selectFile(this, $(this).attr("filepath"));
- }
- })
- .click( function() {
- selectFile(this, $(this).attr("filepath"));
- TSCORE.openTagMenu(this, $(this).attr("tag"), $(this).attr("filepath"));
- } )
- .dropdown( 'attach' , '#tagMenu' );
-
- if(viewMode == "files") {
- console.debug("Change to FileView");
- fileTable.fnSetColumnVis(0, true);
- fileTable.fnSetColumnVis(1, true);
- fileTable.fnSetColumnVis(2, true);
- fileTable.fnSetColumnVis(3, false);
- fileTable.fnSetColumnVis(4, false);
- } else if (viewMode == "tags") {
- console.debug("Change to TagView");
- fileTable.fnSetColumnVis(0, false);
- fileTable.fnSetColumnVis(1, false);
- fileTable.fnSetColumnVis(2, false);
- fileTable.fnSetColumnVis(3, true);
- fileTable.fnSetColumnVis(4, true);
- }
-
- $('#'+exports.ID+"FileTable_wrapper").show();
-
- $( "#"+exports.ID+"CreateFileButton" ).button( "enable" );
-
- $( "#"+exports.ID+"TagButton" ).button( "disable" );
-
- TSCORE.hideLoadingAnimation();
- }
-
- exports.setFileFilter = function setFileFilter(filter) {
- $( "#"+exports.ID+"FilterBox").val(filter);
- fileTable.fnFilter(filter);
- }
-
- exports.getNextFile = function getNextFile(filePath) {
- var nextFilePath = undefined;
- var data = fileTable._('tr', {"filter":"applied"});
- console.debug("Next file: "+nextFilePath);
- }
-
- exports.getPrevFile = function getPrevFile(filePath) {
- var data = fileTable.fnGetData();
- }
-
- exports.clearSelectedFiles = function() {
- TSCORE.selectedFiles = [];
- $('#'+exports.ID+'FileTable tbody tr').each(function(){
- $(this).removeClass('ui-selected');
- });
- }
-
- var selectFile = function(tagButton, filePath) {
- exports.clearSelectedFiles();
- $(tagButton).parent().parent().toggleClass("ui-selected");
- TSCORE.selectedFiles.push(filePath);
- handleElementActivation();
- }
-
- var initButtons = function() {
-
- // Initialize file buttons
- $( "#"+exports.ID+"CreateFileButton" ).button({
- text: true,
- icons: {
- primary: "ui-icon-document"
- }
- })
- .click(function() {
- $( "#dialog-filecreate" ).dialog( "open" );
- });
-
- $( "#"+exports.ID+"TagButton" ).button({
- text: true,
- icons: {
- primary: "ui-icon-document"
- }
- })
- .click(function() {
- $( "#dialogAddTags" ).dialog( "open" );
- });
-
- $( "#clearFilterButton" ).button({
- text: false,
- disabled: false,
- icons: {
- primary: "ui-icon-close"
- }
- })
- .click(function() {
- $( "#filterBox" ).val( "" );
- fileTable.fnFilter( "" );
- });
- }
-
- var handleElementActivation = function() {
- console.debug("Entering element activation handler...");
-
- if (TSCORE.selectedFiles.length > 1) {
- $( "#"+exports.ID+"TagButton" ).button( "enable" );
- } else if (TSCORE.selectedFiles.length == 1) {
- $( "#"+exports.ID+"TagButton" ).button( "enable" );
- } else {
- $( "#"+exports.ID+"TagButton" ).button( "disable" );
- }
- }
-
-});
\ No newline at end of file
diff --git a/data/ext/perspectiveDefault/perspectiveUI.js b/data/ext/perspectiveDefault/perspectiveUI.js
index 3358f8f0a..b48b44439 100644
--- a/data/ext/perspectiveDefault/perspectiveUI.js
+++ b/data/ext/perspectiveDefault/perspectiveUI.js
@@ -72,22 +72,28 @@ console.debug("Loading UI for perspectiveDefault");
var self = this;
- // <div class="btn-toolbar pull-right" style="margin: 0px;">
+ // var tagButtons = $("<div>").appendTo( "#tagGroups" );
+
+ this.viewToolbar.append($("<div>", {
+ class: "btn-group",
+ style: "margin: 0px",
+ id: this.extensionID+"Toolbar",
+ })
- this.viewToolbar.append($("<a>", {
+ .append($("<a>", {
class: "btn btn-small",
disabled: false,
title: "Create new file",
id: this.extensionID+"CreateFileButton",
})
.click(function() {
- $( "#dialog-filecreate" ).dialog( "open" );
+ TSCORE.openFileCreateDialog();
})
.append( "<i class='icon-plus'>" )
- .append("New")
- );
+ .append(" New")
+ )
- this.viewToolbar.append($("<button>", {
+ .append($("<button>", {
class: "btn btn-small",
disabled: false,
title: "Show subfolders content. \nOn subfolder with many files, this step can take some time!",
@@ -98,10 +104,10 @@ console.debug("Loading UI for perspectiveDefault");
TSCORE.IO.createDirectoryIndex(TSCORE.currentPath);
})
.append( $("<i>", { class: "icon-retweet", }) )
- .append("Subdirs")
- );
-
- this.viewToolbar.append($("<button>", {
+ .append(" Subdirs")
+ )
+
+ .append($("<button>", {
class: "btn btn-small",
disabled: false,
title: "Tag Selected Files",
@@ -111,10 +117,10 @@ console.debug("Loading UI for perspectiveDefault");
TSCORE.showAddTagsDialog();
})
.append( $("<i>", { class: "icon-tag", }) )
- .append("Add Tag")
- );
+ .append(" Add Tag")
+ )
- this.viewToolbar.append($("<button>", {
+ .append($("<button>", {
class: "btn btn-small",
"data-toggle": "button",
disabled: false,
@@ -128,7 +134,7 @@ console.debug("Loading UI for perspectiveDefault");
//.append("Toggle Thumbnails")
)
- this.viewToolbar.append($("<button>", {
+ .append($("<button>", {
class: "btn btn-small",
disabled: false,
title: "Increase Thumbnails Size",
@@ -141,6 +147,8 @@ console.debug("Loading UI for perspectiveDefault");
//.append("Zoom In")
)
+ ); // end toolbar
+
this.viewToolbar.append($("<div >", {
class: "btn-group",
"data-toggle": "buttons-checkbox",
@@ -179,7 +187,8 @@ console.debug("Loading UI for perspectiveDefault");
// 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",
- })));
+ })))
+
this.viewContainer.append($("<table>", {
cellpadding: "0",
diff --git a/data/index.html b/data/index.html
index 1b20dd69d..e09ef650d 100644
--- a/data/index.html
+++ b/data/index.html
@@ -4,7 +4,7 @@
<!--
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 LICENSE file. Initializing TagSpaces ...
+ can be found in the LICENSE file.
-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" type="image/x-icon" href="icons/icon16.png">
@@ -14,9 +14,7 @@
<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/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" type="text/css" href="libs/bootstrap/css/bootstrap.css">
<link rel="stylesheet/less" type="text/css" href="css/tagspaces.less">
</head>
<body style="background-color: lightgray;">
@@ -27,8 +25,9 @@
<span id="loadingAnimation">&nbsp;</span>
<div class="btn-toolbar pull-right" style="margin: 0px;">
<div id="viewSwitcher" class="btn-group" data-toggle="buttons-radio"></div>
+ <a id="testAlertButton" role="button" class="btn btn-small" title="Options Dialog" ><i class="icon-adjust"></i> Test Alerts</a>
<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>
+ <a id="openAboutBox" data-placement="bottom" 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>&nbsp;</button-->
</div>
</div>
@@ -57,7 +56,7 @@
<div class="ui-layout-east" style="padding: 0">
<div class="east-north" style="padding: 1; background-color: #EEEEEE;">
<span id="fileTitle"></span>
- <span id="filetoolbox" style="float: right;"></span>
+ <span id="filetoolbox" class="btn-group pull-right"></span>
<p id="tagsContainer">
<span id="fileTags"></span>
</p>
@@ -72,25 +71,123 @@
</div>
</div>
- <div id="dialog-filecreate" title="Create new file">
- <p class="validateTips">All form fields are required.</p>
- <form action="javascript:void(0);">
- <fieldset>
- <p>
- <label for="fileTypeRadio">Filetype</label>
- <span id="fileTypeRadio">
- <input type="radio" id="txtFileTypeButton" name="fileTypeRadio" checked="checked" /><label for="txtFileTypeButton">TXT</label>
- <input type="radio" id="mdFileTypeButton" name="fileTypeRadio" /><label title="Markdown" for="mdFileTypeButton">MD</label>
- <input type="radio" id="htmlFileTypeButton" name="fileTypeRadio" /><label for="htmlFileTypeButton">HTML</label>
- </span>
- </p><p>
- <label for="name">Name of the file</label>
- <input type="text" name="newFileName" id="newFileName" />
- </p>
- </fieldset>
- </form>
+ <div id="dialog-filecreate" class="modal hide" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true" >
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4>Create new file</h4>
+ </div>
+ <div class="modal-body">
+ <form class="form-horizontal">
+ <div class="control-group">
+ <label class="control-label" for="fileTypeChooser">Filetype</label>
+ <div class="controls">
+ <div class="btn-group" data-toggle="buttons-radio" name="fileTypeChooser">
+ <button id="txtFileTypeButton" data-toggle="tooltip" title="Create a plain text file" name="fileTypeRadio" class="btn">TXT</button>
+ <button id="mdFileTypeButton" data-toggle="tooltip" title="Create a MarkDown file" name="fileTypeRadio" class="btn">MD</button>
+ <button id="htmlFileTypeButton" data-toggle="tooltip" title="Create a HTML file" name="fileTypeRadio" class="btn">HTML</button>
+ </div>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="newFileName">Filename</label>
+ <div class="controls">
+ <input type="text" id="newFileName" id="newFileName" placeholder="Filename">
+ </div>
+ </div>
+ </form>
+ </div>
+ <div class="modal-footer">
+ <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
+ <button id="fileCreateConfirmButton" class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Ok</button>
+ </div>
</div>
+ <div id="dialogAbout" class="modal hide" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4>About TagSpaces</h4>
+ </div>
+ <div class="modal-body">
+ <iframe id="aboutIframe" style="width: 100%; height: 350px; border: 0px;" src="about.html"></iframe>
+ </div>
+ <div class="modal-footer">
+ <button class="btn" id="aboutDialogSettings">Advanced Settings</button>
+ <button class="btn" id="aboutDialogBack">Back</button>
+ <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>
+ </div>
+ </div>
+
+ <div id="dialogCreateFolderConnection" class="modal hide" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true" >
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4>Connect Folder</h4>
+ </div>
+ <div class="modal-body">
+ <form class="form-horizontal">
+ <div class="control-group">
+ <label class="control-label" for="connectionName">Connection Name</label>
+ <div class="controls">
+ <input type="text" name="connectionName" id="connectionName" />
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="folderLocation">Folder Location</label>
+ <div class="controls">
+ <input type="text" name="folderLocation" id="folderLocation" placeholder="c:\users\ugg\documents" />
+ <button id="selectLocalDirectory" class="btn" title="Select local folder"><i class="icon-folder-open"></i></button>
+ </div>
+ </div>
+ </form>
+ </div>
+ <div class="modal-footer">
+ <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
+ <button id="createFolderConnectionButton" class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Ok</button>
+ </div>
+ </div>
+
+ <div id="dialogOptions" class="modal hide" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4>About TagSpaces</h4>
+ </div>
+ <div class="modal-body">
+ <form class="form-horizontal">
+ <div class="control-group">
+ <label class="control-label" for="inputEmail">Email</label>
+ <div class="controls">
+ <input type="text" id="inputEmail" placeholder="Email">
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="inputPassword">Password</label>
+ <div class="controls">
+ <input type="password" id="inputPassword" placeholder="Password">
+ </div>
+ </div>
+ <div class="control-group">
+ <div class="controls">
+ <label class="checkbox">
+ <input type="checkbox">
+ Remember me </label>
+ <button type="submit" class="btn">
+ Sign in
+ </button>
+ </div>
+ </div>
+ </form>
+ </div>
+ <div class="modal-footer">
+ <button class="btn" id="aboutDialogSettings">Advanced Settings</button>
+ <button class="btn" id="aboutDialogBack">Back</button>
+ <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>
+ </div>
+ </div>
+
+ <div id="dialogSetting" title="Settings">
+ <div id="settingsEditor" style="width: 100%; height: 100%;"></div>
+ <div id="settingsPlainJSON" style="width: 100%; height: 100%;"></div>
+ </div>
+
<div id="dialog-dircreate" title="Create new directory">
<p class="validateTips">All form fields are required.</p>
<form action="javascript:void(0);">
@@ -166,43 +263,6 @@
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Do you really want to delete this taggroup?</p>
</div>
- <div id="dialog-confirmfavoritedelete" title="Delete this favorite?">
- <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Do you really want to delete this favorite?</p>
- </div>
-
- <div id="dialogFavoriteCreate" title="Connect new location">
- <p class="validateTips">All form fields are required.</p>
- <form action="javascript:void(0);">
- <fieldset>
- <p>
- <label for="name">Name</label>
- <input type="text" name="name" id="favoriteName" />
- </p>
- <p>
- <label for="location">Location</label>
- <input type="text" name="location" id="favoriteLocation" />
- <button id="selectLocalDirectory" title="Select local folder">&nbsp;</button>
- </p>
- </fieldset>
- </form>
- </div>
-
- <div id="dialogFavoriteEdit" title="Edit Favorite">
- <p class="validateTips">All form fields are required.</p>
- <form action="javascript:void(0);">
- <fieldset>
- <p>
- <label for="name">Name</label>
- <input type="text" name="name" id="newFavoriteName" />
- </p>
- <p>
- <label for="location">Location</label>
- <input type="text" name="location" id="newFavoriteLocation" />
- </p>
- </fieldset>
- </form>
- </div>
-
<div id="dialog-tagedit" title="Edit Tag">
<p class="validateTips">All form fields are required.</p>
<form action="javascript:void(0);">
@@ -248,62 +308,6 @@
</form>
</div>
- <div id="dialogAbout" class="modal hide" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4>About TagSpaces</h4>
- </div>
- <div class="modal-body">
- <iframe id="aboutIframe" style="width: 100%; height: 350px; border: 0px;" src="about.html"></iframe>
- </div>
- <div class="modal-footer">
- <button class="btn" id="aboutDialogSettings">Advanced Settings</button>
- <button class="btn" id="aboutDialogBack">Back</button>
- <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>
- </div>
- </div>
-
- <div id="dialogOptions" class="modal hide" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4>About TagSpaces</h4>
- </div>
- <div class="modal-body">
- <form class="form-horizontal">
- <div class="control-group">
- <label class="control-label" for="inputEmail">Email</label>
- <div class="controls">
- <input type="text" id="inputEmail" placeholder="Email">
- </div>
- </div>
- <div class="control-group">
- <label class="control-label" for="inputPassword">Password</label>
- <div class="controls">
- <input type="password" id="inputPassword" placeholder="Password">
- </div>
- </div>
- <div class="control-group">
- <div class="controls">
- <label class="checkbox">
- <input type="checkbox"> Remember me
- </label>
- <button type="submit" class="btn">Sign in</button>
- </div>
- </div>
- </form>
- </div>
- <div class="modal-footer">
- <button class="btn" id="aboutDialogSettings">Advanced Settings</button>
- <button class="btn" id="aboutDialogBack">Back</button>
- <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>
- </div>
- </div>
-
- <div id="dialogSetting" title="Settings">
- <div id="settingsEditor" style="width: 100%; height: 100%;"></div>
- <div id="settingsPlainJSON" style="width: 100%; height: 100%;"></div>
- </div>
-
<ul class="contextMenu" id="favoritesList"></ul>
<ul id="tagSuggestionsMenu" class="dropdown-menu has-tip anchor-right"></ul>
diff --git a/data/js/core.api.js b/data/js/core.api.js
index 6f4184d9c..906df60db 100644
--- a/data/js/core.api.js
+++ b/data/js/core.api.js
@@ -2,7 +2,7 @@
* 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";
+"use strict";
console.debug("Loading core.api.js ...");
@@ -38,8 +38,7 @@ define(function(require, exports, module) {
function initApp() {
console.debug("Init application");
- tsCoreUI.initButtons();
- tsCoreUI.initDialogs();
+ tsCoreUI.initUI();
tsTagsUI.initContextMenus();
tsTagsUI.initDialogs();
@@ -277,7 +276,9 @@ define(function(require, exports, module) {
// Proxying functions from tsCoreUI
exports.showAlertDialog = tsCoreUI.showAlertDialog;
- exports.hideAllDropDownMenus = tsCoreUI.hideAllDropDownMenus;
+ exports.showConfirmDialog = tsCoreUI.showConfirmDialog;
+ exports.hideAllDropDownMenus = tsCoreUI.hideAllDropDownMenus;
+ exports.openFileCreateDialog = tsCoreUI.openFileCreateDialog;
// Proxying functions from tsTagsUI
exports.generateTagButtons = tsTagsUI.generateTagButtons;
diff --git a/data/js/core.ui.js b/data/js/core.ui.js
index 63703a9a3..11ea8d1da 100644
--- a/data/js/core.ui.js
+++ b/data/js/core.ui.js
@@ -11,6 +11,8 @@ define(function(require, exports, module) {
var editor = undefined;
var formatter = undefined;
+
+ var fileContent = undefined;
// Init JSON Editor
var initJSONEditor = function() {
@@ -18,90 +20,85 @@ define(function(require, exports, module) {
formatter = new JSONFormatter(document.getElementById("settingsPlainJSON"));
}
- var showAlertDialog = function(message, title)
- {
- if (!title) {
- title = 'Alert';
- }
+ var showAlertDialog = function(message, title) {
+ if (!title) { title = 'Alert'; }
+ if (!message) { message = 'No Message to Display.'; }
- if (!message) {
- message = 'No Message to Display.';
- }
+ var alertModal =
+ $('<div class="modal hide">' +
+ '<div class="modal-header">' +
+ '<a class="close" data-dismiss="modal" >&times;</a>' +
+ '<h4>' + title +'</h4>' +
+ '</div>' +
+ '<div class="modal-body">' +
+ '<h6>' + message + '</h6>' +
+ '</div>' +
+ '<div class="modal-footer">' +
+ '<a href="#" id="okButton" class="btn btn-primary">Ok</a>' +
+ '</div>' +
+ '</div>');
- $("<div></div>").html(message).dialog({
- title: title,
- resizable: false,
- modal: true,
- buttons: {
- "Ok": function()
- {
- $( this ).dialog( "close" );
- }
- }
+ alertModal.find('#okButton').click(function(event) {
+ alertModal.modal('hide');
});
- }
- var initButtons = function() {
- $( "#openSettings" )
- .click(function() {
- TSCORE.showAlertDialog("Not implemented yet");
- });
-
- $( "#toggleLeftPanel" ).click(function() {
- TSCORE.toggleLeftPanel();
- });
- }
+ alertModal.modal('show');
+ }
- var initDialogs = function() {
- var newDirName = $( "#dirname" );
- var newFileName = $( "#newFileName" );
- var renamedFileName = $( "#renamedFileName" );
+ var showConfirmDialog = function(title, message, callback) {
+ if (!title) { title = 'Confirm'; }
+ if (!message) { message = 'No Message to Display.'; }
- // TODO evtl add smarttag and the others...
- var allFields = $( [] ).add( newDirName );
-
- var tips = $( ".validateTips" );
+ var confirmModal =
+ $('<div class="modal hide">' +
+ '<div class="modal-header">' +
+ '<a class="close" data-dismiss="modal" >&times;</a>' +
+ '<h4>' + title +'</h4>' +
+ '</div>' +
+ '<div class="modal-body">' +
+ '<h6>' + message + '</h6>' +
+ '</div>' +
+ '<div class="modal-footer">' +
+ '<a href="#" class="btn" data-dismiss="modal">Cancel</a>' +
+ '<a href="#" id="okButton" class="btn btn-primary">Ok</a>' +
+ '</div>' +
+ '</div>');
- function updateTips( t ) {
- tips
- .text( t )
- .addClass( "ui-state-highlight" );
- window.setTimeout(function() {
- tips.removeClass( "ui-state-highlight", 1500 );
- }, 500 );
- }
+ confirmModal.find('#okButton').click(function(event) {
+ callback();
+ confirmModal.modal('hide');
+ });
- function checkLength( o, n, min, max ) {
- if ( o.val().length > max || o.val().length < min ) {
- o.addClass( "ui-state-error" );
- updateTips( "Length of " + n + " must be between " +
- min + " and " + max + "." );
- return false;
- } else {
- return true;
- }
- }
+ confirmModal.modal('show');
+ };
- function checkRegexp( o, regexp, n ) {
- if ( !( regexp.test( o.val() ) ) ) {
- o.addClass( "ui-state-error" );
- updateTips( n );
- return false;
- } else {
- return true;
- }
- }
+
+ var openFileCreateDialog = function() {
+ fileContent = TSCORE.Config.getNewTextFileContent(); // Default new file in text file
+ $("#newFileName").val(".txt");
+ $('#dialog-filecreate').modal({show: true});
+ $('#txtFileTypeButton').button('toggle');
+ }
+
+ var initUI = function() {
- $( "#fileTypeRadio" ).buttonset();
-
- var fileContent = undefined;
+ $( "#openAboutBox" ).tooltip();
+
+ $( "#toggleLeftPanel" ).click(function() {
+ TSCORE.toggleLeftPanel();
+ });
+
+ $( "#testAlertButton" ).click(function() {
+ TSCORE.showAlertDialog("test1","test2");
+ TSCORE.showConfirmDialog("test1","test2", function() {alert("test")});
+ })
$( "#txtFileTypeButton" ).click(function() {
// TODO Add to config options
fileContent = TSCORE.Config.getNewTextFileContent();
//Leave the filename as it is by no extension
- if(newFileName.val().lastIndexOf(".")>=0) {
- newFileName.val(newFileName.val().substring(0,newFileName.val().lastIndexOf("."))+".txt");
+ if($( "#newFileName" ).val().lastIndexOf(".")>=0) {
+ $( "#newFileName" ).val($( "#newFileName" ).val().substring(0,$( "#newFileName" ).val().lastIndexOf("."))+".txt");
}
});
@@ -109,8 +106,8 @@ define(function(require, exports, module) {
// TODO Add to config options
fileContent = TSCORE.Config.getNewHTMLFileContent();
//Leave the filename as it is by no extension
- if(newFileName.val().lastIndexOf(".")>=0) {
- newFileName.val(newFileName.val().substring(0,newFileName.val().lastIndexOf("."))+".html");
+ if($( "#newFileName" ).val().lastIndexOf(".")>=0) {
+ $( "#newFileName" ).val($( "#newFileName" ).val().substring(0,$( "#newFileName" ).val().lastIndexOf("."))+".html");
}
});
@@ -118,46 +115,26 @@ define(function(require, exports, module) {
// TODO Add to config options
fileContent = TSCORE.Config.getNewMDFileContent();
//Leave the filename as it is by no extension
- if(newFileName.val().lastIndexOf(".")>=0) {
- newFileName.val(newFileName.val().substring(0,newFileName.val().lastIndexOf("."))+".md");
+ if($( "#newFileName" ).val().lastIndexOf(".")>=0) {
+ $( "#newFileName" ).val($( "#newFileName" ).val().substring(0,$( "#newFileName" ).val().lastIndexOf("."))+".md");
}
});
- $( "#dialog-filecreate" ).dialog({
- autoOpen: false,
- height: 250,
- width: 450,
- modal: true,
- buttons: {
- "Create": function() {
- var bValid = true;
- allFields.removeClass( "ui-state-error" );
-
- bValid = bValid && checkLength( newFileName, "filename", 4, 200 );
- // bValid = bValid && checkRegexp( renamedFileName, /^[a-z]([0-9a-z_.])+$/i, "Filename may consist of a-z, 0-9, underscores, begin with a letter." );
- if(TSCORE.fileExists(newFileName.val())) {
- updateTips("File already exists.");
- bValid = false;
- }
- if ( bValid ) {
- TSCORE.IO.saveTextFile(TSCORE.currentPath+TSCORE.TagUtils.DIR_SEPARATOR+$( "#newFileName" ).val(),fileContent);
- $( this ).dialog( "close" );
- TSCORE.IO.listDirectory(TSCORE.currentPath);
- }
- },
- Cancel: function() {
- $( this ).dialog( "close" );
- }
- },
- close: function() {
- allFields.val( "" ).removeClass( "ui-state-error" );
- },
- open: function() {
- fileContent = TSCORE.Config.getNewTextFileContent(); // Default new file in text file
- $( "#newFileName" ).val(".txt");
- }
- });
-
+ $( '#fileCreateConfirmButton' ).click(function() {
+ var bValid = true;
+// bValid = bValid && checkLength( newFileName, "filename", 4, 200 );
+
+ if(TSCORE.fileExists($( "#newFileName" ).val())) {
+ updateTips("File already exists.");
+ bValid = false;
+ }
+ if ( bValid ) {
+ TSCORE.IO.saveTextFile(TSCORE.currentPath+TSCORE.TagUtils.DIR_SEPARATOR+$( "#newFileName" ).val(),fileContent);
+ $('#dialog-filecreate').modal('hide')
+ TSCORE.IO.listDirectory(TSCORE.currentPath);
+ }
+ });
+
$( "#dialog-filerename" ).dialog({
autoOpen: false,
height: 220,
@@ -165,16 +142,14 @@ define(function(require, exports, module) {
modal: true,
buttons: {
"Rename": function() {
- var bValid = true;
- allFields.removeClass( "ui-state-error" );
-
- bValid = bValid && checkLength( renamedFileName, "filename", 3, 200 );
+ var bValid = true;
+ // bValid = bValid && checkLength( $( "#renamedFileName" ).val(), "filename", 3, 200 );
// bValid = bValid && checkRegexp( renamedFileName, /^[a-z]([0-9a-z_.])+$/i, "Filename may consist of a-z, 0-9, underscores, begin with a letter." );
if ( bValid ) {
var containingDir = TSCORE.TagUtils.extractContainingDirectoryPath(TSCORE.selectedFiles[0]);
TSCORE.IO.renameFile(
TSCORE.selectedFiles[0],
- containingDir+TSCORE.TagUtils.DIR_SEPARATOR+renamedFileName.val()
+ containingDir+TSCORE.TagUtils.DIR_SEPARATOR+$( "#renamedFileName" ).val()
);
$( this ).dialog( "close" );
}
@@ -184,7 +159,7 @@ define(function(require, exports, module) {
}
},
close: function() {
- allFields.val( "" ).removeClass( "ui-state-error" );
+
},
open: function() {
$( "#renamedFileName" ).val(TSCORE.TagUtils.extractFileName(TSCORE.selectedFiles[0]));
@@ -241,8 +216,7 @@ define(function(require, exports, module) {
$( this ).dialog( "close" );
}
}
- });
-
+ });
$( "#aboutDialogBack" ).click(function() {
$("#aboutIframe").attr("src","about.html");
@@ -301,7 +275,6 @@ define(function(require, exports, module) {
});
}
-
var hideAllDropDownMenus = function() {
$('BODY')
.find('.dropdown-menu').hide().end()
@@ -309,9 +282,10 @@ define(function(require, exports, module) {
}
// Public API definition
- exports.initButtons = initButtons;
- exports.initDialogs = initDialogs;
+ exports.initUI = initUI;
exports.showAlertDialog = showAlertDialog;
+ exports.showConfirmDialog = showConfirmDialog;
+ exports.openFileCreateDialog = openFileCreateDialog;
exports.hideAllDropDownMenus = hideAllDropDownMenus;
});
\ No newline at end of file
diff --git a/data/js/directories.ui.js b/data/js/directories.ui.js
index 882ab02f1..d937c07d8 100644
--- a/data/js/directories.ui.js
+++ b/data/js/directories.ui.js
@@ -19,9 +19,7 @@ define(function(require, exports, module) {
document.title = title + " | " + TSCORE.Config.DefaultSettings.appName;
- $( "#reloadTagSpace" ).button({
- label: title
- });
+ $( "#reloadTagSpace" ).text(title);
$( "#reloadTagSpace" ).attr("title",path);
// Clears the directory history
@@ -271,17 +269,10 @@ define(function(require, exports, module) {
$( "#selectTagSpace" ).tooltip();
- $( "#selectLocalDirectory" )
- .button({
- text: false,
- icons: {
- primary: "ui-icon-folder-open"
- }
- })
- .click(function() {
- TSCORE.IO.selectDirectory();
- return false;
- })
+ $( "#selectLocalDirectory" ).click(function() {
+ TSCORE.IO.selectDirectory();
+ return false;
+ })
}
function initContextMenus() {
@@ -306,41 +297,6 @@ define(function(require, exports, module) {
function initDialogs() {
var newDirName = $( "#dirname" );
-
- // TODO evtl add smarttag and the others...
- var allFields = $( [] ).add( newDirName );
-
- var tips = $( ".validateTips" );
-
- function updateTips( t ) {
- tips
- .text( t )
- .addClass( "ui-state-highlight" );
- setTimeout(function() {
- tips.removeClass( "ui-state-highlight", 1500 );
- }, 500 );
- }
-
- function checkLength( o, n, min, max ) {
- if ( o.val().length > max || o.val().length < min ) {
- o.addClass( "ui-state-error" );
- updateTips( "Length of " + n + " must be between " +
- min + " and " + max + "." );
- return false;
- } else {
- return true;
- }
- }
-
- function checkRegexp( o, regexp, n ) {
- if ( !( regexp.test( o.val() ) ) ) {
- o.addClass( "ui-state-error" );
- updateTips( n );
- return false;
- } else {
- return true;
- }
- }
$( "#dialog-dircreate" ).dialog({
autoOpen: false,
@@ -350,11 +306,10 @@ define(function(require, exports, module) {
buttons: {
"Create": function() {
var bValid = true;
- allFields.removeClass( "ui-state-error" );
-
- bValid = bValid && checkLength( newDirName, "directory name", 3, 100 );
+
+ //bValid = bValid && checkLength( newDirName, "directory name", 3, 100 );
- bValid = bValid && checkRegexp( newDirName, /^[a-z]([0-9a-z_])+$/i, "Directory name may consist of a-z, 0-9, underscores, begin with a letter." );
+ //bValid = bValid && checkRegexp( newDirName, /^[a-z]([0-9a-z_])+$/i, "Directory name may consist of a-z, 0-9, underscores, begin with a letter." );
// From jquery.validate.js (by joern), contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
// bValid = bValid && checkRegexp( email, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i, "eg. [email protected]" );
// bValid = bValid && checkRegexp( password, /^([0-9a-zA-Z])+$/, "Password field only allow : a-z 0-9" );
@@ -373,43 +328,36 @@ define(function(require, exports, module) {
}
});
- $( "#dialog-confirmfavoritedelete" ).dialog({
- autoOpen: false,
- resizable: false,
- height:140,
- modal: true,
- buttons: {
- "Delete": function() {
- TSCORE.Config.deleteFavorite(nameCurrentFavorite);
- initFavorites();
- openFavorite(TSCORE.Config.Settings["tagspacesList"][0].path, TSCORE.Config.Settings["tagspacesList"][0].name);
- $( this ).dialog( "close" );
- },
- Cancel: function() {
- $( this ).dialog( "close" );
- }
- }
- });
-
- $( "#dialogFavoriteCreate" ).dialog({
- autoOpen: false,
- resizable: false,
- height:240,
- modal: true,
- buttons: {
- "Create": function() {
- TSCORE.Config.createFavorite($("#favoriteName").val(), $("#favoriteLocation").val());
- initFavorites();
- openFavorite(TSCORE.Config.Settings["tagspacesList"][0].path, TSCORE.Config.Settings["tagspacesList"][0].name);
- $( this ).dialog( "close" );
- },
- Cancel: function() {
- $( this ).dialog( "close" );
- }
- }
+ $( "#createFolderConnectionButton" ).click( function() {
+ TSCORE.Config.createFavorite($("#connectionName").val(), $("#folderLocation").val());
+ initFavorites();
+ openFavorite(TSCORE.Config.Settings["tagspacesList"][0].path, TSCORE.Config.Settings["tagspacesList"][0].name);
});
}
+ function openCreateFolderConnectionDialog() {
+ $("#connectionName").val("");
+ $("#folderLocation").val("");
+ $('#dialogCreateFolderConnection').modal({show: true});
+ }
+
+ function deleteFolderConnection() {
+ console.debug("Deleting folder connection..");
+ TSCORE.Config.deleteFavorite(nameCurrentFavorite);
+ initFavorites();
+ if(TSCORE.Config.Settings["tagspacesList"][0] != undefined) {
+ openFavorite(TSCORE.Config.Settings["tagspacesList"][0].path, TSCORE.Config.Settings["tagspacesList"][0].name);
+ }
+ }
+
+ function openDeleteFolderConnectionDialog() {
+ TSCORE.showConfirmDialog(
+ "Delete connection to folder",
+ "Do you want to delete this connection to a folder?",
+ deleteFolderConnection
+ )
+ }
+
function initFavorites() {
console.debug("Creating location menu...");
@@ -433,16 +381,13 @@ define(function(require, exports, module) {
var commandName = ui.item.attr( "name" );
switch (commandName) {
case "createFavorite":
- $("#favoriteName").val("");
- $("#favoriteLocation").val("");
- $("#dialogFavoriteCreate").dialog("open");
+ openCreateFolderConnectionDialog();
break;
case "editFavorite":
console.debug("Editing fav... under dev...");
- $("#dialogFavoriteEdit").dialog("open");
break;
case "deleteFavorite":
- $( "#dialog-confirmfavoritedelete" ).dialog("open");
+ openDeleteFolderConnectionDialog();
break;
default:
nameCurrentFavorite = ui.item.attr( "name" );
diff --git a/data/js/fileopener.js b/data/js/fileopener.js
index 48ebd0dc9..727d050d9 100644
--- a/data/js/fileopener.js
+++ b/data/js/fileopener.js
@@ -174,22 +174,17 @@ define(function(require, exports, module) {
$( "#selectedFilePath" ).click(function() {
this.select();
});
-
- addEditButton("#filetoolbox", filePath);
addPrevButton("#filetoolbox");
-
addNextButton("#filetoolbox");
-
- addFullScreenButton("#filetoolbox");
-
- addOpenInWindowButton("#filetoolbox", filePath);
-
addTagSuggestionButton("#filetoolbox");
-
- addShowFullDetailsButton("#filetoolbox");
-
addCloseButton("#filetoolbox");
+
+ // Add to dropdown
+ //addFullScreenButton("#filetoolbox");
+ //addOpenInWindowButton("#filetoolbox", filePath);
+ //addEditButton("#filetoolbox", filePath);
+ //addShowFullDetailsButton("#filetoolbox");
}
function initTagSuggestionMenu(filePath) {
@@ -233,44 +228,44 @@ define(function(require, exports, module) {
}
function addTagSuggestionButton(container) {
- $( ""+container ).append('<button id="openTagSuggestionMenu" title="Tag Suggestions">Tag</button>');
- $( "#openTagSuggestionMenu" ).button({
- text: false,
- icons: {
- primary: "ui-icon-tag"
- },
- disabled: false
- })
+ $( ""+container ).append('<button id="openTagSuggestionMenu" class="btn btn-small" title="Tag Suggestions"><i class="icon-tags"></i></button>');
}
function addNextButton(container) {
- $( ""+container ).append('<button id="nextFileButton" title="Go to the next file">Tag</button>');
- $( "#nextFileButton" ).button({
- text: false,
- icons: {
- primary: "ui-icon-circle-triangle-e"
- },
- disabled: false
- })
- .click(function() {
- openFile(TSCORE.ViewManager.getNextFile(_openedFilePath));
+ $( ""+container ).append('<button id="nextFileButton" class="btn btn-small" title="Go to the next file"><i class="icon-circle-arrow-right"></i></button>');
+ $( "#nextFileButton" ).click(function() {
+ TSCORE.FileOpener.openFile(TSCORE.ViewManager.getNextFile(_openedFilePath));
});
}
function addPrevButton(container) {
- $( ""+container ).append('<button id="prevFileButton" title="Go to the next file">Tag</button>');
- $( "#prevFileButton" ).button({
- text: false,
- icons: {
- primary: "ui-icon-circle-triangle-w"
- },
- disabled: false
- })
- .click(function() {
- openFile(TSCORE.ViewManager.getPrevFile(_openedFilePath));
+ $( ""+container ).append('<button id="prevFileButton" class="btn btn-small" title="Go to the previous file"><i class="icon-circle-arrow-left"></i></button>');
+ $( "#prevFileButton" ).click(function() {
+ TSCORE.FileOpener.openFile(TSCORE.ViewManager.getPrevFile(_openedFilePath));
});
}
+ function addCloseButton(container) {
+ $( ""+container ).append('<button id="closeOpenedFile" class="btn btn-small" title="Close file"><i class="icon-remove-sign"></i></button>');
+ $( "#closeOpenedFile" ).click(function() {
+ if(_isEditMode) {
+ if(confirm("If you confirm, all made changes will be lost.")){
+ // Cleaning the viewer/editor
+ document.getElementById("viewer").innerHTML = "";
+ TSCORE.FileOpener.setFileOpened(false);
+ TSCORE.closeFileViewer();
+ _isEditMode = false;
+ }
+ } else {
+ // Cleaning the viewer/editor
+ document.getElementById("viewer").innerHTML = "";
+ TSCORE.FileOpener.setFileOpened(false);
+ TSCORE.closeFileViewer();
+ _isEditMode = false;
+ }
+ });
+ }
+
function addEditButton(container, filePath) {
var buttonDisabled = false;
// If no editor found, disabling the button
@@ -341,34 +336,6 @@ define(function(require, exports, module) {
});
}
- function addCloseButton(container) {
- $( ""+container ).append('<button id="closeOpenedFile">Close Viewer</button>');
- $( "#closeOpenedFile" ).button({
- text: false,
- icons: {
- primary: "ui-icon-circle-close"
- },
- disabled: false
- })
- .click(function() {
- if(_isEditMode) {
- if(confirm("If you confirm, all made changes will be lost.")){
- // Cleaning the viewer/editor
- document.getElementById("viewer").innerHTML = "";
- TSCORE.FileOpener.setFileOpened(false);
- TSCORE.closeFileViewer();
- _isEditMode = false;
- }
- } else {
- // Cleaning the viewer/editor
- document.getElementById("viewer").innerHTML = "";
- TSCORE.FileOpener.setFileOpened(false);
- TSCORE.closeFileViewer();
- _isEditMode = false;
- }
- });
- }
-
function addFullScreenButton(container) {
$( ""+container ).append('<button id="startFullscreen">Fullscreen</button>');
$( "#startFullscreen" ).button({
diff --git a/data/js/ioapi.chrome.js b/data/js/ioapi.chrome.js
index 5d84beed4..473d08e35 100644
--- a/data/js/ioapi.chrome.js
+++ b/data/js/ioapi.chrome.js
@@ -185,11 +185,12 @@ New:
exports.selectDirectory = function() {
console.debug("Select directory functionality not implemented on chrome yet!");
- nativeIO.launchFolderSelect(function(dirPath){
+ // TSCORE.showAlertDialog("Not implemented yet");
+/* nativeIO.launchFolderSelect(function(dirPath){
if (dirPath && dirPath.length){
$("#favoriteLocation").val(dirPath);
}
- });
+ }); */
}
exports.selectFile = function() {
diff --git a/data/js/ioapi.mozilla.receiver.js b/data/js/ioapi.mozilla.receiver.js
index ff406e1b6..2732e4207 100644
--- a/data/js/ioapi.mozilla.receiver.js
+++ b/data/js/ioapi.mozilla.receiver.js
@@ -122,7 +122,7 @@ console.debug("Loading messaging.mozilla.js..");
case "selectDirectory":
if(message.success){
// TODO make the use of this function more general
- $("#favoriteLocation").val(message.content);
+ $("#folderLocation").val(message.content);
} else {
TSCORE.updateLogger("Selecting directory failed.");
}
diff --git a/data/js/tags.ui.js b/data/js/tags.ui.js
index bc3e81aef..77d709637 100644
--- a/data/js/tags.ui.js
+++ b/data/js/tags.ui.js
@@ -130,49 +130,6 @@ define(function(require, exports, module) {
}
function initDialogs() {
- var newDirName = $( "#dirname" );
-
- var newFileName = $( "#newFileName" );
-
- var renamedFileName = $( "#renamedFileName" );
-
- var smartTag = $( "#smartTagName" );
-
- // TODO evtl add smarttag and the others...
- var allFields = $( [] ).add( newDirName );
-
- var tips = $( ".validateTips" );
-
- function updateTips( t ) {
- tips
- .text( t )
- .addClass( "ui-state-highlight" );
- setTimeout(function() {
- tips.removeClass( "ui-state-highlight", 1500 );
- }, 500 );
- }
-
- function checkLength( o, n, min, max ) {
- if ( o.val().length > max || o.val().length < min ) {
- o.addClass( "ui-state-error" );
- updateTips( "Length of " + n + " must be between " +
- min + " and " + max + "." );
- return false;
- } else {
- return true;
- }
- }
-
- function checkRegexp( o, regexp, n ) {
- if ( !( regexp.test( o.val() ) ) ) {
- o.addClass( "ui-state-error" );
- updateTips( n );
- return false;
- } else {
- return true;
- }
- }
-
$( "#dialog-smarttag" ).dialog({
autoOpen: false,
height: 220,
@@ -183,10 +140,10 @@ define(function(require, exports, module) {
var bValid = true;
allFields.removeClass( "ui-state-error" );
- bValid = bValid && checkLength( smartTag, "tagname", 2, 40 );
+ //bValid = bValid && checkLength( smartTag, "tagname", 2, 40 );
if ( bValid ) {
for (var i=0; i < TSCORE.selectedFiles.length; i++) {
- TSCORE.TagUtils.writeTagsToFile(TSCORE.selectedFiles[i], [smartTag.val()]);
+ TSCORE.TagUtils.writeTagsToFile(TSCORE.selectedFiles[i], [$( "#smartTagName" ).val()]);
};
$( this ).dialog( "close" );
IOAPI.listDirectory(TSCORE.currentPath);
@@ -389,45 +346,36 @@ define(function(require, exports, module) {
});
}
-
function generateTagGroups() {
console.debug("Generating TagGroups...");
$("#tagGroups").empty();
- $("#tagGroups").addClass("ui-accordion ui-accordion-icons ui-widget ui-helper-reset")
+ $("#tagGroups").addClass("accordion");
for(var i=0; i < TSCORE.Config.Settings["tagGroups"].length; i++) {
// Code based on http://jsbin.com/eqape/1/edit
- $("#tagGroups").append($("<h3>", {
- class: "ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom"
+ $("#tagGroups").append($("<div>", {
+ "class": "accordion-group"
})
- /* .droppable({
- accept: ".tagButton",
- hoverClass: "activeRow",
- drop: function( event, ui ) {
- var tagName = ui.draggable.attr("tag");
- TSCORE.Config.createTag(TSCORE.selectedTagData, tagName );
- TSCORE.Config.deleteTag(TSCORE.selectedTagData);
- generateTagGroups();
- }
- }) */
- .hover(function() { $(this).toggleClass("ui-state-hover"); })
- .append($("<span>", {
- class: "tagGroupTitle",
- text: TSCORE.Config.Settings["tagGroups"][i].title,
+ .append($("<div>", {
+ "class": "accordion-heading",
+ })
+ .append($("<a>", {
+ "class": "tagGroupTitle",
+ "data-toggle": "collapse",
+ "data-target": "#tagButtons"+i,
+ "href": "#",
+ "text": TSCORE.Config.Settings["tagGroups"][i].title,
})
- .click(function() {
- $(this)
- .parent().toggleClass("ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom").end()
- .parent().next().toggleClass("ui-accordion-content-active").toggle();
- return false;
- })
)
- .append($("<span>", {
- class: "ui-icon ui-icon-gear",
- style: "float: right!important; position:relative!important; vertical-align: middle; display:inline-block;",
- tag: TSCORE.Config.Settings["tagGroups"][i].title,
- key: TSCORE.Config.Settings["tagGroups"][i].key,
- title: "Taggroup options",
- })
+
+ .append($("<a>", {
+ "class": "dropdown-toggle pull-right",
+ "role": "button",
+ "tag": TSCORE.Config.Settings["tagGroups"][i].title,
+ "key": TSCORE.Config.Settings["tagGroups"][i].key,
+ "title": "Taggroup options",
+ "href": "#"
+ })
+ .append("<b class='caret'></b>")
.dropdown( 'attach' , '#tagGroupMenu' )
.click( function(event) {
//console.debug("Clicked in taggroup setting");
@@ -435,13 +383,25 @@ define(function(require, exports, module) {
TSCORE.selectedTagData = TSCORE.Config.getTagGroupData($(this).attr("key"));
TSCORE.selectedTagData.parentKey = undefined;
})
- )
- );
-
- var tagButtons = $("<div>").appendTo( "#tagGroups" );
- tagButtons.attr("style","margin: 0px; padding: 5px;");
- tagButtons.addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom")
- tagButtons.hide();
+ ) // end gear
+
+ ) // end heading
+
+ .append($("<div>", {
+ "class": "accordion-body collapse in",
+ "id": "tagButtons"+i,
+ })
+ .append($("<div>", {
+ "class": "accordion-inner",
+ "id": "tagButtonsContent"+i,
+ "style": "padding: 3px",
+ })
+ ) // end accordion-inner
+ ) // end accordion button
+
+ ); // end group
+
+ var tagButtons = $("<div>").appendTo( "#tagButtonsContent"+i );
for(var j=0; j < TSCORE.Config.Settings["tagGroups"][i]["children"].length; j++) {
tagButtons.append($("<a>", {
"class": "btn btn-small btn-success tagButton",
@@ -451,32 +411,23 @@ define(function(require, exports, module) {
"text": TSCORE.Config.Settings["tagGroups"][i]["children"][j].title,
})
.draggable({
- cancel: false,
- appendTo: "body",
- helper: "clone",
- revert: true,
+ "cancel": false,
+ "appendTo": "body",
+ "helper": "clone",
+ "revert": true,
})
.click( function() {
TSCORE.selectedTag = $(this).attr("tag");
TSCORE.selectedTagData = TSCORE.Config.getTagData($(this).attr("tag"), $(this).attr("parentKey"));
TSCORE.selectedTagData.parentKey = $(this).attr("parentKey");
})
- .append($("<span>", {
- class: "caret",
- }))
+ .append( "<span class='caret'>" )
.dropdown( 'attach' , '#tagTreeMenu' )
);
- }
+ }
}
-
- //Opens all taggroups by default
- $("#tagGroups").find("h3").each(function(index) {
- //console.log("Entered h3 "+$(this).next().text());
- $(this).toggleClass("ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom").end()
- $(this).next().toggleClass("ui-accordion-content-active").toggle();
- });
}
-
+
function openTagMenu(tagButton, tag, filePath) {
TSCORE.selectedFiles.push(filePath);
TSCORE.selectedTag = tag;
diff --git a/data/libs/bootstrap/LICENSE.txt b/data/libs/bootstrap/LICENSE.txt
new file mode 100644
index 000000000..2bb9ad240
--- /dev/null
+++ b/data/libs/bootstrap/LICENSE.txt
@@ -0,0 +1,176 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/data/loader.js b/data/loader.js
index 89d2974ea..8e56ece4f 100644
--- a/data/loader.js
+++ b/data/loader.js
@@ -21,7 +21,7 @@ var isChrome = !isSafari && 'WebkitTransform' in document.documentElement.style;
console.debug("Loading Loader 4 Firefox: "+isFirefox+" | Chrome: "+isChrome);
-// Setting up the IO functionality according to the plattform
+// Setting up the IO functionality according to the platform
var IO_JS = undefined;
if( isFirefox ) {
IO_JS = "js/ioapi.mozilla";
diff --git a/data/manifest.json b/data/manifest.json
index 68dd106db..ab18183cc 100644
--- a/data/manifest.json
+++ b/data/manifest.json
@@ -1,6 +1,6 @@
{
"name": "TagSpaces",
- "version": "1.3.1308",
+ "version": "1.4.1311",
"manifest_version": 2,
"description": "TagSpaces Explorer",
"icons": {
diff --git a/package.json b/package.json
index 12384e0b3..1d2cd10be 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "tagspaces",
"license": "AGPL 3.0",
"author": "Ugg Rock",
- "version": "1.3.1308",
+ "version": "1.4.1311",
"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/run.sh b/run.sh
index 7278d9765..57764806b 100644
--- a/run.sh
+++ b/run.sh
@@ -1,2 +1,2 @@
#!/bin/bash
-cfx run -p ../profileFW
+cfx run -p ../mozprofile
diff --git a/update.rdf b/update.rdf
index 0a5cc7dab..af62b438c 100644
--- a/update.rdf
+++ b/update.rdf
@@ -7,14 +7,14 @@
<r:Seq>
<r:li>
<r:Description>
- <version>1.3.1308</version>
+ <version>1.4.1311</version>
<targetApplication>
<r:Description>
<id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
<minVersion>16.0</minVersion>
<maxVersion>*</maxVersion>
- <updateLink>http://tagspaces.com/releases/1.3/tagspaces.1.3.1308.xpi</updateLink>
- <updateInfoURL>http://tagspaces.com/releases/1.3/updateInfo.xml</updateInfoURL>
+ <updateLink>http://tagspaces.com/releases/1.4/tagspaces.1.4.1311.xpi</updateLink>
+ <updateInfoURL>http://tagspaces.com/releases/1.4/updateInfo.xml</updateInfoURL>
</r:Description>
</targetApplication>
</r:Description>