diff --git a/rpc.js b/rpc.js index e241a271f..465413fd1 100644 --- a/rpc.js +++ b/rpc.js @@ -1181,7 +1181,7 @@ RPC.create = function ( }); case 'IS_NEW_CHANNEL': return void isNewChannel(Env, msg[1], function (e, isNew) { - respond(null, [null, isNew, null]); + respond(e, [null, isNew, null]); }); default: console.error("unsupported!"); diff --git a/www/common/rpc.js b/www/common/rpc.js index e86615111..bcbc98662 100644 --- a/www/common/rpc.js +++ b/www/common/rpc.js @@ -102,7 +102,7 @@ types of messages: } // HACK to hide messages from the anon rpc - if (parsed.length !== 4) { + if (parsed.length !== 4 && parsed[1] !== 'ERROR') { console.log(parsed); console.error("received message [%s] for txid[%s] with no callback", msg, txid); } diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index 0bbd40eea..57261372d 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -132,10 +132,12 @@ define([ // Check if the pad exists on server if (!window.location.hash) { isNewFile = true; return; } - Cryptpad.isNewChannel(window.location.href, waitFor(function (e, isNew) { - if (e) { return console.error(e); } - isNewFile = Boolean(isNew); - })); + if (realtime) { + Cryptpad.isNewChannel(window.location.href, waitFor(function (e, isNew) { + if (e) { return console.error(e); } + isNewFile = Boolean(isNew); + })); + } }).nThen(function () { var readOnly = secret.keys && !secret.keys.editKeyStr; var isNewHash = true; diff --git a/www/todo/inner.js b/www/todo/inner.js index d502d2990..f34592568 100644 --- a/www/todo/inner.js +++ b/www/todo/inner.js @@ -51,7 +51,7 @@ define([ Sortable.create($list[0], { store: { - get: function (sortable) { + get: function () { return todo.getOrder(); }, set: function (sortable) { @@ -135,6 +135,8 @@ define([ $taskDiv.addClass('cp-app-todo-task-complete'); } + var $span = $('', { 'class': 'cp-app-todo-task-text' }); + var $input = $('', { type: 'text', 'class': 'cp-app-todo-task-input' @@ -147,8 +149,7 @@ define([ } }).appendTo($taskDiv); - var $span = $('', { 'class': 'cp-app-todo-task-text' }) - .text(entry.task) + $span.text(entry.task) .appendTo($taskDiv) .click(function () { $input.show();