Merge pull request #2418 from ether/etherpad-export-and-import

Full Pad portability (Export/Import)
This commit is contained in:
John McLear 2014-12-31 13:32:09 +00:00
commit 036b7d2890
9 changed files with 261 additions and 64 deletions

View file

@ -689,6 +689,9 @@ table#otheruserstable {
#exportpdfa:before {
content: "\e803";
}
#exportetherpada:before {
content: "\e806";
}
#exportopena:before {
content: "\e805";
}

View file

@ -109,6 +109,8 @@ var padimpexp = (function()
msg = html10n.get("pad.impexp.convertFailed");
} else if(status === "uploadFailed"){
msg = html10n.get("pad.impexp.uploadFailed");
} else if(status === "padHasData"){
msg = html10n.get("pad.impexp.padHasData");
}
function showError(fade)
@ -198,6 +200,7 @@ var padimpexp = (function()
// build the export links
$("#exporthtmla").attr("href", pad_root_path + "/export/html");
$("#exportetherpada").attr("href", pad_root_path + "/export/etherpad");
$("#exportplaina").attr("href", pad_root_path + "/export/txt");
// activate action to import in the form
@ -234,13 +237,13 @@ var padimpexp = (function()
$('#importform').submit(fileInputSubmit);
$('.disabledexport').click(cantExport);
},
handleFrameCall: function(status)
handleFrameCall: function(directDatabaseAccess, status)
{
if (status !== "ok")
{
importFailed(status);
}
if(directDatabaseAccess) pad.switchToPad(clientVars.padId);
importDone();
},
disable: function()