Skip to content
Snippets Groups Projects
Commit 380da6f4 authored by Demian Katz's avatar Demian Katz
Browse files

Merge branch 'release-4.0'

parents 734faaca 537a6782
No related merge requests found
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -78,13 +78,10 @@ footer ul { padding-left: 30px; } ...@@ -78,13 +78,10 @@ footer ul { padding-left: 30px; }
[id^=list].list-group .col-sm-9 { margin: 0; } [id^=list].list-group .col-sm-9 { margin: 0; }
/* --- Channels --- */ /* --- Channels --- */
.channel { margin-bottom: 2rem; } .channel,
.channel-title { .channel-title.no-results { margin-bottom: 2rem; }
margin-top: 1rem; .channel-title { margin-top: 1rem; }
margin-left: -56px;
}
.channel-title .fa { margin-top: 4px; } .channel-title .fa { margin-top: 4px; }
.channel-title h2 { padding-left: 50px; }
/* --- Offcanvas --- */ /* --- Offcanvas --- */
body.offcanvas { body.offcanvas {
......
...@@ -85,10 +85,22 @@ function bindChannelAddMenu(iteration, scope) { ...@@ -85,10 +85,22 @@ function bindChannelAddMenu(iteration, scope) {
$(scope).find('.channel-add-menu .dropdown-menu a').click(function selectAddedChannel(e) { $(scope).find('.channel-add-menu .dropdown-menu a').click(function selectAddedChannel(e) {
$.ajax(e.target.href).done(function addChannelAjaxDone(data) { $.ajax(e.target.href).done(function addChannelAjaxDone(data) {
var list = $(e.target).closest('.dropdown-menu'); var list = $(e.target).closest('.dropdown-menu');
$(e.target).closest('.channel').after(data); var $testEl = $(data);
// Make sure the channel has content
if ($testEl.find('.channel-record').length === 0) {
$(e.target).closest('.channel').after(
'<div class="channel-title no-results">'
+ '<h2>' + $testEl.find('h2').html() + '</h2>'
+ VuFind.translate('nohit_heading')
+ '</div>'
);
} else {
$(e.target).closest('.channel').after(data);
$('.channel').each(setupChannelSlider);
$('.channel').each(bindChannelAddMenu);
}
// Remove dropdown link
$('[data-token="' + e.target.dataset.token + '"]').parent().remove(); $('[data-token="' + e.target.dataset.token + '"]').parent().remove();
$('.channel').each(setupChannelSlider);
$('.channel').each(bindChannelAddMenu);
if (list.children().length === 0) { if (list.children().length === 0) {
$('.channel-add-menu[data-group="' + list.closest('.channel-add-menu').data('group') + '"]').remove(); $('.channel-add-menu[data-group="' + list.closest('.channel-add-menu').data('group') + '"]').remove();
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
$this->jsTranslations()->addStrings([ $this->jsTranslations()->addStrings([
'channel_expand' => 'channel_expand', 'channel_expand' => 'channel_expand',
'channel_search' => 'channel_search', 'channel_search' => 'channel_search',
'nohit_heading' => 'nohit_heading',
'View Record' => 'View Record', 'View Record' => 'View Record',
]); ]);
?> ?>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -128,6 +128,11 @@ header { ...@@ -128,6 +128,11 @@ header {
/* --- Cart --- */ /* --- Cart --- */
#cartSummary strong { font-weight: inherit; } #cartSummary strong { font-weight: inherit; }
/* --- Channels --- */
.channel-title { margin-top: 1rem; }
.channel,
.channel-title.no-results { margin-bottom: 2rem; }
/* --- MyResearch --- */ /* --- MyResearch --- */
.myresearch-menu a:hover { background-color: @white; } .myresearch-menu a:hover { background-color: @white; }
......
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