Merge pull request #2410 from Gared/feature/notify-user-cookies-rejected
Notify user if cookies can't be createdpull/2420/head
commit
5df638bfac
|
@ -24,6 +24,7 @@
|
||||||
"pad.colorpicker.cancel": "Cancel",
|
"pad.colorpicker.cancel": "Cancel",
|
||||||
|
|
||||||
"pad.loading": "Loading...",
|
"pad.loading": "Loading...",
|
||||||
|
"pad.noCookie": "Cookie could not be found. Please allow cookies in your browser!",
|
||||||
"pad.passwordRequired": "You need a password to access this pad",
|
"pad.passwordRequired": "You need a password to access this pad",
|
||||||
"pad.permissionDenied": "You do not have permission to access this pad",
|
"pad.permissionDenied": "You do not have permission to access this pad",
|
||||||
"pad.wrongPassword": "Your password was wrong",
|
"pad.wrongPassword": "Your password was wrong",
|
||||||
|
|
|
@ -1086,6 +1086,10 @@ input[type=checkbox] {
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#noCookie{
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
/* gritter stuff */
|
/* gritter stuff */
|
||||||
#gritter-notice-wrapper {
|
#gritter-notice-wrapper {
|
||||||
position:fixed;
|
position:fixed;
|
||||||
|
|
|
@ -472,6 +472,16 @@ var pad = {
|
||||||
if (typeof customStart == "function") customStart();
|
if (typeof customStart == "function") customStart();
|
||||||
getParams();
|
getParams();
|
||||||
handshake();
|
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()
|
_afterHandshake: function()
|
||||||
|
|
|
@ -114,6 +114,9 @@
|
||||||
<div id="wrongPassword">
|
<div id="wrongPassword">
|
||||||
<p data-l10n-id="pad.wrongPassword">Your password was wrong</p>
|
<p data-l10n-id="pad.wrongPassword">Your password was wrong</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="noCookie">
|
||||||
|
<p data-l10n-id="pad.noCookie">Cookie could not be found. Please allow cookies in your browser!</p>
|
||||||
|
</div>
|
||||||
<% e.begin_block("loading"); %>
|
<% e.begin_block("loading"); %>
|
||||||
<p data-l10n-id="pad.loading" id="loading">Loading...</p>
|
<p data-l10n-id="pad.loading" id="loading">Loading...</p>
|
||||||
<% e.end_block(); %>
|
<% e.end_block(); %>
|
||||||
|
|
Loading…
Reference in New Issue