File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed
core/src/main/resources/lib Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 11Behaviour . specify ( "A.post" , "link.post" , 0 , function ( element ) {
2- const pendingHref = element . getAttribute ( "data-post-href" ) ;
3- if ( pendingHref ) {
4- element . setAttribute ( "href" , pendingHref ) ;
5- element . removeAttribute ( "data-post-href" ) ;
6- }
7-
82 element . onclick = function ( ) {
9- var form = document . createElement ( "form" ) ;
3+ const url = element . getAttribute ( "data-post-href" ) || element . getAttribute ( "href" ) ;
4+ if ( ! url ) {
5+ return false ;
6+ }
7+ const form = document . createElement ( "form" ) ;
108 form . setAttribute ( "method" , "POST" ) ;
11- form . setAttribute ( "action" , element . getAttribute ( "href" ) ) ;
9+ form . setAttribute ( "action" , url ) ;
1210 crumb . appendToForm ( form ) ;
1311 document . body . appendChild ( form ) ;
1412 form . submit ( ) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2323THE SOFTWARE.
2424-->
2525<?jelly escape-by-default =' true' ?>
26- <j : jelly xmlns : j =" jelly:core" xmlns : st =" jelly:stapler" xmlns : d =" jelly:define" xmlns : l =" /lib/layout" xmlns : t =" /lib/hudson" xmlns : f =" /lib/form" xmlns : local =" local" >
26+ <j : jelly xmlns : j =" jelly:core" xmlns : st =" jelly:stapler" xmlns : d =" jelly:define" xmlns : l =" /lib/layout"
27+ xmlns : t =" /lib/hudson"
28+ xmlns : local =" local" >
2729 <st : documentation >
2830 Displays the status of executors.
2931 <st : attribute name =" computers" >
@@ -176,7 +178,7 @@ THE SOFTWARE.
176178 </j : if >
177179 <st : adjunct includes =" lib.form.link.link" />
178180 <!-- TODO improve l:link so the `a` can be changed to `l:link`. -->
179- <a class =" collapse post" data-post-href =" ${rootURL}/toggleCollapse?paneId=executors"
181+ <a class =" collapse post" href = " # " data-post-href =" ${rootURL}/toggleCollapse?paneId=executors"
180182 tooltip =" ${paneIsCollapsed ? '%Expand' : '%Collapse'}" data-tooltip-append-to-parent =" true" >
181183 <j : set var =" svgIconId" value =" ${paneIsCollapsed ? 'chevron-up' : 'chevron-down'}" />
182184 <l : icon src =" symbol-${svgIconId}" />
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ THE SOFTWARE.
6161 <j : if test =" ${attrs.id != null}" >
6262 <st : adjunct includes =" lib.form.link.link" />
6363 <!-- TODO improve l:link so the `a` can be changed to `l:link`. -->
64- <a class =" collapse post" data-post-href =" ${rootURL}/toggleCollapse?paneId=${attrs.id}"
64+ <a class =" collapse post" href = " # " data-post-href =" ${rootURL}/toggleCollapse?paneId=${attrs.id}"
6565 title =" ${paneIsCollapsed ? '%expand' : '%collapse'}" >
6666
6767 <j : set var =" svgIconId" value =" ${paneIsCollapsed ? 'chevron-up' : 'chevron-down'}" />
You can’t perform that action at this time.
0 commit comments