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: Unresolved
    • Icon: Minor Minor
    • claim-plugin

      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

            Unassigned Unassigned
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: