02c1d5b7dede77d3b91d58892248e3e470ac94af
[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 $buttons = void 0;
18       var index = void 0;
19       var il = opts.buttons.length;
20       for (index = 0; index < il; index++) {
21         if (opts.buttons[index].primary && opts.buttons[index].primary === true) {
22           primaryIndex = index;
23           delete opts.buttons[index].primary;
24           break;
25         }
26       }
27       this._super();
28       $buttons = this.uiButtonSet.children().addClass(opts.buttonClass);
29       if (typeof primaryIndex !== 'undefined') {
30         $buttons.eq(index).addClass(opts.buttonPrimaryClass);
31       }
32     }
33   });
34 })(jQuery);