Notify user if cookies can't be created

This commit is contained in:
Gared 2014-12-28 15:02:56 +01:00
parent a645aeef5c
commit 2307c6fbda
4 changed files with 18 additions and 0 deletions

View file

@ -1086,6 +1086,10 @@ input[type=checkbox] {
display:none;
}
#nocookie{
display:none;
}
/* gritter stuff */
#gritter-notice-wrapper {
position:fixed;

View file

@ -442,6 +442,16 @@ var pad = {
if (typeof customStart == "function") customStart();
getParams();
handshake();
// To use etherpad you have to allow cookies.
// This will check if the creation of a test-cookie has success.
// Otherwise it shows up a message to the user.
createCookie("test", "test");
if (!readCookie("test"))
{
$('#loading').hide();
$('#nocookie').show();
}
});
},
_afterHandshake: function()