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-conte.../plugins/ninja-fo.../assets/js
File: admin-submissions.js
jQuery( document ).ready( function( $ ) {
[0] Fix | Delete
[1] Fix | Delete
var clickedElement;
[2] Fix | Delete
[3] Fix | Delete
$(document).off( 'mousedown' ).on( 'mousedown', function( e ) {
[4] Fix | Delete
clickedElement = e.target;
[5] Fix | Delete
});
[6] Fix | Delete
[7] Fix | Delete
$( '#nf_form_filter' ).off( 'focus' ).on( 'focus', function () {
[8] Fix | Delete
//show the dropdown on focus of the input
[9] Fix | Delete
$( '.nf-form-dropdown' ).show();
[10] Fix | Delete
});
[11] Fix | Delete
[12] Fix | Delete
$( '#nf_form_filter' ).off( 'keyup' ).on( 'keyup', function () {
[13] Fix | Delete
//show the dropdown if it isn't show
[14] Fix | Delete
$( '.nf-form-dropdown' ).show();
[15] Fix | Delete
// get the value of the input, which we filter on
[16] Fix | Delete
var filter = $( this ).val();
[17] Fix | Delete
if( '' === filter ) {
[18] Fix | Delete
//if the filter val is empty, show all form options
[19] Fix | Delete
$( '.nf-form-dropdown' ).find( 'li' ).show();
[20] Fix | Delete
} else {
[21] Fix | Delete
$.each( $( '#nf_form_options span' ), function ( index, span ) {
[22] Fix | Delete
var tmpSpan = $( span );
[23] Fix | Delete
// test to see if span text contains the entered value
[24] Fix | Delete
if ( 0 <= tmpSpan.text().toLowerCase().indexOf( filter.toLowerCase() ) ) {
[25] Fix | Delete
// shows options that DO contain the text entered
[26] Fix | Delete
tmpSpan.parent().show();
[27] Fix | Delete
} else {
[28] Fix | Delete
// hides options the do not contain the text entered
[29] Fix | Delete
tmpSpan.parent().hide();
[30] Fix | Delete
}
[31] Fix | Delete
});
[32] Fix | Delete
}
[33] Fix | Delete
});
[34] Fix | Delete
[35] Fix | Delete
$( '#nf_form_filter' ).off( 'blur' ).on( 'blur' , function( e ) {
[36] Fix | Delete
if( 'undefined' !== typeof clickedElement ) {
[37] Fix | Delete
if ( ! $( clickedElement ).hasClass( 'nf-form-option' ) ) {
[38] Fix | Delete
$( '#nf_form_filter' ).val( '' );
[39] Fix | Delete
$( '.nf-form-dropdown' ).hide();
[40] Fix | Delete
}
[41] Fix | Delete
}
[42] Fix | Delete
});
[43] Fix | Delete
[44] Fix | Delete
$( '.nf-form-option' ).off( 'click' ).on( 'click', function() {
[45] Fix | Delete
// on click get the value of the input
[46] Fix | Delete
var val = $( this ).data( 'val' );
[47] Fix | Delete
// nf_export_form is now a hidden field instead of select element
[48] Fix | Delete
$( '#form_id' ).val( val );
[49] Fix | Delete
$( '#form_id' ).trigger( 'change' );
[50] Fix | Delete
// set the text of the input field
[51] Fix | Delete
$( '#nf_form_filter' ).val( '' );
[52] Fix | Delete
// and hide the option.
[53] Fix | Delete
$( '.nf-form-dropdown' ).hide();
[54] Fix | Delete
});
[55] Fix | Delete
[56] Fix | Delete
});
[57] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function