Skip to content

Commit 1320fb5

Browse files
committed
Channels tab: enable AJAX compatibility.
1 parent d5617a5 commit 1320fb5

File tree

4 files changed

+3
-15
lines changed

4 files changed

+3
-15
lines changed

config/vufind/RecordTabs.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ defaultTab = null
155155
; by a tab. Settings are named by the tab name (X above) and may be repeated if
156156
; multiple scripts are required.
157157
[TabScripts]
158+
Channels[] = channels.js
158159
Versions[] = combined-search.js
159160
Versions[] = check_item_statuses.js
160161
Versions[] = record_versions.js

module/VuFind/src/VuFind/RecordTab/Channels.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,6 @@ public function getDescription()
6969
return $this->options['label'] ?? 'Channels';
7070
}
7171

72-
/**
73-
* Can this tab be loaded via AJAX?
74-
*
75-
* @return bool
76-
*/
77-
public function supportsAjax()
78-
{
79-
// Due to heavy Javascript in channels, the tab cannot be AJAX-loaded:
80-
return false;
81-
}
82-
8372
/**
8473
* Return context variables used for rendering the block's template.
8574
*

themes/bootstrap5/templates/channels/channelList.phtml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<?php
22
$this->assetManager()->appendScriptLink('channels.js');
3-
$this->jsTranslations()->addStrings([
4-
'channel_more_items' => 'channel_more_items',
5-
'nohit_heading' => 'nohit_heading',
6-
]);
73
?>
84

95
<?php if (empty($token) && ($displaySearchBox ?? true)): // no results ?>

themes/bootstrap5/templates/layout/js-translations.phtml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ $this->jsTranslations()->addStrings(
88
'bulk_limit_exceeded' => 'bulk_limit_exceeded',
99
'bulk_noitems_advice' => 'bulk_noitems_advice',
1010
'bulk_save_success' => 'bulk_save_success',
11+
'channel_more_items' => 'channel_more_items',
1112
'clear_selection' => 'clear_selection',
1213
'close' => 'close',
1314
'collection_empty' => 'collection_empty',
@@ -28,6 +29,7 @@ $this->jsTranslations()->addStrings(
2829
'modified_filter_count' => 'modified_filter_count',
2930
'more_ellipsis' => 'more_ellipsis',
3031
'no_description' => 'no_description',
32+
'nohit_heading' => 'nohit_heading',
3133
'number_thousands_separator' => [
3234
'number_thousands_separator', [], ',',
3335
],

0 commit comments

Comments
 (0)