mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-22 17:34:03 +03:00
96d3a03a08
And fix a regression: https://github.com/go-gitea/gitea/pull/30053#discussion_r1874405470 Major changes: * rewrite without jquery * remove the "delete modal", using "link-action" is good enough * merge "new modal" and "edit modal"
17 lines
577 B
TypeScript
17 lines
577 B
TypeScript
import {initCompLabelEdit} from './comp/LabelEdit.ts';
|
|
import {toggleElem} from '../utils/dom.ts';
|
|
|
|
export function initCommonOrganization() {
|
|
if (!document.querySelectorAll('.organization').length) {
|
|
return;
|
|
}
|
|
|
|
document.querySelector('.organization.settings.options #org_name')?.addEventListener('input', function () {
|
|
const nameChanged = this.value.toLowerCase() !== this.getAttribute('data-org-name').toLowerCase();
|
|
toggleElem('#org-name-change-prompt', nameChanged);
|
|
});
|
|
|
|
// Labels
|
|
initCompLabelEdit('.page-content.organization.settings.labels');
|
|
}
|