1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-22 09:24:21 +01:00

fix some warnings

This commit is contained in:
kakwa 2017-04-06 01:20:51 +02:00
parent 6e526b6f15
commit 3378822d2e

View File

@ -1,22 +1,23 @@
classes = ['lcform-col-1', 'lcform-col-2']; var classes = ["lcform-col-1", "lcform-col-2"];
for(var j in classes){ var j, len_j = classes.length;
for(j=0; j < len_j; j++){
var formSelector = classes[j]; var formSelector = classes[j];
var forms = document.getElementsByClassName(formSelector); var forms = document.getElementsByClassName(formSelector);
//console.log(formSelector); //console.log(formSelector);
//console.log(forms); //console.log(forms);
if (forms.length > 0){ if (forms.length > 0){
forms[0].style.removeProperty('display'); forms[0].style.removeProperty('display');
var in_groups = forms[0].getElementsByClassName('input-group-addon'); var InputGroups = forms[0].getElementsByClassName("input-group-addon");
//console.log(in_groups); //console.log(InputGroups);
var i, len = in_groups.length; var i, len = InputGroups.length;
var longest = 0; var longest = 0;
for(i=0; i < len; i++){ for(i=0; i < len; i++){
if (in_groups[i].id != 'basic-addon-password2'){ if (InputGroups[i].id !== "basic-addon-password2"){
longest = longest < in_groups[i].clientWidth ? in_groups[i].clientWidth : longest; longest = longest < InputGroups[i].clientWidth ? InputGroups[i].clientWidth : longest;
} }
} }
for(i=0; i < len; i++){ for(i=0; i < len; i++){
in_groups[i].style.minWidth = (longest + 0) + 'px'; InputGroups[i].style.minWidth = (longest + 0) + "px";
} }
//console.log(longest); //console.log(longest);
} }