Multivolume Work: page view: three "undefined" in navigation
BFallert opened this issue · 2 comments
When i open a Multivolume Work in page view i see tree "undefined" in navigation:
<ul class="tx-dlf-navigation">
....
<li class="tx-dlf-navigation-edit">undefined</li>
<li class="tx-dlf-navigation-editRemove" style="padding-left: 4px;">undefined</li>
<li class="tx-dlf-navigation-magnifier" style="padding-left: 4px;">undefined</li>
You can see this in the Demo-Installation
Das Steinkohlenrevier von Lugau-Oelsnitz:
https://presentation-demo.kitodo.org/index.php?id=4&tx_dlf%5Bid%5D=797&tx_dlf%5Bpage%5D=1
For a volume or monograph, the following will be displayed instead
We don't use the DLF:Basket
plugin!
So now i see at a Multivolume Work:
But i see now that i have to see this only if i use the DLF:Basket
plugin.
When i open a 'normal' book i get a empty <div
class="tx-dlf-navigation-edit">` and so i see there no button.
Perhaps you can check the merken
-Button <button id="submitBasketForm" onclick="this.form.submit()">merken</button>
so you can check if a id submitBasketForm
exists.
if ($('.tx-dlf-navigation-edit').length) {
$('ul.tx-dlf-navigation').append('<li class="tx-dlf-navigation-edit">' + $('.tx-dlf-navigation-edit').html() + '</li>');
} else {
if ($('#submitBasketForm').length) {
$('ul.tx-dlf-navigation').append('<li class="tx-dlf-navigation-edit"><span></span></li>');
}
}
...
(the same with the other two buttons)
Should i do a PR?