Commit Graph

195 Commits

Author SHA1 Message Date
XhmikosR 220139a89f
Release v5.0.0-beta3 (#33439) 2021-03-23 18:26:54 +02:00
GeoSot e163d98845
modal: move common code to a new `isAnimated` method (#33056) 2021-03-08 18:35:59 +02:00
alpadev 48a95f7280
refactor: use a Map instead of an Object in dom/data (#32180)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com>
2021-03-02 16:55:44 +02:00
Muhammadamin 056216a3bd
modal: don't add margin & padding when sticky is not full width (#30621)
* modal: don't add margin & padding when sticky is not full width

* Check if element is shorter than window

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com>
2021-02-23 14:52:09 +02:00
Rohit Sharma dc5e3328c1
Allow constructors to accept a CSS selector (#32245)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Mark Otto <otto@github.com>
2021-02-22 09:01:04 +02:00
XhmikosR 92434fa30f
util: change `isRTL` to a function (#32446)
This allows the bundler to tree-shake the function.
2021-02-16 10:14:05 +02:00
XhmikosR e50c11b8c6
Release v5.0.0-beta2 (#32467)
* Bump version to 5.0.0-beta2

* Dist
2021-02-10 18:14:51 +02:00
GeoSot b5bf3131fb
modal: move common code to reusable functions (#32511)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-14 21:22:09 +02:00
Rohit Sharma e34481b6eb
Fix toggling modal when clicking on `data-bs-toggle="modal"` (#32691)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-13 21:59:47 +02:00
XhmikosR 1edec546cb
Remove `TRANSITION_END` from utils (#32394) 2020-12-10 16:54:50 +02:00
alpadev 85208ae557
Refactor components to use a utility function to define jQuery plugins (#32285)
* refactor: use an utility function to define jQuery plugins

* test: add spec for defineJQueryPlugin utility function

* Update .bundlewatch.config.json

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-12-08 08:16:50 +02:00
XhmikosR 8dc85c657e Prepare v5.0.0-beta1. 2020-12-07 18:18:16 +02:00
Gaël Poupard 9488978fb5 feat(RTL): implement RTL
Using RTLCSS directives, renaming things to use logical names and following best practices.
2020-12-04 07:52:03 +02:00
XhmikosR 701c6c6e77
Unbreak lines. (#32304) 2020-12-02 06:45:15 +02:00
Rohit Sharma c3689ac073
Remove the `show` property from the modal plugin (#32279)
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 <xhmikosr@gmail.com>
2020-11-30 12:12:40 +02:00
Rohit Sharma 04674f88b0 Remove setData from construtors (#32264) 2020-11-29 20:58:26 +02:00
Rohit Sharma f6a8733741 Move `VERSION` to BaseComponent (#32254) 2020-11-29 20:58:26 +02:00
Johann-S 9eb9d02084 add dispose in base component 2020-11-29 20:58:26 +02:00
Johann-S 9f6b342dc7 create a base component 2020-11-29 20:58:26 +02:00
Rohit Sharma 0839cbf04d
Don't hide modal when keyboard is set to false in modal's configuration (#32179)
* 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 <xhmikosr@gmail.com>
2020-11-20 15:36:24 +02:00
Rohit Sharma 2630b05eb3
Make the attribute methods bs specific (#32173)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-20 11:13:13 +02:00
XhmikosR 2e758f64cf Switch to Number properties 2020-11-14 15:54:50 +02:00
Rohit Sharma 418f17ee2b Add `bs` in data attributes
- Add `bs` in data APIs everywhere
- Update unit tests
2020-11-14 07:09:15 +02:00
XhmikosR 384eccbfaf
Prepare v5.0.0-alpha3 (#32122) 2020-11-11 19:07:37 +02:00
XhmikosR 421e2482e2
Streamline jQuery comment. (#32016) 2020-11-01 15:49:51 +02:00
Sascha c21506d499
Fix TypeError when Bootstrap is included in `head` (#32024)
* 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 <xhmikosr@gmail.com>
2020-11-01 15:32:36 +02:00
XhmikosR b083c9639f
Prepare v5.0.0-alpha2. (#31748) 2020-09-29 18:33:00 +03:00
XhmikosR 6d86b140f9 Add parentheses around multiple spread conditions 2020-07-12 15:52:25 +03:00
Shohei Yoshida fb4efb49ea
Prevent overflowing static backdrop modal animation (#30326)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-06-25 11:35:53 +03:00
XhmikosR c28934cb18
Rename "master" to "main". (#31050) 2020-06-16 21:41:47 +03:00
Rohit Sharma 5faf41eb48
Add role="dialog" in modals via JavaScript (#30936) 2020-06-04 10:35:09 +03:00
XhmikosR 38ec7c4df7
Bump version to 5.0.0-alpha1 (#29925)
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-13 22:36:00 +03:00
Giovanni Mendoza 3e7566f2c3 Avoid bad scrollbar replacement into width values 2020-05-12 07:51:09 +03:00
XhmikosR 737b6925ab Revert "Avoid bad scrollbar replacement into width values (#30690)"
This reverts commit 85c4788ded.
2020-05-06 21:25:59 +02:00
Johann-S 85c4788ded
Avoid bad scrollbar replacement into width values (#30690) 2020-04-29 22:28:20 +03:00
Tanguy Krotoff dcd99aa7d1 Replace event.which with event.key and event.button 2020-04-17 18:22:15 +03:00
ysds dfa017adc3 Always modal scroll top to 0 2020-04-01 10:05:43 +03:00
Johann-S 26d86fce2a
fix: remove make array util function (#30430) 2020-03-25 16:35:02 +02:00
XhmikosR 38333feda5 Switch to strings constants.
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-03-18 12:58:54 +02:00
Giovanni Mendoza 954a0b1e6a Close modal with keyboard=true & backdrop=static (#29986)
* Close modal with keyboard=true & backdrop=static
2020-01-10 11:06:12 +02:00
Higor Araújo dos Anjos 46912797b2 Added animation when modal backdrop is static (#29516) 2019-10-25 21:12:09 +03:00
Johann-S 3d12b541c4 return to the original file structure to avoid breaking modularity 2019-10-03 09:55:57 +02:00
Johann-S 1ac07a66ce rewrite modal unit tests 2019-07-23 14:23:50 +02:00
XhmikosR 438e01b61c Rename `eventHandler` and `selectorEngine` files. 2019-05-08 17:26:37 +03:00
XhmikosR 1393678f0b Remove obsolete comments. 2019-03-11 17:01:28 +02:00
XhmikosR 46c037410b Comply to the new rules. 2019-03-11 17:01:28 +02:00
Johann-S 8a37045b79 move util in a util folder with the sanitizer 2019-02-26 13:04:04 +02:00
Johann-S fee11fd7ae use our selector engine instead of native api 2019-02-20 22:05:45 +02:00
Joshua Wilson fdbb5db919 minor jQuery.hasclass removal (#28158) 2019-02-20 22:05:45 +02:00
Johann-S a2f1d79045 Refactor util plugin and some tests 2019-02-20 22:05:45 +02:00
Johann-S c44db783bf chore(update): bump to 4.1.3 2019-02-20 22:05:45 +02:00
Johann-S 467dd113c5 fix(plugins): save instance in constructor 2019-02-20 22:05:45 +02:00
Johann-S 64591b3722 fix(manipulator): increase coverage for manipulator 2019-02-20 22:05:45 +02:00
Johann-S 2b78078779 fix(data): do not use data object in our unit tests 2019-02-20 22:05:45 +02:00
Johann-S 7eddee286e remove old references to jquery and some fixes 2019-02-20 22:05:45 +02:00
Alessandro Chitolina 33211eefdf Rewritten modal without jquery (#23955)
* Trigger jquery events if available in event handler

* Rewritten modal without jquery
2019-02-20 22:05:45 +02:00
Johann-S fb465c4745 Remove jQuery from Util.js
s
2019-02-20 22:05:45 +02:00
XhmikosR 8fa0d30101
Release v4.3.1. (#28252) 2019-02-13 18:01:40 +02:00
Mark Otto 1ded0d6a4e
Release v4.3.0 (#28228)
* Prep for v4.3.0

* More updates for v4.3.0.

* rerun to build docs source map
2019-02-11 11:15:34 -08:00
Shohei Yoshida de0bb1e052 Scrollable modal (#27769) 2019-01-20 23:28:16 +02:00
Mark Otto 9e4e94747b
Bump to v4.2.1 (#27892) 2018-12-21 10:55:28 -08:00
Mark Otto eda851ee76 Prep for v4.2.0 release
- Move 4.1 docs to 4.2
- Update versions everywhere to 4.1.3 with release script
- Manually bump the shorthand version in package.json
- Add 4.2 to the versions docs page
- Update some redirects
- Fix tests asset URLs
- Bump Nuget and more
2018-12-21 09:03:29 -08:00
Patrick H. Lauke 6c00dd08bc Add aria-modal to modals (#27780)
Dynamically set/remove `aria-modal="true"` when a modal is shown/hidden
2018-12-05 20:58:09 +02:00
ysds 0140552322 Fix body scrolling issue when modal open (#27698) 2018-11-23 13:41:42 +01:00
Johann-S 9201a80510 some cleaning and changes for readability 2018-11-14 10:54:50 +01:00
Andrew Luca bd2851938a test(Modal): check if modal is disposed 2018-10-30 16:28:32 +01:00
Andrew Luca 65dc8c9070 refactor(Modal): add `_isTransitioning` default value
Having variables initialised from start `_isTransitioning` is better.
Would be better to add an eslint rule to check for undeclared variables use.
Reordered enter checks for `show` and `hide` by priority.
2018-10-30 16:28:32 +01:00
Johann-S ffc8d507c7 calculate modal transition duration based on modal-dialog element 2018-10-28 23:59:17 +02:00
Johann-S 7c7a1706c3 remove useless iife 2018-09-26 15:03:38 +02:00
XhmikosR acd19de6a9 Use ES6 arrow function. 2018-08-12 22:22:12 +03:00
Mark Otto 3b55873438 Ship v4.1.3 2018-07-24 08:54:34 -07:00
Mark Otto c4ccfbe04e Ship v4.1.2 2018-07-12 09:27:14 -07:00
Johann-S 283ab30164 fix(modal): fix unit test and resetting style 2018-07-11 11:05:38 +02:00
Catalin Zalog cb82394fc8 fix(modal): removes .navbar-toggler margin 2018-07-11 11:05:38 +02:00
Johann-S a79b8aa16a refactor(plugins): query elements without jquery 2018-06-03 11:40:08 +02:00
Johann-S b1eb3fccfa refactor(plugins): improve how we query elements 2018-06-01 10:30:11 +02:00
Mark Otto 779ad9f174 Bump version to v4.1.1 2018-04-30 09:04:33 -07:00
Johann-S ba10b63c9d fix issue related to Object.keys and Dropdown issue 2018-04-13 18:59:30 +02:00
MietekN 418fd76ba9 modal use global scope for default 2018-04-12 11:21:10 +02:00
Mark Otto 8f7bd41993
Ship v4.1.0 (#26218)
* update docs path from docs/4.0/ to docs/4.1/

* bump version to 4.1.0

* Update redirects to work for 4.1 docs move

* Update docs version switcher to include latest and link to 4.0 docs

* re-run dist

* Update package-lock.json

* Update docs-navbar.html
2018-04-09 09:00:23 -07:00
Johann-S bedc96e48b Use transitionEnd in QUnit since we moved away from PhantomJS 2018-03-20 15:56:51 +01:00
Martijn Cuppens 1fadad1c33 Variable transition durations (#25662) 2018-03-13 09:59:20 +01:00
Martijn Cuppens 29f178d891 Remove unused variable (#25670)
This variable is not used anywhere.

Leftover from #18373.
2018-02-25 11:22:50 +02:00
Martijn Cuppens 8cfbf6933b Consistent usage of $(document.body) instead of $('body') (#25671) 2018-02-21 09:01:02 +01:00
Mark Otto 572d00ac7e Bump version to 4.0.0 2018-01-18 10:24:51 -08:00
XhmikosR 80d0943b95 Comply to the new rules. 2018-01-11 18:48:46 +02:00
Mark Otto ced70da441 Update version to 4.0.0-beta.3 2017-12-28 09:50:04 -08:00
Johann-S 9a0bba9afa
Object spread : less jQuery more ES6 (#24665) 2017-11-13 11:25:36 +01:00
Johann-S 62fbb23ee6 Change Rollup config to wrap our dist files with jQuery instead of $ 2017-10-24 12:39:25 +02:00
Johann-S 1487c3a994 Add `Util.jQuery` which will detect jQuery instead of relying on global `$` (#24513) 2017-10-23 10:35:27 +03:00
Mark Otto dbf5405cfd fix version number 2017-10-19 12:23:29 -07:00
Mark Otto cf00548f4e new version number 2017-10-19 12:23:29 -07:00
Johann-S 8e7ba02c5c Modal plugin set _isTransitioning after the trigger of hide event 2017-10-10 14:19:22 +02:00
lucascono 4b6537bef3 Fix modal bug
Fix for issue #24117
2017-10-04 06:08:34 -03:00
Johann-S b29b1e1558 Use imported jQuery object 2017-10-04 09:55:32 +02:00
Johann-S e04e42d08c Merge branch 'v4-dev' into fix-jumping-modal-on-resize 2017-09-03 12:56:04 +02:00
Johann-S 37e105333d Merge branch 'v4-dev' into fix-unwanted-padding-on-modal 2017-09-02 09:04:04 +02:00
Johann-S 9936bf5944 Create a bundled release of Bootstrap with Popper.js inside 2017-08-31 18:43:04 +02:00
David Bailey cbaf7a7b79 Fix failing test
_adjustDialog should be called when the modal is first displayed to prevent it jumping position when the viewport is resized
2017-08-29 15:42:58 +01:00
David Bailey 3f2a8db471 Use getBoundingClientRect instead of jQuery 2017-08-28 18:55:45 +01:00