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

[uno-choice] Extract inline script block in org/biouno/unochoice/common/checkboxContent.jelly

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • _unsorted

      Problem

      == Inline Script Block
      Line: 104
      ----
      <script type="text/javascript">
      <![CDATA[
        (function() {
            var f = function() {
                var height = 0;
                var maxCount = ${it.getVisibleItemCount()};
      
                var refElement = document.getElementById("ecp_${h.escape(it.randomName)}_0");
                if(maxCount > 0 && refElement && refElement.offsetHeight !=0) {
                    for(var i=0; i< maxCount; i++) {
                        height += refElement.offsetHeight + 3;
                    }
                }
                else {
                    height = maxCount * 25.5;
                }
      
                height = Math.floor(height);
                document.getElementById("ecp_${h.escape(it.randomName)}").style.height = height + "px";
            };
      
            f();
        })();
      ]]>
        </script>
      ----
      

      Solution

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

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

              Created:
              Updated:
              Resolved: