mirror of https://github.com/xwiki-labs/cryptpad
Merge branch 'staging' into exportSheet
This commit is contained in:
commit
c8384f42c9
|
@ -286,7 +286,9 @@
|
|||
display: none;
|
||||
}
|
||||
input {
|
||||
width: ~"calc(100% - 30px)";
|
||||
//width: ~"calc(100% - 30px)";
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding: 0 10px;
|
||||
border: 0;
|
||||
height: auto;
|
||||
|
@ -298,8 +300,9 @@
|
|||
.leftside-menu-category_main();
|
||||
width: ~"calc(100% + 5px)";
|
||||
margin: 0;
|
||||
margin-bottom: -6px;
|
||||
display: inline-block;
|
||||
//margin-bottom: -6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
margin-left: -5px;
|
||||
padding-left: 5px;
|
||||
|
@ -309,6 +312,12 @@
|
|||
width: 25px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
.cp-app-drive-element {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -643,7 +643,7 @@ define([
|
|||
// DRIVE
|
||||
var currentPath = APP.currentPath = LS.getLastOpenedFolder();
|
||||
if (APP.newSharedFolder) {
|
||||
var newSFPaths = manager.findFile(APP.newSharedFolder);
|
||||
var newSFPaths = manager.findFile(Number(APP.newSharedFolder));
|
||||
if (newSFPaths.length) {
|
||||
currentPath = newSFPaths[0];
|
||||
}
|
||||
|
@ -672,6 +672,8 @@ define([
|
|||
displayedCategories = [FILES_DATA];
|
||||
currentPath = [FILES_DATA];
|
||||
}
|
||||
} else if (priv.isEmbed && APP.newSharedFolder) {
|
||||
displayedCategories = [ROOT, TRASH];
|
||||
}
|
||||
|
||||
APP.editable = !APP.readOnly;
|
||||
|
@ -2395,6 +2397,7 @@ define([
|
|||
path.forEach(function (p, idx) {
|
||||
if (isTrash && [2,3].indexOf(idx) !== -1) { return; }
|
||||
if (skipNext) { skipNext = false; return; }
|
||||
if (APP.newSharedFolder && priv.isEmbed && p === ROOT && !idx) { return; }
|
||||
var name = p;
|
||||
|
||||
if (manager.isFile(el) && isInTrashRoot && idx === 1) {
|
||||
|
@ -2435,7 +2438,7 @@ define([
|
|||
addDragAndDropHandlers($span, path.slice(0, idx), true, true);
|
||||
|
||||
if (idx === 0) { name = p === SHARED_FOLDER ? name : getPrettyName(p); }
|
||||
else {
|
||||
else if (!(APP.newSharedFolder && priv.isEmbed && idx === 1)) {
|
||||
var $span2 = $('<span>', {
|
||||
'class': 'cp-app-drive-path-element cp-app-drive-path-separator'
|
||||
}).text(' / ');
|
||||
|
@ -4103,17 +4106,28 @@ define([
|
|||
var createTree = function ($container, path) {
|
||||
var root = manager.find(path);
|
||||
|
||||
var isRoot = manager.comparePath([ROOT], path);
|
||||
var rootName = ROOT_NAME;
|
||||
if (APP.newSharedFolder && priv.isEmbed && isRoot) {
|
||||
var newSFPaths = manager.findFile(Number(APP.newSharedFolder));
|
||||
if (newSFPaths.length) {
|
||||
path = newSFPaths[0];
|
||||
path.push(ROOT);
|
||||
root = manager.find(path);
|
||||
rootName = manager.getSharedFolderData(APP.newSharedFolder).title;
|
||||
}
|
||||
}
|
||||
|
||||
// don't try to display what doesn't exist
|
||||
if (!root) { return; }
|
||||
|
||||
// Display the root element in the tree
|
||||
var displayingRoot = manager.comparePath([ROOT], path);
|
||||
if (displayingRoot) {
|
||||
var isRootOpened = manager.comparePath([ROOT], currentPath);
|
||||
if (isRoot) {
|
||||
var isRootOpened = manager.comparePath(path.slice(), currentPath);
|
||||
var $rootIcon = manager.isFolderEmpty(files[ROOT]) ?
|
||||
(isRootOpened ? $folderOpenedEmptyIcon : $folderEmptyIcon) :
|
||||
(isRootOpened ? $folderOpenedIcon : $folderIcon);
|
||||
var $rootElement = createTreeElement(ROOT_NAME, $rootIcon.clone(), [ROOT], false, true, true, isRootOpened);
|
||||
var $rootElement = createTreeElement(rootName, $rootIcon.clone(), path.slice(), false, true, true, isRootOpened);
|
||||
if (!manager.hasSubfolder(root)) {
|
||||
$rootElement.find('.cp-app-drive-icon-expcol').css('visibility', 'hidden');
|
||||
}
|
||||
|
|
|
@ -548,6 +548,8 @@ define([
|
|||
var secret = Hash.getSecrets('drive', parsed.hash, folderData.password);
|
||||
SF.upgrade(secret.channel, secret);
|
||||
Env.folders[folderId].userObject.setReadOnly(false, secret.keys.secondaryKey);
|
||||
waitFor.abort();
|
||||
return void cb(folderId);
|
||||
}
|
||||
if (err) {
|
||||
waitFor.abort();
|
||||
|
|
Loading…
Reference in New Issue