Server IP : 104.21.38.3 / Your IP : 104.23.175.161 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 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 : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/coircraft.com/wp-content/plugins/caldera-forms/assets/js/ |
Upload File : |
/* custom helpers */ Handlebars.registerHelper("even", function(options) { var intval = options.data.index / 2; if( intval === Math.ceil( intval ) ){ return options.fn(this); }else{ return false; } }); Handlebars.registerHelper("odd", function(options) { var intval = options.data.index / 2; if( intval === Math.ceil( intval ) ){ return false; }else{ return options.fn(this); } }); Handlebars.registerHelper("json", function(context) { return JSON.stringify( context ); }); /* Baldrick handlebars.js templating plugin */ (function($){ var compiledTemplates = {}; $.fn.baldrick.registerhelper('handlebars', { bind : function(triggers, defaults){ var templates = triggers.filter("[data-template-url]"); if(templates.length){ templates.each(function(){ var trigger = $(this); if(typeof compiledTemplates[trigger.data('templateUrl')] === 'undefined'){ compiledTemplates[trigger.data('templateUrl')] = true; if(typeof(Storage)!=="undefined"){ var cache, key; if(trigger.data('cacheLocal')){ key = trigger.data('cacheLocal'); cache = localStorage.getItem( 'handlebars_' + key ); }else if(trigger.data('cacheSession')){ key = trigger.data('cacheSession'); cache = sessionStorage.getItem( 'handlebars_' + key ); } } if(cache){ compiledTemplates[trigger.data('templateUrl')] = Handlebars.compile(cache); }else{ $.get(trigger.data('templateUrl'), function(data, ts, xhr){ if(typeof(Storage)!=="undefined"){ var key; if(trigger.data('cacheLocal')){ key = trigger.data('cacheLocal'); localStorage.setItem( 'handlebars_' + key, xhr.responseText ); }else if(trigger.data('cacheSession')){ key = trigger.data('cacheSession'); sessionStorage.setItem( 'handlebars_' + key, xhr.responseText ); } } compiledTemplates[trigger.data('templateUrl')] = Handlebars.compile(xhr.responseText); }); } } }); } }, request_params : function(request, defaults, params){ if((params.trigger.data('templateUrl') || params.trigger.data('template')) && typeof Handlebars === 'object'){ request.dataType = 'json'; return request; } }, filter : function(opts, defaults){ if(opts.params.trigger.data('templateUrl')){ if( typeof compiledTemplates[opts.params.trigger.data('templateUrl')] === 'function' ){ opts.data = compiledTemplates[opts.params.trigger.data('templateUrl')](opts.data); } }else if(opts.params.trigger.data('template')){ if( typeof compiledTemplates[opts.params.trigger.data('template')] === 'function' ){ opts.data = compiledTemplates[opts.params.trigger.data('template')](opts.data); }else{ if($(opts.params.trigger.data('template'))){ compiledTemplates[opts.params.trigger.data('template')] = Handlebars.compile($(opts.params.trigger.data('template')).html()); opts.data = compiledTemplates[opts.params.trigger.data('template')](opts.data); } } } return opts; } }); })(jQuery);