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

This commit is contained in:
ansuz
2017-05-12 10:54:32 +02:00
11 changed files with 169 additions and 21 deletions

View File

@@ -143,7 +143,7 @@ define([
return {
show: function () {
$target.show();
$target.css('display', 'inline');
return this;
},
hide: function () {

View File

@@ -840,21 +840,17 @@ define([
return;
}
var rootFiles = getFiles([ROOT, TEMPLATE]).slice();
//var toClean = [];
var root = find([ROOT]);
us.forEach(function (el) {
if (!isFile(el) || rootFiles.indexOf(el) !== -1) {
return;
//toClean.push(idx);
}
var name = getFileData(el).title || NEW_FILE_NAME;
var data = getFileData(el);
var name = data ? data.title : NEW_FILE_NAME;
var newName = getAvailableName(root, name);
root[newName] = el;
});
delete files[UNSORTED];
/*toClean.forEach(function (idx) {
us.splice(idx, 1);
});*/
};
var fixTemplate = function () {
if (!Array.isArray(files[TEMPLATE])) { debug("TEMPLATE was not an array"); files[TEMPLATE] = []; }