1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-14 06:04:25 +00:00
gitea/web_src/js/features/common-organization.js

18 lines
531 B
JavaScript
Raw Normal View History

import $ from 'jquery';
import {initCompLabelEdit} from './comp/LabelEdit.js';
import {toggleElem} from '../utils/dom.js';
export function initCommonOrganization() {
if ($('.organization').length === 0) {
return;
}
$('.organization.settings.options #org_name').on('input', function () {
const nameChanged = $(this).val().toLowerCase() !== $(this).attr('data-org-name').toLowerCase();
toggleElem('#org-name-change-prompt', nameChanged);
});
// Labels
initCompLabelEdit('.organization.settings.labels');
}