Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-74110

[claim] Extract inline script block and event handlers in hudson/plugins/claim/AbstractClaimBuildAction/summary.jelly

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • claim-plugin
    • 585.v619f52a_a_09dc

      Problems

      == Inline Script Block
      Line: 4
      ----
      <script type="text/javascript">
              function ShowPopup(hoveritem) {
                  var hp = document.getElementById("claimHoverPopup");
                  hp.style.display = "block";
              }
      
              function HidePopup() {
                  var hp = document.getElementById("claimHoverPopup");
                  hp.style.display = "none";
                  var action = <st:bind value="${it}" />;
              }
      
              function Display(error) {
                  var reasonText = document.getElementById("errordesc");
                  var action = <st:bind value="${it}" />;
                  action.getReason(error, function(content) {
                      reasonText.textContent = content.responseObject();
                  });
              }
         </script>
      ----
      
      == Inline Event Handler
      Line: 33
      ----
      <a id="claim" href="#" onClick="ShowPopup(this); return false;">
      ----
      
      == Inline Event Handler
      Line: 47
      ----
      <a id="reassign" href="#" onClick="ShowPopup(this); return false;">
      ----
      
      == Inline Event Handler
      Line: 70
      ----
      <f:select onChange="Display(this.value);"/>
      ----
      
      == Inline Event Handler
      Line: 88
      ----
      <button type="button" name="Cancel" formNoValidate="formNoValidate" class="jenkins-button jenkins-submit-button}" onClick="HidePopup();">
      ----
      

      Solutions

      https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks
      https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers

            yafenkin Yaroslav Afenkin
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: