Skip to content

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

Added start here hint/tooltip Multiple selection bug fixed Context menu for files and fileTitles unified Drag&Drop for moving files implemented Added context menu for file extension

uggrockfebc4769eaa1
diff --git a/data/css/tagspaces.less b/data/css/tagspaces.less
index 98ff64116..46e3f1110 100644
--- a/data/css/tagspaces.less
+++ b/data/css/tagspaces.less
@@ -6,6 +6,7 @@
@fileExtColor: #008080;
@baseTagColor: #008000;
@directoryColor: #F6A828;
+@tagFontSize: 1em;
.roundedTagCorners (@radius: 2px) {
border-radius: @radius;
@@ -150,7 +151,7 @@ li hr {
background-color: @baseTagColor;
padding-right: 12px;
font-weight: bold;
- font-size: 1em;
+ font-size: @tagFontSize;
color: white;
margin: 1px;
border-color: transparent;
@@ -166,11 +167,12 @@ li hr {
padding: 1px;
padding-right: 12px;
font-weight: normal;
- font-size: 1em;
+ font-size: @tagFontSize;
color: #222222;
text-align: left;
margin: 1px;
border: #ddd solid 1px;
+ z-index: 9999;
.arrowDownImage;
.roundedTagCorners;
}
@@ -180,7 +182,7 @@ li hr {
background: transparent url("arrow-down.png") no-repeat right;
padding-right: 12px;
font-weight: normal;
- font-size: 1em;
+ font-size: @tagFontSize;
color: #222222;
text-align: left;
margin: 1px;
@@ -193,7 +195,7 @@ li hr {
background-color: @fileExtColor;
padding-right: 12px;
font-weight: bold;
- font-size: 1em;
+ font-size: @tagFontSize;
color: white;
margin: 1px;
border-color: transparent;
@@ -296,7 +298,7 @@ span.dynatree-icon {
/* background: #F6A828 url("arrow-down.png") no-repeat right;
padding-right: 12px;*/
font-weight: bold;
- font-size: 1em;
+ font-size: @tagFontSize;
color: white;
margin: 1px;
border-color: transparent;
@@ -307,13 +309,18 @@ span.dynatree-icon {
padding: 1px;
background-color: @directoryColor;
font-weight: bold;
- font-size: 1em;
+ font-size: @tagFontSize;
color: white;
margin: 1px;
border-color: transparent;
.roundedTagCorners;
}
+/*desaturate(@directoryColor, 30%) */
+.dirButtonActive {
+ background-color: red;
+}
+
#dirTree .dynatree-active {
/* background-color: #E1A4A4;
width: 100%; */
@@ -357,7 +364,7 @@ span.dynatree-icon {
background-color: @baseTagColor;
padding-right: 12px;
font-weight: bold;
- font-size: 1em;
+ font-size: @tagFontSize;
color: white;
margin: 1px;
border-color: transparent;
@@ -377,21 +384,16 @@ div.jsoneditor-frame {
border-color: green;
}
-/* Data Table */
-table.dataTable tr.selectedRow {
- background-color: #FECA40 !important;
-}
-
-#fileTable .ui-selecting { background: #FECA40; }
-#fileTable .ui-selected { background: #FECA40; }
-
table.dataTable tr.even {
background-color: white;
}
table.dataTable tr.odd {
background-color: white;
-}
+}
+
+table.dataTable tr.ui-selecting { background: #FECA40 !important; }
+table.dataTable tr.ui-selected { background: #FECA40 !important; }
table.dataTable tr.odd td.sorting_1 { background-color: inherit; }
table.dataTable tr.odd td.sorting_2 { background-color: inherit; }
diff --git a/data/index.html b/data/index.html
index e9db8b6d3..5e7cb5037 100644
--- a/data/index.html
+++ b/data/index.html
@@ -34,7 +34,7 @@
<div id="directoryNavigator" class="west-center" style="padding: 0">
<div id="directoryNavigatorNorth" style="padding: 0" >
<button id="reloadTagSpace" style="text-align: left; width: 85%;">Select Location</button>
- <button id="selectTagSpace">&nbsp;</button>
+ <button id="selectTagSpace" title="Start using TagSpaces by clicking on the dropdown button and creating a new favorite directory or selecting an existing one.">&nbsp;</button>
</div>
<div id="dirTree" style="padding: 0; height: 100%;"></div>
</div>
@@ -260,11 +260,10 @@
<li action="deleteFile" title=""><a href="javascript:void(0);"><span class="ui-icon ui-icon-trash"></span>Delete File</a></li>
</ul>
- <ul id="fileTitleMenu" class="dropdown-menu has-tip">
- <li action="addTag" title=""><a href="javascript:void(0);"><span class="ui-icon ui-icon-tag"></span>Add Tags</a></li>
- <li action="openFile" title=""><a href="javascript:void(0);"><span class="ui-icon ui-icon-plus"></span>Open File</a></li>
- </ul>
-
+ <ul id="extensionMenu" class="dropdown-menu has-tip anchor-right">
+ <li action="addTagAsFilter" title=""><a href="javascript:void(0);"><span class="ui-icon ui-icon-search"></span>Set As Filter</a></li>
+ </ul>
+
<ul id="tagMenu" class="dropdown-menu has-tip anchor-right">
<li action="addTagAsFilter" title=""><a href="javascript:void(0);"><span class="ui-icon ui-icon-search"></span>Set As Filter</a></li>
<li action="editTag" title=""><a href="javascript:void(0);"><span class="ui-icon ui-icon-pencil"></span>Edit Tag</a></li>
diff --git a/data/js/directories.ui.js b/data/js/directories.ui.js
index 44c5ef8e4..902e3cbf8 100644
--- a/data/js/directories.ui.js
+++ b/data/js/directories.ui.js
@@ -107,6 +107,16 @@ DirectoriesUI.generateDirPath = function() {
title: DirectoriesUI.directoryHistory[i]["children"][j].key,
text: DirectoriesUI.directoryHistory[i]["children"][j].title,
})
+ .droppable({
+ hoverClass: "dirButtonActive",
+ drop: function( event, ui ) {
+ var fileName = ui.draggable.attr("title");
+ var targetDir = $(this).attr("key");
+ console.log("Moving file: "+fileName+" to "+targetDir);
+ IOAPI.renameFile(UIAPI.currentPath+UIAPI.getDirSeparator()+fileName, targetDir+UIAPI.getDirSeparator()+fileName);
+ IOAPI.listDirectory(UIAPI.currentPath);
+ }
+ })
.click( function() {
DirectoriesUI.navigateToDirectory($(this).attr("key"));
})
@@ -206,6 +216,7 @@ DirectoriesUI.initButtons = function() {
$( "#reloadTagSpace" )
.button()
.click(function() {
+ $( "#selectTagSpace" ).tooltip( "disable" );
$("#favoritesList").width($( "#reloadTagSpace" ).width()+$("#selectTagSpace").width());
$("#favoritesList").show().position({
my: "left top",
@@ -241,6 +252,8 @@ DirectoriesUI.initButtons = function() {
.next()
.hide()
.menu();
+
+ $( "#selectTagSpace" ).tooltip();
$( "#selectLocalDirectory" )
.button({
@@ -426,42 +439,4 @@ DirectoriesUI.initFavorites = function() {
}
});
$( "#favoritesList" ).hide();
-}
-
-/*
-DirectoriesUI.clearSelectedDirs = function() {
- // Deselect all
- $(".selectedDirectory", $("#dirTree")).each(function(){
- $(this).removeClass('selectedDirectory');
- });
-}
-
-DirectoriesUI.initDirectoryTree = function() {
- // Init the tree module
- $("#dirTree").dynatree({
- autoFocus: true,
- activeVisible: true,
- clickFolderMode: 1,
- onActivate: function(node) {
- DirectoriesUI.clearSelectedDirs();
- UIAPI.currentPath = node.data.key;
- $(node.li).addClass("selectedDirectory");
- $("#selectedFilePath").val("");
- TSSETTINGS.setLastOpenedDir(node.data.key);
- IOAPI.listDirectory(UIAPI.currentPath);
- },
- onExpand: function(flag, node) {
- },
- onLazyRead: function(node){
- UIAPI.currentTreeElements = node;
- IOAPI.getSubdirs(node.data.key);
- return true;
- },
- onDblClick: function(node, event) {
- DirectoriesUI.clearSelectedDirs();
- node.toggleExpand();
- $(node.li).addClass("selectedDirectory");
- },
- // children: [{title: "Test Node"}]
- });
-} */
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/data/js/main.js b/data/js/main.js
index 7c9e640e9..838d138cc 100644
--- a/data/js/main.js
+++ b/data/js/main.js
@@ -8,6 +8,8 @@ define([
'jsoneditor',
'jquerylayout',
'jquerydropdown',
+ 'jqueryuitooltips',
+ 'jqueryuidroppable',
'less'
], function($){
"use strict";
@@ -90,6 +92,9 @@ var initApp = function(){
UIAPI.initLayout();
console.debug("Layout initialized");
});
+
+ // Show start hint
+ $( "#selectTagSpace" ).tooltip( "open" );
});
}
diff --git a/data/js/view.basic.js b/data/js/view.basic.js
index da1ca7bfa..1d1f654e0 100644
--- a/data/js/view.basic.js
+++ b/data/js/view.basic.js
@@ -7,6 +7,7 @@ define([
'exports',
'module',
'datatables',
+ 'jqueryuidraggable',
// 'css!datatablescss'
],function(require, exports, module) {
"use strict";
@@ -52,7 +53,7 @@ exports.init = function init() {
modeSwitcher.append($("<input>", {
type: "radio",
name: "modeSwitcher",
- checked: true,
+ checked: "checked",
id: exports.ID+"FilesMode",
}));
@@ -95,8 +96,7 @@ exports.init = function init() {
.click(function() {
viewMode = "files"
exports.load();
- })
-
+ })
viewToolbar.append($("<span>", {
style: "float: right; margin: 0px; padding: 0px;",
@@ -134,15 +134,15 @@ exports.init = function init() {
],
"aoColumnDefs": [
{ // Filename column
- "mRender": function ( data, type, row ) { return buttonizeFileName(data) },
+ "mRender": function ( data, type, row ) { return TagsUI.buttonizeFileName(data) },
"aTargets": [ 0 ]
},
{ // Title column
- "mRender": function ( data, type, row ) { return buttonizeTitle(data,row[0]) },
+ "mRender": function ( data, type, row ) { return TagsUI.buttonizeTitle(data,row[0]) },
"aTargets": [ 3 ]
},
{ // Tags column
- "mRender": function ( data, type, row ) { return generateTagButtons(data,row[5],row[0]) },
+ "mRender": function ( data, type, row ) { return TagsUI.generateTagButtons(data,row[5],row[0]) },
"aTargets": [ 4 ]
},
{ // Last changed date column
@@ -163,22 +163,21 @@ exports.init = function init() {
filter: 'tr',
start: function() {
console.debug("Start selecting");
- UIAPI.selectedFiles = [];
- $('#'+exports.ID+"FileTable tbody tr").each(function(){
- $(this).removeClass('selectedRow');
- });
+
+ //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 index = $("#fileTable tr").index(this) - 1;
- $('#fileTable tbody tr:eq('+index+')').toggleClass('selectedRow');
- $('#fileTable tbody tr:eq('+index+')').toggleClass('ui-selected');
var rowData = fileTable.fnGetData( this );
// Add the filename which is located in the first column to the list of selected filenames
UIAPI.selectedFiles.push(rowData[0]);
});
console.debug("Selected files: "+UIAPI.selectedFiles);
- UIAPI.handleElementActivation();
}
})
@@ -193,7 +192,6 @@ exports.init = function init() {
fileTable.fnFilter( "" );
}));
- initContextMenus();
initButtons();
}
@@ -221,25 +219,36 @@ exports.load = function load() {
} );
fileTable.$('.fileButton')
+ .draggable({
+ cancel:false,
+ appendTo: "body",
+ helper: "clone",
+ revert: true,
+ start: function() {
+ selectFile(this, $(this).attr("title"));
+ }
+ })
.click( function() {
- openFileMenu(this, $(this).attr("title"));
- } )
+ selectFile(this, $(this).attr("title"));
+ } )
.dropdown( 'attach' , '#fileMenu' );
fileTable.$('.fileTitleButton')
.click( function() {
- openFileTitleMenu(this, $(this).attr("title"));
+ selectFile(this, $(this).attr("title"));
} )
- .dropdown( 'attach' , '#fileTitleMenu' );
+ .dropdown( 'attach' , '#fileMenu' );
fileTable.$('.extTagButton')
.click( function() {
+ selectFile(this, $(this).attr("fileName"));
TagsUI.openTagMenu(this, $(this).attr("tag"), $(this).attr("filename"));
} )
- .dropdown( 'attach' , '#tagMenu' );
+ .dropdown( 'attach' , '#extensionMenu' );
fileTable.$('.tagButton')
.click( function() {
+ selectFile(this, $(this).attr("fileName"));
TagsUI.openTagMenu(this, $(this).attr("tag"), $(this).attr("filename"));
} )
.dropdown( 'attach' , '#tagMenu' );
@@ -273,70 +282,18 @@ exports.setFileFilter = function setFileFilter(filter) {
}
exports.clearSelectedFiles = function() {
- // Deselect all
- $(".selectedRow", $(fileTable)).each(function(){
- $(this).toggleClass('selectedRow');
- });
-}
-
-var generateTagButtons = function(commaSeparatedTags, fileExtension, fileName) {
- console.debug("Creating tags...");
- var tagString = ""+commaSeparatedTags;
- var wrapper = $('<span>');
- if(fileExtension.length > 0) {
- wrapper.append($('<button>', {
- title: "Opens context menu for "+fileExtension,
- tag: fileExtension,
- filename: fileName,
- class: "extTagButton",
- text: fileExtension
- }));
- }
- if(tagString.length > 0) {
- var tags = tagString.split(",");
- for (var i=0; i < tags.length; i++) {
- wrapper.append($('<button>', {
- title: "Opens context menu for "+tags[i],
- tag: tags[i],
- filename: fileName,
- class: "tagButton",
- text: tags[i]
- }));
- }
- }
- return wrapper.html();
-}
-
-var buttonizeTitle = function(title, fileName) {
- return $('<span>').append($('<button>', {
- title: fileName,
- class: 'fileTitleButton',
- text: title+' '
- })).html();
+ UIAPI.selectedFiles = [];
+ $('#'+exports.ID+'FileTable tbody tr').each(function(){
+ $(this).removeClass('ui-selected');
+ });
}
-var openFileTitleMenu = function(tagButton, fileName) {
+var selectFile = function(tagButton, fileName) {
exports.clearSelectedFiles();
- $(tagButton).parent().parent().toggleClass("selectedRow");
-
- UIAPI.currentFilename = fileName;
- UIAPI.selectedFiles.push(UIAPI.currentFilename);
-}
-
-var buttonizeFileName = function(fileName) {
- return $('<span>').append($('<button>', {
- title: fileName,
- class: 'fileButton',
- text: fileName
- })).html();
-}
-
-var openFileMenu = function(tagButton, fileName) {
- exports.clearSelectedFiles();
- $(tagButton).parent().parent().toggleClass("selectedRow");
-
+
+ $(tagButton).parent().parent().toggleClass("ui-selected");
UIAPI.currentFilename = fileName;
- UIAPI.selectedFiles.push(UIAPI.currentFilename);
+ UIAPI.selectedFiles.push(UIAPI.currentFilename);
}
var initButtons = function() {
@@ -365,57 +322,6 @@ var initButtons = function() {
});
}
-var initContextMenus = function() {
- $( "#fileMenu" ).menu({
- select: function( event, ui ) {
- var commandName = ui.item.attr( "action" );
- switch (commandName) {
- case "addTag":
- console.debug("Adding tag...");
- $("#tags").val("");
- $( "#dialogAddTags" ).dialog( "open" );
- break;
- case "openFile":
- console.debug("Opening file...");
- UIAPI.openFile(UIAPI.currentPath+UIAPI.getDirSeparator()+UIAPI.selectedFiles[0]);
- break;
- case "openDirectory":
- console.debug("Opening parent directory...");
- IOAPI.openDirectory(UIAPI.currentPath);
- break;
- case "renameFile":
- console.debug("Renaming file...");
- $( "#dialog-filerename" ).dialog( "open" );
- break;
- case "deleteFile":
- console.debug("Deleting file...");
- $( "#dialog-confirmdelete" ).dialog( "open" );
- break;
- default:
- break;
- }
- }
- });
-
- $( "#fileTitleMenu" ).menu({
- select: function( event, ui ) {
- var commandName = ui.item.attr( "action" );
- switch (commandName) {
- case "openFile":
- UIAPI.openFile(UIAPI.currentPath+UIAPI.getDirSeparator()+UIAPI.selectedFiles[0]);
- break;
- case "addTag":
- console.debug("Adding tag...");
- $("#tags").val("");
- $( "#dialogAddTags" ).dialog( "open" );
- break;
- default:
- break;
- }
- }
- });
-}
-
// currently not used
var handleElementActivation = function() {
console.debug("Entering element activation handler...");
diff --git a/data/js/view.search.js b/data/js/view.search.js
index c3754c7e1..df912fff1 100644
--- a/data/js/view.search.js
+++ b/data/js/view.search.js
@@ -40,66 +40,11 @@ exports.init = function init() {
viewFooter.empty();
viewToolbar.append($("<button>", {
- text: "Reindex",
+ text: "ReIndex",
disabled: true,
title: "Reindex current favorite folder.",
id: exports.ID+"ReIndexButton",
- }));
-
-/* viewToolbar.append($("<span>", {
- id: exports.ID+"ModeSwitcher",
- }));
-
- var modeSwitcher = $("#"+exports.ID+"ModeSwitcher");
-
- modeSwitcher.append($("<input>", {
- type: "radio",
- name: "modeSwitcher",
- checked: true,
- id: exports.ID+"FilesMode",
- }));
-
- modeSwitcher.append($("<label>", {
- for: exports.ID+"FilesMode",
- text: "Files",
- }));
-
- modeSwitcher.append($("<input>", {
- type: "radio",
- name: "modeSwitcher",
- id: exports.ID+"TagsMode",
- }));
-
- modeSwitcher.append($("<label>", {
- for: exports.ID+"TagsMode",
- text: "Tags",
- }));
-
- 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($("<span>", {
style: "float: right; margin: 0px; padding: 0px;",
@@ -137,15 +82,15 @@ exports.init = function init() {
],
"aoColumnDefs": [
{ // Filename column
- "mRender": function ( data, type, row ) { return buttonizeFileName(data) },
+ "mRender": function ( data, type, row ) { return TagsUI.buttonizeFileName(data) },
"aTargets": [ 0 ]
},
{ // Title column
- "mRender": function ( data, type, row ) { return buttonizeTitle(data,row[0]) },
+ "mRender": function ( data, type, row ) { return TagsUI.buttonizeTitle(data,row[0]) },
"aTargets": [ 3 ]
},
{ // Tags column
- "mRender": function ( data, type, row ) { return generateTagButtons(data,row[5],row[0]) },
+ "mRender": function ( data, type, row ) { return TagsUI.generateTagButtons(data,row[5],row[0]) },
"aTargets": [ 4 ]
},
{ // Last changed date column
@@ -158,6 +103,8 @@ exports.init = function init() {
]
} );
+ fileTable.fnSetColumnVis(0, false);
+
// Disable alerts in datatable
fileTable.dataTableExt.sErrMode = 'throw';
@@ -166,22 +113,21 @@ exports.init = function init() {
filter: 'tr',
start: function() {
console.debug("Start selecting");
- UIAPI.selectedFiles = [];
- $('#'+exports.ID+"FileTable tbody tr").each(function(){
- $(this).removeClass('selectedRow');
- });
+
+ //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 index = $("#fileTable tr").index(this) - 1;
- $('#fileTable tbody tr:eq('+index+')').toggleClass('selectedRow');
- $('#fileTable tbody tr:eq('+index+')').toggleClass('ui-selected');
var rowData = fileTable.fnGetData( this );
// Add the filename which is located in the first column to the list of selected filenames
UIAPI.selectedFiles.push(rowData[0]);
});
console.debug("Selected files: "+UIAPI.selectedFiles);
- UIAPI.handleElementActivation();
}
})
@@ -196,7 +142,6 @@ exports.init = function init() {
fileTable.fnFilter( "" );
}));
- initContextMenus();
initButtons();
}
@@ -251,10 +196,11 @@ var enhanceIndexData = function(index) {
exports.updateIndexData = function updateIndexData(index) {
console.debug("Updating index data.");
+ // Clearing the old data
+ fileTable.fnClearTable();
+
fileTable.fnAddData( enhanceIndexData(index) );
-// fileTable.fnSetColumnVis(0, true);
-
fileTable.$('tr').dblclick( function() {
console.debug("Opening file...");
var rowData = fileTable.fnGetData( this );
@@ -262,26 +208,22 @@ exports.updateIndexData = function updateIndexData(index) {
UIAPI.openFile(rowData[6]);
} );
- fileTable.$('.fileButton')
- .click( function() {
- openFileMenu(this, $(this).attr("title"));
- } )
- .dropdown( 'attach' , '#fileMenu' );
-
fileTable.$('.fileTitleButton')
.click( function() {
- openFileTitleMenu(this, $(this).attr("title"));
+ selectFile(this, $(this).attr("title"));
} )
- .dropdown( 'attach' , '#fileTitleMenu' );
+ .dropdown( 'attach' , '#fileMenu' );
fileTable.$('.extTagButton')
.click( function() {
+ selectFile(this, $(this).attr("fileName"));
TagsUI.openTagMenu(this, $(this).attr("tag"), $(this).attr("filename"));
} )
- .dropdown( 'attach' , '#tagMenu' );
+ .dropdown( 'attach' , '#extensionMenu' );
fileTable.$('.tagButton')
.click( function() {
+ selectFile(this, $(this).attr("fileName"));
TagsUI.openTagMenu(this, $(this).attr("tag"), $(this).attr("filename"));
} )
.dropdown( 'attach' , '#tagMenu' );
@@ -299,70 +241,18 @@ exports.setFileFilter = function setFileFilter(filter) {
}
exports.clearSelectedFiles = function() {
- // Deselect all
- $(".selectedRow", $(fileTable)).each(function(){
- $(this).toggleClass('selectedRow');
- });
+ UIAPI.selectedFiles = [];
+ $('#'+exports.ID+'FileTable tbody tr').each(function(){
+ $(this).removeClass('ui-selected');
+ });
}
-var generateTagButtons = function(commaSeparatedTags, fileExtension, fileName) {
- console.debug("Creating tags...");
- var tagString = ""+commaSeparatedTags;
- var wrapper = $('<span>');
- if(fileExtension.length > 0) {
- wrapper.append($('<button>', {
- title: "Opens context menu for "+fileExtension,
- tag: fileExtension,
- filename: fileName,
- class: "extTagButton",
- text: fileExtension
- }));
- }
- if(tagString.length > 0) {
- var tags = tagString.split(",");
- for (var i=0; i < tags.length; i++) {
- wrapper.append($('<button>', {
- title: "Opens context menu for "+tags[i],
- tag: tags[i],
- filename: fileName,
- class: "tagButton",
- text: tags[i]
- }));
- }
- }
- return wrapper.html();
-}
-
-var buttonizeTitle = function(title, fileName) {
- return $('<span>').append($('<button>', {
- title: fileName,
- class: 'fileTitleButton',
- text: title+' '
- })).html();
-}
-
-var openFileTitleMenu = function(tagButton, fileName) {
- exports.clearSelectedFiles();
- $(tagButton).parent().parent().toggleClass("selectedRow");
-
- UIAPI.currentFilename = fileName;
- UIAPI.selectedFiles.push(UIAPI.currentFilename);
-}
-
-var buttonizeFileName = function(fileName) {
- return $('<span>').append($('<button>', {
- title: fileName,
- class: 'fileButton',
- text: fileName
- })).html();
-}
-
-var openFileMenu = function(tagButton, fileName) {
+var selectFile = function(tagButton, fileName) {
exports.clearSelectedFiles();
- $(tagButton).parent().parent().toggleClass("selectedRow");
-
+
+ $(tagButton).parent().parent().toggleClass("ui-selected");
UIAPI.currentFilename = fileName;
- UIAPI.selectedFiles.push(UIAPI.currentFilename);
+ UIAPI.selectedFiles.push(UIAPI.currentFilename);
}
var initButtons = function() {
@@ -392,55 +282,6 @@ var initButtons = function() {
});
}
-var initContextMenus = function() {
- $( "#fileMenu" ).menu({
- select: function( event, ui ) {
- var commandName = ui.item.attr( "action" );
- switch (commandName) {
- case "addTag":
- console.debug("Adding tag...");
- $("#tags").val("");
- $( "#dialogAddTags" ).dialog( "open" );
- break;
- case "openFile":
- UIAPI.openFile(UIAPI.currentPath+UIAPI.getDirSeparator()+UIAPI.selectedFiles[0]);
- break;
- case "openDirectory":
- console.debug("Opening parent directory...");
- IOAPI.openDirectory(UIAPI.currentPath);
- break;
- case "renameFile":
- console.debug("Renaming file...");
- $( "#dialog-filerename" ).dialog( "open" );
- break;
- case "deleteFile":
- console.debug("Deleting file...");
- $( "#dialog-confirmdelete" ).dialog( "open" );
- break;
- default:
- break;
- }
- }
- });
-
- $( "#fileTitleMenu" ).menu({
- select: function( event, ui ) {
- var commandName = ui.item.attr( "action" );
- switch (commandName) {
- case "openFile":
- UIAPI.openFile(UIAPI.currentPath+UIAPI.getDirSeparator()+UIAPI.selectedFiles[0]);
- break;
- case "addTag":
- console.debug("Adding tag...");
- $("#tags").val("");
- $( "#dialogAddTags" ).dialog( "open" );
- break;
- default:
- break;
- }
- }
- });
-}
// currently not used
var handleElementActivation = function() {
diff --git a/data/loader.js b/data/loader.js
index 9777b8746..181bb6e42 100644
--- a/data/loader.js
+++ b/data/loader.js
@@ -31,7 +31,7 @@ require.config({
jqueryuispinner: 'libs/jqueryui/jquery.ui.spinner',
jqueryuislider: 'libs/jqueryui/jquery.ui.slider',
jqueryuitabs: 'libs/jqueryui/jquery.ui.tabs',
- jqueryuitooltips: 'libs/jqueryui/jquery.ui.tooltips',
+ jqueryuitooltips: 'libs/jqueryui/jquery.ui.tooltip',
jqueryuicss: 'libs/jqueryui/custom-theme/jquery-ui-1.9.2.custom',
datatables: 'libs/datatables/js/jquery.dataTables.min',
datatablescss: 'libs/datatables/css/jquery.dataTables',
@@ -68,7 +68,14 @@ require.config({
'jqueryuidialog',
'jqueryuiselectable',
'jqueryuiautocomplete',
- 'jqueryuidatepicker',
+ 'jqueryuidatepicker',
+ ]
+ },
+ 'jqueryuitooltips': {
+ deps: [
+ 'jqueryui',
+ 'jqueryuiwidget',
+ 'jqueryuiposition',
]
},
'jqueryuidraggable': {
@@ -77,7 +84,12 @@ require.config({
'jqueryuiwidget',
'jqueryuimouse',
]
- },
+ },
+ 'jqueryuidroppable': {
+ deps: [
+ 'jqueryuidraggable',
+ ]
+ },
'jqueryuiresizable': {
deps: [
'jqueryui',