Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bootstrap5 theme #3222

Merged
merged 133 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
f93fd74
Initial commit. Very raw.
EreMaijala Nov 10, 2023
6db3e8f
Fix popper install.
EreMaijala Nov 10, 2023
45a0148
Use minified bootstrap js.
EreMaijala Nov 10, 2023
8830abe
Navbar + modal tweaks.
EreMaijala Nov 10, 2023
9f09641
Fix tooltips, btn-default, forms etc.
EreMaijala Nov 13, 2023
cc8f0fb
Fix checkboxes, paddings, control widths etc.
EreMaijala Nov 13, 2023
037937b
Tweaks here and there. Initial conversion of bootprint3 and sandal.
EreMaijala Nov 14, 2023
6a71b51
Add mixins and more vars to bs3-compat.
EreMaijala Nov 15, 2023
e52af63
Add a phing task to create bootstrap5 templates and remove them from …
EreMaijala Nov 17, 2023
361809a
Merge branch 'dev' into dev-bootstrap5
EreMaijala Nov 17, 2023
e56c45f
Merge branch 'dev' into dev-bootstrap5
EreMaijala Nov 17, 2023
55e91e2
Tweak Mink tests to work without jQuery :focusable selector.
EreMaijala Nov 17, 2023
9975f33
Fix cart popovers, Mink tests, pagination.
EreMaijala Nov 21, 2023
d574ca0
Fix virtual keyboard etc.
EreMaijala Nov 22, 2023
4376404
Add files.
EreMaijala Nov 22, 2023
3bdd217
Switch to dart-sass from deprecated node-sass.
EreMaijala Nov 28, 2023
ac61470
Upgrade Font Awesome to get rid of deprecation warnings.
EreMaijala Nov 28, 2023
a490965
Add compatibility layer for old data attributes.
EreMaijala Nov 28, 2023
7278a8b
Use load path for bootstrap vendor files.
EreMaijala Nov 28, 2023
8bee275
Fix lightbox.
EreMaijala Nov 28, 2023
75c8d2c
Fix responsive utilities, add pager, tweak breadcrumbs etc.
EreMaijala Nov 28, 2023
c252544
Improve navbar-form.
EreMaijala Nov 28, 2023
4e24927
Fix labels and badges. Rename a couple of override files.
EreMaijala Dec 12, 2023
6fe9395
Merge branch 'dev' into dev-bootstrap5
EreMaijala Dec 13, 2023
4696985
Fix badge color.
EreMaijala Dec 13, 2023
d19955b
Merge branch 'dev' into dev-bootstrap5
EreMaijala Dec 13, 2023
54e5d50
Update searchbox_controls.js from bootstrap3.
EreMaijala Dec 13, 2023
86e48a9
Use variable overrides from a11y, setup alert colors properly, add mo…
EreMaijala Dec 13, 2023
c0a6fc1
Merge branch 'dev' into dev-bootstrap5
EreMaijala Jan 17, 2024
15d63df
Remove bootstrap-accessibility.
EreMaijala Jan 17, 2024
bc147b5
Merge branch 'dev' into dev-bootstrap5
EreMaijala Mar 6, 2024
d709c15
Update JS.
EreMaijala Mar 6, 2024
3f4f708
Update SCSS.
EreMaijala Mar 6, 2024
e0ca574
Merge branch 'dev' into dev-bootstrap5
EreMaijala Mar 6, 2024
8f4cd86
Update JS from bootstrap3.
EreMaijala Mar 6, 2024
7ad1e37
Fix account ajax tooltips.
EreMaijala Mar 6, 2024
2854d7c
Update theme config.
EreMaijala Mar 6, 2024
612b754
Update scss, tweak navbar and pagination.
EreMaijala Mar 6, 2024
43fca35
Fix navbar.
EreMaijala Mar 7, 2024
42c60bf
Tweak update-bootstrap5-templates task.
EreMaijala Mar 7, 2024
7ba62fa
Fix pager and pagination vertical margins.
EreMaijala Mar 8, 2024
7001341
Add list_item_selection.js.
EreMaijala Mar 8, 2024
6cf0425
Merge branch 'dev' into dev-bootstrap5
EreMaijala Mar 18, 2024
e0725fa
Update js and scss with changes in dev.
EreMaijala Mar 18, 2024
e5bef9d
Fix grid breakpoints for more bs3 compatible ones.
EreMaijala Mar 18, 2024
c22fc7f
Fix data-toggle update to not apply to vufind-offcanvas.
EreMaijala Mar 18, 2024
1a84b79
Add selectors to MinkTestCase.
EreMaijala Mar 18, 2024
c7853a8
Add height to .form-control in bs3-compat.
EreMaijala Mar 18, 2024
72c5740
Change md breakpoint to align with bs3.
EreMaijala Mar 18, 2024
87e1833
Merge branch 'dev' into dev-bootstrap5
EreMaijala Mar 18, 2024
22901c0
Update styles and js from bootstrap3, fix search form breakpoint.
EreMaijala Mar 18, 2024
ebee345
Fix legend, label and MyResearch menu underline.
EreMaijala Mar 18, 2024
a8eb1d2
Fix hierarchy icons.
EreMaijala Mar 18, 2024
588c0b5
Fix textarea height (e.g. feedback forms)
EreMaijala Mar 18, 2024
5871472
Merge branch 'dev' into dev-bootstrap5
EreMaijala Mar 22, 2024
683db30
Apply upstream changes to bootstrap5.
EreMaijala Mar 22, 2024
ac7098e
Fix btn-default background color.
EreMaijala Mar 22, 2024
7fede37
Revert lost changes in navbar header.
EreMaijala Mar 22, 2024
019abc0
Fix channels popovers.
EreMaijala Mar 28, 2024
e32c934
Disable dark mode for now.
EreMaijala Mar 28, 2024
29871b7
Comment out dark mode variables for now.
EreMaijala Apr 2, 2024
8682bf9
Merge branch 'dev' into dev-bootstrap5
EreMaijala Apr 2, 2024
38699b0
Update styles from dev.
EreMaijala Apr 2, 2024
b48f918
Fix list item selection tests.
EreMaijala Apr 2, 2024
fb2c648
Merge branch 'dev' into dev-bootstrap5
EreMaijala Apr 10, 2024
be306b6
Add sandal5, revert sandal and bootprint3 to bootstrap3.
EreMaijala Apr 16, 2024
35994a5
Fix navbar active item color.
EreMaijala Apr 16, 2024
b1c499a
Add build task scssonly for less-less themes and update build:css to …
EreMaijala Apr 16, 2024
dd521a3
Fix sandal5 compiled.css.
EreMaijala Apr 16, 2024
8a97fd6
Merge branch 'dev' into dev-bootstrap5
EreMaijala Apr 17, 2024
f4c2b1e
Upstream changes, fix btn-default focus.
EreMaijala Apr 17, 2024
3ae44b5
Add update-bootstrap3 task, rename update-bootstrap5. Tweak tasks.
EreMaijala Apr 17, 2024
7384e0b
Fix QA.
EreMaijala Apr 17, 2024
8263170
Copy view helpers from Bootstrap3.
EreMaijala Apr 17, 2024
c4ed228
Add mentions of bootstrap5 and sandal5 to config.ini.
EreMaijala Apr 17, 2024
2f2222e
Fix Mink tests, facet storage, missing js updates.
EreMaijala Apr 18, 2024
19dfce1
Fix tags and panel titles.
EreMaijala Apr 18, 2024
ae277be
Disable check:scss for scss-only themes.
EreMaijala Apr 18, 2024
ca71443
Fix navbar nav links, similar items.
EreMaijala Apr 18, 2024
dcb440f
Fix list-group bottom margin.
EreMaijala Apr 18, 2024
d06662a
Fix similar items carousel.
EreMaijala Apr 19, 2024
cdb2075
Fix search type field alignment (and other selects as well).
EreMaijala Apr 19, 2024
2f830bf
Fix print media table background.
EreMaijala Apr 19, 2024
582c21e
Fix labels, drop a11y.scss.
EreMaijala Apr 19, 2024
63c92b6
Sort bootstrap imports.
EreMaijala Apr 19, 2024
806a0ed
Tweak badge and label font sizes (again).
EreMaijala Apr 19, 2024
151f4b8
Fix typo.
EreMaijala Apr 19, 2024
7b7610a
Merge branch 'dev' into dev-bootstrap5
EreMaijala Apr 19, 2024
082025d
Fix offcanvas toggles, print table background.
EreMaijala Apr 22, 2024
a56973a
Fix btn-default active and focus colors.
EreMaijala Apr 22, 2024
0fe2250
Fix active tab handling.
EreMaijala Apr 22, 2024
4a0763c
Fix sandal focus outline. Fix multi-select height.
EreMaijala Apr 22, 2024
8922cdc
Fix navbar colors, search tabs.
EreMaijala Apr 22, 2024
febe7d0
Switch to manual focus to fix buttons in popovers in channels.
EreMaijala Apr 22, 2024
46cd20b
Fix reboot position, fix navbar dropdowns.
EreMaijala Apr 22, 2024
72f1f2e
Less to sass.
EreMaijala Apr 22, 2024
238842e
Fix search tabs in results, disable !important color utilities to fix…
EreMaijala Apr 23, 2024
fc4b0a2
Fix height of non-multiple select when size is specified.
EreMaijala Apr 23, 2024
2ff7e78
Fix MyResearch menu hover color.
EreMaijala Apr 23, 2024
f899737
Fix normal nav-link hover color.
EreMaijala Apr 23, 2024
ba351fe
Merge remote-tracking branch 'origin/dev' into dev-bootstrap5
EreMaijala Apr 24, 2024
4476363
Revert sandal common.less, update cookieconsent styles.
EreMaijala Apr 24, 2024
7a67be5
Upgrade to Bootstrap 5.3.3.
EreMaijala Apr 24, 2024
c37c2b3
Fix MyResearch navbar dropdown menu hover color.
EreMaijala Apr 24, 2024
3a4a03e
Add sr-only-focusable to bs3-compat.
EreMaijala Apr 24, 2024
099e8a5
Fix select field in admin module.
EreMaijala Apr 25, 2024
7241066
Tweak admin form a bit more.
EreMaijala May 2, 2024
274860b
Merge remote-tracking branch 'origin/dev' into dev-bootstrap5
EreMaijala May 15, 2024
c6880c8
Apply upstream changes to bootstrap5.
EreMaijala May 16, 2024
2d622ba
Merge remote-tracking branch 'origin/dev' into dev-bootstrap5
EreMaijala May 20, 2024
ba8ed75
Apply upstream changes to bs5 themes.
EreMaijala May 20, 2024
336564e
Revert bad change.
EreMaijala May 20, 2024
79d93b7
Fix accessibility issues with header and tabs.
EreMaijala May 20, 2024
60620de
Add templates.
EreMaijala May 20, 2024
f188109
Update .gitignore.
EreMaijala May 20, 2024
4c6087c
Enable check-bootstrap5 task.
EreMaijala May 20, 2024
9bf7d23
Add templates in templates/admin/tags.
EreMaijala May 20, 2024
e9ca50a
Make Bootstrap3 view helpers extend Bootstrap5's to keep things in sync.
EreMaijala May 20, 2024
f0716aa
Merge remote-tracking branch 'origin/dev' into dev-bootstrap5
EreMaijala May 20, 2024
7a9ccfc
Apply upstream changes to bootstrap5.
EreMaijala May 20, 2024
b2079d7
Fix selectors.
EreMaijala May 21, 2024
01d9387
Merge remote-tracking branch 'origin/dev' into dev-bootstrap5
EreMaijala May 21, 2024
557eab2
Fix Mink tests.
EreMaijala May 21, 2024
b0afe2f
Hide browser's X button in search fields.
EreMaijala May 21, 2024
c63139e
Fix facet lightbox.
EreMaijala May 21, 2024
ef5ae2b
Fix responsive tables.
EreMaijala May 21, 2024
f6f8c86
Add composer task 'install-build-deps'.
EreMaijala May 21, 2024
5dc1dcb
Merge branch 'dev' into dev-bootstrap5
demiankatz May 21, 2024
e88a88a
Remove extraneous view helper code.
EreMaijala May 22, 2024
47a59a3
Fix comment.
EreMaijala May 22, 2024
859a8f4
Change Bootstrap 3 compatibility JS module name.
EreMaijala May 22, 2024
2ba0c3c
Update function name too.
EreMaijala May 22, 2024
b974772
Merge remote-tracking branch 'origin/dev' into dev-bootstrap5
EreMaijala May 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ node_modules
package-lock.json
public/swagger-ui
tests/phpcs.cache.json
themes/bootstrap5/scss/vendor/bootstrap
local/DirLocations.ini
local/config/vufind/*.ini
local/config/vufind/*.json
Expand Down
28 changes: 22 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ module.exports = function(grunt) {
var parts = file.split('/');
parts.pop(); // eliminate filename

// initialize search path with directory containing LESS file
// initialize search path with directory containing the LESS or SCSS file
var retVal = [];
retVal.push(parts.join('/'));
retVal.push(parts.join('/') + '/vendor/');

var themeBase = parts.slice(0, -1);
retVal.push(themeBase.join('/') + '/node_modules/');

// Iterate through theme.config.php files collecting parent themes in search path:
while (config = fs.readFileSync("themes/" + parts[1] + "/theme.config.php", "UTF-8")) {
// First identify mixins:
Expand All @@ -44,6 +47,9 @@ module.exports = function(grunt) {
parts[1] = matches[1];
retVal.push(parts.join('/') + '/');
retVal.push(parts.join('/') + '/vendor/');

var parentThemeBase = parts.slice(0, -1);
retVal.push(parentThemeBase.join('/') + '/node_modules/');
}
return retVal;
}
Expand All @@ -57,7 +63,7 @@ module.exports = function(grunt) {
}
}];

grunt.initConfig({
const gruntConfig = {
// LESS compilation
less: {
compile: {
Expand All @@ -77,6 +83,7 @@ module.exports = function(grunt) {
}
},
// SASS compilation
// 'scss' is also mapped to 'scssonly' below
'scss': {
'dart-sass': {
options: {
Expand Down Expand Up @@ -201,7 +208,11 @@ module.exports = function(grunt) {
tasks: ['scss']
}
}
});
};
// scssonly compiles scss files for themes that don't use less
gruntConfig.scssonly = gruntConfig.scss;

grunt.initConfig(gruntConfig);

grunt.registerMultiTask('lessdev', function lessWithMaps() {
grunt.config.set('less', {
Expand All @@ -224,9 +235,13 @@ module.exports = function(grunt) {
grunt.config.set('dart-sass', getSassConfig(this.data.options, false));
grunt.task.run('dart-sass');
});
grunt.registerMultiTask('scssonly', function sassScan() {
grunt.config.set('dart-sass', getSassConfig(this.data.options, false, false));
grunt.task.run('dart-sass');
});

grunt.registerMultiTask('check:scss', function sassCheck() {
grunt.config.set('dart-sass', getSassConfig(this.data.options, true));
grunt.config.set('dart-sass', getSassConfig(this.data.options, true, true));
grunt.task.run('dart-sass');
});

Expand All @@ -244,11 +259,12 @@ module.exports = function(grunt) {
- grunt lessToSass = transpile all LESS files to SASS.`);
});

function getSassConfig(additionalOptions, checkOnly) {
function getSassConfig(additionalOptions, checkOnly, themesWithLess = null) {
var sassConfig = {},
path = require('path'),
themeList = fs.readdirSync(path.resolve('themes')).filter(function (theme) {
return fs.existsSync(path.resolve('themes/' + theme + '/scss/compiled.scss'));
return fs.existsSync(path.resolve('themes/' + theme + '/scss/compiled.scss'))
&& (null === themesWithLess || themesWithLess === fs.existsSync(path.resolve('themes/' + theme + '/less/compiled.less')));
});

for (var i in themeList) {
Expand Down
152 changes: 152 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,15 @@
<phingcall target="eslint-report"/>
<phingcall target="jshint-report"/>
<phingcall target="phpstan-checkstyle"/>
<phingcall target="check-bootstrap5"/>
</target>

<!-- Quality Assurance Tasks -->
<target name="qa-console" description="quality assurance tasks">
<!-- Call standard tasks -->
<phingcall target="qa-js-and-less"/>
<phingcall target="qa-php"/>
<phingcall target="check-bootstrap5"/>
</target>

<!-- Quality Assurance Javascript Tasks -->
Expand Down Expand Up @@ -958,4 +960,154 @@ ${git_status}
</filterchain>
</reflexive>
</target>

<!-- Update bootstrap3 templates from bootstrap5 -->
<!-- N.B. This destroys any existing bootstrap3 templates (except explicitly excluded ones) -->
<target name="update-bootstrap3">
<property name="templatesdir" value="${srcdir}/themes/bootstrap3/templates" />
<if>
<available file="${templatesdir}"></available>
<then>
<echo message="Checking for uncommitted changes in ${templatesdir}" />
<exec command="git diff --exit-code ${templatesdir}" checkreturn="true" passthru="true" />
<delete failonerror="true">
<fileset dir="${templatesdir}">
<exclude name="header.phtml" />
</fileset>
</delete>
</then>
</if>
<mkdir dir="${templatesdir}"></mkdir>
<copy todir="${templatesdir}">
<fileset dir="${srcdir}/themes/bootstrap5/templates" defaultexcludes="false">
<exclude name="header.phtml" />
<exclude name="RecordTab/similaritemscarousel.phtml" />
</fileset>
</copy>
<reflexive>
<fileset dir="${templatesdir}">
<include pattern="**/*.phtml" />
<exclude name="header.phtml" />
<exclude name="RecordTab/similaritemscarousel.phtml" />
</fileset>
<filterchain>
<replaceregexp>
<!-- HTML attributes -->
<regexp pattern=" data-bs-(dismiss|ride|slide|slide-to|target|toggle)=" replace=" data-\1=" />

