mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 09:56:15 -04:00
Issue #2960 - deactivate settings.json
Deactivate settings.json in Admin dashboard
This commit is contained in:
parent
c5638dd7e5
commit
a8d5dc0693
6 changed files with 35 additions and 2 deletions
|
@ -38,6 +38,12 @@ div.innerwrapper {
|
|||
padding-left: 265px;
|
||||
}
|
||||
|
||||
div.innerwrapper-err {
|
||||
padding: 15px;
|
||||
padding-left: 265px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
background: none repeat scroll 0px 0px #FFFFFF;
|
||||
box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.2);
|
||||
|
|
|
@ -14,12 +14,20 @@ $(document).ready(function () {
|
|||
|
||||
socket.on('settings', function (settings) {
|
||||
|
||||
/* Check whether the settings.json is authorized to be viewed */
|
||||
if(settings.results === 'NOT_ALLOWED') {
|
||||
$('.innerwrapper').hide();
|
||||
$('.innerwrapper-err').show();
|
||||
$('.err-message').html("Settings json is not authorized to be viewed in Admin page!!");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check to make sure the JSON is clean before proceeding */
|
||||
if(isJSONClean(settings.results))
|
||||
{
|
||||
$('.settings').append(settings.results);
|
||||
$('.settings').focus();
|
||||
$('.settings').autosize();
|
||||
$('.settings').autosize();
|
||||
}
|
||||
else{
|
||||
alert("YOUR JSON IS BAD AND YOU SHOULD FEEL BAD");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue