Drag from recent pads

pull/1/head
yflory 5 years ago
parent c3d6b72763
commit aef0f29c2f

@ -1207,9 +1207,6 @@ define([
if ($element.is('.cp-app-drive-element-notrash')) {
// We can't delete elements in virtual categories
hide.push('delete');
} else {
// We can only open parent in virtual categories
hide.push('openparent');
}
if (!$element.is('.cp-border-color-file')) {
//hide.push('download');
@ -1310,6 +1307,10 @@ define([
hide.push('open');
}
if (!APP.loggedIn) {
hide.push('openparent');
}
filter = function ($el, className) {
if (hide.indexOf(className) !== -1) { return true; }
};
@ -1325,7 +1326,7 @@ define([
'deleteowned', 'removesf', 'access', 'properties', 'hashtag'];
break;
case 'default':
show = ['open', 'openro', 'preview', 'share', 'openparent', 'delete', 'deleteowned', 'properties', 'access', 'hashtag', 'makeacopy'];
show = ['open', 'openro', 'preview', 'openincode', 'share', 'download', 'openparent', 'delete', 'deleteowned', 'properties', 'access', 'hashtag', 'makeacopy', 'savelocal', 'rename'];
break;
case 'trashtree': {
show = ['empty'];
@ -2117,7 +2118,7 @@ define([
onElementClick(e, $element);
});
if (!isTrash) {
$element.contextmenu(openContextMenu('tree'));
$element.on('contextmenu', openContextMenu('tree'));
$element.data('context', 'tree');
} else {
$element.contextmenu(openContextMenu('trash'));
@ -3316,25 +3317,17 @@ define([
var $icon = getFileIcon(id);
var ro = manager.isReadOnlyFile(id);
// ro undefined means it's an old hash which doesn't support read-only
var roClass = typeof(ro) === 'undefined' ? ' cp-app-drive-element-noreadonly' :
/*var roClass = typeof(ro) === 'undefined' ? ' cp-app-drive-element-noreadonly' :
ro ? ' cp-app-drive-element-readonly' : '';
var $element = $('<li>', {
'class': 'cp-app-drive-element cp-app-drive-element-notrash cp-app-drive-element-file cp-app-drive-element-row' + roClass,
});
$element.prepend($icon).dblclick(function () {
openFile(id);
});
addFileData(id, $element);
$element.data('path', path);
$element.click(function(e) {
e.stopPropagation();
onElementClick(e, $element);
});
$element.contextmenu(openContextMenu('default'));
});*/
var parentPath = path.slice();
var key = parentPath.pop();
var root = manager.find(parentPath);
var $element = createElement(parentPath, key, root);
$element.off('contextmenu').contextmenu(openContextMenu('default'));
$element.data('context', 'default');
/*if (draggable) {
addDragAndDropHandlers($element, path, false, false);
}*/
$list.append($element);
i++;
});

Loading…
Cancel
Save