mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 01:23:55 +02:00
Removed console logs
This commit is contained in:
parent
11b38d554f
commit
cd67c9d456
2 changed files with 7 additions and 14 deletions
|
@ -84,7 +84,7 @@ $(document).ready(function(){
|
||||||
|
|
||||||
$('#settings-form').on('click', '.add-row', function(){
|
$('#settings-form').on('click', '.add-row', function(){
|
||||||
var row = $(this).parents("tr")
|
var row = $(this).parents("tr")
|
||||||
var row-data = row.parent().children(".row-data")
|
var data = row.parent().children(".row-data")
|
||||||
|
|
||||||
// Check key spaces
|
// Check key spaces
|
||||||
var name = row.children(".key").children("input").val()
|
var name = row.children(".key").children("input").val()
|
||||||
|
@ -94,7 +94,7 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
// Check keys with the same name
|
// Check keys with the same name
|
||||||
var equals = false;
|
var equals = false;
|
||||||
_.each(row-data.children(".key"), function(element) {
|
_.each(data.children(".key"), function(element) {
|
||||||
if ($(element).text() === name) {
|
if ($(element).text() === name) {
|
||||||
equals = true
|
equals = true
|
||||||
return
|
return
|
||||||
|
@ -125,7 +125,7 @@ $(document).ready(function(){
|
||||||
|
|
||||||
_.each(row.children(), function(element) {
|
_.each(row.children(), function(element) {
|
||||||
if ($(element).hasClass("number")) { // Index row
|
if ($(element).hasClass("number")) { // Index row
|
||||||
var numbers = row-data.children(".number")
|
var numbers = data.children(".number")
|
||||||
if (numbers.length > 0) {
|
if (numbers.length > 0) {
|
||||||
$(element).html(parseInt(numbers.last().text()) + 1)
|
$(element).html(parseInt(numbers.last().text()) + 1)
|
||||||
} else {
|
} else {
|
||||||
|
@ -134,10 +134,7 @@ $(document).ready(function(){
|
||||||
} else if ($(element).hasClass("buttons")) { // Change buttons
|
} else if ($(element).hasClass("buttons")) { // Change buttons
|
||||||
var prevSpan = $(element).parent().prev().children(".buttons").children("span")
|
var prevSpan = $(element).parent().prev().children(".buttons").children("span")
|
||||||
var span = $(element).children("span")
|
var span = $(element).children("span")
|
||||||
console.log(prevSpan.length)
|
|
||||||
console.log(span.length)
|
|
||||||
if (prevSpan.hasClass("del-row")) {
|
if (prevSpan.hasClass("del-row")) {
|
||||||
console.log("Switching icons")
|
|
||||||
span.removeClass("glyphicon-ok add-row")
|
span.removeClass("glyphicon-ok add-row")
|
||||||
span.addClass("glyphicon-remove del-row")
|
span.addClass("glyphicon-remove del-row")
|
||||||
} else {
|
} else {
|
||||||
|
@ -308,7 +305,7 @@ function makeTable(setting, setting_name, setting_value) {
|
||||||
}
|
}
|
||||||
html += "<td class='key'>" + name + "</td>"
|
html += "<td class='key'>" + name + "</td>"
|
||||||
_.each(setting.columns, function(col) {
|
_.each(setting.columns, function(col) {
|
||||||
html += "<td class='data'>"
|
html += "<td class='row-data'>"
|
||||||
if (row.hasOwnProperty(col.name)) {
|
if (row.hasOwnProperty(col.name)) {
|
||||||
html += row[col.name]
|
html += row[col.name]
|
||||||
}
|
}
|
||||||
|
@ -343,7 +340,7 @@ function makeTableInputs(setting) {
|
||||||
<input type='text' class='form-control' placeholder='" + setting.key.placeholder + "' value=''>\
|
<input type='text' class='form-control' placeholder='" + setting.key.placeholder + "' value=''>\
|
||||||
</td>"
|
</td>"
|
||||||
_.each(setting.columns, function(col) {
|
_.each(setting.columns, function(col) {
|
||||||
html += "<td class='data'name='" + col.name + "'>\
|
html += "<td class='row-data'name='" + col.name + "'>\
|
||||||
<input type='text' class='form-control' placeholder='" + col.placeholder + "' value=''>\
|
<input type='text' class='form-control' placeholder='" + col.placeholder + "' value=''>\
|
||||||
</td>"
|
</td>"
|
||||||
})
|
})
|
||||||
|
|
|
@ -279,9 +279,7 @@ void DomainServerSettingsManager::updateSetting(const QString& key, const QJsonV
|
||||||
|
|
||||||
QVariantMap& thisMap = *reinterpret_cast<QVariantMap*>(settingMap[key].data());
|
QVariantMap& thisMap = *reinterpret_cast<QVariantMap*>(settingMap[key].data());
|
||||||
foreach(const QString childKey, newValue.toObject().keys()) {
|
foreach(const QString childKey, newValue.toObject().keys()) {
|
||||||
updateSetting(childKey, newValue.toObject()[childKey],
|
updateSetting(childKey, newValue.toObject()[childKey], thisMap, settingDescription.toObject()[key]);
|
||||||
thisMap,
|
|
||||||
settingDescription.toObject()[key]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settingMap[key].toMap().isEmpty()) {
|
if (settingMap[key].toMap().isEmpty()) {
|
||||||
|
@ -310,9 +308,7 @@ void DomainServerSettingsManager::recurseJSONObjectAndOverwriteSettings(const QJ
|
||||||
QJsonValue thisDescription;
|
QJsonValue thisDescription;
|
||||||
if (settingExists(groupKey, settingKey, descriptionArray, thisDescription)) {
|
if (settingExists(groupKey, settingKey, descriptionArray, thisDescription)) {
|
||||||
QVariantMap& thisMap = *reinterpret_cast<QVariantMap*>(settingsVariant[groupKey].data());
|
QVariantMap& thisMap = *reinterpret_cast<QVariantMap*>(settingsVariant[groupKey].data());
|
||||||
updateSetting(settingKey, settingValue,
|
updateSetting(settingKey, settingValue, thisMap, thisDescription);
|
||||||
thisMap,
|
|
||||||
thisDescription);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue