mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
Merge branch 'pita'
Resolved conflicts: .gitignore src/static/js/ace.js src/static/js/ace2_inner.js src/static/js/broadcast.js src/static/js/domline.js src/static/pad.html src/static/timeslider.html Ignored conflicts (please merge manually later): node/server.js src/node/utils/Minify.js
This commit is contained in:
commit
ce5d2d8685
35 changed files with 1839 additions and 1037 deletions
|
@ -95,11 +95,6 @@ var padimpexp = (function()
|
|||
}, 0);
|
||||
$('#importarrow').stop(true, true).hide();
|
||||
$('#importstatusball').show();
|
||||
|
||||
$("#import .importframe").load(function()
|
||||
{
|
||||
importDone();
|
||||
});
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -107,8 +102,6 @@ var padimpexp = (function()
|
|||
function importFailed(msg)
|
||||
{
|
||||
importErrorMessage(msg);
|
||||
importDone();
|
||||
addImportFrames();
|
||||
}
|
||||
|
||||
function importDone()
|
||||
|
@ -120,6 +113,7 @@ var padimpexp = (function()
|
|||
}, 0);
|
||||
$('#importstatusball').hide();
|
||||
importClearTimeout();
|
||||
addImportFrames();
|
||||
}
|
||||
|
||||
function importClearTimeout()
|
||||
|
@ -131,11 +125,19 @@ var padimpexp = (function()
|
|||
}
|
||||
}
|
||||
|
||||
function importErrorMessage(msg)
|
||||
function importErrorMessage(status)
|
||||
{
|
||||
var msg="";
|
||||
|
||||
if(status === "convertFailed"){
|
||||
msg = "We were not able to import this file. Please use a different document format or copy paste manually";
|
||||
} else if(status === "uploadFailed"){
|
||||
msg = "The upload failed, please try again";
|
||||
}
|
||||
|
||||
function showError(fade)
|
||||
{
|
||||
$('#importmessagefail').html('<strong style="color: red">Import failed:</strong> ' + (msg || 'Please try a different file.'))[(fade ? "fadeIn" : "show")]();
|
||||
$('#importmessagefail').html('<strong style="color: red">Import failed:</strong> ' + (msg || 'Please copy paste'))[(fade ? "fadeIn" : "show")]();
|
||||
}
|
||||
|
||||
if ($('#importexport .importmessage').is(':visible'))
|
||||
|
@ -175,39 +177,6 @@ var padimpexp = (function()
|
|||
importDone();
|
||||
}
|
||||
|
||||
function importApplicationSuccessful(data, textStatus)
|
||||
{
|
||||
if (data.substr(0, 2) == "ok")
|
||||
{
|
||||
if ($('#importexport .importmessage').is(':visible'))
|
||||
{
|
||||
$('#importexport .importmessage').hide();
|
||||
}
|
||||
$('#importmessagesuccess').html('<strong style="color: green">Import successful!</strong>').show();
|
||||
$('#importformfilediv').hide();
|
||||
window.setTimeout(function()
|
||||
{
|
||||
$('#importmessagesuccess').fadeOut("slow", function()
|
||||
{
|
||||
$('#importformfilediv').show();
|
||||
});
|
||||
if (hidePanelCall)
|
||||
{
|
||||
hidePanelCall();
|
||||
}
|
||||
}, 3000);
|
||||
}
|
||||
else if (data.substr(0, 4) == "fail")
|
||||
{
|
||||
importErrorMessage("Couldn't update pad contents. This can happen if your web browser has \"cookies\" disabled.");
|
||||
}
|
||||
else if (data.substr(0, 4) == "msg:")
|
||||
{
|
||||
importErrorMessage(data.substr(4));
|
||||
}
|
||||
importDone();
|
||||
}
|
||||
|
||||
///// export
|
||||
|
||||
function cantExport()
|
||||
|
@ -257,8 +226,7 @@ var padimpexp = (function()
|
|||
$("#exportworda").remove();
|
||||
$("#exportpdfa").remove();
|
||||
$("#exportopena").remove();
|
||||
$("#importexport").css({"height":"115px"});
|
||||
$("#importexportline").css({"height":"115px"});
|
||||
$(".importformdiv").remove();
|
||||
$("#import").html("Import is not available. To enable import please install abiword");
|
||||
}
|
||||
else if(clientVars.abiwordAvailable == "withoutPDF")
|
||||
|
@ -292,16 +260,14 @@ var padimpexp = (function()
|
|||
$('#importform').submit(fileInputSubmit);
|
||||
$('.disabledexport').click(cantExport);
|
||||
},
|
||||
handleFrameCall: function(callName, argsArray)
|
||||
handleFrameCall: function(status)
|
||||
{
|
||||
if (callName == 'importFailed')
|
||||
if (status !== "ok")
|
||||
{
|
||||
importFailed(argsArray[0]);
|
||||
}
|
||||
else if (callName == 'importSuccessful')
|
||||
{
|
||||
importSuccessful(argsArray[0]);
|
||||
importFailed(status);
|
||||
}
|
||||
|
||||
importDone();
|
||||
},
|
||||
disable: function()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue