Dont use jquery in import handler (#4153)

I think jQ3 update broke imports a bit, so this removes jQuery and also ensures only .etherpad does reload of page.
pull/4154/head
John McLear 2020-07-08 14:50:48 +01:00 committed by GitHub
parent 27c56109c7
commit a3386e3e55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 10 deletions

View File

@ -286,15 +286,6 @@ exports.doImport = function (req, res, padId)
} }
}).then(() => { }).then(() => {
// close the connection // close the connection
res.send( res.send("<script>document.addEventListener('DOMContentLoaded', function(){ var impexp = window.parent.padimpexp.handleFrameCall('" + req.directDatabaseAccess +"', '" + status + "'); })</script>");
"<head> \
<script type='text/javascript' src='../../static/js/jquery.js'></script> \
</head> \
<script> \
$(window).load(function(){ \
var impexp = window.parent.padimpexp.handleFrameCall('" + req.directDatabaseAccess +"', '" + status + "'); \
}) \
</script>"
);
}); });
} }

View File

@ -244,6 +244,7 @@ var padimpexp = (function()
}, },
handleFrameCall: function(directDatabaseAccess, status) handleFrameCall: function(directDatabaseAccess, status)
{ {
if(directDatabaseAccess === "undefined") directDatabaseAccess = false;
if (status !== "ok") if (status !== "ok")
{ {
importFailed(status); importFailed(status);