Skip to content

Commit 8332fda

Browse files
author
unknown
committed
Release 2.1.0
1 parent ece253d commit 8332fda

File tree

11 files changed

+42
-14
lines changed

11 files changed

+42
-14
lines changed

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MDB5
2-
Version: FREE 2.0.0
2+
Version: FREE 2.1.0
33

44
Documentation:
55
https://mdbootstrap.com/docs/standard/

css/mdb.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/mdb.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@
3030
height="150px"
3131
width="150px"
3232
/>
33-
<h5 class="mb-3">Release suprise! 50% OFF MDB 5 PRO</h5>
33+
<h5 class="mb-3">Release surprise! 50% OFF MDB 5 PRO</h5>
3434

3535
<p>
3636
Use this coupon code before the next release to claim the reward.<br />Hurry up & don't
3737
loose your chance.
3838
</p>
39+
3940
<p>
4041
<code class="text-uppercase h1 px-2 rounded bg-dark text-white">MB8XW23V</code>
4142
</p>
@@ -44,15 +45,21 @@ <h5 class="mb-3">Release suprise! 50% OFF MDB 5 PRO</h5>
4445
onclick="copy('MB8XW23V');toastr.info('Coupon code copied! Use it on the checkout.');"
4546
target="_blank"
4647
role="button"
48+
id="code-button"
4749
>CLAIM DISCOUNT</a
4850
>
51+
4952
<a
5053
class="btn btn-outline-primary btn-lg"
5154
href="https://mdbootstrap.com/docs/standard/getting-started/"
5255
target="_blank"
5356
role="button"
5457
>START TUTORIAL</a
5558
>
59+
<div class="my-2 alert alert-success" id="code-success" style="display: none;">
60+
Copied
61+
</div>
62+
<p>See <a href="https://mdbootstrap.com/docs/standard/pro/">prices</a></p>
5663
<h5 class="h1-responsive text-uppercase mt-3">
5764
the code <span class="font-weight-bold"></span> expires in:<br />
5865
<span class="font-weight-bold" id="time-counter"></span>
@@ -67,6 +74,16 @@ <h5 class="h1-responsive text-uppercase mt-3">
6774
<script type="text/javascript" src="js/mdb.min.js"></script>
6875
<!-- Custom scripts -->
6976
<script type="text/javascript">
77+
var button = document.getElementById('code-button');
78+
button.onclick = function () {
79+
var div = document.getElementById('code-success');
80+
if (div.style.display !== 'none') {
81+
div.style.display = 'none';
82+
} else {
83+
div.style.display = 'block';
84+
}
85+
};
86+
7087
function copy(text) {
7188
var textarea = document.createElement('textarea');
7289
textarea.value = text;
@@ -78,7 +95,7 @@ <h5 class="h1-responsive text-uppercase mt-3">
7895

7996
// Ad counter
8097
// Set the date we're counting down to
81-
var countDownDate = new Date(Date.UTC(2020, 09, 30, 10, 00, 00));
98+
var countDownDate = new Date(Date.UTC(2020, 10, 17, 10, 00, 00));
8299
var counterElement = document.getElementById('time-counter');
83100

84101
// Update the count down every 1 second

js/mdb.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/mdb.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdb-ui-kit",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"main": "js/mdb.min.js",
55
"repository": "https://github.com/mdbootstrap/mdb-ui-kit.git",
66
"author": "MDBootstrap",

src/js/bootstrap/src/dom/manipulator.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ const Manipulator = {
6060

6161
offset(element) {
6262
const rect = element.getBoundingClientRect();
63-
6463
return {
65-
top: rect.top + document.body.scrollTop,
66-
left: rect.left + document.body.scrollLeft,
64+
top: rect.top + (document.body.scrollTop || document.documentElement.scrollTop),
65+
left: rect.left + (document.body.scrollLeft || document.documentElement.scrollLeft),
6766
};
6867
},
6968

src/js/mdb/util/focusTrap.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import SelectorEngine from '../dom/selector-engine';
22
import { isVisible } from './index';
33

44
class FocusTrap {
5-
constructor(element, options = {}) {
5+
constructor(element, options = {}, toggler) {
66
this._element = element;
7+
this._toggler = toggler;
78
this._event = options.event || 'blur';
89
this._condition = options.condition || (() => true);
910
this._selector =
@@ -31,6 +32,10 @@ class FocusTrap {
3132
this._focusableElements.forEach((element) => {
3233
element.removeEventListener(this._event, this.handler);
3334
});
35+
36+
if (this._toggler) {
37+
this._toggler.focus();
38+
}
3439
}
3540

3641
update() {
@@ -40,7 +45,10 @@ class FocusTrap {
4045

4146
_init() {
4247
const handler = (e) => {
43-
if (!this._firstElement || e.key !== 'Tab') return;
48+
if (!this._firstElement || e.key !== 'Tab' || this._focusableElements.includes(e.target)) {
49+
return;
50+
}
51+
4452
e.preventDefault();
4553
this._firstElement.focus();
4654

src/js/mdb/util/keycodes.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export const ENTER = 13;
1010
export const SPACE = 32;
1111
export const ESCAPE = 27;
1212
export const TAB = 9;
13+
export const BACKSPACE = 8;
14+
export const DELETE = 46;
1315
export const A = 65;
1416
export const B = 66;
1517
export const C = 67;

0 commit comments

Comments
 (0)