js: reinit kebab menu on content update (#77799)
gitea/gadjo/pipeline/head This commit looks good
Details
gitea/gadjo/pipeline/head This commit looks good
Details
This commit is contained in:
parent
0ba1626591
commit
e12ea98ed7
|
@ -492,11 +492,13 @@ var gadjo_js = gadjo_js || {};
|
|||
});
|
||||
}
|
||||
});
|
||||
$(function() {
|
||||
function prepare_kebab_menu() {
|
||||
$(document.querySelectorAll('.extra-actions-menu')).each(function(i, el) {
|
||||
this.setAttribute('id', 'extra-actions-menu');
|
||||
});
|
||||
$(document.querySelectorAll('.extra-actions-menu-opener')).each(function(i, el) {
|
||||
if (this.__initialized === true) return;
|
||||
this.__initialized = true;
|
||||
this.setAttribute('tabindex', 0);
|
||||
this.setAttribute('aria-label', 'Menu'); // XXX: translation
|
||||
this.setAttribute('aria-controls', 'extra-actions-menu');
|
||||
|
@ -515,7 +517,11 @@ var gadjo_js = gadjo_js || {};
|
|||
this.setAttribute('aria-expanded', $(this).is('.open'));
|
||||
});
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
prepare_kebab_menu();
|
||||
});
|
||||
$(document).on('gadjo:content-update', prepare_kebab_menu);
|
||||
$(function() {
|
||||
$(document).on('click auxclick', '.clickable-rows tr', function(event) {
|
||||
var $target = $(event.target);
|
||||
|
|
Loading…
Reference in New Issue