|
|
@ -866,7 +866,7 @@ define([
|
|
|
|
options.push({tag: 'hr'});
|
|
|
|
options.push({tag: 'hr'});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
AppConfig.availablePadTypes.forEach(function (type) {
|
|
|
|
AppConfig.availablePadTypes.forEach(function (type) {
|
|
|
|
var path = '/#?path=' + encodeURIComponent(currentPath);
|
|
|
|
var path = filesOp.isPathInTrash(currentPath) ? '' : '/#?path=' + encodeURIComponent(currentPath);
|
|
|
|
options.push({
|
|
|
|
options.push({
|
|
|
|
tag: 'a',
|
|
|
|
tag: 'a',
|
|
|
|
attributes: {
|
|
|
|
attributes: {
|
|
|
@ -1253,9 +1253,7 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var $modeButton = createViewModeButton().appendTo($toolbar.find('.rightside'));
|
|
|
|
var $modeButton = createViewModeButton().appendTo($toolbar.find('.rightside'));
|
|
|
|
var $title = createTitle(path).appendTo($toolbar.find('.rightside'));
|
|
|
|
var $title = createTitle(path).appendTo($toolbar.find('.rightside'));
|
|
|
|
if (!filesOp.isPathInTrash(path)) {
|
|
|
|
|
|
|
|
createNewButton(isInRoot).appendTo($toolbar.find('.leftside'));
|
|
|
|
createNewButton(isInRoot).appendTo($toolbar.find('.leftside'));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $folderHeader = getFolderListHeader();
|
|
|
|
var $folderHeader = getFolderListHeader();
|
|
|
|
var $fileHeader = getFileListHeader(true);
|
|
|
|
var $fileHeader = getFileListHeader(true);
|
|
|
@ -1312,14 +1310,14 @@ define([
|
|
|
|
if (collapsable) {
|
|
|
|
if (collapsable) {
|
|
|
|
$collapse = $expandIcon.clone();
|
|
|
|
$collapse = $expandIcon.clone();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var $element = $('<li>').append($collapse).append($icon).append($name)
|
|
|
|
var $element = $('<li>').append($collapse).append($icon).append($name).click(function (e) {
|
|
|
|
.click(function () {
|
|
|
|
|
|
|
|
module.displayDirectory(path);
|
|
|
|
module.displayDirectory(path);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if (draggable) { $element.attr('draggable', true); }
|
|
|
|
if (draggable) { $element.attr('draggable', true); }
|
|
|
|
if (collapsable) {
|
|
|
|
if (collapsable) {
|
|
|
|
$element.addClass('collapsed');
|
|
|
|
$element.addClass('collapsed');
|
|
|
|
$collapse.click(function() {
|
|
|
|
$collapse.click(function(e) {
|
|
|
|
|
|
|
|
e.stopPropagation();
|
|
|
|
if ($element.hasClass('collapsed')) {
|
|
|
|
if ($element.hasClass('collapsed')) {
|
|
|
|
// It is closed, open it
|
|
|
|
// It is closed, open it
|
|
|
|
$element.removeClass('collapsed');
|
|
|
|
$element.removeClass('collapsed');
|
|
|
@ -1697,10 +1695,11 @@ define([
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}).on('remove', [], function (o, p) {
|
|
|
|
}).on('remove', [], function (o, p) {
|
|
|
|
var path = arguments[1];
|
|
|
|
var path = arguments[1];
|
|
|
|
if ((filesOp.isPathInUnsorted(currentPath) && filesOp.isPathInUnsorted(path)) ||
|
|
|
|
var cPath = currentPath.slice();
|
|
|
|
(filesOp.isPathInTemplate(currentPath) && filesOp.isPathInTemplate(path)) ||
|
|
|
|
if ((filesOp.isPathInUnsorted(cPath) && filesOp.isPathInUnsorted(path)) ||
|
|
|
|
(path.length >= currentPath.length && filesOp.isSubpath(path, currentPath)) ||
|
|
|
|
(filesOp.isPathInTemplate(cPath) && filesOp.isPathInTemplate(path)) ||
|
|
|
|
(filesOp.isPathInTrash(currentPath) && filesOp.isPathInTrash(path))) {
|
|
|
|
(path.length >= cPath.length && filesOp.isSubpath(path, cPath)) ||
|
|
|
|
|
|
|
|
(filesOp.isPathInTrash(cPath) && filesOp.isPathInTrash(path))) {
|
|
|
|
// Reload after a few to make sure all the change events have been received
|
|
|
|
// Reload after a few to make sure all the change events have been received
|
|
|
|
onRefresh.to = window.setTimeout(refresh, 500);
|
|
|
|
onRefresh.to = window.setTimeout(refresh, 500);
|
|
|
|
}
|
|
|
|
}
|
|
|
|