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

[dynamic_extended_choice_parameter] Extract inline script block in com/moded/extendedchoiceparameter/ExtendedChoiceParameterDefinition/radioContent.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 25
      ----
      <script>
      <![CDATA[  
        		(function() {
        			var f = function() {
      	  			var height = 0;
      	  			var maxCount = ${index};
      	  			if(maxCount > ${it.visibleItemCount}) {
      	  				maxCount = ${it.visibleItemCount};
      	  			}
      	  			
      	  			if(maxCount > 0 && document.getElementById("ecp_${it.name}_0").offsetHeight !=0) {
      		  			for(var i=0; i< maxCount; i++) {
      		  				height += document.getElementById("ecp_${it.name}_" + i).offsetHeight + 3;
      		  			}
      		  		}
      	  			else {
      	  				height = maxCount * 25.5;
      	  			}
      	  			height = Math.floor(height);
      	  			document.getElementById("ecp_${it.name}").style.height = height + "px";
      	  		};
      	  		
      	  		f();
        		})();
      ]]>  		
        </script>
      ----
      

      Solution

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

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

              Created:
              Updated: