Bug 12428 - "OPAC info" is not displayed in the OPAC
The changes made by Bug 7720 ("Ambiguity in OPAC Details location")
broke the display of OPAC branch information tooltips by making changes
to the markup which the tooltip plugin needs to function.
This patch corrects the markup to enable tooltips to work again. This
patch also makes changes to Items.pm so that branch information tooltips
can be shown for both home and holding branches (which are optionally
displayed now via the changes by Bug 7720). Before this patch the
tooltip would always display the information for the holding branch
regardless of the OpacLocationBranchToDisplay setting.
This patch also changes the footer include, adding an alias for the
jQueryUI tooltip function to prevent conflict with Bootstrap's function
of the same name.
To test, you must have at least two libraries configured with "OPAC
info" for display in the OPAC.
Modify the holdings of a title so that there is at least one item which
has different holding and home branches matching your library configured
above.
View the detail page for that record under various values of the
OpacLocationBranchToDisplay system preference:
- "holding library" : The table of holdings should show a column for
only the holding library. Hovering your cursor over the library name
should display the branch information you configured for that library
in a tooltip .
- "home and holding library" : The table of holdings should show columns
for both home and holding library. Hovering your cursor over each
should show the corresponding library information tooltips.
- "home library" : The table of holdings should show a column for
only the home library. Hovering your cursor over the library name
should display the branch information you configured for that library
in a tooltip.
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
Works with all settings of OpacLocationBranchToDisplay.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
c81f58a1c8
commit
c5602bf813
|
|
@ -1270,7 +1270,8 @@ sub GetItemsInfo {
|
|||
itemtypes.notforloan as notforloan_per_itemtype,
|
||||
holding.branchurl,
|
||||
holding.branchname,
|
||||
holding.opac_info as branch_opac_info
|
||||
holding.opac_info as holding_branch_opac_info,
|
||||
home.opac_info as home_branch_opac_info
|
||||
FROM items
|
||||
LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
|
||||
LEFT JOIN branches AS home ON items.homebranch=home.branchcode
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -77,6 +77,10 @@
|
|||
<!-- JavaScript includes -->
|
||||
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/jquery-ui.js"></script>
|
||||
<script type="text/javascript">
|
||||
// Resolve name collision between jQuery UI and Twitter Bootstrap
|
||||
$.widget.bridge('uitooltip', $.ui.tooltip);
|
||||
</script>
|
||||
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="[% interface %]/[% theme %]/js/global.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
|
|
|||
|
|
@ -1189,19 +1189,19 @@
|
|||
<td class="location" property="seller">
|
||||
<link property="itemOffered" href="#record" />
|
||||
<link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
|
||||
<div class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
|
||||
<span class="[% ITEM_RESULT.holding_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
|
||||
[% IF ( ITEM_RESULT.branchurl ) %]
|
||||
<a href="[% ITEM_RESULT.branchurl %]" title="">[% ITEM_RESULT.branchname %]</a>
|
||||
<a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
|
||||
[% ELSE %]
|
||||
<span title="">[% ITEM_RESULT.branchname %]</span>
|
||||
<span>[% ITEM_RESULT.branchname %]</span>
|
||||
[% END %]
|
||||
</div>
|
||||
</span>
|
||||
<div class="branch-info-tooltip">[% ITEM_RESULT.holding_branch_opac_info %]</div>
|
||||
|
||||
[% IF ( OpacLocationBranchToDisplayShelving == 'holding' || OpacLocationBranchToDisplayShelving == 'both' ) %]
|
||||
<span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
|
||||
[% END %]
|
||||
|
||||
<div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
|
||||
</td>
|
||||
[% END %]
|
||||
|
||||
|
|
@ -1209,18 +1209,19 @@
|
|||
<td class="location" property="seller">
|
||||
<link property="itemOffered" href="#record" />
|
||||
<link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
|
||||
<div class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
|
||||
<span class="[% ITEM_RESULT.home_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
|
||||
[% IF Branches.GetURL( ITEM_RESULT.homebranch ) %]
|
||||
[% home_branch_url = Branches.GetURL( ITEM_RESULT.homebranch ) %]
|
||||
[% IF ( home_branch_url ) %]
|
||||
<a href="[% home_branch_url %]">[% Branches.GetName( ITEM_RESULT.homebranch ) %]</a>
|
||||
[% ELSE %]
|
||||
[% Branches.GetName( ITEM_RESULT.homebranch ) %]
|
||||
<span>[% Branches.GetName( ITEM_RESULT.homebranch ) %]</span>
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
<span title="">[% Branches.GetName( ITEM_RESULT.homebranch ) %]</span>
|
||||
<span>[% Branches.GetName( ITEM_RESULT.homebranch ) %]</span>
|
||||
[% END %]
|
||||
</div>
|
||||
</span>
|
||||
<div class="branch-info-tooltip">[% ITEM_RESULT.home_branch_opac_info %]</div>
|
||||
|
||||
[% IF ( OpacLocationBranchToDisplayShelving == 'home' || OpacLocationBranchToDisplayShelving == 'both' ) %]
|
||||
<span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
|
||||
|
|
@ -1354,7 +1355,7 @@
|
|||
|
||||
$(document).ready(function() {
|
||||
$('#bibliodescriptions').tabs();
|
||||
$(".branch-info-tooltip-trigger").tooltip({
|
||||
$(".branch-info-tooltip-trigger").uitooltip({
|
||||
position: { my: "left+15 center", at: "right center" },
|
||||
show: 50,
|
||||
hide: 50,
|
||||
|
|
|
|||
|
|
@ -1523,6 +1523,10 @@ input.editshelf {
|
|||
display: none;
|
||||
}
|
||||
|
||||
.ui-tooltip-content p {
|
||||
margin: 0.3em 0;
|
||||
}
|
||||
|
||||
#social_networks {
|
||||
a {
|
||||
background: transparent url("../images/social-sprite.png") no-repeat;
|
||||
|
|
|
|||
Loading…
Reference in New Issue