SHOW:
|
|
- or go back to the newest paste.
1 | $( function () { | |
2 | mw.loader.using( [ 'oojs-ui' ] ).done( function () { | |
3 | $( '.editCheckboxes input[type=checkbox]' ).each( function () { | |
4 | var checkboxWidget, | |
5 | $this = $( this ), | |
6 | id = $this.attr( 'id' ); | |
7 | ||
8 | checkboxWidget = new OO.ui.CheckboxInputWidget( { | |
9 | name: $this.attr( 'name' ), | |
10 | - | tabIndex: $this.attr( 'tabindex' ), |
10 | + | tabIndex: Number($this.attr( 'tabindex' )), |
11 | accessKey: $this.attr( 'accesskey' ), | |
12 | value: $this.attr( 'value' ), | |
13 | selected: this.checked | |
14 | } ); | |
15 | ||
16 | checkboxWidget.$input.attr( 'id', id ); | |
17 | checkboxWidget.$element.css( 'display', 'inline-block' ); | |
18 | ||
19 | $this.replaceWith( checkboxWidget.$element ); | |
20 | } ); | |
21 | } ); | |
22 | } ); |