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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/jquery/ui
File: dialog.js
[500] Fix | Delete
// Change the context for the click callback to be the main element
[501] Fix | Delete
click = props.click;
[502] Fix | Delete
buttonOptions = {
[503] Fix | Delete
icon: props.icon,
[504] Fix | Delete
iconPosition: props.iconPosition,
[505] Fix | Delete
showLabel: props.showLabel,
[506] Fix | Delete
[507] Fix | Delete
// Deprecated options
[508] Fix | Delete
icons: props.icons,
[509] Fix | Delete
text: props.text
[510] Fix | Delete
};
[511] Fix | Delete
[512] Fix | Delete
delete props.click;
[513] Fix | Delete
delete props.icon;
[514] Fix | Delete
delete props.iconPosition;
[515] Fix | Delete
delete props.showLabel;
[516] Fix | Delete
[517] Fix | Delete
// Deprecated options
[518] Fix | Delete
delete props.icons;
[519] Fix | Delete
if ( typeof props.text === "boolean" ) {
[520] Fix | Delete
delete props.text;
[521] Fix | Delete
}
[522] Fix | Delete
[523] Fix | Delete
$( "<button></button>", props )
[524] Fix | Delete
.button( buttonOptions )
[525] Fix | Delete
.appendTo( that.uiButtonSet )
[526] Fix | Delete
.on( "click", function() {
[527] Fix | Delete
click.apply( that.element[ 0 ], arguments );
[528] Fix | Delete
} );
[529] Fix | Delete
} );
[530] Fix | Delete
this._addClass( this.uiDialog, "ui-dialog-buttons" );
[531] Fix | Delete
this.uiDialogButtonPane.appendTo( this.uiDialog );
[532] Fix | Delete
},
[533] Fix | Delete
[534] Fix | Delete
_makeDraggable: function() {
[535] Fix | Delete
var that = this,
[536] Fix | Delete
options = this.options;
[537] Fix | Delete
[538] Fix | Delete
function filteredUi( ui ) {
[539] Fix | Delete
return {
[540] Fix | Delete
position: ui.position,
[541] Fix | Delete
offset: ui.offset
[542] Fix | Delete
};
[543] Fix | Delete
}
[544] Fix | Delete
[545] Fix | Delete
this.uiDialog.draggable( {
[546] Fix | Delete
cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
[547] Fix | Delete
handle: ".ui-dialog-titlebar",
[548] Fix | Delete
containment: "document",
[549] Fix | Delete
start: function( event, ui ) {
[550] Fix | Delete
that._addClass( $( this ), "ui-dialog-dragging" );
[551] Fix | Delete
that._blockFrames();
[552] Fix | Delete
that._trigger( "dragStart", event, filteredUi( ui ) );
[553] Fix | Delete
},
[554] Fix | Delete
drag: function( event, ui ) {
[555] Fix | Delete
that._trigger( "drag", event, filteredUi( ui ) );
[556] Fix | Delete
},
[557] Fix | Delete
stop: function( event, ui ) {
[558] Fix | Delete
var left = ui.offset.left - that.document.scrollLeft(),
[559] Fix | Delete
top = ui.offset.top - that.document.scrollTop();
[560] Fix | Delete
[561] Fix | Delete
options.position = {
[562] Fix | Delete
my: "left top",
[563] Fix | Delete
at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
[564] Fix | Delete
"top" + ( top >= 0 ? "+" : "" ) + top,
[565] Fix | Delete
of: that.window
[566] Fix | Delete
};
[567] Fix | Delete
that._removeClass( $( this ), "ui-dialog-dragging" );
[568] Fix | Delete
that._unblockFrames();
[569] Fix | Delete
that._trigger( "dragStop", event, filteredUi( ui ) );
[570] Fix | Delete
}
[571] Fix | Delete
} );
[572] Fix | Delete
},
[573] Fix | Delete
[574] Fix | Delete
_makeResizable: function() {
[575] Fix | Delete
var that = this,
[576] Fix | Delete
options = this.options,
[577] Fix | Delete
handles = options.resizable,
[578] Fix | Delete
[579] Fix | Delete
// .ui-resizable has position: relative defined in the stylesheet
[580] Fix | Delete
// but dialogs have to use absolute or fixed positioning
[581] Fix | Delete
position = this.uiDialog.css( "position" ),
[582] Fix | Delete
resizeHandles = typeof handles === "string" ?
[583] Fix | Delete
handles :
[584] Fix | Delete
"n,e,s,w,se,sw,ne,nw";
[585] Fix | Delete
[586] Fix | Delete
function filteredUi( ui ) {
[587] Fix | Delete
return {
[588] Fix | Delete
originalPosition: ui.originalPosition,
[589] Fix | Delete
originalSize: ui.originalSize,
[590] Fix | Delete
position: ui.position,
[591] Fix | Delete
size: ui.size
[592] Fix | Delete
};
[593] Fix | Delete
}
[594] Fix | Delete
[595] Fix | Delete
this.uiDialog.resizable( {
[596] Fix | Delete
cancel: ".ui-dialog-content",
[597] Fix | Delete
containment: "document",
[598] Fix | Delete
alsoResize: this.element,
[599] Fix | Delete
maxWidth: options.maxWidth,
[600] Fix | Delete
maxHeight: options.maxHeight,
[601] Fix | Delete
minWidth: options.minWidth,
[602] Fix | Delete
minHeight: this._minHeight(),
[603] Fix | Delete
handles: resizeHandles,
[604] Fix | Delete
start: function( event, ui ) {
[605] Fix | Delete
that._addClass( $( this ), "ui-dialog-resizing" );
[606] Fix | Delete
that._blockFrames();
[607] Fix | Delete
that._trigger( "resizeStart", event, filteredUi( ui ) );
[608] Fix | Delete
},
[609] Fix | Delete
resize: function( event, ui ) {
[610] Fix | Delete
that._trigger( "resize", event, filteredUi( ui ) );
[611] Fix | Delete
},
[612] Fix | Delete
stop: function( event, ui ) {
[613] Fix | Delete
var offset = that.uiDialog.offset(),
[614] Fix | Delete
left = offset.left - that.document.scrollLeft(),
[615] Fix | Delete
top = offset.top - that.document.scrollTop();
[616] Fix | Delete
[617] Fix | Delete
options.height = that.uiDialog.height();
[618] Fix | Delete
options.width = that.uiDialog.width();
[619] Fix | Delete
options.position = {
[620] Fix | Delete
my: "left top",
[621] Fix | Delete
at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
[622] Fix | Delete
"top" + ( top >= 0 ? "+" : "" ) + top,
[623] Fix | Delete
of: that.window
[624] Fix | Delete
};
[625] Fix | Delete
that._removeClass( $( this ), "ui-dialog-resizing" );
[626] Fix | Delete
that._unblockFrames();
[627] Fix | Delete
that._trigger( "resizeStop", event, filteredUi( ui ) );
[628] Fix | Delete
}
[629] Fix | Delete
} )
[630] Fix | Delete
.css( "position", position );
[631] Fix | Delete
},
[632] Fix | Delete
[633] Fix | Delete
_trackFocus: function() {
[634] Fix | Delete
this._on( this.widget(), {
[635] Fix | Delete
focusin: function( event ) {
[636] Fix | Delete
this._makeFocusTarget();
[637] Fix | Delete
this._focusedElement = $( event.target );
[638] Fix | Delete
}
[639] Fix | Delete
} );
[640] Fix | Delete
},
[641] Fix | Delete
[642] Fix | Delete
_makeFocusTarget: function() {
[643] Fix | Delete
this._untrackInstance();
[644] Fix | Delete
this._trackingInstances().unshift( this );
[645] Fix | Delete
},
[646] Fix | Delete
[647] Fix | Delete
_untrackInstance: function() {
[648] Fix | Delete
var instances = this._trackingInstances(),
[649] Fix | Delete
exists = $.inArray( this, instances );
[650] Fix | Delete
if ( exists !== -1 ) {
[651] Fix | Delete
instances.splice( exists, 1 );
[652] Fix | Delete
}
[653] Fix | Delete
},
[654] Fix | Delete
[655] Fix | Delete
_trackingInstances: function() {
[656] Fix | Delete
var instances = this.document.data( "ui-dialog-instances" );
[657] Fix | Delete
if ( !instances ) {
[658] Fix | Delete
instances = [];
[659] Fix | Delete
this.document.data( "ui-dialog-instances", instances );
[660] Fix | Delete
}
[661] Fix | Delete
return instances;
[662] Fix | Delete
},
[663] Fix | Delete
[664] Fix | Delete
_minHeight: function() {
[665] Fix | Delete
var options = this.options;
[666] Fix | Delete
[667] Fix | Delete
return options.height === "auto" ?
[668] Fix | Delete
options.minHeight :
[669] Fix | Delete
Math.min( options.minHeight, options.height );
[670] Fix | Delete
},
[671] Fix | Delete
[672] Fix | Delete
_position: function() {
[673] Fix | Delete
[674] Fix | Delete
// Need to show the dialog to get the actual offset in the position plugin
[675] Fix | Delete
var isVisible = this.uiDialog.is( ":visible" );
[676] Fix | Delete
if ( !isVisible ) {
[677] Fix | Delete
this.uiDialog.show();
[678] Fix | Delete
}
[679] Fix | Delete
this.uiDialog.position( this.options.position );
[680] Fix | Delete
if ( !isVisible ) {
[681] Fix | Delete
this.uiDialog.hide();
[682] Fix | Delete
}
[683] Fix | Delete
},
[684] Fix | Delete
[685] Fix | Delete
_setOptions: function( options ) {
[686] Fix | Delete
var that = this,
[687] Fix | Delete
resize = false,
[688] Fix | Delete
resizableOptions = {};
[689] Fix | Delete
[690] Fix | Delete
$.each( options, function( key, value ) {
[691] Fix | Delete
that._setOption( key, value );
[692] Fix | Delete
[693] Fix | Delete
if ( key in that.sizeRelatedOptions ) {
[694] Fix | Delete
resize = true;
[695] Fix | Delete
}
[696] Fix | Delete
if ( key in that.resizableRelatedOptions ) {
[697] Fix | Delete
resizableOptions[ key ] = value;
[698] Fix | Delete
}
[699] Fix | Delete
} );
[700] Fix | Delete
[701] Fix | Delete
if ( resize ) {
[702] Fix | Delete
this._size();
[703] Fix | Delete
this._position();
[704] Fix | Delete
}
[705] Fix | Delete
if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
[706] Fix | Delete
this.uiDialog.resizable( "option", resizableOptions );
[707] Fix | Delete
}
[708] Fix | Delete
},
[709] Fix | Delete
[710] Fix | Delete
_setOption: function( key, value ) {
[711] Fix | Delete
var isDraggable, isResizable,
[712] Fix | Delete
uiDialog = this.uiDialog;
[713] Fix | Delete
[714] Fix | Delete
if ( key === "disabled" ) {
[715] Fix | Delete
return;
[716] Fix | Delete
}
[717] Fix | Delete
[718] Fix | Delete
this._super( key, value );
[719] Fix | Delete
[720] Fix | Delete
if ( key === "appendTo" ) {
[721] Fix | Delete
this.uiDialog.appendTo( this._appendTo() );
[722] Fix | Delete
}
[723] Fix | Delete
[724] Fix | Delete
if ( key === "buttons" ) {
[725] Fix | Delete
this._createButtons();
[726] Fix | Delete
}
[727] Fix | Delete
[728] Fix | Delete
if ( key === "closeText" ) {
[729] Fix | Delete
this.uiDialogTitlebarClose.button( {
[730] Fix | Delete
[731] Fix | Delete
// Ensure that we always pass a string
[732] Fix | Delete
label: $( "<a>" ).text( "" + this.options.closeText ).html()
[733] Fix | Delete
} );
[734] Fix | Delete
}
[735] Fix | Delete
[736] Fix | Delete
if ( key === "draggable" ) {
[737] Fix | Delete
isDraggable = uiDialog.is( ":data(ui-draggable)" );
[738] Fix | Delete
if ( isDraggable && !value ) {
[739] Fix | Delete
uiDialog.draggable( "destroy" );
[740] Fix | Delete
}
[741] Fix | Delete
[742] Fix | Delete
if ( !isDraggable && value ) {
[743] Fix | Delete
this._makeDraggable();
[744] Fix | Delete
}
[745] Fix | Delete
}
[746] Fix | Delete
[747] Fix | Delete
if ( key === "position" ) {
[748] Fix | Delete
this._position();
[749] Fix | Delete
}
[750] Fix | Delete
[751] Fix | Delete
if ( key === "resizable" ) {
[752] Fix | Delete
[753] Fix | Delete
// currently resizable, becoming non-resizable
[754] Fix | Delete
isResizable = uiDialog.is( ":data(ui-resizable)" );
[755] Fix | Delete
if ( isResizable && !value ) {
[756] Fix | Delete
uiDialog.resizable( "destroy" );
[757] Fix | Delete
}
[758] Fix | Delete
[759] Fix | Delete
// Currently resizable, changing handles
[760] Fix | Delete
if ( isResizable && typeof value === "string" ) {
[761] Fix | Delete
uiDialog.resizable( "option", "handles", value );
[762] Fix | Delete
}
[763] Fix | Delete
[764] Fix | Delete
// Currently non-resizable, becoming resizable
[765] Fix | Delete
if ( !isResizable && value !== false ) {
[766] Fix | Delete
this._makeResizable();
[767] Fix | Delete
}
[768] Fix | Delete
}
[769] Fix | Delete
[770] Fix | Delete
if ( key === "title" ) {
[771] Fix | Delete
this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
[772] Fix | Delete
}
[773] Fix | Delete
},
[774] Fix | Delete
[775] Fix | Delete
_size: function() {
[776] Fix | Delete
[777] Fix | Delete
// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
[778] Fix | Delete
// divs will both have width and height set, so we need to reset them
[779] Fix | Delete
var nonContentHeight, minContentHeight, maxContentHeight,
[780] Fix | Delete
options = this.options;
[781] Fix | Delete
[782] Fix | Delete
// Reset content sizing
[783] Fix | Delete
this.element.show().css( {
[784] Fix | Delete
width: "auto",
[785] Fix | Delete
minHeight: 0,
[786] Fix | Delete
maxHeight: "none",
[787] Fix | Delete
height: 0
[788] Fix | Delete
} );
[789] Fix | Delete
[790] Fix | Delete
if ( options.minWidth > options.width ) {
[791] Fix | Delete
options.width = options.minWidth;
[792] Fix | Delete
}
[793] Fix | Delete
[794] Fix | Delete
// Reset wrapper sizing
[795] Fix | Delete
// determine the height of all the non-content elements
[796] Fix | Delete
nonContentHeight = this.uiDialog.css( {
[797] Fix | Delete
height: "auto",
[798] Fix | Delete
width: options.width
[799] Fix | Delete
} )
[800] Fix | Delete
.outerHeight();
[801] Fix | Delete
minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
[802] Fix | Delete
maxContentHeight = typeof options.maxHeight === "number" ?
[803] Fix | Delete
Math.max( 0, options.maxHeight - nonContentHeight ) :
[804] Fix | Delete
"none";
[805] Fix | Delete
[806] Fix | Delete
if ( options.height === "auto" ) {
[807] Fix | Delete
this.element.css( {
[808] Fix | Delete
minHeight: minContentHeight,
[809] Fix | Delete
maxHeight: maxContentHeight,
[810] Fix | Delete
height: "auto"
[811] Fix | Delete
} );
[812] Fix | Delete
} else {
[813] Fix | Delete
this.element.height( Math.max( 0, options.height - nonContentHeight ) );
[814] Fix | Delete
}
[815] Fix | Delete
[816] Fix | Delete
if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
[817] Fix | Delete
this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
[818] Fix | Delete
}
[819] Fix | Delete
},
[820] Fix | Delete
[821] Fix | Delete
_blockFrames: function() {
[822] Fix | Delete
this.iframeBlocks = this.document.find( "iframe" ).map( function() {
[823] Fix | Delete
var iframe = $( this );
[824] Fix | Delete
[825] Fix | Delete
return $( "<div>" )
[826] Fix | Delete
.css( {
[827] Fix | Delete
position: "absolute",
[828] Fix | Delete
width: iframe.outerWidth(),
[829] Fix | Delete
height: iframe.outerHeight()
[830] Fix | Delete
} )
[831] Fix | Delete
.appendTo( iframe.parent() )
[832] Fix | Delete
.offset( iframe.offset() )[ 0 ];
[833] Fix | Delete
} );
[834] Fix | Delete
},
[835] Fix | Delete
[836] Fix | Delete
_unblockFrames: function() {
[837] Fix | Delete
if ( this.iframeBlocks ) {
[838] Fix | Delete
this.iframeBlocks.remove();
[839] Fix | Delete
delete this.iframeBlocks;
[840] Fix | Delete
}
[841] Fix | Delete
},
[842] Fix | Delete
[843] Fix | Delete
_allowInteraction: function( event ) {
[844] Fix | Delete
if ( $( event.target ).closest( ".ui-dialog" ).length ) {
[845] Fix | Delete
return true;
[846] Fix | Delete
}
[847] Fix | Delete
[848] Fix | Delete
// TODO: Remove hack when datepicker implements
[849] Fix | Delete
// the .ui-front logic (#8989)
[850] Fix | Delete
return !!$( event.target ).closest( ".ui-datepicker" ).length;
[851] Fix | Delete
},
[852] Fix | Delete
[853] Fix | Delete
_createOverlay: function() {
[854] Fix | Delete
if ( !this.options.modal ) {
[855] Fix | Delete
return;
[856] Fix | Delete
}
[857] Fix | Delete
[858] Fix | Delete
var jqMinor = $.fn.jquery.substring( 0, 4 );
[859] Fix | Delete
[860] Fix | Delete
// We use a delay in case the overlay is created from an
[861] Fix | Delete
// event that we're going to be cancelling (#2804)
[862] Fix | Delete
var isOpening = true;
[863] Fix | Delete
this._delay( function() {
[864] Fix | Delete
isOpening = false;
[865] Fix | Delete
} );
[866] Fix | Delete
[867] Fix | Delete
if ( !this.document.data( "ui-dialog-overlays" ) ) {
[868] Fix | Delete
[869] Fix | Delete
// Prevent use of anchors and inputs
[870] Fix | Delete
// This doesn't use `_on()` because it is a shared event handler
[871] Fix | Delete
// across all open modal dialogs.
[872] Fix | Delete
this.document.on( "focusin.ui-dialog", function( event ) {
[873] Fix | Delete
if ( isOpening ) {
[874] Fix | Delete
return;
[875] Fix | Delete
}
[876] Fix | Delete
[877] Fix | Delete
var instance = this._trackingInstances()[ 0 ];
[878] Fix | Delete
if ( !instance._allowInteraction( event ) ) {
[879] Fix | Delete
event.preventDefault();
[880] Fix | Delete
instance._focusTabbable();
[881] Fix | Delete
[882] Fix | Delete
// Support: jQuery >=3.4 <3.7 only
[883] Fix | Delete
// In jQuery 3.4-3.6, there are multiple issues with focus/blur
[884] Fix | Delete
// trigger chains or when triggering is done on a hidden element
[885] Fix | Delete
// at least once.
[886] Fix | Delete
// Trigger focus in a delay in addition if needed to avoid the issues.
[887] Fix | Delete
// See https://github.com/jquery/jquery/issues/4382
[888] Fix | Delete
// See https://github.com/jquery/jquery/issues/4856
[889] Fix | Delete
// See https://github.com/jquery/jquery/issues/4950
[890] Fix | Delete
if ( jqMinor === "3.4." || jqMinor === "3.5." || jqMinor === "3.6." ) {
[891] Fix | Delete
instance._delay( instance._restoreTabbableFocus );
[892] Fix | Delete
}
[893] Fix | Delete
}
[894] Fix | Delete
}.bind( this ) );
[895] Fix | Delete
}
[896] Fix | Delete
[897] Fix | Delete
this.overlay = $( "<div>" )
[898] Fix | Delete
.appendTo( this._appendTo() );
[899] Fix | Delete
[900] Fix | Delete
this._addClass( this.overlay, null, "ui-widget-overlay ui-front" );
[901] Fix | Delete
this._on( this.overlay, {
[902] Fix | Delete
mousedown: "_keepFocus"
[903] Fix | Delete
} );
[904] Fix | Delete
this.document.data( "ui-dialog-overlays",
[905] Fix | Delete
( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 );
[906] Fix | Delete
},
[907] Fix | Delete
[908] Fix | Delete
_destroyOverlay: function() {
[909] Fix | Delete
if ( !this.options.modal ) {
[910] Fix | Delete
return;
[911] Fix | Delete
}
[912] Fix | Delete
[913] Fix | Delete
if ( this.overlay ) {
[914] Fix | Delete
var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
[915] Fix | Delete
[916] Fix | Delete
if ( !overlays ) {
[917] Fix | Delete
this.document.off( "focusin.ui-dialog" );
[918] Fix | Delete
this.document.removeData( "ui-dialog-overlays" );
[919] Fix | Delete
} else {
[920] Fix | Delete
this.document.data( "ui-dialog-overlays", overlays );
[921] Fix | Delete
}
[922] Fix | Delete
[923] Fix | Delete
this.overlay.remove();
[924] Fix | Delete
this.overlay = null;
[925] Fix | Delete
}
[926] Fix | Delete
}
[927] Fix | Delete
} );
[928] Fix | Delete
[929] Fix | Delete
// DEPRECATED
[930] Fix | Delete
// TODO: switch return back to widget declaration at top of file when this is removed
[931] Fix | Delete
if ( $.uiBackCompat !== false ) {
[932] Fix | Delete
[933] Fix | Delete
// Backcompat for dialogClass option
[934] Fix | Delete
$.widget( "ui.dialog", $.ui.dialog, {
[935] Fix | Delete
options: {
[936] Fix | Delete
dialogClass: ""
[937] Fix | Delete
},
[938] Fix | Delete
_createWrapper: function() {
[939] Fix | Delete
this._super();
[940] Fix | Delete
this.uiDialog.addClass( this.options.dialogClass );
[941] Fix | Delete
},
[942] Fix | Delete
_setOption: function( key, value ) {
[943] Fix | Delete
if ( key === "dialogClass" ) {
[944] Fix | Delete
this.uiDialog
[945] Fix | Delete
.removeClass( this.options.dialogClass )
[946] Fix | Delete
.addClass( value );
[947] Fix | Delete
}
[948] Fix | Delete
this._superApply( arguments );
[949] Fix | Delete
}
[950] Fix | Delete
} );
[951] Fix | Delete
}
[952] Fix | Delete
[953] Fix | Delete
return $.ui.dialog;
[954] Fix | Delete
[955] Fix | Delete
} );
[956] Fix | Delete
[957] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function