246855c96df95f7c262df5e802538dd5a4810d10
[yaffs-website] / web / core / misc / dialog / dialog.jquery-ui.js
1 /**
2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
5 * @preserve
6 **/
7
8 (function ($) {
9   $.widget('ui.dialog', $.ui.dialog, {
10     options: {
11       buttonClass: 'button',
12       buttonPrimaryClass: 'button--primary'
13     },
14     _createButtons: function _createButtons() {
15       var opts = this.options;
16       var primaryIndex = void 0;
17       var index = void 0;
18       var il = opts.buttons.length;
19       for (index = 0; index < il; index++) {
20         if (opts.buttons[index].primary && opts.buttons[index].primary === true) {
21           primaryIndex = index;
22           delete opts.buttons[index].primary;
23           break;
24         }
25       }
26       this._super();
27       var $buttons = this.uiButtonSet.children().addClass(opts.buttonClass);
28       if (typeof primaryIndex !== 'undefined') {
29         $buttons.eq(index).addClass(opts.buttonPrimaryClass);
30       }
31     }
32   });
33 })(jQuery);