@@ -945,6 +945,7 @@ window.ConfigurationsView = countlyView.extend({
945
945
objectKeys . splice ( objectKeys . indexOf ( "default" ) , 1 ) ;
946
946
objectKeys . unshift ( 'default' ) ;
947
947
}
948
+
948
949
for ( var a in objectKeys ) {
949
950
var i = objectKeys [ a ] ;
950
951
if ( typeof configsData [ i ] === "object" && i !== "_user" ) {
@@ -954,12 +955,12 @@ window.ConfigurationsView = countlyView.extend({
954
955
var display = i === this . selectedNav . key ? this . userConfig ? "table-row" : "block" : this . userConfig ? "table-row" : "none" ;
955
956
956
957
// var category = "CORE";
957
- var relatedNav = this . navTitles . coreTitles . find ( function ( x ) {
958
+ var relatedNav = this . navTitles . coreTitles . find ( function ( x ) { // eslint-disable-line no-loop-func
958
959
return x . key === i ;
959
960
} ) ;
960
961
if ( ! relatedNav ) {
961
962
// category = "PLUGINS";
962
- relatedNav = this . navTitles . pluginTitles . find ( function ( x ) {
963
+ relatedNav = this . navTitles . pluginTitles . find ( function ( x ) { // eslint-disable-line no-loop-func
963
964
return x . key === i ;
964
965
} ) ;
965
966
}
@@ -976,19 +977,19 @@ window.ConfigurationsView = countlyView.extend({
976
977
}
977
978
else {
978
979
var input = this . getInputByType ( ( id + "." + i ) . substring ( 1 ) , "" ) ;
979
- var label = this . getInputLabel ( ( id + "." + i ) . substring ( 1 ) , i ) ;
980
+ label = this . getInputLabel ( ( id + "." + i ) . substring ( 1 ) , i ) ;
980
981
if ( input && label ) {
981
982
configsHTML += "<tr id='config-row-" + i + "-" + id . replace ( "." , "" ) + "' class='config-table-details-row'><td>" + label + "</td><td>" + input + "</td></tr>" ;
982
983
}
983
984
}
984
985
}
985
986
else if ( i === "_user" ) {
986
- var hasSelectedData = Object . keys ( configsData [ i ] ) . some ( function ( key ) {
987
+ var hasSelectedData = Object . keys ( configsData [ i ] ) . some ( function ( key ) { // eslint-disable-line no-loop-func
987
988
return configsData [ i ] [ key ] ;
988
989
} ) ;
989
- var label = '<div data-localize="' + jQuery . i18n . map [ "configs.user-level-configuration" ] + '">' + jQuery . i18n . map [ "configs.user-level-configuration" ] + '</div><span class="config-help" data-localize="' + jQuery . i18n . map [ "configs.help.user-level-configuration" ] + '">' + jQuery . i18n . map [ "configs.help.user-level-configuration" ] + '</span>' ;
990
+ label = '<div data-localize="' + jQuery . i18n . map [ "configs.user-level-configuration" ] + '">' + jQuery . i18n . map [ "configs.user-level-configuration" ] + '</div><span class="config-help" data-localize="' + jQuery . i18n . map [ "configs.help.user-level-configuration" ] + '">' + jQuery . i18n . map [ "configs.help.user-level-configuration" ] + '</span>' ;
990
991
991
- var input = '<div class="cly-multi-select user-config-select ' + ( hasSelectedData ? 'selection-exists' : '' ) + '" id="' + id . substring ( 1 ) + '._user" style="width: 100%; box-sizing: border-box;">' ;
992
+ input = '<div class="cly-multi-select user-config-select ' + ( hasSelectedData ? 'selection-exists' : '' ) + '" id="' + id . substring ( 1 ) + '._user" style="width: 100%; box-sizing: border-box;">' ;
992
993
input += '<div class="select-inner">' ;
993
994
input += '<div class="text-container">' ;
994
995
input += '<div class="text">' ;
@@ -1003,17 +1004,17 @@ window.ConfigurationsView = countlyView.extend({
1003
1004
input += '<div class="right combo"></div>' ;
1004
1005
input += '</div>' ;
1005
1006
input += '<div class="select-items square" style="width: 100%;"><div>' ;
1006
- for ( var c in configsData [ i ] ) {
1007
- input += '<div data-value="' + c + '" class="item ' + ( configsData [ i ] [ c ] ? 'selected' : '' ) + '">' + this . getLabelName ( ( id + "." + c ) . substring ( 1 ) , c ) . text + '</div>' ;
1007
+ for ( var d in configsData [ i ] ) {
1008
+ input += '<div data-value="' + d + '" class="item ' + ( configsData [ i ] [ d ] ? 'selected' : '' ) + '">' + this . getLabelName ( ( id + "." + d ) . substring ( 1 ) , d ) . text + '</div>' ;
1008
1009
}
1009
1010
input += '</div></div>' ;
1010
1011
input += '</div>' ;
1011
1012
1012
1013
configsHTML += "<tr id='config-row-" + i + "-user-conf' class='config-table-details-row user-row' style='display:none'><td>" + label + "</td><td>" + input + "</td></tr>" ;
1013
1014
}
1014
1015
else {
1015
- var input = this . getInputByType ( ( id + "." + i ) . substring ( 1 ) , configsData [ i ] ) ;
1016
- var label = this . getInputLabel ( ( id + "." + i ) . substring ( 1 ) , i ) ;
1016
+ input = this . getInputByType ( ( id + "." + i ) . substring ( 1 ) , configsData [ i ] ) ;
1017
+ label = this . getInputLabel ( ( id + "." + i ) . substring ( 1 ) , i ) ;
1017
1018
if ( input && label ) {
1018
1019
configsHTML += "<tr id='config-row-" + i + "-" + id . replace ( "." , "" ) + "' class='config-table-details-row'><td>" + label + "</td><td>" + input + "</td></tr>" ;
1019
1020
}
@@ -1241,7 +1242,7 @@ if (countlyGlobal.member.global_admin) {
1241
1242
this . onChange ( name , value ) ;
1242
1243
}
1243
1244
} ,
1244
- beforeRender : function ( ) {
1245
+ beforeRender : function ( ) { // eslint-disable-line no-loop-func
1245
1246
var self = this ;
1246
1247
if ( ! configManagementPromise ) {
1247
1248
configManagementPromise = $ . when ( countlyPlugins . initializeConfigs ( ) ) ;
0 commit comments