@concretecms/bedrock 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@
13
13
  </div>
14
14
  </template>
15
15
  <script>
16
- /* global bootstrap */
16
+ /* global bootstrap ConcreteModal */
17
17
  import ConcreteAnnouncementModal from './Modal/Modal'
18
18
 
19
19
  export default {
@@ -58,6 +58,8 @@ export default {
58
58
  if (modal) {
59
59
  modal.show()
60
60
  }
61
+ ConcreteModal.fixBackdrop()
62
+ $('#concrete-announcement-modal').appendTo('#ccm-tooltip-holder')
61
63
  }
62
64
  }
63
65
  </script>
@@ -20,6 +20,10 @@ class ConcreteModal {
20
20
  })
21
21
  }
22
22
 
23
+ static fixBackdrop(element = '#ccm-tooltip-holder') {
24
+ $('.modal-backdrop').appendTo(element)
25
+ }
26
+
23
27
  show(options) {
24
28
  options = $.extend(options, {
25
29
  className: 'ccm-ui',
@@ -57,17 +61,12 @@ class ConcreteModal {
57
61
  // dialog._config.backdrop = 'static'
58
62
  dialog.show()
59
63
 
64
+ ConcreteModal.fixBackdrop(options.container)
65
+
60
66
  if (options.backdrop === 'static') {
61
67
  dialog._config.backdrop = 'static'
62
68
  }
63
-
64
- element.addEventListener('hide.bs.modal', function() {
65
- ConcreteModal.totalOpen--
66
- })
67
- ConcreteModal.totalOpen++
68
69
  }
69
70
  }
70
71
 
71
- ConcreteModal.totalOpen = 0
72
-
73
72
  global.ConcreteModal = ConcreteModal
@@ -37,4 +37,13 @@
37
37
  opacity: 0;
38
38
  }
39
39
 
40
-
40
+ /**
41
+ * Fix for https://github.com/concretecms/concretecms/issues/11306
42
+ * Old Bootstrap 3 themes will cause this. BS3 used to set .fade {opacity: 0} right within
43
+ * the global namespace. Bootstrap 4/5 fix this by setting that to .fade(not(.show)), but unless
44
+ * the BS3 root fade is reverted then it will override our updates and bootstrap modals will not work
45
+ * on the frontend. This should fix that.
46
+ */
47
+ .fade {
48
+ opacity: revert;
49
+ }
@@ -1,3 +1,5 @@
1
+ @import 'variables';
2
+
1
3
  div.ccm-production-notice-staging {
2
4
  background-color: black;
3
5
  bottom: 0;
@@ -8,5 +10,5 @@ div.ccm-production-notice-staging {
8
10
  position: fixed;
9
11
  text-align: center;
10
12
  width: 100%;
11
- z-index: 1000;
13
+ z-index: $index-level-stage-notice;
12
14
  }
@@ -0,0 +1 @@
1
+ $index-level-stage-notice: 820 !default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@concretecms/bedrock",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "The asset framework and dependencies for Concrete CMS.",
5
5
  "scripts": {
6
6
  "lint": "standardx \"**/*.{js,vue}\" && stylelint assets/**/*.{scss,vue}",