From 289adf4f5afa4dd7635c03234125133815ec1b14 Mon Sep 17 00:00:00 2001 From: Gregor Gawol <gawol@ub.uni-leipzig.de> Date: Fri, 6 Dec 2019 14:15:28 +0100 Subject: [PATCH] refs #16616 [fid_adlr] boss bugs * fixed boss display bugs --- .../templates/RecordTab/holdingsils.phtml | 21 ++++++++----------- .../fid_adlr/templates/get-it-box/links.phtml | 3 ++- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/themes/fid_adlr/templates/RecordTab/holdingsils.phtml b/themes/fid_adlr/templates/RecordTab/holdingsils.phtml index d6ef95819f8..1d9e3fc45b9 100644 --- a/themes/fid_adlr/templates/RecordTab/holdingsils.phtml +++ b/themes/fid_adlr/templates/RecordTab/holdingsils.phtml @@ -49,6 +49,7 @@ }).done(function(response) { if (response.data.isISIL) { $('.boss-data-true').html(response.data.html); + $('.getitbox-notices').addClass('hidden'); } else { $('.boss-data-false').html(response.data.html); $('.boss-notice').addClass('hidden'); @@ -60,17 +61,6 @@ JS; ?> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> -<?php if ($getit->hideNotice()): ?> - <? $script = <<<JS - $(document).ready(function() { - $('.getitbox-notices').addClass('hidden'); - // Use to register new lightbox window networknotice - VuFind.lightbox.bind(); - }); -JS; - ?> - <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> -<?php endif; ?> <?php endif; ?> <div class="getitbox-getit"> @@ -119,7 +109,7 @@ JS; <?php if ($user && $getit->showBOSSData()): ?> <div class="boss-data-false"></div> -<?php if ($getit->hideNotice()): ?><br/><?php endif; ?> +<?php if (!$getit->hideNotice()): ?><br/><?php endif; ?> <?php endif; ?> <?php @@ -129,6 +119,13 @@ JS; <?=sprintf($getit->getNotices(), $url)?> <?php if ($getit->hideNotice()): ?></div><?php endif; ?> </div> +<?php else: ?> +<div class="getitbox-notices"> + <?php if ($user && $getit->showBOSSData()): ?> + <div class="boss-data-false"></div> + <?php if (!$getit->hideNotice()): ?><br/><?php endif; ?> + <?php endif; ?> +</div> <?php endif; ?> <!-- fid_adlr: recordTab - holdingsils - END --> diff --git a/themes/fid_adlr/templates/get-it-box/links.phtml b/themes/fid_adlr/templates/get-it-box/links.phtml index 3ca642872af..6dac92c17db 100644 --- a/themes/fid_adlr/templates/get-it-box/links.phtml +++ b/themes/fid_adlr/templates/get-it-box/links.phtml @@ -19,7 +19,8 @@ <a href="<?= $this->escapeHtmlAttr($this->proxyUrl($current['url'])) ?>" target="_blank"><i class="icon icon-external-link" aria-hidden="true"></i> <?= $this->truncate($this->escapeHtml($current['desc']), $maxDisplayLength) ?> - </a><?php endif; ?> + </a><br/> + <?php endif; ?> <?php endforeach; ?> <?php endif; ?> <?php /* finc-specific snippet - #9274 - replaces if ($openUrlActive): ... - CK */ ?> -- GitLab