@concretecms/bedrock 1.4.1 → 1.4.3

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.
@@ -2,8 +2,6 @@ import jQuery from 'jquery'
2
2
  import 'bootstrap'
3
3
  // We will be refactoring this, also it causes problems with installation.
4
4
  // import './frontend/async-thumbnail-builder'
5
- import './frontend/locations/country-data-link'
6
- import './frontend/locations/country-stateprovince-link'
7
5
 
8
6
  // Let us use Vue with our theme JS
9
7
  import VueManager from '../../../assets/cms/js/vue/Manager'
@@ -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>
@@ -9,6 +9,9 @@ import bootbox from 'bootbox'
9
9
  class ConcreteModal {
10
10
  openExternal(url, title, options) {
11
11
  var my = this
12
+ if (!options) {
13
+ options = {}
14
+ }
12
15
  new ConcreteAjaxRequest({
13
16
  url: url,
14
17
  dataType: 'html',
@@ -20,6 +23,10 @@ class ConcreteModal {
20
23
  })
21
24
  }
22
25
 
26
+ static fixBackdrop(element = '#ccm-tooltip-holder') {
27
+ $('.modal-backdrop').appendTo(element)
28
+ }
29
+
23
30
  show(options) {
24
31
  options = $.extend(options, {
25
32
  className: 'ccm-ui',
@@ -57,17 +64,12 @@ class ConcreteModal {
57
64
  // dialog._config.backdrop = 'static'
58
65
  dialog.show()
59
66
 
67
+ ConcreteModal.fixBackdrop(options.container)
68
+
60
69
  if (options.backdrop === 'static') {
61
70
  dialog._config.backdrop = 'static'
62
71
  }
63
-
64
- element.addEventListener('hide.bs.modal', function() {
65
- ConcreteModal.totalOpen--
66
- })
67
- ConcreteModal.totalOpen++
68
72
  }
69
73
  }
70
74
 
71
- ConcreteModal.totalOpen = 0
72
-
73
75
  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
+ }
@@ -130,7 +130,9 @@ window._ = _
130
130
  var target = $('a' + window.location.hash).offset()
131
131
  $('html, body').animate({ scrollTop: target.top }, 800, 'linear')
132
132
  }
133
- window.obj = oldobj
133
+ if (oldobj) {
134
+ window.obj = oldobj
135
+ }
134
136
  obj.attachBindings()
135
137
  obj.publish('conversationLoaded')
136
138
  })
@@ -1,3 +1,4 @@
1
+ /* eslint-disable eqeqeq */
1
2
  var USE_MUTATIONOBSERVER = !!(window.MutationObserver && window.MutationObserver.prototype && window.MutationObserver.prototype.observe)
2
3
 
3
4
  function loadDataForCountry(countryCode, callback) {
@@ -185,7 +186,7 @@ Link.prototype = {
185
186
  .val(spCode)
186
187
  .text(name)
187
188
 
188
- if (spCode === selectedStateprovince) {
189
+ if (spCode == selectedStateprovince) {
189
190
  $o.attr('selected', 'selected')
190
191
  }
191
192
  me.$stateprovinceSelect.append($o)
@@ -0,0 +1,2 @@
1
+ import './frontend/country-stateprovince-link'
2
+ import './frontend/country-data-link'
@@ -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.3",
4
4
  "description": "The asset framework and dependencies for Concrete CMS.",
5
5
  "scripts": {
6
6
  "lint": "standardx \"**/*.{js,vue}\" && stylelint assets/**/*.{scss,vue}",