aboutsummaryrefslogtreecommitdiff
path: root/js/src/modal.js
AgeCommit message (Collapse)AuthorFilesLines
2021-05-11Extract static `DATA_KEY` & `EVENT_KEY` to base-component (#33635)GeoSot1-3/+3
* Force each plugin that extends base-components to implement a static method `NAME()` * Remove redundant `NAME` argument from 'Utils.defineJQueryPlugin' & fix test
2021-05-11Refactor: move disposing properties into the base class (#33740)GeoSot1-8/+1
Moves more functionality to `base-component`, transferring the responsibility of disposal to parent class. Each component, dusting disposal, sets its protected properties to `null`. So the same can be done in one place for all children components .
2021-05-10Merge js-components 'transitionend' listener callbacks into one methodGeoSot1-16/+2
2021-05-05Release v5.0.0 (#33647)v5.0.0XhmikosR1-1/+1
* Bump version to 5.0.0 * Fix npm tag * Dist
2021-04-14Decouple BackDrop from modal (#32439)GeoSot1-62/+22
* Create backdrop.js util * revert breaking changes remove PromiseTimout usage revert class name * one more test | change bundlewatch.config * add config obj to backdrop helper | tests for rootElement | use transitionend helper * Minor tweaks — Renaming Co-authored-by: Rohit Sharma <[email protected]>
2021-04-11Remove element event listeners through base component (#33429)GeoSot1-1/+1
After some research, I found out that EventHandler saves all the custom events per element using namespace, and is capable of removing handlers using only the element and its namespace (`DATA_KEY`). So, probably is better to utilize the base-component to do the same job.
2021-04-11Decouple Modal's scrollbar functionality (#33245)GeoSot1-71/+11
2021-04-06Omit getting data-attributes from toggle elementGeoSot1-1/+1
2021-04-06Simplify Modal configGeoSot1-26/+11
2021-03-30Use template literals instead of concatenation (#33497)Rohit Sharma1-1/+1
2021-03-23Release v5.0.0-beta3 (#33439)v5.0.0-beta3XhmikosR1-1/+1
2021-03-08modal: move common code to a new `isAnimated` method (#33056)GeoSot1-16/+17
2021-03-02refactor: use a Map instead of an Object in dom/data (#32180)alpadev1-2/+2
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2021-02-23modal: don't add margin & padding when sticky is not full width (#30621)Muhammadamin1-0/+4
* modal: don't add margin & padding when sticky is not full width * Check if element is shorter than window Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2021-02-22Allow constructors to accept a CSS selector (#32245)Rohit Sharma1-1/+1
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2021-02-16util: change `isRTL` to a function (#32446)XhmikosR1-4/+3
This allows the bundler to tree-shake the function.
2021-02-10Release v5.0.0-beta2 (#32467)v5.0.0-beta2XhmikosR1-1/+1
* Bump version to 5.0.0-beta2 * Dist
2021-01-14modal: move common code to reusable functions (#32511)GeoSot1-52/+25
Co-authored-by: XhmikosR <[email protected]>
2021-01-13Fix toggling modal when clicking on `data-bs-toggle="modal"` (#32691)Rohit Sharma1-1/+1
Co-authored-by: XhmikosR <[email protected]>
2020-12-10Remove `TRANSITION_END` from utils (#32394)XhmikosR1-8/+7
2020-12-08Refactor components to use a utility function to define jQuery plugins (#32285)alpadev1-15/+2
* refactor: use an utility function to define jQuery plugins * test: add spec for defineJQueryPlugin utility function * Update .bundlewatch.config.json Co-authored-by: XhmikosR <[email protected]>
2020-12-07Prepare v5.0.0-beta1.XhmikosR1-1/+1
2020-12-04feat(RTL): implement RTLGaël Poupard1-2/+3
Using RTLCSS directives, renaming things to use logical names and following best practices.
2020-12-02Unbreak lines. (#32304)XhmikosR1-7/+2
2020-11-30Remove the `show` property from the modal plugin (#32279)Rohit Sharma1-6/+2
Drop the support of show property from the modal plugin. When creating the new modal instance in v5, the `show` property does not work anymore, so instead of fixing the behavior just removing it permanently to keep the consistency between all the plugins. (All other plugins require the `show()` method to be called on the instances to be shown) Co-authored-by: XhmikosR <[email protected]>
2020-11-29Remove setData from construtors (#32264)Rohit Sharma1-1/+0
2020-11-29Move `VERSION` to BaseComponent (#32254)Rohit Sharma1-5/+0
2020-11-29add dispose in base componentJohann-S1-3/+2
2020-11-29create a base componentJohann-S1-6/+8
2020-11-20Don't hide modal when keyboard is set to false in modal's configuration (#32179)Rohit Sharma1-26/+26
* Don't hide modal when config.keyboard is false * Update unit test - Modal should not be closed when pressing esc key if keyboard = false and backdrop is 'static' Co-authored-by: XhmikosR <[email protected]>
2020-11-20Make the attribute methods bs specific (#32173)Rohit Sharma1-9/+9
Co-authored-by: XhmikosR <[email protected]>
2020-11-14Switch to Number propertiesXhmikosR1-3/+3
2020-11-14Add `bs` in data attributesRohit Sharma1-11/+11
- Add `bs` in data APIs everywhere - Update unit tests
2020-11-11Prepare v5.0.0-alpha3 (#32122)v5.0.0-alpha3XhmikosR1-2/+2
2020-11-01Streamline jQuery comment. (#32016)XhmikosR1-1/+1
2020-11-01Fix TypeError when Bootstrap is included in `head` (#32024)Sascha1-11/+14
* extend jquery after domContentLoaded event is fired * add unittest for util onDOMContentLoaded * wait for trigger jquery event after domContentLoaded * remove domcontentready from eventHandler * move istanbul ignore statements to correct line Co-authored-by: XhmikosR <[email protected]>
2020-09-29Prepare v5.0.0-alpha2. (#31748)v5.0.0-alpha2XhmikosR1-2/+2
2020-07-12Add parentheses around multiple spread conditionsXhmikosR1-1/+1
2020-06-25Prevent overflowing static backdrop modal animation (#30326)Shohei Yoshida1-1/+14
Co-authored-by: XhmikosR <[email protected]>
2020-06-16Rename "master" to "main". (#31050)XhmikosR1-1/+1
2020-06-04Add role="dialog" in modals via JavaScript (#30936)Rohit Sharma1-0/+2
2020-05-13Bump version to 5.0.0-alpha1 (#29925)XhmikosR1-2/+2
Also add v4.5.0 in versions and keep README.md pointing to v4.5.0 so that there are no broken stuff.
2020-05-12Avoid bad scrollbar replacement into width valuesGiovanni Mendoza1-1/+1
2020-05-06Revert "Avoid bad scrollbar replacement into width values (#30690)"XhmikosR1-3/+2
This reverts commit 85c4788dedfdec7d681829e3a52ada0c33f8fa8e.
2020-04-29Avoid bad scrollbar replacement into width values (#30690)Johann-S1-2/+3
2020-04-17Replace event.which with event.key and event.buttonTanguy Krotoff1-3/+3
2020-04-01Always modal scroll top to 0ysds1-4/+2
2020-03-25fix: remove make array util function (#30430)Johann-S1-5/+4
2020-03-18Switch to strings constants.XhmikosR1-81/+75
This allows the minifier to mangle the constants. It also allows the linter to find unused strings properly. While at it, remove a few unused properties. File Before After Diff -------------------------------------------------------- bootstrap.bundle.min.js 23.61 kB 22.61 kB -1.00 kB (-4.23 %) bootstrap.min.js 17.04 kB 16.08 kB -0.96 kB (-5.63 %)
2020-01-10Close modal with keyboard=true & backdrop=static (#29986)Giovanni Mendoza1-2/+5
* Close modal with keyboard=true & backdrop=static