Merge pull request #579 from b1rdhous3/master

Renaming versionBranch, JSONEditor Enchancements and Chang Readme.md
This commit is contained in:
Paulchen Panther
2019-07-19 17:44:19 +02:00
committed by GitHub
12 changed files with 33 additions and 20 deletions

View File

@@ -78,7 +78,7 @@ $(document).ready( function() {
$('#dash_currv').html(window.currentChannel+' '+window.currentVersion);
$('#dash_instance').html(window.serverConfig.general.name);
$('#dash_ports').html(window.serverConfig.flatbufServer.port+' | '+window.serverConfig.protoServer.port);
$('#dash_versionbranch').html(window.serverConfig.general.versionBranch);
$('#dash_watchedversionbranch').html(window.serverConfig.general.watchedVersionBranch);
getReleases(function(callback){
if(callback)

View File

@@ -1540,8 +1540,13 @@ JSONEditor.AbstractEditor = Class.extend({
var storedAccess = this.access
if(this.schema.access){
if(this.schema.access == 'system')
this.container.style.display = "none";
else if(this.schema.access == 'expert' && storedAccess != 'expert'){
this.container.style.display = "none";
else if(this.schema.access == 'advanced' && storedAccess == 'default')
{
this.container.style.display = "none";
}
else if(this.schema.access == 'expert' && storedAccess != 'expert')
{
this.container.style.display = "none";
//this.disable();
}

View File

@@ -593,6 +593,8 @@ function createHelpTable(list, phead){
// break one iteration (in the loop), if the schema has the entry hidden=true
if ("options" in list[key] && "hidden" in list[key].options && (list[key].options.hidden))
continue;
if ("access" in list[key] && ((list[key].access == "advanced" && storedAccess == "default") || (list[key].access == "expert" && storedAccess != "expert")))
continue;
var text = list[key].title.replace('title', 'expl');
tbody.appendChild(createTableRow([$.i18n(list[key].title), $.i18n(text)], false, false));
@@ -604,6 +606,8 @@ function createHelpTable(list, phead){
// break one iteration (in the loop), if the schema has the entry hidden=true
if ("options" in ilist[ikey] && "hidden" in ilist[ikey].options && (ilist[ikey].options.hidden))
continue;
if ("access" in ilist[ikey] && ((ilist[ikey].access == "advanced" && storedAccess == "default") || (ilist[ikey].access == "expert" && storedAccess != "expert")))
continue;
var itext = ilist[ikey].title.replace('title', 'expl');
tbody.appendChild(createTableRow([$.i18n(ilist[ikey].title), $.i18n(itext)], false, false));
}
@@ -743,7 +747,7 @@ function getReleases(callback)
{
window.latestStableVersion = latest;
if(window.serverConfig.general.versionBranch == "Beta" && window.latestStableVersion.tag_name.replace(/\./g, '') <= window.latestBetaVersion.tag_name.replace(/\./g, ''))
if(window.serverConfig.general.watchedVersionBranch == "Beta" && window.latestStableVersion.tag_name.replace(/\./g, '') <= window.latestBetaVersion.tag_name.replace(/\./g, ''))
{
window.latestVersion = window.latestBetaVersion;
}