mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-15 13:09:38 +02:00
Style new code like old
This commit is contained in:
parent
21ba4f3394
commit
fd77f8401c
1 changed files with 7 additions and 25 deletions
|
@ -973,27 +973,13 @@ function makeTable(setting, keypath, setting_value, isLocked) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isArray && col.type === "checkbox" && col.editable) {
|
if (isArray && col.type === "checkbox" && col.editable) {
|
||||||
|
|
||||||
html += "<td class='" + Settings.DATA_COL_CLASS + "'name='" + col.name + "'>"
|
html += "<td class='" + Settings.DATA_COL_CLASS + "'name='" + col.name + "'>"
|
||||||
html += "<input type='checkbox' "
|
+ "<input type='checkbox' class='form-control toggle-checkbox table-checkbox' "
|
||||||
html += "class='form-control toggle-checkbox table-checkbox' "
|
+ "name='" + colName + "'" + (colValue ? " checked" : "") + " /></td>";
|
||||||
html += "name='" + colName + "'"
|
|
||||||
html += (colValue ? " checked" : "")
|
|
||||||
html += " />"
|
|
||||||
html += "</td>"
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
// Use a hidden input so that the values are posted.
|
||||||
// setup the td for this column
|
html += "<td class='" + Settings.DATA_COL_CLASS + "' name='" + colName + "'>"
|
||||||
html += "<td class='" + Settings.DATA_COL_CLASS + "' name='" + colName + "'>";
|
+ colValue + "<input type='hidden' name='" + colName + "' value='" + colValue + "'/></td>";
|
||||||
|
|
||||||
// add the actual value to the td so it is displayed
|
|
||||||
html += colValue;
|
|
||||||
|
|
||||||
// for values to be posted properly we add a hidden input to this td
|
|
||||||
html += "<input type='hidden' name='" + colName + "' value='" + colValue + "'/>";
|
|
||||||
|
|
||||||
html += "</td>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -1039,12 +1025,8 @@ function makeTableInputs(setting) {
|
||||||
_.each(setting.columns, function(col) {
|
_.each(setting.columns, function(col) {
|
||||||
if (col.type === "checkbox") {
|
if (col.type === "checkbox") {
|
||||||
html += "<td class='" + Settings.DATA_COL_CLASS + "'name='" + col.name + "'>"
|
html += "<td class='" + Settings.DATA_COL_CLASS + "'name='" + col.name + "'>"
|
||||||
html += "<input type='checkbox' "
|
+ "<input type='checkbox' class='form-control toggle-checkbox' name='" + col.name + "'"
|
||||||
html += "class='form-control toggle-checkbox' "
|
+ (col.default ? " checked" : "") + "/></td>";
|
||||||
html += "name='" + col.name + "'"
|
|
||||||
html += (col.default ? " checked" : "")
|
|
||||||
html += "/>"
|
|
||||||
html += "</td>"
|
|
||||||
} else {
|
} else {
|
||||||
html += "<td class='" + Settings.DATA_COL_CLASS + "'name='" + col.name + "'>\
|
html += "<td class='" + Settings.DATA_COL_CLASS + "'name='" + col.name + "'>\
|
||||||
<input type='text' class='form-control' placeholder='" + (col.placeholder ? col.placeholder : "") + "'\
|
<input type='text' class='form-control' placeholder='" + (col.placeholder ? col.placeholder : "") + "'\
|
||||||
|
|
Loading…
Reference in a new issue