<!-- HTMLAttributes helper -->
<regexp pattern="'data-bs-(dismiss|target|toggle)'" replace="'data-\1'" />
</replaceregexp>
</filterchain>
</reflexive>
</target>

<!-- Update bootstrap5 templates from bootstrap3 -->
<!-- N.B. This destroys any existing bootstrap5 templates (except explicitly excluded ones) -->
<target name="update-bootstrap5">
<property name="templatesdir" value="${srcdir}/themes/bootstrap5/templates" />
<if>
<available file="${templatesdir}"></available>
<then>
<echo message="Checking for uncommitted changes in ${templatesdir}" />
<exec command="git diff --exit-code ${templatesdir}" checkreturn="true" passthru="true" />
<delete failonerror="true">
<fileset dir="${templatesdir}">
<exclude name="header.phtml" />
<exclude name="RecordTab/similaritemscarousel.phtml" />
</fileset>
</delete>
</then>
</if>
<mkdir dir="${templatesdir}"></mkdir>
<copy todir="${templatesdir}">
<fileset dir="${srcdir}/themes/bootstrap3/templates" defaultexcludes="false">
<exclude name="header.phtml" />
<exclude name="RecordTab/similaritemscarousel.phtml" />
</fileset>
</copy>
<reflexive>
<fileset dir="${templatesdir}">
<include pattern="**/*.phtml" />
</fileset>
<filterchain>
<replaceregexp>
<!-- HTML attributes -->
<regexp pattern=" data-(dismiss|ride|slide|slide-to|target|toggle)=(?!&quot;vufind)" replace=" data-bs-\1=" />

