How overwriting bootstrap-select piece of code?

Hello,

To improve multilist table, I need to overwrite a piece of code of bootstrap-select.
I need to replace:

by this:

 '<button type="button" class="actions-btn bs-select-all btn btn-default" title="' + this.options.selectAllText + '"><span class="glyphicon glyphicon-ok-sign"></span></button>' +
 '<button type="button" class="actions-btn bs-deselect-all btn btn-default" title="' + this.options.deselectAllText + '"><span class="glyphicon glyphicon-remove-sign"></span></button>'

I replace text of button by icones to display multi select live table buttons like this:

I try to use a ssx object (like my previous xwiki version when bootstrap-multiselect missing) but it doesn’t work since bootstrap-select-1.12.0.jar (or missing some important point)

Any thoughts/help/advice?

For instant maybe I need to priorize my SSX object but it doesn’t work…

Thxs

Pascal B

Maybe I can try a PR in GitHub - snapappointments/bootstrap-select: 🚀 The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more. project …

Since bootstrap-select is located in WEB-INF/lib you can overwrite any of its files in WEB-INF/classes.

Do you mean, I must drop a custom-bootstrap-select-xx.jar in WEB-INF/classes (or only js script)?

No just the file from inside the JAR you want to modify (but you need to keep the same folders).

Excellent, I will give a try (for instant I try to PR bootstrap-select project :slight_smile: )

Always the best.

Then you need to PR XWiki project to upgrade bootstrap-select :slight_smile:

FYI, here my issue + PR

and example:

Then I must wait :slight_smile:

Thanks you I will give a try your fix.

bootstrap-select-1.12.0.jar contain:
META-INF/ressources/webjars/bootstrap-select/1.12.0/js/bootstrap-select.js and bootstrap-select.min.js
then to overwrite bootstrap js file, I must use this path:

WEB-INF/classes/META-INF/ressources/webjars/bootstrap-select/1.12.0/js/
or
WEB-INF/classes/bootstrap-select/1.12.0/js/

and which file I must use the minify js file, the other or both ?

thxs

I would not put much effort in this and just duplicate bootstrap-select.js into bootstrap-select.min.js :slight_smile:

with this path it’s work. ty :slight_smile:

I let this post open to keep you in touch with my patch on GitHub - snapappointments/bootstrap-select: 🚀 The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more. project

Hello,
On xwiki 10.11.1 (previous 9.11.4) my custom bootstrap-select is not overwrited anymore if I copy it on WEB-INF/classes/META-INF/ressources/webjars/bootstrap-select/1.12.0 path…
I checked path in WEB-INF/lib/bootstrap-select-1.12.0.jar but the path is unchanged.
Do you know where I must copy my custom bootstrap-select js and CSS file?

Thxs.
Pascal B

After reinit my tomcat cache directory, my bootstrap-selec overwrited working better… Hum :blush:
Thxs anyways