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: datepicker.js
thisYear = new Date().getFullYear();
[2000] Fix | Delete
determineYear = function( value ) {
[2001] Fix | Delete
var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) :
[2002] Fix | Delete
( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) :
[2003] Fix | Delete
parseInt( value, 10 ) ) );
[2004] Fix | Delete
return ( isNaN( year ) ? thisYear : year );
[2005] Fix | Delete
};
[2006] Fix | Delete
year = determineYear( years[ 0 ] );
[2007] Fix | Delete
endYear = Math.max( year, determineYear( years[ 1 ] || "" ) );
[2008] Fix | Delete
year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
[2009] Fix | Delete
endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
[2010] Fix | Delete
inst.yearshtml += "<select class='ui-datepicker-year' aria-label='" + selectYearLabel + "' data-handler='selectYear' data-event='change'>";
[2011] Fix | Delete
for ( ; year <= endYear; year++ ) {
[2012] Fix | Delete
inst.yearshtml += "<option value='" + year + "'" +
[2013] Fix | Delete
( year === drawYear ? " selected='selected'" : "" ) +
[2014] Fix | Delete
">" + year + "</option>";
[2015] Fix | Delete
}
[2016] Fix | Delete
inst.yearshtml += "</select>";
[2017] Fix | Delete
[2018] Fix | Delete
html += inst.yearshtml;
[2019] Fix | Delete
inst.yearshtml = null;
[2020] Fix | Delete
}
[2021] Fix | Delete
}
[2022] Fix | Delete
[2023] Fix | Delete
html += this._get( inst, "yearSuffix" );
[2024] Fix | Delete
if ( showMonthAfterYear ) {
[2025] Fix | Delete
html += ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" ) + monthHtml;
[2026] Fix | Delete
}
[2027] Fix | Delete
html += "</div>"; // Close datepicker_header
[2028] Fix | Delete
return html;
[2029] Fix | Delete
},
[2030] Fix | Delete
[2031] Fix | Delete
/* Adjust one of the date sub-fields. */
[2032] Fix | Delete
_adjustInstDate: function( inst, offset, period ) {
[2033] Fix | Delete
var year = inst.selectedYear + ( period === "Y" ? offset : 0 ),
[2034] Fix | Delete
month = inst.selectedMonth + ( period === "M" ? offset : 0 ),
[2035] Fix | Delete
day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ),
[2036] Fix | Delete
date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );
[2037] Fix | Delete
[2038] Fix | Delete
inst.selectedDay = date.getDate();
[2039] Fix | Delete
inst.drawMonth = inst.selectedMonth = date.getMonth();
[2040] Fix | Delete
inst.drawYear = inst.selectedYear = date.getFullYear();
[2041] Fix | Delete
if ( period === "M" || period === "Y" ) {
[2042] Fix | Delete
this._notifyChange( inst );
[2043] Fix | Delete
}
[2044] Fix | Delete
},
[2045] Fix | Delete
[2046] Fix | Delete
/* Ensure a date is within any min/max bounds. */
[2047] Fix | Delete
_restrictMinMax: function( inst, date ) {
[2048] Fix | Delete
var minDate = this._getMinMaxDate( inst, "min" ),
[2049] Fix | Delete
maxDate = this._getMinMaxDate( inst, "max" ),
[2050] Fix | Delete
newDate = ( minDate && date < minDate ? minDate : date );
[2051] Fix | Delete
return ( maxDate && newDate > maxDate ? maxDate : newDate );
[2052] Fix | Delete
},
[2053] Fix | Delete
[2054] Fix | Delete
/* Notify change of month/year. */
[2055] Fix | Delete
_notifyChange: function( inst ) {
[2056] Fix | Delete
var onChange = this._get( inst, "onChangeMonthYear" );
[2057] Fix | Delete
if ( onChange ) {
[2058] Fix | Delete
onChange.apply( ( inst.input ? inst.input[ 0 ] : null ),
[2059] Fix | Delete
[ inst.selectedYear, inst.selectedMonth + 1, inst ] );
[2060] Fix | Delete
}
[2061] Fix | Delete
},
[2062] Fix | Delete
[2063] Fix | Delete
/* Determine the number of months to show. */
[2064] Fix | Delete
_getNumberOfMonths: function( inst ) {
[2065] Fix | Delete
var numMonths = this._get( inst, "numberOfMonths" );
[2066] Fix | Delete
return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) );
[2067] Fix | Delete
},
[2068] Fix | Delete
[2069] Fix | Delete
/* Determine the current maximum date - ensure no time components are set. */
[2070] Fix | Delete
_getMinMaxDate: function( inst, minMax ) {
[2071] Fix | Delete
return this._determineDate( inst, this._get( inst, minMax + "Date" ), null );
[2072] Fix | Delete
},
[2073] Fix | Delete
[2074] Fix | Delete
/* Find the number of days in a given month. */
[2075] Fix | Delete
_getDaysInMonth: function( year, month ) {
[2076] Fix | Delete
return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate();
[2077] Fix | Delete
},
[2078] Fix | Delete
[2079] Fix | Delete
/* Find the day of the week of the first of a month. */
[2080] Fix | Delete
_getFirstDayOfMonth: function( year, month ) {
[2081] Fix | Delete
return new Date( year, month, 1 ).getDay();
[2082] Fix | Delete
},
[2083] Fix | Delete
[2084] Fix | Delete
/* Determines if we should allow a "next/prev" month display change. */
[2085] Fix | Delete
_canAdjustMonth: function( inst, offset, curYear, curMonth ) {
[2086] Fix | Delete
var numMonths = this._getNumberOfMonths( inst ),
[2087] Fix | Delete
date = this._daylightSavingAdjust( new Date( curYear,
[2088] Fix | Delete
curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) );
[2089] Fix | Delete
[2090] Fix | Delete
if ( offset < 0 ) {
[2091] Fix | Delete
date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) );
[2092] Fix | Delete
}
[2093] Fix | Delete
return this._isInRange( inst, date );
[2094] Fix | Delete
},
[2095] Fix | Delete
[2096] Fix | Delete
/* Is the given date in the accepted range? */
[2097] Fix | Delete
_isInRange: function( inst, date ) {
[2098] Fix | Delete
var yearSplit, currentYear,
[2099] Fix | Delete
minDate = this._getMinMaxDate( inst, "min" ),
[2100] Fix | Delete
maxDate = this._getMinMaxDate( inst, "max" ),
[2101] Fix | Delete
minYear = null,
[2102] Fix | Delete
maxYear = null,
[2103] Fix | Delete
years = this._get( inst, "yearRange" );
[2104] Fix | Delete
if ( years ) {
[2105] Fix | Delete
yearSplit = years.split( ":" );
[2106] Fix | Delete
currentYear = new Date().getFullYear();
[2107] Fix | Delete
minYear = parseInt( yearSplit[ 0 ], 10 );
[2108] Fix | Delete
maxYear = parseInt( yearSplit[ 1 ], 10 );
[2109] Fix | Delete
if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) {
[2110] Fix | Delete
minYear += currentYear;
[2111] Fix | Delete
}
[2112] Fix | Delete
if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) {
[2113] Fix | Delete
maxYear += currentYear;
[2114] Fix | Delete
}
[2115] Fix | Delete
}
[2116] Fix | Delete
[2117] Fix | Delete
return ( ( !minDate || date.getTime() >= minDate.getTime() ) &&
[2118] Fix | Delete
( !maxDate || date.getTime() <= maxDate.getTime() ) &&
[2119] Fix | Delete
( !minYear || date.getFullYear() >= minYear ) &&
[2120] Fix | Delete
( !maxYear || date.getFullYear() <= maxYear ) );
[2121] Fix | Delete
},
[2122] Fix | Delete
[2123] Fix | Delete
/* Provide the configuration settings for formatting/parsing. */
[2124] Fix | Delete
_getFormatConfig: function( inst ) {
[2125] Fix | Delete
var shortYearCutoff = this._get( inst, "shortYearCutoff" );
[2126] Fix | Delete
shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff :
[2127] Fix | Delete
new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) );
[2128] Fix | Delete
return { shortYearCutoff: shortYearCutoff,
[2129] Fix | Delete
dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ),
[2130] Fix | Delete
monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) };
[2131] Fix | Delete
},
[2132] Fix | Delete
[2133] Fix | Delete
/* Format the given date for display. */
[2134] Fix | Delete
_formatDate: function( inst, day, month, year ) {
[2135] Fix | Delete
if ( !day ) {
[2136] Fix | Delete
inst.currentDay = inst.selectedDay;
[2137] Fix | Delete
inst.currentMonth = inst.selectedMonth;
[2138] Fix | Delete
inst.currentYear = inst.selectedYear;
[2139] Fix | Delete
}
[2140] Fix | Delete
var date = ( day ? ( typeof day === "object" ? day :
[2141] Fix | Delete
this._daylightSavingAdjust( new Date( year, month, day ) ) ) :
[2142] Fix | Delete
this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
[2143] Fix | Delete
return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) );
[2144] Fix | Delete
}
[2145] Fix | Delete
} );
[2146] Fix | Delete
[2147] Fix | Delete
/*
[2148] Fix | Delete
* Bind hover events for datepicker elements.
[2149] Fix | Delete
* Done via delegate so the binding only occurs once in the lifetime of the parent div.
[2150] Fix | Delete
* Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
[2151] Fix | Delete
*/
[2152] Fix | Delete
function datepicker_bindHover( dpDiv ) {
[2153] Fix | Delete
var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
[2154] Fix | Delete
return dpDiv.on( "mouseout", selector, function() {
[2155] Fix | Delete
$( this ).removeClass( "ui-state-hover" );
[2156] Fix | Delete
if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
[2157] Fix | Delete
$( this ).removeClass( "ui-datepicker-prev-hover" );
[2158] Fix | Delete
}
[2159] Fix | Delete
if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
[2160] Fix | Delete
$( this ).removeClass( "ui-datepicker-next-hover" );
[2161] Fix | Delete
}
[2162] Fix | Delete
} )
[2163] Fix | Delete
.on( "mouseover", selector, datepicker_handleMouseover );
[2164] Fix | Delete
}
[2165] Fix | Delete
[2166] Fix | Delete
function datepicker_handleMouseover() {
[2167] Fix | Delete
if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) {
[2168] Fix | Delete
$( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" );
[2169] Fix | Delete
$( this ).addClass( "ui-state-hover" );
[2170] Fix | Delete
if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
[2171] Fix | Delete
$( this ).addClass( "ui-datepicker-prev-hover" );
[2172] Fix | Delete
}
[2173] Fix | Delete
if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
[2174] Fix | Delete
$( this ).addClass( "ui-datepicker-next-hover" );
[2175] Fix | Delete
}
[2176] Fix | Delete
}
[2177] Fix | Delete
}
[2178] Fix | Delete
[2179] Fix | Delete
/* jQuery extend now ignores nulls! */
[2180] Fix | Delete
function datepicker_extendRemove( target, props ) {
[2181] Fix | Delete
$.extend( target, props );
[2182] Fix | Delete
for ( var name in props ) {
[2183] Fix | Delete
if ( props[ name ] == null ) {
[2184] Fix | Delete
target[ name ] = props[ name ];
[2185] Fix | Delete
}
[2186] Fix | Delete
}
[2187] Fix | Delete
return target;
[2188] Fix | Delete
}
[2189] Fix | Delete
[2190] Fix | Delete
/* Invoke the datepicker functionality.
[2191] Fix | Delete
@param options string - a command, optionally followed by additional parameters or
[2192] Fix | Delete
Object - settings for attaching new datepicker functionality
[2193] Fix | Delete
@return jQuery object */
[2194] Fix | Delete
$.fn.datepicker = function( options ) {
[2195] Fix | Delete
[2196] Fix | Delete
/* Verify an empty collection wasn't passed - Fixes #6976 */
[2197] Fix | Delete
if ( !this.length ) {
[2198] Fix | Delete
return this;
[2199] Fix | Delete
}
[2200] Fix | Delete
[2201] Fix | Delete
/* Initialise the date picker. */
[2202] Fix | Delete
if ( !$.datepicker.initialized ) {
[2203] Fix | Delete
$( document ).on( "mousedown", $.datepicker._checkExternalClick );
[2204] Fix | Delete
$.datepicker.initialized = true;
[2205] Fix | Delete
}
[2206] Fix | Delete
[2207] Fix | Delete
/* Append datepicker main container to body if not exist. */
[2208] Fix | Delete
if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) {
[2209] Fix | Delete
$( "body" ).append( $.datepicker.dpDiv );
[2210] Fix | Delete
}
[2211] Fix | Delete
[2212] Fix | Delete
var otherArgs = Array.prototype.slice.call( arguments, 1 );
[2213] Fix | Delete
if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) {
[2214] Fix | Delete
return $.datepicker[ "_" + options + "Datepicker" ].
[2215] Fix | Delete
apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
[2216] Fix | Delete
}
[2217] Fix | Delete
if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) {
[2218] Fix | Delete
return $.datepicker[ "_" + options + "Datepicker" ].
[2219] Fix | Delete
apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
[2220] Fix | Delete
}
[2221] Fix | Delete
return this.each( function() {
[2222] Fix | Delete
if ( typeof options === "string" ) {
[2223] Fix | Delete
$.datepicker[ "_" + options + "Datepicker" ]
[2224] Fix | Delete
.apply( $.datepicker, [ this ].concat( otherArgs ) );
[2225] Fix | Delete
} else {
[2226] Fix | Delete
$.datepicker._attachDatepicker( this, options );
[2227] Fix | Delete
}
[2228] Fix | Delete
} );
[2229] Fix | Delete
};
[2230] Fix | Delete
[2231] Fix | Delete
$.datepicker = new Datepicker(); // singleton instance
[2232] Fix | Delete
$.datepicker.initialized = false;
[2233] Fix | Delete
$.datepicker.uuid = new Date().getTime();
[2234] Fix | Delete
$.datepicker.version = "1.13.3";
[2235] Fix | Delete
[2236] Fix | Delete
return $.datepicker;
[2237] Fix | Delete
[2238] Fix | Delete
} );
[2239] Fix | Delete
[2240] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function