<!-- HTMLAttributes helper -->
<regexp pattern="'data-(dismiss|target|toggle)'" replace="'data-bs-\1'" />
</replaceregexp>
</filterchain>
</reflexive>
</target>

<!-- Check that bootstrap5 is up to date with bootstrap3 -->
<target name="check-bootstrap5">
<property override="true" name="check_dir_base" value="${srcdir}/themes/bootstrap3/templates" />
<property override="true" name="check_dir_compare" value="${srcdir}/themes/bootstrap5/templates" />
<foreach target="check-dir-single-file" param="filename">
<fileset dir="${check_dir_base}" defaultexcludes="false">
<exclude name="header.phtml" />
<exclude name="RecordTab/similaritemscarousel.phtml" />
<different targetdir="${check_dir_compare}" ignoreFileTimes="true" />
</fileset>
</foreach>

<property override="true" name="check_dir_base" value="${srcdir}/themes/bootstrap3/scss" />
<property override="true" name="check_dir_compare" value="${srcdir}/themes/bootstrap5/scss" />
<foreach target="check-dir-single-file" param="filename">
<fileset dir="${check_dir_base}" defaultexcludes="false">
<exclude name="/" />
<exclude name="bootstrap.scss" />
<exclude name="components/similar-carousel.scss" />
<exclude name="vendor/**" />
<different targetdir="${check_dir_compare}" ignoreFileTimes="true" />
</fileset>
</foreach>

