![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/webtrees/resources/views/modules/descendancy/ |
Upload File : |
<?php declare(strict_types=1); use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Tree; use Fisharebest\Webtrees\View; /** * @var string $individual_list * @var Tree $tree */ ?> <form method="post" action="<?= e(route('module', ['module' => 'descendancy', 'action' => 'Descendants', 'tree' => $tree->name()])) ?>" onsubmit="return false;"> <input type="search" name="sb_desc_name" id="sb_desc_name" placeholder="<?= I18N::translate('Search') ?>"> <?= csrf_field() ?> </form> <div id="sb_desc_content"> <ul> <?= $individual_list ?> </ul> </div> <?php View::push('javascript') ?> <script> function dsearchQ() { var query = $("#sb_desc_name").val(); if (query.length>1) { $("#sb_desc_content").load(<?= json_encode(route('module', ['module' => 'descendancy', 'action' => 'Search', 'tree' => $tree->name(), 'search' => '']), JSON_THROW_ON_ERROR) ?> + encodeURIComponent(query)); } } $("#sb_desc_name").focus(function(){this.select();}); $("#sb_desc_name").blur(function(){if (this.value === "") this.value="<?= I18N::translate('Search') ?>";}); var dtimerid = null; $("#sb_desc_name").keyup(function(e) { if (dtimerid) window.clearTimeout(dtimerid); dtimerid = window.setTimeout("dsearchQ()", 500); }); $("#sb_desc_content").on("click", ".sb_desc_indi", function() { var self = $(this), state = self.children(".plusminus"), target = self.siblings("div"); if(state.hasClass("icon-plus")) { if (jQuery.trim(target.html())) { target.show("fast"); // already got content so just show it } else if (this.dataset.wtHref !== "#") { target .hide() .load(this.dataset.wtHref, function(response, status, xhr) { if(status === "success" && response !== "") { target.show("fast"); } }) } } else { target.hide("fast"); } state.toggleClass("icon-minus icon-plus"); return false; }); </script> <?php View::endpush() ?>