File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
- import $ from 'jquery' ;
2
1
import { initCompLabelEdit } from './comp/LabelEdit.js' ;
3
2
import { toggleElem } from '../utils/dom.js' ;
4
3
5
4
export function initCommonOrganization ( ) {
6
- if ( $ ( '.organization' ) . length === 0 ) {
5
+ if ( ! document . querySelectorAll ( '.organization' ) . length ) {
7
6
return ;
8
7
}
9
8
10
- $ ( '.organization.settings.options #org_name' ) . on ( 'input' , function ( ) {
11
- const nameChanged = $ ( this ) . val ( ) . toLowerCase ( ) !== $ ( this ) . attr ( 'data-org-name' ) . toLowerCase ( ) ;
9
+ const orgNameInput = document . querySelector ( '.organization.settings.options #org_name' ) ;
10
+ if ( ! orgNameInput ) return ;
11
+ orgNameInput . addEventListener ( 'input' , function ( ) {
12
+ const nameChanged = this . value . toLowerCase ( ) !== this . getAttribute ( 'data-org-name' ) . toLowerCase ( ) ;
12
13
toggleElem ( '#org-name-change-prompt' , nameChanged ) ;
13
14
} ) ;
14
15
You can’t perform that action at this time.
0 commit comments