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 @@
$(document).ready(function() {
var recordId = $('.hiddenId').val();
var recordSource = $('.hiddenSource').val();
// console.log({id: recordId, source: recordSource});
$.ajax({
dataType: 'json',
url: VuFind.path + '/AJAX/JSON?method=getBoss',
......@@ -49,7 +48,6 @@
}).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');
......@@ -63,6 +61,16 @@ JS;
<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET');?>
<?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">
<h4><?=$getit->getBoxHeadline()?></h4>
......@@ -109,7 +117,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
......@@ -123,7 +131,7 @@ JS;
<div class="getitbox-notices">
<?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; ?>
</div>
<?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