<property override="true" name="check_dir_base" value="${srcdir}/themes/bootstrap3/js" />
<property override="true" name="check_dir_compare" value="${srcdir}/themes/bootstrap5/js" />
<foreach target="check-dir-single-file" param="filename">
<fileset dir="${check_dir_base}" defaultexcludes="false">
<exclude name="/" />
<exclude name="account_ajax.js" />
<exclude name="cart.js" />
<exclude name="channels.js" />
<exclude name="facets.js" />
<exclude name="lightbox.js" />
<exclude name="vendor" />
<exclude name="vendor/bootstrap-accessibility.min.js" />
<exclude name="vendor/bootstrap.min.js" />
<different targetdir="${check_dir_compare}" ignoreFileTimes="true" />
</fileset>
</foreach>
</target>
<!-- subtask for check-bootstrap5 -->
<target name="check-dir-single-file">
<loadFile property="base_file" file="${check_dir_base}/${filename}">
<filterchain>
<replaceregexp>
<!-- HTML attributes -->
<regexp pattern=" data-(dismiss|ride|slide|slide-to|target|toggle)=(?!&quot;vufind)" replace=" data-bs-\1=" />

<!-- HTMLAttributes helper -->
<regexp pattern="'data-(dismiss|target|toggle)'" replace="'data-bs-\1'" />

