forked from forgejo/forgejo
Improve ellipsis buttons (#17773)
* Improve ellipsis buttons - Remove icon font usage - Add aria-expanded attribute * rename function to match Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
e595986458
commit
9450410ff7
6 changed files with 18 additions and 7 deletions
|
@ -1,9 +1,11 @@
|
|||
const {csrfToken} = window.config;
|
||||
|
||||
export function initRepoCommitButton() {
|
||||
$('.commit-button').on('click', function (e) {
|
||||
export function initRepoEllipsisButton() {
|
||||
$('.ellipsis-button').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
const expanded = $(this).attr('aria-expanded') === 'true';
|
||||
$(this).parent().find('.commit-body').toggle();
|
||||
$(this).attr('aria-expanded', String(!expanded));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue