Staging v1.0.10#143
Conversation
Signed-off-by: Dmitry Nikolaev <dnikolaev@rocketsoftware.com>
Enforce UTC timestamps (regression affecting Windows)
Signed-off-by: Dmitry Nikolaev <dnikolaev@rocketsoftware.com>
Doc update v1.0.10
| var minVisibleOffset = $(window).scrollTop(); | ||
| var tocHeight = parseInt($sideToc.height()) + parseInt($sideToc.css("padding-top")) + parseInt($sideToc.css("padding-bottom")) + parseInt($sideToc.css("margin-top")) + parseInt($sideToc.css("margin-bottom")); | ||
| var tocWidth = parseInt($sideTocID.outerWidth()) - parseInt($sideTocID.css("padding-left")) - parseInt($sideTocID.css("padding-right")); | ||
| var tocXNav = parseInt($slideSection.offset().left) - tocWidth; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note documentation
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 months ago
To fix the issue, the unused variable tocXNav should be removed from the code. This involves deleting its declaration and initialization on line 374. No other changes are necessary, as the variable is not used elsewhere in the function or the provided code snippet.
| @@ -373,3 +373,3 @@ | ||
| var tocWidth = parseInt($sideTocID.outerWidth()) - parseInt($sideTocID.css("padding-left")) - parseInt($sideTocID.css("padding-right")); | ||
| var tocXNav = parseInt($slideSection.offset().left) - tocWidth; | ||
|
|
||
|
|
| $('.wh_content_area').css('min-height', cHeight+'px'); | ||
| $sideToc.css("top", topOffset + "px").css("width", tocWidth + "px").css("position", "fixed").css("z-index", "997").css("overflow-y", "auto").css("overflow-x", "hidden"); | ||
| if(visibleAreaHeight + topOffset > $(".wh_footer").offset().top) { | ||
| $sideToc.css("max-height", $(".wh_footer").offset().top - topOffset - parseInt($(".wh_footer").css("margin-top"))) |
Check notice
Code scanning / CodeQL
Semicolon insertion Note documentation
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 months ago
To fix the issue, we will explicitly add a semicolon at the end of the flagged line (line 399). This change ensures consistency with the rest of the function and eliminates reliance on JavaScript's automated semicolon insertion. No additional changes or dependencies are required.
| @@ -398,3 +398,3 @@ | ||
| if(visibleAreaHeight + topOffset > $(".wh_footer").offset().top) { | ||
| $sideToc.css("max-height", $(".wh_footer").offset().top - topOffset - parseInt($(".wh_footer").css("margin-top"))) | ||
| $sideToc.css("max-height", $(".wh_footer").offset().top - topOffset - parseInt($(".wh_footer").css("margin-top"))); | ||
| } else { |
| $sideToc.css("top", topOffset + "px"); | ||
| } | ||
| if(visibleAreaHeight + topOffset > $(".wh_footer").offset().top) { | ||
| $sideToc.css("max-height", $(".wh_footer").offset().top - topOffset - parseInt($(".wh_footer").css("margin-top"))) |
Check notice
Code scanning / CodeQL
Semicolon insertion Note documentation
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 months ago
To fix the issue, we will explicitly add a semicolon at the end of the flagged line to ensure consistency with the rest of the code and to avoid relying on JavaScript's automatic semicolon insertion. This change will not alter the functionality of the code but will improve its readability and maintainability.
| @@ -417,3 +417,3 @@ | ||
| if(visibleAreaHeight + topOffset > $(".wh_footer").offset().top) { | ||
| $sideToc.css("max-height", $(".wh_footer").offset().top - topOffset - parseInt($(".wh_footer").css("margin-top"))) | ||
| $sideToc.css("max-height", $(".wh_footer").offset().top - topOffset - parseInt($(".wh_footer").css("margin-top"))); | ||
| } else { |
| return false; | ||
| } | ||
|
|
||
| function clearHighlights() { |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note documentation
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 months ago
To fix the issue, the unused function clearHighlights should be removed from the code. This involves deleting its definition entirely, including the function signature and body. This change will improve code clarity and eliminate unnecessary elements.
| @@ -127,5 +127,3 @@ | ||
|
|
||
| function clearHighlights() { | ||
|
|
||
| } | ||
|
|
|
|
||
| var wh_mobile = | ||
| (typeof whDistribution != 'undefined') && whDistribution == 'wh-mobile'; | ||
| var wh_Classic = |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note documentation
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 months ago
To fix the issue, the unused variable wh_Classic should be removed from the code. This involves deleting its declaration on line 319 and ensuring that no other parts of the code depend on it. Since the variable is not used anywhere in the provided snippet, this change will not affect the functionality of the code.
| @@ -318,4 +318,3 @@ | ||
| (typeof whDistribution != 'undefined') && whDistribution == 'wh-mobile'; | ||
| var wh_Classic = | ||
| (typeof whDistribution != 'undefined') && whDistribution == 'wh-classic'; | ||
|
|
||
|
|
| */ | ||
| function computeHTMLResult(whDistribution, pageNumber, totalPageNumber, itemsPerPage) { | ||
| // Empty jQuery element | ||
| var results = $(); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note documentation
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 months ago
To fix the problem, the unused variable results should be removed from the code. This involves deleting its declaration on line 411. No other changes are necessary, as the variable is not used elsewhere in the code.
| @@ -410,4 +410,2 @@ | ||
| // Empty jQuery element | ||
| var results = $(); | ||
|
|
||
| var $wh_search_results_items = $(); |
|
|
||
| function computeSearchItemHTML(searchItem, whDistribution, hasSimilarPages, similarPageID) { | ||
| // New empty jQuery element | ||
| var htmlResult = $(); |
Check warning
Code scanning / CodeQL
Useless assignment to local variable Warning documentation
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 11 months ago
To fix the issue, the unnecessary initialization of htmlResult on line 534 should be removed. This will eliminate the "useless assignment to local variable" error while preserving the functionality of the code. The variable htmlResult can be declared without assigning it a value initially, as it is overwritten later in the function.
| @@ -533,3 +533,3 @@ | ||
| // New empty jQuery element | ||
| var htmlResult = $(); | ||
| var htmlResult; | ||
|
|
No description provided.