Skip to content
Snippets Groups Projects
Commit 58e0c65c authored by Gregor Gawol's avatar Gregor Gawol Committed by Sebastian Kehr
Browse files

refs #16627 [fid_adlr] ebook notice bug

* fixed some bugs
parent e03ad166
No related merge requests found
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
$(document).ready(function() { $(document).ready(function() {
var recordId = $('.hiddenId').val(); var recordId = $('.hiddenId').val();
var recordSource = $('.hiddenSource').val(); var recordSource = $('.hiddenSource').val();
// console.log({id: recordId, source: recordSource});
$.ajax({ $.ajax({
dataType: 'json', dataType: 'json',
url: VuFind.path + '/AJAX/JSON?method=getBoss', url: VuFind.path + '/AJAX/JSON?method=getBoss',
...@@ -49,7 +48,6 @@ ...@@ -49,7 +48,6 @@
}).done(function(response) { }).done(function(response) {
if (response.data.isISIL) { if (response.data.isISIL) {
$('.boss-data-true').html(response.data.html); $('.boss-data-true').html(response.data.html);
$('.getitbox-notices').addClass('hidden');
} else { } else {
$('.boss-data-false').html(response.data.html); $('.boss-data-false').html(response.data.html);
$('.boss-notice').addClass('hidden'); $('.boss-notice').addClass('hidden');
...@@ -63,6 +61,16 @@ JS; ...@@ -63,6 +61,16 @@ JS;
<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?> <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?>
<?php endif; ?> <?php endif; ?>
<?php if ($getit->hideNotice()): ?>
<? $script = <<<JS
$(document).ready(function() {
$('.getitbox-notices').addClass('hidden');
});
JS;
?>
<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?>
<?php endif; ?>
<div class="getitbox-getit"> <div class="getitbox-getit">
<h4><?=$getit->getBoxHeadline()?></h4> <h4><?=$getit->getBoxHeadline()?></h4>
...@@ -109,7 +117,7 @@ JS; ...@@ -109,7 +117,7 @@ JS;
<?php if ($user && $getit->showBOSSData()): ?> <?php if ($user && $getit->showBOSSData()): ?>
<div class="boss-data-false"></div> <div class="boss-data-false"></div>
<?php if (!$getit->hideNotice()): ?><br/><?php endif; ?> <?php if ($getit->hideNotice()): ?><br/><?php endif; ?>
<?php endif; ?> <?php endif; ?>
<?php <?php
...@@ -123,7 +131,7 @@ JS; ...@@ -123,7 +131,7 @@ JS;
<div class="getitbox-notices"> <div class="getitbox-notices">
<?php if ($user && $getit->showBOSSData()): ?> <?php if ($user && $getit->showBOSSData()): ?>
<div class="boss-data-false"></div> <div class="boss-data-false"></div>
<?php if (!$getit->hideNotice()): ?><br/><?php endif; ?> <?php if ($getit->hideNotice()): ?><br/><?php endif; ?>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment