Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/jenkins
  Commit: dd13c42d28c5aeebc6d182739a8dc646a06b8368
      
https://github.com/jenkinsci/jenkins/commit/dd13c42d28c5aeebc6d182739a8dc646a06b8368
  Author: Wadeck Follonier <wad...@users.noreply.github.com>
  Date:   2019-03-09 (Sat, 09 Mar 2019)

  Changed paths:
    M 
core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js

  Log Message:
  -----------
  Correct small JS bug

Context: 
The "Manage Legacy API Token usage" page, used for migrating the legacy API 
Token.

Problem: 
If you click on a line, the checkbox is checked and the line is highlighted. 
But if you click on the checkbox, the behavior should be the same. This is not 
the case for all the lines, except the last one.

Root cause:
In the code, I used a `var` inside a loop. Due to the JS behavior, the `var` 
are not scoped to their "block", but to their "function block". That results in 
the `onCheckChanged(checkBox)`, the checkBox change it's value, due to the 
closure, that keep the reference to a variable that is changed.

Solution:
Either using `let` instead of `var` or using the `this` that corresponds to the 
checkbox in this case.


  Commit: e50a72767d9f2a4b58746d04c12360c8554ccc45
      
https://github.com/jenkinsci/jenkins/commit/e50a72767d9f2a4b58746d04c12360c8554ccc45
  Author: Baptiste Mathus <bmat...@gmail.com>
  Date:   2019-03-20 (Wed, 20 Mar 2019)

  Changed paths:
    M 
core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/resources.js

  Log Message:
  -----------
  Merge pull request #3932 from Wadeck/SMALL_JS_BUG

Correct small JS bug


Compare: 
https://github.com/jenkinsci/jenkins/compare/1c9eb43283e7...e50a72767d9f

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to