* Adds default classes to buttons for styling purposes.
*/
-(function ($) {
+(function($) {
$.widget('ui.dialog', $.ui.dialog, {
options: {
buttonClass: 'button',
_createButtons() {
const opts = this.options;
let primaryIndex;
- let $buttons;
let index;
const il = opts.buttons.length;
for (index = 0; index < il; index++) {
- if (opts.buttons[index].primary && opts.buttons[index].primary === true) {
+ if (
+ opts.buttons[index].primary &&
+ opts.buttons[index].primary === true
+ ) {
primaryIndex = index;
delete opts.buttons[index].primary;
break;
}
}
this._super();
- $buttons = this.uiButtonSet.children().addClass(opts.buttonClass);
+ const $buttons = this.uiButtonSet.children().addClass(opts.buttonClass);
if (typeof primaryIndex !== 'undefined') {
$buttons.eq(index).addClass(opts.buttonPrimaryClass);
}
},
});
-}(jQuery));
+})(jQuery);