diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index 5c0f9b511..b05628dbd 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -698,6 +698,9 @@ define([ if (readOnly) { return; } toolbar.$drawer.append( common.createButton('import', true, options, function (c, f) { + if (state !== STATE.READY || unsyncMode) { + return void UI.warn(Messages.disconnected); + } if (async) { fi(c, f, function (content) { nThen(function (waitFor) { diff --git a/www/kanban/inner.js b/www/kanban/inner.js index 3c399389a..5d4aa4302 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -1054,14 +1054,13 @@ define([ if (framework.isReadOnly() || framework.isLocked()) { $container.addClass('cp-app-readonly'); - } else { - framework.setFileImporter({}, function (content /*, file */) { - var parsed; - try { parsed = JSON.parse(content); } - catch (e) { return void console.error(e); } - return { content: parsed }; - }); } + framework.setFileImporter({}, function (content /*, file */) { + var parsed; + try { parsed = JSON.parse(content); } + catch (e) { return void console.error(e); } + return { content: parsed }; + }); framework.setFileExporter('.json', function () { return new Blob([JSON.stringify(kanban.getBoardsJSON(), 0, 2)], {