Add import & export in pad2

pull/1/head
yflory 7 years ago
parent 1da11a1883
commit b2e6df1f9d

@ -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}));
}

@ -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) {

Loading…
Cancel
Save