@@ -6,23 +6,23 @@ function isExclusiveScopeName(name) {
6
6
}
7
7
8
8
function updateExclusiveLabelEdit ( form ) {
9
- const nameInput = $ ( `${ form } .label-name-input` ) ;
10
- const exclusiveField = $ ( `${ form } .label-exclusive-input-field` ) ;
11
- const exclusiveCheckbox = $ ( `${ form } .label-exclusive-input` ) ;
12
- const exclusiveWarning = $ ( `${ form } .label-exclusive-warning` ) ;
9
+ const $ nameInput = $ ( `${ form } .label-name-input` ) ;
10
+ const $ exclusiveField = $ ( `${ form } .label-exclusive-input-field` ) ;
11
+ const $ exclusiveCheckbox = $ ( `${ form } .label-exclusive-input` ) ;
12
+ const $ exclusiveWarning = $ ( `${ form } .label-exclusive-warning` ) ;
13
13
14
- if ( isExclusiveScopeName ( nameInput . val ( ) ) ) {
15
- exclusiveField . removeClass ( 'muted' ) ;
16
- exclusiveField . removeAttr ( 'aria-disabled' ) ;
17
- if ( exclusiveCheckbox . prop ( 'checked' ) && exclusiveCheckbox . data ( 'exclusive-warn' ) ) {
18
- exclusiveWarning . removeClass ( 'gt-hidden' ) ;
14
+ if ( isExclusiveScopeName ( $ nameInput. val ( ) ) ) {
15
+ $ exclusiveField. removeClass ( 'muted' ) ;
16
+ $ exclusiveField. removeAttr ( 'aria-disabled' ) ;
17
+ if ( $ exclusiveCheckbox. prop ( 'checked' ) && $ exclusiveCheckbox. data ( 'exclusive-warn' ) ) {
18
+ $ exclusiveWarning. removeClass ( 'gt-hidden' ) ;
19
19
} else {
20
- exclusiveWarning . addClass ( 'gt-hidden' ) ;
20
+ $ exclusiveWarning. addClass ( 'gt-hidden' ) ;
21
21
}
22
22
} else {
23
- exclusiveField . addClass ( 'muted' ) ;
24
- exclusiveField . attr ( 'aria-disabled' , 'true' ) ;
25
- exclusiveWarning . addClass ( 'gt-hidden' ) ;
23
+ $ exclusiveField. addClass ( 'muted' ) ;
24
+ $ exclusiveField. attr ( 'aria-disabled' , 'true' ) ;
25
+ $ exclusiveWarning. addClass ( 'gt-hidden' ) ;
26
26
}
27
27
}
28
28
@@ -46,18 +46,18 @@ export function initCompLabelEdit(selector) {
46
46
$ ( '.edit-label .color-picker' ) . minicolors ( 'value' , $ ( this ) . data ( 'color' ) ) ;
47
47
$ ( '#label-modal-id' ) . val ( $ ( this ) . data ( 'id' ) ) ;
48
48
49
- const nameInput = $ ( '.edit-label .label-name-input' ) ;
50
- nameInput . val ( $ ( this ) . data ( 'title' ) ) ;
49
+ const $ nameInput = $ ( '.edit-label .label-name-input' ) ;
50
+ $ nameInput. val ( $ ( this ) . data ( 'title' ) ) ;
51
51
52
- const isArchivedCheckbox = $ ( '.edit-label .label-is-archived-input' ) ;
53
- isArchivedCheckbox . prop ( 'checked' , this . hasAttribute ( 'data-is-archived' ) ) ;
52
+ const $ isArchivedCheckbox = $ ( '.edit-label .label-is-archived-input' ) ;
53
+ $ isArchivedCheckbox. prop ( 'checked' , this . hasAttribute ( 'data-is-archived' ) ) ;
54
54
55
- const exclusiveCheckbox = $ ( '.edit-label .label-exclusive-input' ) ;
56
- exclusiveCheckbox . prop ( 'checked' , this . hasAttribute ( 'data-exclusive' ) ) ;
55
+ const $ exclusiveCheckbox = $ ( '.edit-label .label-exclusive-input' ) ;
56
+ $ exclusiveCheckbox. prop ( 'checked' , this . hasAttribute ( 'data-exclusive' ) ) ;
57
57
// Warn when label was previously not exclusive and used in issues
58
- exclusiveCheckbox . data ( 'exclusive-warn' ,
58
+ $ exclusiveCheckbox. data ( 'exclusive-warn' ,
59
59
$ ( this ) . data ( 'num-issues' ) > 0 &&
60
- ( ! this . hasAttribute ( 'data-exclusive' ) || ! isExclusiveScopeName ( nameInput . val ( ) ) ) ) ;
60
+ ( ! this . hasAttribute ( 'data-exclusive' ) || ! isExclusiveScopeName ( $ nameInput. val ( ) ) ) ) ;
61
61
updateExclusiveLabelEdit ( '.edit-label' ) ;
62
62
63
63
$ ( '.edit-label .label-desc-input' ) . val ( $ ( this ) . data ( 'description' ) ) ;
0 commit comments