Add extra classname to modals
See original GitHub issueDescription
Trying to use your plugin “MultiSort”, the plugin opens a modal after clicking on the button.
Unfortunately the modal is written at the end of the document and is only using the class “modal”. That class is used heavily by other (foreign) components and plugins, so the layout is more or less uncontrolable:
The close button is not reachable, the width is cut etc.:
Currently, the generated modal from your BT plugin looks like this:
<div class="modal fade in" id="sortModal_tbl-main" ...
We could use the css method [id^="sortModal_"] { ... }
, but that would neither matches our rules nor be easy to maintain.
If you would add an extra class (f.eg. “bootstraptable” it would be much easier to define own CSS rules:
<div class="bootstraptable modal fade in" id="sortModal_tbl-main" ...
It would be perfect, if the developer could define those optional prefix/addition by option (f.eg. “multiSortModalClass”).
multiSortModalClass: "bootstraptable",
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
I think we can add an option like
modalTemplate
to support custom the HTML template.@snoopy72 I understand you point, but i think it makes more sense to allow the user to customize the html (which includes the classes) then adding a options which changes only one part of the html. We have more then 1 extension, which means we must add X options to add X classes, in my opinion it makes more sense to allow overwrite the html. @djhvscf