Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
ansuz 8 years ago
commit deed04108b

@ -1465,11 +1465,11 @@ define([
APP.newFolder = info.newPath; APP.newFolder = info.newPath;
refresh(); refresh();
}; };
$block.find('a.cp-app-drive-toolbar-new-folder, li.cp-app-drive-toolbar-new-folder') $block.find('a.cp-app-drive-new-folder, li.cp-app-drive-new-folder')
.click(function () { .click(function () {
filesOp.addFolder(currentPath, null, onCreated); filesOp.addFolder(currentPath, null, onCreated);
}); });
$block.find('a.cp-app-drive-toolbar-new-upload, li.cp-app-drive-toolbar-new-upload') $block.find('a.cp-app-drive-new-upload, li.cp-app-drive-new-upload')
.click(function () { .click(function () {
var $input = $('<input>', { var $input = $('<input>', {
'type': 'file', 'type': 'file',
@ -1484,7 +1484,7 @@ define([
$input.click(); $input.click();
}); });
} }
$block.find('a.cp-app-drive-toolbar-new-doc, li.cp-app-drive-toolbar-new-doc') $block.find('a.cp-app-drive-new-doc, li.cp-app-drive-new-doc')
.click(function () { .click(function () {
var type = $(this).attr('data-type') || 'pad'; var type = $(this).attr('data-type') || 'pad';
var path = filesOp.isPathIn(currentPath, [TRASH]) ? '' : currentPath; var path = filesOp.isPathIn(currentPath, [TRASH]) ? '' : currentPath;
@ -1504,20 +1504,20 @@ define([
if (isInRoot) { if (isInRoot) {
options.push({ options.push({
tag: 'a', tag: 'a',
attributes: {'class': 'cp-app-drive-toolbar-new-older'}, attributes: {'class': 'cp-app-drive-new-older'},
content: $('<div>').append($folderIcon.clone()).html() + Messages.fm_folder content: $('<div>').append($folderIcon.clone()).html() + Messages.fm_folder
}); });
options.push({tag: 'hr'}); options.push({tag: 'hr'});
options.push({ options.push({
tag: 'a', tag: 'a',
attributes: {'class': 'cp-app-drive-toolbar-new-upload'}, attributes: {'class': 'cp-app-drive-new-upload'},
content: $('<div>').append(getIcon('file')).html() + Messages.uploadButton content: $('<div>').append(getIcon('file')).html() + Messages.uploadButton
}); });
options.push({tag: 'hr'}); options.push({tag: 'hr'});
} }
getNewPadTypes().forEach(function (type) { getNewPadTypes().forEach(function (type) {
var attributes = { var attributes = {
'class': 'cp-app-drive-toolbar-new-doc', 'class': 'cp-app-drive-new-doc',
'data-type': type, 'data-type': type,
'href': '#' 'href': '#'
}; };

@ -85,8 +85,6 @@ define([
Cryptpad.whenRealtimeSyncs(result.realtime, function () { Cryptpad.whenRealtimeSyncs(result.realtime, function () {
Cryptpad.login(result.userHash, result.userName, function () { Cryptpad.login(result.userHash, result.userName, function () {
registering = false; registering = false;
/*
FIXME: migration and readme not working if not redirected to drive
if (sessionStorage.redirectTo) { if (sessionStorage.redirectTo) {
var h = sessionStorage.redirectTo; var h = sessionStorage.redirectTo;
var parser = document.createElement('a'); var parser = document.createElement('a');
@ -97,7 +95,6 @@ define([
return; return;
} }
} }
*/
window.location.href = '/drive/'; window.location.href = '/drive/';
}); });
}); });

Loading…
Cancel
Save