Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/jquery/ui
File: dialog.js
/*!
[0] Fix | Delete
* jQuery UI Dialog 1.13.3
[1] Fix | Delete
* https://jqueryui.com
[2] Fix | Delete
*
[3] Fix | Delete
* Copyright OpenJS Foundation and other contributors
[4] Fix | Delete
* Released under the MIT license.
[5] Fix | Delete
* https://jquery.org/license
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
//>>label: Dialog
[9] Fix | Delete
//>>group: Widgets
[10] Fix | Delete
//>>description: Displays customizable dialog windows.
[11] Fix | Delete
//>>docs: https://api.jqueryui.com/dialog/
[12] Fix | Delete
//>>demos: https://jqueryui.com/dialog/
[13] Fix | Delete
//>>css.structure: ../../themes/base/core.css
[14] Fix | Delete
//>>css.structure: ../../themes/base/dialog.css
[15] Fix | Delete
//>>css.theme: ../../themes/base/theme.css
[16] Fix | Delete
[17] Fix | Delete
( function( factory ) {
[18] Fix | Delete
"use strict";
[19] Fix | Delete
[20] Fix | Delete
if ( typeof define === "function" && define.amd ) {
[21] Fix | Delete
[22] Fix | Delete
// AMD. Register as an anonymous module.
[23] Fix | Delete
define( [
[24] Fix | Delete
"jquery",
[25] Fix | Delete
"./button",
[26] Fix | Delete
"./draggable",
[27] Fix | Delete
"./mouse",
[28] Fix | Delete
"./resizable",
[29] Fix | Delete
"../focusable",
[30] Fix | Delete
"../keycode",
[31] Fix | Delete
"../position",
[32] Fix | Delete
"../safe-active-element",
[33] Fix | Delete
"../safe-blur",
[34] Fix | Delete
"../tabbable",
[35] Fix | Delete
"../unique-id",
[36] Fix | Delete
"../version",
[37] Fix | Delete
"../widget"
[38] Fix | Delete
], factory );
[39] Fix | Delete
} else {
[40] Fix | Delete
[41] Fix | Delete
// Browser globals
[42] Fix | Delete
factory( jQuery );
[43] Fix | Delete
}
[44] Fix | Delete
} )( function( $ ) {
[45] Fix | Delete
"use strict";
[46] Fix | Delete
[47] Fix | Delete
$.widget( "ui.dialog", {
[48] Fix | Delete
version: "1.13.3",
[49] Fix | Delete
options: {
[50] Fix | Delete
appendTo: "body",
[51] Fix | Delete
autoOpen: true,
[52] Fix | Delete
buttons: [],
[53] Fix | Delete
classes: {
[54] Fix | Delete
"ui-dialog": "ui-corner-all",
[55] Fix | Delete
"ui-dialog-titlebar": "ui-corner-all"
[56] Fix | Delete
},
[57] Fix | Delete
closeOnEscape: true,
[58] Fix | Delete
closeText: "Close",
[59] Fix | Delete
draggable: true,
[60] Fix | Delete
hide: null,
[61] Fix | Delete
height: "auto",
[62] Fix | Delete
maxHeight: null,
[63] Fix | Delete
maxWidth: null,
[64] Fix | Delete
minHeight: 150,
[65] Fix | Delete
minWidth: 150,
[66] Fix | Delete
modal: false,
[67] Fix | Delete
position: {
[68] Fix | Delete
my: "center",
[69] Fix | Delete
at: "center",
[70] Fix | Delete
of: window,
[71] Fix | Delete
collision: "fit",
[72] Fix | Delete
[73] Fix | Delete
// Ensure the titlebar is always visible
[74] Fix | Delete
using: function( pos ) {
[75] Fix | Delete
var topOffset = $( this ).css( pos ).offset().top;
[76] Fix | Delete
if ( topOffset < 0 ) {
[77] Fix | Delete
$( this ).css( "top", pos.top - topOffset );
[78] Fix | Delete
}
[79] Fix | Delete
}
[80] Fix | Delete
},
[81] Fix | Delete
resizable: true,
[82] Fix | Delete
show: null,
[83] Fix | Delete
title: null,
[84] Fix | Delete
width: 300,
[85] Fix | Delete
[86] Fix | Delete
// Callbacks
[87] Fix | Delete
beforeClose: null,
[88] Fix | Delete
close: null,
[89] Fix | Delete
drag: null,
[90] Fix | Delete
dragStart: null,
[91] Fix | Delete
dragStop: null,
[92] Fix | Delete
focus: null,
[93] Fix | Delete
open: null,
[94] Fix | Delete
resize: null,
[95] Fix | Delete
resizeStart: null,
[96] Fix | Delete
resizeStop: null
[97] Fix | Delete
},
[98] Fix | Delete
[99] Fix | Delete
sizeRelatedOptions: {
[100] Fix | Delete
buttons: true,
[101] Fix | Delete
height: true,
[102] Fix | Delete
maxHeight: true,
[103] Fix | Delete
maxWidth: true,
[104] Fix | Delete
minHeight: true,
[105] Fix | Delete
minWidth: true,
[106] Fix | Delete
width: true
[107] Fix | Delete
},
[108] Fix | Delete
[109] Fix | Delete
resizableRelatedOptions: {
[110] Fix | Delete
maxHeight: true,
[111] Fix | Delete
maxWidth: true,
[112] Fix | Delete
minHeight: true,
[113] Fix | Delete
minWidth: true
[114] Fix | Delete
},
[115] Fix | Delete
[116] Fix | Delete
_create: function() {
[117] Fix | Delete
this.originalCss = {
[118] Fix | Delete
display: this.element[ 0 ].style.display,
[119] Fix | Delete
width: this.element[ 0 ].style.width,
[120] Fix | Delete
minHeight: this.element[ 0 ].style.minHeight,
[121] Fix | Delete
maxHeight: this.element[ 0 ].style.maxHeight,
[122] Fix | Delete
height: this.element[ 0 ].style.height
[123] Fix | Delete
};
[124] Fix | Delete
this.originalPosition = {
[125] Fix | Delete
parent: this.element.parent(),
[126] Fix | Delete
index: this.element.parent().children().index( this.element )
[127] Fix | Delete
};
[128] Fix | Delete
this.originalTitle = this.element.attr( "title" );
[129] Fix | Delete
if ( this.options.title == null && this.originalTitle != null ) {
[130] Fix | Delete
this.options.title = this.originalTitle;
[131] Fix | Delete
}
[132] Fix | Delete
[133] Fix | Delete
// Dialogs can't be disabled
[134] Fix | Delete
if ( this.options.disabled ) {
[135] Fix | Delete
this.options.disabled = false;
[136] Fix | Delete
}
[137] Fix | Delete
[138] Fix | Delete
this._createWrapper();
[139] Fix | Delete
[140] Fix | Delete
this.element
[141] Fix | Delete
.show()
[142] Fix | Delete
.removeAttr( "title" )
[143] Fix | Delete
.appendTo( this.uiDialog );
[144] Fix | Delete
[145] Fix | Delete
this._addClass( "ui-dialog-content", "ui-widget-content" );
[146] Fix | Delete
[147] Fix | Delete
this._createTitlebar();
[148] Fix | Delete
this._createButtonPane();
[149] Fix | Delete
[150] Fix | Delete
if ( this.options.draggable && $.fn.draggable ) {
[151] Fix | Delete
this._makeDraggable();
[152] Fix | Delete
}
[153] Fix | Delete
if ( this.options.resizable && $.fn.resizable ) {
[154] Fix | Delete
this._makeResizable();
[155] Fix | Delete
}
[156] Fix | Delete
[157] Fix | Delete
this._isOpen = false;
[158] Fix | Delete
[159] Fix | Delete
this._trackFocus();
[160] Fix | Delete
},
[161] Fix | Delete
[162] Fix | Delete
_init: function() {
[163] Fix | Delete
if ( this.options.autoOpen ) {
[164] Fix | Delete
this.open();
[165] Fix | Delete
}
[166] Fix | Delete
},
[167] Fix | Delete
[168] Fix | Delete
_appendTo: function() {
[169] Fix | Delete
var element = this.options.appendTo;
[170] Fix | Delete
if ( element && ( element.jquery || element.nodeType ) ) {
[171] Fix | Delete
return $( element );
[172] Fix | Delete
}
[173] Fix | Delete
return this.document.find( element || "body" ).eq( 0 );
[174] Fix | Delete
},
[175] Fix | Delete
[176] Fix | Delete
_destroy: function() {
[177] Fix | Delete
var next,
[178] Fix | Delete
originalPosition = this.originalPosition;
[179] Fix | Delete
[180] Fix | Delete
this._untrackInstance();
[181] Fix | Delete
this._destroyOverlay();
[182] Fix | Delete
[183] Fix | Delete
this.element
[184] Fix | Delete
.removeUniqueId()
[185] Fix | Delete
.css( this.originalCss )
[186] Fix | Delete
[187] Fix | Delete
// Without detaching first, the following becomes really slow
[188] Fix | Delete
.detach();
[189] Fix | Delete
[190] Fix | Delete
this.uiDialog.remove();
[191] Fix | Delete
[192] Fix | Delete
if ( this.originalTitle ) {
[193] Fix | Delete
this.element.attr( "title", this.originalTitle );
[194] Fix | Delete
}
[195] Fix | Delete
[196] Fix | Delete
next = originalPosition.parent.children().eq( originalPosition.index );
[197] Fix | Delete
[198] Fix | Delete
// Don't try to place the dialog next to itself (#8613)
[199] Fix | Delete
if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
[200] Fix | Delete
next.before( this.element );
[201] Fix | Delete
} else {
[202] Fix | Delete
originalPosition.parent.append( this.element );
[203] Fix | Delete
}
[204] Fix | Delete
},
[205] Fix | Delete
[206] Fix | Delete
widget: function() {
[207] Fix | Delete
return this.uiDialog;
[208] Fix | Delete
},
[209] Fix | Delete
[210] Fix | Delete
disable: $.noop,
[211] Fix | Delete
enable: $.noop,
[212] Fix | Delete
[213] Fix | Delete
close: function( event ) {
[214] Fix | Delete
var that = this;
[215] Fix | Delete
[216] Fix | Delete
if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
[217] Fix | Delete
return;
[218] Fix | Delete
}
[219] Fix | Delete
[220] Fix | Delete
this._isOpen = false;
[221] Fix | Delete
this._focusedElement = null;
[222] Fix | Delete
this._destroyOverlay();
[223] Fix | Delete
this._untrackInstance();
[224] Fix | Delete
[225] Fix | Delete
if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) {
[226] Fix | Delete
[227] Fix | Delete
// Hiding a focused element doesn't trigger blur in WebKit
[228] Fix | Delete
// so in case we have nothing to focus on, explicitly blur the active element
[229] Fix | Delete
// https://bugs.webkit.org/show_bug.cgi?id=47182
[230] Fix | Delete
$.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );
[231] Fix | Delete
}
[232] Fix | Delete
[233] Fix | Delete
this._hide( this.uiDialog, this.options.hide, function() {
[234] Fix | Delete
that._trigger( "close", event );
[235] Fix | Delete
} );
[236] Fix | Delete
},
[237] Fix | Delete
[238] Fix | Delete
isOpen: function() {
[239] Fix | Delete
return this._isOpen;
[240] Fix | Delete
},
[241] Fix | Delete
[242] Fix | Delete
moveToTop: function() {
[243] Fix | Delete
this._moveToTop();
[244] Fix | Delete
},
[245] Fix | Delete
[246] Fix | Delete
_moveToTop: function( event, silent ) {
[247] Fix | Delete
var moved = false,
[248] Fix | Delete
zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() {
[249] Fix | Delete
return +$( this ).css( "z-index" );
[250] Fix | Delete
} ).get(),
[251] Fix | Delete
zIndexMax = Math.max.apply( null, zIndices );
[252] Fix | Delete
[253] Fix | Delete
if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
[254] Fix | Delete
this.uiDialog.css( "z-index", zIndexMax + 1 );
[255] Fix | Delete
moved = true;
[256] Fix | Delete
}
[257] Fix | Delete
[258] Fix | Delete
if ( moved && !silent ) {
[259] Fix | Delete
this._trigger( "focus", event );
[260] Fix | Delete
}
[261] Fix | Delete
return moved;
[262] Fix | Delete
},
[263] Fix | Delete
[264] Fix | Delete
open: function() {
[265] Fix | Delete
var that = this;
[266] Fix | Delete
if ( this._isOpen ) {
[267] Fix | Delete
if ( this._moveToTop() ) {
[268] Fix | Delete
this._focusTabbable();
[269] Fix | Delete
}
[270] Fix | Delete
return;
[271] Fix | Delete
}
[272] Fix | Delete
[273] Fix | Delete
this._isOpen = true;
[274] Fix | Delete
this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
[275] Fix | Delete
[276] Fix | Delete
this._size();
[277] Fix | Delete
this._position();
[278] Fix | Delete
this._createOverlay();
[279] Fix | Delete
this._moveToTop( null, true );
[280] Fix | Delete
[281] Fix | Delete
// Ensure the overlay is moved to the top with the dialog, but only when
[282] Fix | Delete
// opening. The overlay shouldn't move after the dialog is open so that
[283] Fix | Delete
// modeless dialogs opened after the modal dialog stack properly.
[284] Fix | Delete
if ( this.overlay ) {
[285] Fix | Delete
this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
[286] Fix | Delete
}
[287] Fix | Delete
[288] Fix | Delete
this._show( this.uiDialog, this.options.show, function() {
[289] Fix | Delete
that._focusTabbable();
[290] Fix | Delete
that._trigger( "focus" );
[291] Fix | Delete
} );
[292] Fix | Delete
[293] Fix | Delete
// Track the dialog immediately upon opening in case a focus event
[294] Fix | Delete
// somehow occurs outside of the dialog before an element inside the
[295] Fix | Delete
// dialog is focused (#10152)
[296] Fix | Delete
this._makeFocusTarget();
[297] Fix | Delete
[298] Fix | Delete
this._trigger( "open" );
[299] Fix | Delete
},
[300] Fix | Delete
[301] Fix | Delete
_focusTabbable: function() {
[302] Fix | Delete
[303] Fix | Delete
// Set focus to the first match:
[304] Fix | Delete
// 1. An element that was focused previously
[305] Fix | Delete
// 2. First element inside the dialog matching [autofocus]
[306] Fix | Delete
// 3. Tabbable element inside the content element
[307] Fix | Delete
// 4. Tabbable element inside the buttonpane
[308] Fix | Delete
// 5. The close button
[309] Fix | Delete
// 6. The dialog itself
[310] Fix | Delete
var hasFocus = this._focusedElement;
[311] Fix | Delete
if ( !hasFocus ) {
[312] Fix | Delete
hasFocus = this.element.find( "[autofocus]" );
[313] Fix | Delete
}
[314] Fix | Delete
if ( !hasFocus.length ) {
[315] Fix | Delete
hasFocus = this.element.find( ":tabbable" );
[316] Fix | Delete
}
[317] Fix | Delete
if ( !hasFocus.length ) {
[318] Fix | Delete
hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
[319] Fix | Delete
}
[320] Fix | Delete
if ( !hasFocus.length ) {
[321] Fix | Delete
hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
[322] Fix | Delete
}
[323] Fix | Delete
if ( !hasFocus.length ) {
[324] Fix | Delete
hasFocus = this.uiDialog;
[325] Fix | Delete
}
[326] Fix | Delete
hasFocus.eq( 0 ).trigger( "focus" );
[327] Fix | Delete
},
[328] Fix | Delete
[329] Fix | Delete
_restoreTabbableFocus: function() {
[330] Fix | Delete
var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
[331] Fix | Delete
isActive = this.uiDialog[ 0 ] === activeElement ||
[332] Fix | Delete
$.contains( this.uiDialog[ 0 ], activeElement );
[333] Fix | Delete
if ( !isActive ) {
[334] Fix | Delete
this._focusTabbable();
[335] Fix | Delete
}
[336] Fix | Delete
},
[337] Fix | Delete
[338] Fix | Delete
_keepFocus: function( event ) {
[339] Fix | Delete
event.preventDefault();
[340] Fix | Delete
this._restoreTabbableFocus();
[341] Fix | Delete
[342] Fix | Delete
// support: IE
[343] Fix | Delete
// IE <= 8 doesn't prevent moving focus even with event.preventDefault()
[344] Fix | Delete
// so we check again later
[345] Fix | Delete
this._delay( this._restoreTabbableFocus );
[346] Fix | Delete
},
[347] Fix | Delete
[348] Fix | Delete
_createWrapper: function() {
[349] Fix | Delete
this.uiDialog = $( "<div>" )
[350] Fix | Delete
.hide()
[351] Fix | Delete
.attr( {
[352] Fix | Delete
[353] Fix | Delete
// Setting tabIndex makes the div focusable
[354] Fix | Delete
tabIndex: -1,
[355] Fix | Delete
role: "dialog"
[356] Fix | Delete
} )
[357] Fix | Delete
.appendTo( this._appendTo() );
[358] Fix | Delete
[359] Fix | Delete
this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" );
[360] Fix | Delete
this._on( this.uiDialog, {
[361] Fix | Delete
keydown: function( event ) {
[362] Fix | Delete
if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
[363] Fix | Delete
event.keyCode === $.ui.keyCode.ESCAPE ) {
[364] Fix | Delete
event.preventDefault();
[365] Fix | Delete
this.close( event );
[366] Fix | Delete
return;
[367] Fix | Delete
}
[368] Fix | Delete
[369] Fix | Delete
// Prevent tabbing out of dialogs
[370] Fix | Delete
if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
[371] Fix | Delete
return;
[372] Fix | Delete
}
[373] Fix | Delete
var tabbables = this.uiDialog.find( ":tabbable" ),
[374] Fix | Delete
first = tabbables.first(),
[375] Fix | Delete
last = tabbables.last();
[376] Fix | Delete
[377] Fix | Delete
if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
[378] Fix | Delete
!event.shiftKey ) {
[379] Fix | Delete
this._delay( function() {
[380] Fix | Delete
first.trigger( "focus" );
[381] Fix | Delete
} );
[382] Fix | Delete
event.preventDefault();
[383] Fix | Delete
} else if ( ( event.target === first[ 0 ] ||
[384] Fix | Delete
event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {
[385] Fix | Delete
this._delay( function() {
[386] Fix | Delete
last.trigger( "focus" );
[387] Fix | Delete
} );
[388] Fix | Delete
event.preventDefault();
[389] Fix | Delete
}
[390] Fix | Delete
},
[391] Fix | Delete
mousedown: function( event ) {
[392] Fix | Delete
if ( this._moveToTop( event ) ) {
[393] Fix | Delete
this._focusTabbable();
[394] Fix | Delete
}
[395] Fix | Delete
}
[396] Fix | Delete
} );
[397] Fix | Delete
[398] Fix | Delete
// We assume that any existing aria-describedby attribute means
[399] Fix | Delete
// that the dialog content is marked up properly
[400] Fix | Delete
// otherwise we brute force the content as the description
[401] Fix | Delete
if ( !this.element.find( "[aria-describedby]" ).length ) {
[402] Fix | Delete
this.uiDialog.attr( {
[403] Fix | Delete
"aria-describedby": this.element.uniqueId().attr( "id" )
[404] Fix | Delete
} );
[405] Fix | Delete
}
[406] Fix | Delete
},
[407] Fix | Delete
[408] Fix | Delete
_createTitlebar: function() {
[409] Fix | Delete
var uiDialogTitle;
[410] Fix | Delete
[411] Fix | Delete
this.uiDialogTitlebar = $( "<div>" );
[412] Fix | Delete
this._addClass( this.uiDialogTitlebar,
[413] Fix | Delete
"ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" );
[414] Fix | Delete
this._on( this.uiDialogTitlebar, {
[415] Fix | Delete
mousedown: function( event ) {
[416] Fix | Delete
[417] Fix | Delete
// Don't prevent click on close button (#8838)
[418] Fix | Delete
// Focusing a dialog that is partially scrolled out of view
[419] Fix | Delete
// causes the browser to scroll it into view, preventing the click event
[420] Fix | Delete
if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
[421] Fix | Delete
[422] Fix | Delete
// Dialog isn't getting focus when dragging (#8063)
[423] Fix | Delete
this.uiDialog.trigger( "focus" );
[424] Fix | Delete
}
[425] Fix | Delete
}
[426] Fix | Delete
} );
[427] Fix | Delete
[428] Fix | Delete
// Support: IE
[429] Fix | Delete
// Use type="button" to prevent enter keypresses in textboxes from closing the
[430] Fix | Delete
// dialog in IE (#9312)
[431] Fix | Delete
this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
[432] Fix | Delete
.button( {
[433] Fix | Delete
label: $( "<a>" ).text( this.options.closeText ).html(),
[434] Fix | Delete
icon: "ui-icon-closethick",
[435] Fix | Delete
showLabel: false
[436] Fix | Delete
} )
[437] Fix | Delete
.appendTo( this.uiDialogTitlebar );
[438] Fix | Delete
[439] Fix | Delete
this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" );
[440] Fix | Delete
this._on( this.uiDialogTitlebarClose, {
[441] Fix | Delete
click: function( event ) {
[442] Fix | Delete
event.preventDefault();
[443] Fix | Delete
this.close( event );
[444] Fix | Delete
}
[445] Fix | Delete
} );
[446] Fix | Delete
[447] Fix | Delete
uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar );
[448] Fix | Delete
this._addClass( uiDialogTitle, "ui-dialog-title" );
[449] Fix | Delete
this._title( uiDialogTitle );
[450] Fix | Delete
[451] Fix | Delete
this.uiDialogTitlebar.prependTo( this.uiDialog );
[452] Fix | Delete
[453] Fix | Delete
this.uiDialog.attr( {
[454] Fix | Delete
"aria-labelledby": uiDialogTitle.attr( "id" )
[455] Fix | Delete
} );
[456] Fix | Delete
},
[457] Fix | Delete
[458] Fix | Delete
_title: function( title ) {
[459] Fix | Delete
if ( this.options.title ) {
[460] Fix | Delete
title.text( this.options.title );
[461] Fix | Delete
} else {
[462] Fix | Delete
title.html( "&#160;" );
[463] Fix | Delete
}
[464] Fix | Delete
},
[465] Fix | Delete
[466] Fix | Delete
_createButtonPane: function() {
[467] Fix | Delete
this.uiDialogButtonPane = $( "<div>" );
[468] Fix | Delete
this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane",
[469] Fix | Delete
"ui-widget-content ui-helper-clearfix" );
[470] Fix | Delete
[471] Fix | Delete
this.uiButtonSet = $( "<div>" )
[472] Fix | Delete
.appendTo( this.uiDialogButtonPane );
[473] Fix | Delete
this._addClass( this.uiButtonSet, "ui-dialog-buttonset" );
[474] Fix | Delete
[475] Fix | Delete
this._createButtons();
[476] Fix | Delete
},
[477] Fix | Delete
[478] Fix | Delete
_createButtons: function() {
[479] Fix | Delete
var that = this,
[480] Fix | Delete
buttons = this.options.buttons;
[481] Fix | Delete
[482] Fix | Delete
// If we already have a button pane, remove it
[483] Fix | Delete
this.uiDialogButtonPane.remove();
[484] Fix | Delete
this.uiButtonSet.empty();
[485] Fix | Delete
[486] Fix | Delete
if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) {
[487] Fix | Delete
this._removeClass( this.uiDialog, "ui-dialog-buttons" );
[488] Fix | Delete
return;
[489] Fix | Delete
}
[490] Fix | Delete
[491] Fix | Delete
$.each( buttons, function( name, props ) {
[492] Fix | Delete
var click, buttonOptions;
[493] Fix | Delete
props = typeof props === "function" ?
[494] Fix | Delete
{ click: props, text: name } :
[495] Fix | Delete
props;
[496] Fix | Delete
[497] Fix | Delete
// Default to a non-submitting button
[498] Fix | Delete
props = $.extend( { type: "button" }, props );
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function