Chris@0: /** Chris@0: * DO NOT EDIT THIS FILE. Chris@0: * See the following change record for more information, Chris@0: * https://www.drupal.org/node/2815083 Chris@0: * @preserve Chris@0: **/ Chris@0: Chris@0: (function ($) { Chris@0: $.widget('ui.dialog', $.ui.dialog, { Chris@0: options: { Chris@0: buttonClass: 'button', Chris@0: buttonPrimaryClass: 'button--primary' Chris@0: }, Chris@0: _createButtons: function _createButtons() { Chris@0: var opts = this.options; Chris@0: var primaryIndex = void 0; Chris@0: var index = void 0; Chris@0: var il = opts.buttons.length; Chris@0: for (index = 0; index < il; index++) { Chris@0: if (opts.buttons[index].primary && opts.buttons[index].primary === true) { Chris@0: primaryIndex = index; Chris@0: delete opts.buttons[index].primary; Chris@0: break; Chris@0: } Chris@0: } Chris@0: this._super(); Chris@14: var $buttons = this.uiButtonSet.children().addClass(opts.buttonClass); Chris@0: if (typeof primaryIndex !== 'undefined') { Chris@0: $buttons.eq(index).addClass(opts.buttonPrimaryClass); Chris@0: } Chris@0: } Chris@0: }); Chris@0: })(jQuery);