Merge branch 'soon' of github.com:xwiki-labs/cryptpad into soon
This commit is contained in:
@@ -3,10 +3,11 @@ define([
|
||||
'/file/file-crypto.js',
|
||||
'/common/common-hash.js',
|
||||
'/common/common-util.js',
|
||||
'/customize/messages.js',
|
||||
'/bower_components/nthen/index.js',
|
||||
'/bower_components/saferphore/index.js',
|
||||
'/bower_components/jszip/dist/jszip.min.js',
|
||||
], function (Crypt, FileCrypto, Hash, Util, nThen, Saferphore, JsZip) {
|
||||
], function (Crypt, FileCrypto, Hash, Util, Messages, nThen, Saferphore, JsZip) {
|
||||
var saveAs = window.saveAs;
|
||||
|
||||
var sanitize = function (str) {
|
||||
@@ -273,7 +274,7 @@ define([
|
||||
fileHost: fileHost,
|
||||
get: getPad,
|
||||
data: data.uo.drive,
|
||||
folder: data.folder || ctx.data.root,
|
||||
folder: data.folder,
|
||||
sf: data.sf,
|
||||
zip: new JsZip(),
|
||||
errors: [],
|
||||
@@ -286,8 +287,8 @@ define([
|
||||
progress('reading', -1);
|
||||
nThen(function (waitFor) {
|
||||
ctx.waitFor = waitFor;
|
||||
var zipRoot = ctx.zip.folder('Root');
|
||||
makeFolder(ctx, ctx.folder, zipRoot, filesData);
|
||||
var zipRoot = ctx.zip.folder(data.name || Messages.fm_rootName);
|
||||
makeFolder(ctx, ctx.folder || ctx.data.root, zipRoot, filesData);
|
||||
progress('download', {});
|
||||
}).nThen(function () {
|
||||
console.log(ctx.zip);
|
||||
@@ -311,7 +312,7 @@ define([
|
||||
|
||||
var _downloadFolder = function (ctx, data, cb, updateProgress) {
|
||||
create(data, ctx.get, ctx.fileHost, function (blob, errors) {
|
||||
console.error(errors); // TODO show user errors
|
||||
if (errors && errors.length) { console.error(errors); } // TODO show user errors
|
||||
var dl = function () {
|
||||
saveAs(blob, data.folderName);
|
||||
};
|
||||
|
||||
@@ -253,7 +253,7 @@ define([
|
||||
return void cb({error: 'User drive removal blocked!'});
|
||||
}
|
||||
|
||||
store.rpc.removeOwnedChannel(data, function (err) {
|
||||
store.rpc.removeOwnedChannel(channel, function (err) {
|
||||
cb({error:err});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -464,7 +464,10 @@ define([
|
||||
|
||||
// convert a folder to a Shared Folder
|
||||
var _convertFolderToSharedFolder = function (Env, data, cb) {
|
||||
var path = data.path;
|
||||
return void cb({
|
||||
error: 'DISABLED'
|
||||
}); // XXX CONVERT
|
||||
/*var path = data.path;
|
||||
var folderElement = Env.user.userObject.find(path);
|
||||
// don't try to convert top-level elements (trash, root, etc) to shared-folders
|
||||
// TODO also validate that you're in root (not templates, etc)
|
||||
@@ -554,7 +557,7 @@ define([
|
||||
Env.user.userObject.delete([path], function () {
|
||||
cb();
|
||||
});
|
||||
});
|
||||
});*/
|
||||
};
|
||||
|
||||
// Delete permanently some pads or folders
|
||||
|
||||
@@ -399,17 +399,6 @@ define([
|
||||
"Shift-Tab": function () {
|
||||
editor.execCommand("indentLess");
|
||||
},
|
||||
"Backspace": function () {
|
||||
var cursor = doc.getCursor();
|
||||
var line = doc.getLine(cursor.line);
|
||||
var beforeCursor = line.substring(0, cursor.ch);
|
||||
if (beforeCursor && beforeCursor.trim() === "") {
|
||||
editor.execCommand("indentLess");
|
||||
} else {
|
||||
editor.execCommand("delCharBefore");
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
$('.CodeMirror').css('font-size', fontSize+'px');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user