-
Task
-
Resolution: Unresolved
-
Minor
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
[JENKINS-74104] [dynamic_extended_choice_parameter] Extract inline script block in com/moded/extendedchoiceparameter/ExtendedChoiceParameterDefinition/checkboxContent.jelly
Description |
Original:
h4. Problems {noformat} == 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> ---- == 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> ---- {noformat} h4. Solution [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks] |
New:
h4. Problem {noformat} == 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> ---- {noformat} h4. Solution [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks] |
Summary | Original: [dynamic_extended_choice_parameter] Extract inline script blocks in com/moded/extendedchoiceparameter/ExtendedChoiceParameterDefinition/checkboxContent.jelly | New: [dynamic_extended_choice_parameter] Extract inline script block in com/moded/extendedchoiceparameter/ExtendedChoiceParameterDefinition/checkboxContent.jelly |
Assignee | New: Yaroslav Afenkin [ yafenkin ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: Open [ 1 ] |