diff --git a/www/common/sframe-common.js b/www/common/sframe-common.js index 113e6e733..a2677a4b7 100644 --- a/www/common/sframe-common.js +++ b/www/common/sframe-common.js @@ -112,7 +112,7 @@ define([ if (callback) { button .click(prepareFeedback(type)) - .click(UI.importContent('text/plain', function (content, file) { + .click(Cryptpad.importContent('text/plain', function (content, file) { callback(content, file); }, {accept: data ? data.accept : undefined})); } diff --git a/www/pad2/main.js b/www/pad2/main.js index 8a438d54e..44d17883f 100644 --- a/www/pad2/main.js +++ b/www/pad2/main.js @@ -528,6 +528,18 @@ define([ $('.cke_toolbox_main').hide(); } + /* add an export button */ + var $export = Cryptpad.createButton('export', true, {}, exportFile); + $drawer.append($export); + + if (!readOnly) { + /* add an import button */ + var $import = Cryptpad.createButton('import', true, { + accept: 'text/html' + }, importFile); + $drawer.append($import); + } + /* add a forget button */ var forgetCb = function (err) { if (err) { return; } @@ -640,16 +652,16 @@ define([ } /* add an export button */ - var $export = Cryptpad.createButton('export', true, {}, exportFile); + /*var $export = Cryptpad.createButton('export', true, {}, exportFile); $drawer.append($export); - - if (!readOnly) { +*/ + //if (!readOnly) { /* add an import button */ - var $import = Cryptpad.createButton('import', true, { + /* var $import = Cryptpad.createButton('import', true, { accept: 'text/html' }, importFile); $drawer.append($import); - } + }*/ /* add a forget button */ /* var forgetCb = function (err) {