Issue #2960 - deactivate settings.json

Deactivate settings.json in Admin dashboard
This commit is contained in:
LokeshN 2016-05-22 20:58:51 +05:30
parent c5638dd7e5
commit a8d5dc0693
6 changed files with 35 additions and 2 deletions

View file

@ -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);

View file

@ -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");