<!-- button-size mixin -->
<regexp pattern="@include button-size\((.+),(.+),(.+),(.+),(.+)\)" replace="@include button-size(\1,\2,\3,\5)" />
</replaceregexp>
</filterchain>
</loadFile>
<loadFile property="compare_file" file="${check_dir_compare}/${filename}" />
<if>
<not>
<equals arg1="${base_file}" arg2="${compare_file}" />
</not>
<then>
<fail message="${check_dir_base}/${filename} and ${check_dir_compare}/${filename} are out of sync" />
</then>
</if>
</target>

</project>
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,13 @@
"post-update-cmd": "@phing-install-dependencies",
"qa": "phing qa-console -Ddefaultconfigs=true",
"show-outdated": "composer show -oD --ignore-platform-req=ext-oci8",
"update-npm-dependencies": [
"update-npm-deps": [
"npm update",
"cd themes/bootstrap3 && npm run updateDeps"
"cd themes/bootstrap3 && npm run updateDeps",
"cd themes/bootstrap5 && npm run updateDeps"
],
"install-build-deps": [
"cd themes/bootstrap5 && npm run installBuildDeps"
]
}
}
2 changes: 2 additions & 0 deletions config/vufind/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ titleSeparator = "::"
; (named after the earlier, now-deprecated blueprint theme)
; sandal = bootstrap3 theme with a "flat" styling applied (a newer look
; than bootprint3).
; bootstrap5 = HTML5 theme using Bootstrap 5 with minimal styling (beta).
; sandal5 = Like sandal, but based on bootstrap5 (beta).
theme = sandal

