Add missing variable declarations
This fixes warnings from LGTM:
Variable i is used like a local variable,
but is missing a declaration.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
4
templates/Sparkle/assets/js/customers.js
vendored
4
templates/Sparkle/assets/js/customers.js
vendored
@@ -30,7 +30,7 @@ $(document).ready(function() {
|
|||||||
},
|
},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
for (i in json) {
|
for (var i in json) {
|
||||||
if (i == 'email_imap' || i == 'email_pop3' || i == 'perlenabled' || i == 'phpenabled' || i == 'dnsenabled') {
|
if (i == 'email_imap' || i == 'email_pop3' || i == 'perlenabled' || i == 'phpenabled' || i == 'dnsenabled') {
|
||||||
/** handle checkboxes **/
|
/** handle checkboxes **/
|
||||||
if (json[i] == 1) {
|
if (json[i] == 1) {
|
||||||
@@ -42,7 +42,7 @@ $(document).ready(function() {
|
|||||||
/** handle array of values **/
|
/** handle array of values **/
|
||||||
$("input[name='allowed_phpconfigs[]']").each(function(index) {
|
$("input[name='allowed_phpconfigs[]']").each(function(index) {
|
||||||
$(this).prop('checked', false);
|
$(this).prop('checked', false);
|
||||||
for (j in json[i]) {
|
for (var j in json[i]) {
|
||||||
if ($(this).val() == json[i][j]) {
|
if ($(this).val() == json[i][j]) {
|
||||||
$(this).prop('checked', true);
|
$(this).prop('checked', true);
|
||||||
break;
|
break;
|
||||||
|
|||||||
2
templates/Sparkle/assets/js/domains.js
vendored
2
templates/Sparkle/assets/js/domains.js
vendored
@@ -35,7 +35,7 @@ $(document).ready(function() {
|
|||||||
$('#phpsettingid option').each(function() {
|
$('#phpsettingid option').each(function() {
|
||||||
var pid = $(this).val();
|
var pid = $(this).val();
|
||||||
$(this).attr("disabled", "disabled");
|
$(this).attr("disabled", "disabled");
|
||||||
for (i in json) {
|
for (var i in json) {
|
||||||
if (pid == json[i]) {
|
if (pid == json[i]) {
|
||||||
$(this).removeAttr("disabled");
|
$(this).removeAttr("disabled");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user