Add import & export in pad2
This commit is contained in:
parent
1da11a1883
commit
b2e6df1f9d
@ -112,7 +112,7 @@ define([
|
|||||||
if (callback) {
|
if (callback) {
|
||||||
button
|
button
|
||||||
.click(prepareFeedback(type))
|
.click(prepareFeedback(type))
|
||||||
.click(UI.importContent('text/plain', function (content, file) {
|
.click(Cryptpad.importContent('text/plain', function (content, file) {
|
||||||
callback(content, file);
|
callback(content, file);
|
||||||
}, {accept: data ? data.accept : undefined}));
|
}, {accept: data ? data.accept : undefined}));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -528,6 +528,18 @@ define([
|
|||||||
$('.cke_toolbox_main').hide();
|
$('.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 */
|
/* add a forget button */
|
||||||
var forgetCb = function (err) {
|
var forgetCb = function (err) {
|
||||||
if (err) { return; }
|
if (err) { return; }
|
||||||
@ -640,16 +652,16 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* add an export button */
|
/* add an export button */
|
||||||
var $export = Cryptpad.createButton('export', true, {}, exportFile);
|
/*var $export = Cryptpad.createButton('export', true, {}, exportFile);
|
||||||
$drawer.append($export);
|
$drawer.append($export);
|
||||||
|
*/
|
||||||
if (!readOnly) {
|
//if (!readOnly) {
|
||||||
/* add an import button */
|
/* add an import button */
|
||||||
var $import = Cryptpad.createButton('import', true, {
|
/* var $import = Cryptpad.createButton('import', true, {
|
||||||
accept: 'text/html'
|
accept: 'text/html'
|
||||||
}, importFile);
|
}, importFile);
|
||||||
$drawer.append($import);
|
$drawer.append($import);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/* add a forget button */
|
/* add a forget button */
|
||||||
/* var forgetCb = function (err) {
|
/* var forgetCb = function (err) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user