Skip to content

Commit 44c8ef1

Browse files
stefanhaertersvenoe
authored andcommitted
Issue #5226: Marked unused variables and fixed typos.
1 parent 7376863 commit 44c8ef1

9 files changed

Lines changed: 29 additions & 29 deletions

var/httpd/htdocs/js/Core.AJAX.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ Core.AJAX = (function (TargetNS) {
368368
// Select elements
369369
if ($Element.is('select')) {
370370
$Element.empty();
371-
$.each(DataValue, function (Index, Value) {
371+
$.each(DataValue, function (_Index, Value) {
372372
var NewOption,
373373
OptionText = Core.App.EscapeHTML(Value[1]);
374374

@@ -649,7 +649,7 @@ Core.AJAX = (function (TargetNS) {
649649
QueryString = TargetNS.SerializeForm($EventElement, Data) + SerializeData(Data);
650650

651651
if (FieldsToUpdate) {
652-
$.each(FieldsToUpdate, function (Index, Value) {
652+
$.each(FieldsToUpdate, function (_Index, Value) {
653653
ToggleAJAXLoader(Value, true);
654654
});
655655
}
@@ -659,7 +659,7 @@ Core.AJAX = (function (TargetNS) {
659659
url: URL,
660660
data: QueryString,
661661
dataType: 'json',
662-
success: function (Response, Status, XHRObject) {
662+
success: function (Response, _Status, XHRObject) {
663663
Core.App.Publish('Core.App.AjaxErrorResolved');
664664

665665
if (RedirectAfterSessionTimeOut(XHRObject)) {
@@ -680,7 +680,7 @@ Core.AJAX = (function (TargetNS) {
680680
},
681681
complete: function () {
682682
if (FieldsToUpdate) {
683-
$.each(FieldsToUpdate, function (Index, Value) {
683+
$.each(FieldsToUpdate, function (_Index, Value) {
684684
ToggleAJAXLoader(Value, false);
685685
});
686686
}
@@ -716,7 +716,7 @@ Core.AJAX = (function (TargetNS) {
716716
url: URL,
717717
data: QueryString,
718718
dataType: 'html',
719-
success: function (Response, Status, XHRObject) {
719+
success: function (Response, _Status, XHRObject) {
720720

721721
Core.App.Publish('Core.App.AjaxErrorResolved');
722722

@@ -773,7 +773,7 @@ Core.AJAX = (function (TargetNS) {
773773
url: URL,
774774
data: Data,
775775
dataType: (typeof DataType === 'undefined') ? 'json' : DataType,
776-
success: function (Response, Status, XHRObject) {
776+
success: function (Response, _Status, XHRObject) {
777777

778778
Core.App.Publish('Core.App.AjaxErrorResolved');
779779

var/httpd/htdocs/js/Core.Agent.Admin.ProcessManagement.Canvas.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Core.Agent.Admin.ProcessManagement.Canvas = (function (TargetNS) {
3838
* @memberof Core.Agent.Admin.ProcessManagement.Canvas
3939
* @member {Array}
4040
* @description
41-
* Glocal list of all process management elements (activities, ...).
41+
* Global list of all process management elements (activities, ...).
4242
*/
4343
var Elements = {},
4444
/**
@@ -77,7 +77,7 @@ Core.Agent.Admin.ProcessManagement.Canvas = (function (TargetNS) {
7777
ScreenWidth = $Element.width();
7878

7979
// Loop through available elements and find max needed width and height
80-
$.each(Core.Agent.Admin.ProcessManagement.ProcessLayout, function (Key, Value) {
80+
$.each(Core.Agent.Admin.ProcessManagement.ProcessLayout, function (_Key, Value) {
8181
var Left = parseInt(Value.left, 10),
8282
Top = parseInt(Value.top, 10);
8383

@@ -120,7 +120,7 @@ Core.Agent.Admin.ProcessManagement.Canvas = (function (TargetNS) {
120120
* @description
121121
* Show confirmation dialog to remove entity from canvas.
122122
*/
123-
function ShowRemoveEntityCanvasConfirmationDialog(EntityType, EntityName, EntityID, Callback) {
123+
function ShowRemoveEntityCanvasConfirmationDialog(EntityType, EntityName, _EntityID, Callback) {
124124
var DialogID = 'Remove' + EntityType + 'CanvasConfirmationDialog',
125125
$DialogElement = $('#Dialogs #' + DialogID);
126126

@@ -334,7 +334,7 @@ Core.Agent.Admin.ProcessManagement.Canvas = (function (TargetNS) {
334334
// Add content to the tooltip
335335
text += "<ul>";
336336
if (AssignedTransitionActions.length) {
337-
$.each(AssignedTransitionActions, function (Key, Value) {
337+
$.each(AssignedTransitionActions, function (_Key, Value) {
338338
text += "<li>" + Core.App.EscapeHTML(Core.Agent.Admin.ProcessManagement.ProcessData.TransitionAction[Value].Name) + "</li>";
339339
});
340340
}
@@ -422,11 +422,11 @@ Core.Agent.Admin.ProcessManagement.Canvas = (function (TargetNS) {
422422
// Add content to the tooltip
423423
text += "<ul>";
424424
if (ActivityDialogs) {
425-
$.each(ActivityDialogs, function (Key, Value) {
425+
$.each(ActivityDialogs, function (_Key, Value) {
426426
var Interfaces = Core.Agent.Admin.ProcessManagement.ProcessData.ActivityDialog[Value].Interface,
427427
SelectedInterface = '';
428428

429-
$.each(Interfaces, function (InterfaceKey, InterfaceValue) {
429+
$.each(Interfaces, function (_InterfaceKey, InterfaceValue) {
430430
if (SelectedInterface.length) {
431431
SelectedInterface += '/';
432432
}
@@ -740,7 +740,7 @@ Core.Agent.Admin.ProcessManagement.Canvas = (function (TargetNS) {
740740
* @name CreateTransition
741741
* @memberof Core.Agent.Admin.ProcessManagement.Canvas
742742
* @function
743-
* @returns {Boolean} Returns fale, if start activity or end activity is not defined.
743+
* @returns {Boolean} Returns false, if start activity or end activity is not defined.
744744
* @param {String} StartElement
745745
* @param {String} EndElement
746746
* @param {String} EntityID
@@ -1182,7 +1182,7 @@ Core.Agent.Admin.ProcessManagement.Canvas = (function (TargetNS) {
11821182
Path[Data.sourceId][TransitionID].ActivityEntityID = Data.targetId;
11831183
}
11841184

1185-
// set connection style to blackagain (if it was red before)
1185+
// set connection style to black again (if it was red before)
11861186
Data.connection.setPaintStyle({ strokeStyle: "#000", lineWidth: 2 });
11871187
Data.targetEndpoint.setPaintStyle({ fillStyle: "#000" });
11881188
}

var/httpd/htdocs/js/Core.Agent.DynamicFieldDBSearch.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Core.Agent.DynamicFieldDBSearch = (function(TargetNS) {
142142
InitDynamicFields();
143143

144144
// Since new process screen loads activity via an AJAX call, we need to subscribe to an event
145-
// in order to re-initalize dynamic fields. Please see bug#13146 for more information.
145+
// in order to re-initialize dynamic fields. Please see bug#13146 for more information.
146146
Core.App.Subscribe('TicketProcess.Init.FirstActivityDialog.Load', function ($ActivityDialog) {
147147
InitDynamicFields($ActivityDialog);
148148
});
@@ -239,7 +239,7 @@ Core.Agent.DynamicFieldDBSearch = (function(TargetNS) {
239239
});
240240

241241
// Hide tooltip in autocomplete field, if user already typed something to prevent the autocomplete list
242-
// to be hidden under the tooltip. (Only needed for serverside errors)
242+
// to be hidden under the tooltip. (Only needed for server-side errors)
243243
$Element.off('keyup.Validate').on('keyup.Validate', function() {
244244
Value = $Element.val();
245245
if($Element.hasClass('ServerError') && Value.length) {
@@ -491,7 +491,7 @@ Core.Agent.DynamicFieldDBSearch = (function(TargetNS) {
491491
return false;
492492
}
493493

494-
// set sufix
494+
// set suffix
495495
Suffix = '_' + IdentifierKey;
496496

497497
// remove unnecessary classes
@@ -656,7 +656,7 @@ Core.Agent.DynamicFieldDBSearch = (function(TargetNS) {
656656
$('#' + Field + 'Data').val('');
657657
}
658658
else {
659-
$.each(DataInputValueChunks, function(Index, Value) {
659+
$.each(DataInputValueChunks, function(_Index, Value) {
660660

661661
if (Value != RemoveValue) {
662662
DataInputValueNew = DataInputValueNew + Value + ',';
@@ -755,7 +755,7 @@ Core.Agent.DynamicFieldDBSearch = (function(TargetNS) {
755755

756756

757757
// restore the needed search attributes after the back button was used
758-
$('#SelectFieldList option').each(function(Key, Value) {
758+
$('#SelectFieldList option').each(function(_Key, Value) {
759759

760760
if ($('#' + $(this).text()).val()) {
761761

var/httpd/htdocs/js/Core.SystemConfiguration.Date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Core.SystemConfiguration.Date = (function (TargetNS) {
4141
TargetNS.ValueGet = function ($Object) {
4242
var Value;
4343

44-
// There are many input/select fields, but we should calcutale Date only once.
44+
// There are many input/select fields, but we should calculate Date only once.
4545
if ($Object.attr("name").endsWith("Day")) {
4646
Value = DateValueGet($Object);
4747
}

var/httpd/htdocs/js/Core.SystemConfiguration.DateTime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Core.SystemConfiguration.DateTime = (function (TargetNS) {
4141
TargetNS.ValueGet = function ($Object) {
4242
var Value;
4343

44-
// There are many input/select fields, but we should calcutale Date only once.
44+
// There are many input/select fields, but we should calculate Date only once.
4545
if ($Object.attr("name").endsWith("Day")) {
4646
Value = DateValueGet($Object);
4747
}

var/httpd/htdocs/js/Core.SystemConfiguration.VacationDays.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Core.SystemConfiguration.VacationDays = (function (TargetNS) {
4141
TargetNS.ValueGet = function ($Object) {
4242
var Value;
4343

44-
// There are many input/select fields, but we should calcutale Date only once.
44+
// There are many input/select fields, but we should calculate Date only once.
4545
if ($Object.attr("id").endsWith("Day")) {
4646
Value = VacationDaysValueGet($Object);
4747
}
@@ -57,7 +57,7 @@ Core.SystemConfiguration.VacationDays = (function (TargetNS) {
5757
* @param {jQueryObject} $Object - jquery object.
5858
* @returns {Object} - Vacation days data.
5959
* @description
60-
* This function calcutates vacation days.
60+
* This function calculates vacation days.
6161
*/
6262
function VacationDaysValueGet($Object) {
6363
var Prefix,

var/httpd/htdocs/js/Core.SystemConfiguration.VacationDaysOneTime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Core.SystemConfiguration.VacationDaysOneTime = (function (TargetNS) {
4141
TargetNS.ValueGet = function ($Object) {
4242
var Value;
4343

44-
// There are many input/select fields, but we should calcutale Date only once.
44+
// There are many input/select fields, but we should calculate Date only once.
4545
if ($Object.attr("id").endsWith("Day")) {
4646
Value = VacationDaysValueGet($Object);
4747
}
@@ -57,7 +57,7 @@ Core.SystemConfiguration.VacationDaysOneTime = (function (TargetNS) {
5757
* @param {jQueryObject} $Object - jquery object.
5858
* @returns {Object} - Vacation days data.
5959
* @description
60-
* This function calcutates vacation days.
60+
* This function calculates vacation days.
6161
*/
6262
function VacationDaysValueGet($Object) {
6363
var Prefix,

var/httpd/htdocs/js/Core.SystemConfiguration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ var Core = Core || {};
14331433
* @function
14341434
* @param {jQueryObject} $Object - jQueryObject
14351435
* @description
1436-
* Go through all items that are used for EffectiveValue calcutation,
1436+
* Go through all items that are used for EffectiveValue calculation,
14371437
* and update their IDs according to the latest changes(array position
14381438
* or renamed hash key).
14391439
*/

var/httpd/htdocs/js/Core.UI.TreeSelection.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ Core.UI.TreeSelection = (function (TargetNS) {
304304
plugins: [ 'search' ]
305305
})
306306
/*eslint-enable camelcase */
307-
.on('select_node.jstree', function (node, selected, event) {
307+
.on('select_node.jstree', function (_node, selected, event) {
308308
var $Node = $('#' + selected.node.id);
309309
if ($Node.hasClass('Disabled') || !$Node.is(':visible')) {
310310
$TreeObj.jstree('deselect_node', selected.node);
@@ -525,7 +525,7 @@ Core.UI.TreeSelection = (function (TargetNS) {
525525

526526
$FieldObj.find('option').remove();
527527

528-
$.each(Data, function(index, OptionData) {
528+
$.each(Data, function(_index, OptionData) {
529529

530530
Key = OptionData[0] || '';
531531
Value = OptionData[1] || '';
@@ -583,7 +583,7 @@ Core.UI.TreeSelection = (function (TargetNS) {
583583
return 0;
584584
});
585585

586-
$.each(SelectData, function(index, SelectedData) {
586+
$.each(SelectData, function(_index, SelectedData) {
587587
$FieldObj.append('<option value="' + SelectedData.Key + '"' + SelectedData.SelectedAttr + SelectedData.DisabledAttr + '>' + SelectedData.Value + '</option>');
588588
});
589589

0 commit comments

Comments
 (0)