diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 000000000..69610cda2 --- /dev/null +++ b/npm-debug.log @@ -0,0 +1,49 @@ +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. (/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. (/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 ] diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 1daf1fe73..410b12136 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -88,6 +88,8 @@ define([ delete localStorage[k]; delete sessionStorage[k]; }); + // Make sure we have an FS_hash in localStorage before reloading all the tabs + // so that we don't end up with tabs using different anon hashes if (!localStorage[fileHashKey]) { localStorage[fileHashKey] = common.createRandomHash(); } diff --git a/www/common/toolbar.js b/www/common/toolbar.js index c2a74e44c..a118dcf62 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -374,7 +374,7 @@ define([ if (config.displayed.indexOf('useradmin') !== -1) { if (!config.userName || !config.userName.setName || !config.userName.lastName) { throw new Error("You must provide a `userName` object containing `setName` (function) " + - "and `lastName` (object) if you want to display the user admin menu.") + "and `lastName` (object) if you want to display the user admin menu."); } var $displayedName = $('', {'class': USERNAME_CLS}); var accountName = Cryptpad.getStore().getLoginName ? Cryptpad.getStore().getLoginName() : null; @@ -388,7 +388,7 @@ define([ var $userName = $('', {'class': 'userDisplayName'}); if (readOnly !== 1) { // Hide "Display name:" in read only mode - $userName.append(Messages.user_displayName + ': ') + $userName.append(Messages.user_displayName + ': '); } $userName.append($displayedName.clone()); $userAdminContent.append($userName); @@ -429,12 +429,12 @@ define([ if (account) { $button.append($('', {'class': 'account-name'}).text('(' + accountName + ')')); } - var dropdownConfig = { + var dropdownConfigUser = { text: $button.html(), // Button initial text options: options, // Entries displayed in the menu left: true, // Open to the left of the button }; - var $userAdmin = Cryptpad.createDropdown(dropdownConfig); + var $userAdmin = Cryptpad.createDropdown(dropdownConfigUser); $userContainer.append($userAdmin); $userAdmin.find('a.logout').click(function (e) { @@ -569,9 +569,9 @@ define([ return; } - var e = jQuery.Event("keyup"); - e.which = 13; - $titleElement.find('input').trigger(e); + var ev = $.Event("keyup"); + ev.which = 13; + $titleElement.find('input').trigger(ev); /* $titleElement.find('input').hide(); diff --git a/www/pad/main.js b/www/pad/main.js index df80cef19..3998ad915 100644 --- a/www/pad/main.js +++ b/www/pad/main.js @@ -495,8 +495,9 @@ define([ updateMetadata(shjson); var newInner = JSON.parse(shjson); + var newSInner; if (newInner.length > 2) { - var newSInner = stringify(newInner[2]); + newSInner = stringify(newInner[2]); } // build a dom from HJSON, diff, and patch the editor @@ -535,7 +536,7 @@ define([ // Notify only when the content has changed, not when someone has joined/left var oldSInner = stringify(JSON.parse(oldShjson)[2]); - if (newSInner !== oldSInner) { + if (newSInner && newSInner !== oldSInner) { notify(); } }; diff --git a/www/poll/index.html b/www/poll/index.html index deac65f77..ab78be2f5 100644 --- a/www/poll/index.html +++ b/www/poll/index.html @@ -32,8 +32,6 @@ } .realtime { display: block; - overflow: auto; - max-height: 100%; max-width: 100%; } diff --git a/www/poll/main.js b/www/poll/main.js index 10a25e01d..49835a13a 100644 --- a/www/poll/main.js +++ b/www/poll/main.js @@ -192,6 +192,20 @@ define([ } }; + var unnotify = function () { + if (APP.tabNotification && + typeof(APP.tabNotification.cancel) === 'function') { + APP.tabNotification.cancel(); + } + }; + + var notify = function () { + if (Visible.isSupported() && !Visible.currently()) { + unnotify(); + APP.tabNotification = Notify.tab(1000, 10); + } + }; + /* Any time the realtime object changes, call this function */ var change = function (o, n, path, throttle) { if (path && !Cryptpad.isArray(path)) { @@ -402,20 +416,6 @@ define([ }); }; - var unnotify = function () { - if (APP.tabNotification && - typeof(APP.tabNotification.cancel) === 'function') { - APP.tabNotification.cancel(); - } - }; - - var notify = function () { - if (Visible.isSupported() && !Visible.currently()) { - unnotify(); - APP.tabNotification = Notify.tab(1000, 10); - } - }; - var userData = APP.userData = {}; // List of pretty names for all users (mapped with their ID) var userList; // List of users still connected to the channel (server IDs) var addToUserData = function(data) { diff --git a/www/slide/main.js b/www/slide/main.js index 4de77868e..e8ef4651b 100644 --- a/www/slide/main.js +++ b/www/slide/main.js @@ -766,7 +766,7 @@ define([ } Slide.update(remoteDoc); - if (oldDoc !== newDoc) { + if (oldDoc !== remoteDoc) { notify(); } }; diff --git a/www/slide/slide.js b/www/slide/slide.js index 501415cad..5fc279d59 100644 --- a/www/slide/slide.js +++ b/www/slide/slide.js @@ -212,19 +212,19 @@ define([ }, 1000); }); $modal.find('#button_exit').click(function (e) { - var e = jQuery.Event("keyup"); - e.which = 27; - $modal.trigger(e); + var ev = $.Event("keyup"); + ev.which = 27; + $modal.trigger(ev); }); $modal.find('#button_left').click(function (e) { - var e = jQuery.Event("keyup"); - e.which = 37; - $modal.trigger(e); + var ev = $.Event("keyup"); + ev.which = 37; + $modal.trigger(ev); }); $modal.find('#button_right').click(function (e) { - var e = jQuery.Event("keyup"); - e.which = 39; - $modal.trigger(e); + var ev = $.Event("keyup"); + ev.which = 39; + $modal.trigger(ev); }); $(ifrw).on('keyup', function (e) {