; Uncomment the following line to use a different default theme for mobile devices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development Wiki
*/
class BulkAction extends \VuFind\View\Helper\Root\BulkAction
class BulkAction extends \VuFind\View\Helper\Bootstrap5\BulkAction
{
/**
* CSS class for button
*
* @var ?string
*/
protected $buttonClass = 'toolbar-btn';
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,6 @@
* @license https://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development Wiki
*/
class CopyToClipboardButton extends \Laminas\View\Helper\AbstractHelper
class CopyToClipboardButton extends \VuFind\View\Helper\Bootstrap5\CopyToClipboardButton
{
/**
* This helper creates button for copying content of an element into clipboard
*
* @param string $elementSelector jQuery selector for element to copy
*
* @return string HTML string
*/
public function __invoke(string $elementSelector)
{
static $buttonNumber = 0;
$buttonNumber++;
$view = $this->getView();
return $view->render(
'Helpers/copy-to-clipboard-button.phtml',
['selector' => $elementSelector, 'buttonNumber' => $buttonNumber]
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,6 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development Wiki
*/
class Flashmessages extends \VuFind\View\Helper\Root\Flashmessages
class Flashmessages extends \VuFind\View\Helper\Bootstrap5\Flashmessages
{
/**
* Get the CSS class to correspond with a messenger namespace
*
* @param string $ns Namespace
*
* @return string
*/
protected function getClassForNamespace($ns)
{
if ($ns == 'error') {
$ns = 'danger';
}
return 'flash-message alert alert-' . $ns;
}
}
10 changes: 1 addition & 9 deletions module/VuFind/src/VuFind/View/Helper/Bootstrap3/Highlight.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development Wiki
*/
class Highlight extends \VuFind\View\Helper\Root\Highlight
class Highlight extends \VuFind\View\Helper\Bootstrap5\Highlight
{
/**
* Constructor
*/
public function __construct()
{
$this->startTag = '<mark>';
$this->endTag = '</mark>';
}
}
Loading
Loading