@@ -977,46 +977,46 @@ window.ConfigurationsView = countlyView.extend({
977
977
}
978
978
else {
979
979
var input = this . getInputByType ( ( id + "." + i ) . substring ( 1 ) , "" ) ;
980
- label = this . getInputLabel ( ( id + "." + i ) . substring ( 1 ) , i ) ;
981
- if ( input && label ) {
982
- configsHTML += "<tr id='config-row-" + i + "-" + id . replace ( "." , "" ) + "' class='config-table-details-row'><td>" + label + "</td><td>" + input + "</td></tr>" ;
980
+ var detailsLabel = this . getInputLabel ( ( id + "." + i ) . substring ( 1 ) , i ) ;
981
+ if ( input && detailsLabel ) {
982
+ configsHTML += "<tr id='config-row-" + i + "-" + id . replace ( "." , "" ) + "' class='config-table-details-row'><td>" + detailsLabel + "</td><td>" + input + "</td></tr>" ;
983
983
}
984
984
}
985
985
}
986
986
else if ( i === "_user" ) {
987
987
var hasSelectedData = Object . keys ( configsData [ i ] ) . some ( function ( key ) { // eslint-disable-line no-loop-func
988
988
return configsData [ i ] [ key ] ;
989
989
} ) ;
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
+ var userLevelLabel = '<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>' ;
991
991
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;">' ;
993
- input += '<div class="select-inner">' ;
994
- input += '<div class="text-container">' ;
995
- input += '<div class="text">' ;
996
- input += '<div class="default-text"></div>' ;
992
+ var userLevelInput = '<div class="cly-multi-select user-config-select ' + ( hasSelectedData ? 'selection-exists' : '' ) + '" id="' + id . substring ( 1 ) + '._user" style="width: 100%; box-sizing: border-box;">' ;
993
+ userLevelInput += '<div class="select-inner">' ;
994
+ userLevelInput += '<div class="text-container">' ;
995
+ userLevelInput += '<div class="text">' ;
996
+ userLevelInput += '<div class="default-text"></div>' ;
997
997
for ( var c in configsData [ i ] ) {
998
998
if ( configsData [ i ] [ c ] ) {
999
- input += '<div class="selection" data-value="' + c + '">' + this . getLabelName ( ( id + "." + c ) . substring ( 1 ) , c ) . text + '<div class="remove"><i class="ion-android-close"></i></div></div>' ;
999
+ userLevelInput += '<div class="selection" data-value="' + c + '">' + this . getLabelName ( ( id + "." + c ) . substring ( 1 ) , c ) . text + '<div class="remove"><i class="ion-android-close"></i></div></div>' ;
1000
1000
}
1001
1001
}
1002
- input += '</div>' ;
1003
- input += '</div>' ;
1004
- input += '<div class="right combo"></div>' ;
1005
- input += '</div>' ;
1006
- input += '<div class="select-items square" style="width: 100%;"><div>' ;
1002
+ userLevelInput += '</div>' ;
1003
+ userLevelInput += '</div>' ;
1004
+ userLevelInput += '<div class="right combo"></div>' ;
1005
+ userLevelInput += '</div>' ;
1006
+ userLevelInput += '<div class="select-items square" style="width: 100%;"><div>' ;
1007
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
+ userLevelInput += '<div data-value="' + d + '" class="item ' + ( configsData [ i ] [ d ] ? 'selected' : '' ) + '">' + this . getLabelName ( ( id + "." + d ) . substring ( 1 ) , d ) . text + '</div>' ;
1009
1009
}
1010
- input += '</div></div>' ;
1011
- input += '</div>' ;
1010
+ userLevelInput += '</div></div>' ;
1011
+ userLevelInput += '</div>' ;
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
+ configsHTML += "<tr id='config-row-" + i + "-user-conf' class='config-table-details-row user-row' style='display:none'><td>" + userLevelLabel + "</td><td>" + userLevelInput + "</td></tr>" ;
1014
1014
}
1015
1015
else {
1016
- input = this . getInputByType ( ( id + "." + i ) . substring ( 1 ) , configsData [ i ] ) ;
1017
- label = this . getInputLabel ( ( id + "." + i ) . substring ( 1 ) , i ) ;
1018
- if ( input && label ) {
1019
- configsHTML += "<tr id='config-row-" + i + "-" + id . replace ( "." , "" ) + "' class='config-table-details-row'><td>" + label + "</td><td>" + input + "</td></tr>" ;
1016
+ var inputElse = this . getInputByType ( ( id + "." + i ) . substring ( 1 ) , configsData [ i ] ) ;
1017
+ var labelElse = this . getInputLabel ( ( id + "." + i ) . substring ( 1 ) , i ) ;
1018
+ if ( inputElse && labelElse ) {
1019
+ configsHTML += "<tr id='config-row-" + i + "-" + id . replace ( "." , "" ) + "' class='config-table-details-row'><td>" + labelElse + "</td><td>" + inputElse + "</td></tr>" ;
1020
1020
}
1021
1021
}
1022
1022
}
@@ -1360,13 +1360,13 @@ app.addPageScript("/manage/plugins", function() {
1360
1360
} ) ;
1361
1361
1362
1362
$ ( document ) . on ( "click" , ".btn-plugin-enabler" , function ( ) {
1363
- plugins = { } ;
1363
+ var pluginsEnabler = { } ;
1364
1364
1365
1365
$ ( "#plugins-table" ) . find ( ".on-off-switch input" ) . each ( function ( ) {
1366
1366
var plugin = this . id . toString ( ) . replace ( / ^ p l u g i n - / , '' ) ,
1367
1367
state = ( $ ( this ) . is ( ":checked" ) ) ? true : false ;
1368
1368
1369
- plugins [ plugin ] = state ;
1369
+ pluginsEnabler [ plugin ] = state ;
1370
1370
} ) ;
1371
1371
1372
1372
var text = jQuery . i18n . map [ "plugins.confirm" ] ;
@@ -1376,7 +1376,7 @@ app.addPageScript("/manage/plugins", function() {
1376
1376
return true ;
1377
1377
}
1378
1378
CountlyHelpers . notify ( msg ) ;
1379
- app . activeView . togglePlugin ( plugins ) ;
1379
+ app . activeView . togglePlugin ( pluginsEnabler ) ;
1380
1380
} , [ jQuery . i18n . map [ "common.no-dont-continue" ] , jQuery . i18n . map [ "plugins.yes-i-want-to-apply-changes" ] ] , { title : jQuery . i18n . map [ "plugins-apply-changes-to-plugins" ] , image : "apply-changes-to-plugins" } ) ;
1381
1381
} ) ;
1382
1382
} ) ;
0 commit comments