Revert the changes adding anonymous pads
parent
f42665ba49
commit
11f0a9ae5f
www
drive
|
@ -1,49 +0,0 @@
|
|||
0 info it worked if it ends with ok
|
||||
1 verbose cli [ '/home/yflory/.nvm/versions/node/v7.0.0/bin/node',
|
||||
1 verbose cli '/home/yflory/.nvm/versions/node/v7.0.0/bin/npm',
|
||||
1 verbose cli 'run',
|
||||
1 verbose cli 'lint' ]
|
||||
2 info using npm@3.10.8
|
||||
3 info using node@v7.0.0
|
||||
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
|
||||
5 info lifecycle cryptpad@0.1.0~prelint: cryptpad@0.1.0
|
||||
6 silly lifecycle cryptpad@0.1.0~prelint: no script for prelint, continuing
|
||||
7 info lifecycle cryptpad@0.1.0~lint: cryptpad@0.1.0
|
||||
8 verbose lifecycle cryptpad@0.1.0~lint: unsafe-perm in lifecycle true
|
||||
9 verbose lifecycle cryptpad@0.1.0~lint: PATH: /home/yflory/.nvm/versions/node/v7.0.0/lib/node_modules/npm/bin/node-gyp-bin:/home/yflory/XWiki/cryptpad/node_modules/.bin:/home/yflory/.nvm/versions/node/v7.0.0/bin:/usr/lib/jvm/java-8-openjdk-amd64/bin:/usr/local/apache-maven/apache-maven-3.3.9/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/yflory/android-sdk-linux/tools
|
||||
10 verbose lifecycle cryptpad@0.1.0~lint: CWD: /home/yflory/XWiki/cryptpad
|
||||
11 silly lifecycle cryptpad@0.1.0~lint: Args: [ '-c',
|
||||
11 silly lifecycle 'jshint --config .jshintrc --exclude-path .jshintignore .' ]
|
||||
12 silly lifecycle cryptpad@0.1.0~lint: Returned: code: 2 signal: null
|
||||
13 info lifecycle cryptpad@0.1.0~lint: Failed to exec lint script
|
||||
14 verbose stack Error: cryptpad@0.1.0 lint: `jshint --config .jshintrc --exclude-path .jshintignore .`
|
||||
14 verbose stack Exit status 2
|
||||
14 verbose stack at EventEmitter.<anonymous> (/home/yflory/.nvm/versions/node/v7.0.0/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
|
||||
14 verbose stack at emitTwo (events.js:106:13)
|
||||
14 verbose stack at EventEmitter.emit (events.js:191:7)
|
||||
14 verbose stack at ChildProcess.<anonymous> (/home/yflory/.nvm/versions/node/v7.0.0/lib/node_modules/npm/lib/utils/spawn.js:40:14)
|
||||
14 verbose stack at emitTwo (events.js:106:13)
|
||||
14 verbose stack at ChildProcess.emit (events.js:191:7)
|
||||
14 verbose stack at maybeClose (internal/child_process.js:877:16)
|
||||
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
|
||||
15 verbose pkgid cryptpad@0.1.0
|
||||
16 verbose cwd /home/yflory/XWiki/cryptpad
|
||||
17 error Linux 4.4.0-59-generic
|
||||
18 error argv "/home/yflory/.nvm/versions/node/v7.0.0/bin/node" "/home/yflory/.nvm/versions/node/v7.0.0/bin/npm" "run" "lint"
|
||||
19 error node v7.0.0
|
||||
20 error npm v3.10.8
|
||||
21 error code ELIFECYCLE
|
||||
22 error cryptpad@0.1.0 lint: `jshint --config .jshintrc --exclude-path .jshintignore .`
|
||||
22 error Exit status 2
|
||||
23 error Failed at the cryptpad@0.1.0 lint script 'jshint --config .jshintrc --exclude-path .jshintignore .'.
|
||||
23 error Make sure you have the latest version of node.js and npm installed.
|
||||
23 error If you do, this is most likely a problem with the cryptpad package,
|
||||
23 error not with npm itself.
|
||||
23 error Tell the author that this fails on your system:
|
||||
23 error jshint --config .jshintrc --exclude-path .jshintignore .
|
||||
23 error You can get information on how to open an issue for this project with:
|
||||
23 error npm bugs cryptpad
|
||||
23 error Or if that isn't available, you can get their info via:
|
||||
23 error npm owner ls cryptpad
|
||||
23 error There is likely additional logging output above.
|
||||
24 verbose exit [ 1, true ]
|
|
@ -576,9 +576,6 @@ define([
|
|||
|
||||
if (!contains) {
|
||||
var data = makePad(href, name);
|
||||
if (common.initialPath) {
|
||||
data.owner = getStore().getLoginName(); // TODO use owner id here?
|
||||
}
|
||||
renamed.push(data);
|
||||
if (USE_FS_STORE && common.initialPath && typeof(getStore().addPad) === "function") {
|
||||
getStore().addPad(href, common.initialPath, name);
|
||||
|
|
|
@ -713,11 +713,6 @@ define([
|
|||
});
|
||||
};
|
||||
|
||||
var isAnonFile = exp.isAnonFile = function (file) {
|
||||
var data = getFileData(file);
|
||||
return !data.owner;
|
||||
};
|
||||
|
||||
var fixFiles = exp.fixFiles = function () {
|
||||
// Explore the tree and check that everything is correct:
|
||||
// * 'root', 'trash', 'unsorted' and 'filesData' exist and are objects
|
||||
|
@ -739,11 +734,6 @@ define([
|
|||
debug("An element in ROOT was not a folder nor a file. ", element[el]);
|
||||
element[el] = undefined;
|
||||
delete element[el];
|
||||
} else if (isFile(element[el])) {
|
||||
if (isAnonFile(element[el])) {
|
||||
debug("An element in ROOT was an anonymous file. ", element[el]);
|
||||
delete element[el];
|
||||
}
|
||||
} else if (isFolder(element[el])) {
|
||||
fixRoot(element[el]);
|
||||
}
|
||||
|
@ -756,7 +746,6 @@ define([
|
|||
var addToClean = function (obj, idx) {
|
||||
if (typeof(obj) !== "object") { toClean.push(idx); return; }
|
||||
if (!isFile(obj.element) && !isFolder(obj.element)) { toClean.push(idx); return; }
|
||||
if (isFile(obj.element) && isAnonFile(obj.element)) { toClean.push(idx); return; }
|
||||
if (!$.isArray(obj.path)) { toClean.push(idx); return; }
|
||||
};
|
||||
for (var el in tr) {
|
||||
|
@ -781,7 +770,7 @@ define([
|
|||
var templateFiles = getTemplateFiles();
|
||||
var toClean = [];
|
||||
us.forEach(function (el, idx) {
|
||||
if (!isFile(el) || rootFiles.indexOf(el) !== -1 || templateFiles.indexOf(el) !== -1 || isAnonFile(el)) {
|
||||
if (!isFile(el) || rootFiles.indexOf(el) !== -1 || templateFiles.indexOf(el) !== -1) {
|
||||
toClean.push(idx);
|
||||
}
|
||||
});
|
||||
|
@ -797,7 +786,7 @@ define([
|
|||
var unsortedFiles = getUnsortedFiles();
|
||||
var toClean = [];
|
||||
us.forEach(function (el, idx) {
|
||||
if (!isFile(el) || rootFiles.indexOf(el) !== -1 || unsortedFiles.indexOf(el) !== -1 || isAnonFile(el)) {
|
||||
if (!isFile(el) || rootFiles.indexOf(el) !== -1 || unsortedFiles.indexOf(el) !== -1) {
|
||||
toClean.push(idx);
|
||||
}
|
||||
});
|
||||
|
@ -812,7 +801,6 @@ define([
|
|||
var unsortedFiles = getUnsortedFiles();
|
||||
var templateFiles = getTemplateFiles();
|
||||
var trashFiles = getTrashFiles();
|
||||
//var anonFiles = getAnonFiles();
|
||||
var toClean = [];
|
||||
fd.forEach(function (el, idx) {
|
||||
if (typeof(el) !== "object") {
|
||||
|
|
|
@ -648,17 +648,12 @@ define([
|
|||
|
||||
var getFileIcon = function (href) {
|
||||
var $icon = $fileIcon.clone();
|
||||
var data = filesOp.getFileData(href);
|
||||
if (!data) { return $icon; }
|
||||
|
||||
if (href.indexOf('/pad/') !== -1) { $icon = $padIcon.clone() }
|
||||
else if (href.indexOf('/code/') !== -1) { $icon = $codeIcon.clone() }
|
||||
else if (href.indexOf('/slide/') !== -1) { $icon = $slideIcon.clone() }
|
||||
else if (href.indexOf('/poll/') !== -1) { $icon = $pollIcon.clone() }
|
||||
|
||||
if (!data.owner) {
|
||||
$icon = $('<span>').append($anonIcon.clone()).append($icon);
|
||||
}
|
||||
return $icon;
|
||||
};
|
||||
|
||||
|
@ -1249,7 +1244,7 @@ define([
|
|||
var $fileHeader = getFileListHeader(true);
|
||||
|
||||
if (isUnsorted || isTemplate) {
|
||||
displayHrefArray($list, path[0]);
|
||||
displayHrefArray($list, path[0], true);
|
||||
} else if (isAllFiles) {
|
||||
displayAllFiles($list);
|
||||
} else if (isTrashRoot) {
|
||||
|
@ -1676,7 +1671,7 @@ define([
|
|||
var path = arguments[2];
|
||||
if (path[0] !== 'drive') { return false; }
|
||||
path = path.slice(1);
|
||||
var cPath = filesOp.isPathInAnon(currentPath) ? [FILES_DATA] : currentPath.slice();
|
||||
var cPath = currentPath.slice();
|
||||
if ((filesOp.isPathInUnsorted(cPath) && filesOp.isPathInUnsorted(path)) ||
|
||||
(filesOp.isPathInTemplate(cPath) && filesOp.isPathInTemplate(path)) ||
|
||||
(path.length >= cPath.length && filesOp.isSubpath(path, cPath)) ||
|
||||
|
@ -1684,7 +1679,7 @@ define([
|
|||
// Reload after a few ms to make sure all the change events have been received
|
||||
onRefresh.refresh();
|
||||
} else if (path.length && path[0] === FILES_DATA) {
|
||||
if (filesOp.isPathInHrefArray(cPath) || filesOp.isPathInAnon(path)) {
|
||||
if (filesOp.isPathInHrefArray(cPath)) {
|
||||
onRefresh.refresh();
|
||||
} else {
|
||||
refreshFilesData();
|
||||
|
|
Loading…
Reference in New Issue