beyond-rails 0.0.209 → 0.0.214

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d95a6afa505cfa001f46fd57f9824a247f2f5db6d99020e93e28253179598a6
4
- data.tar.gz: ddb3990fc4e1fb721d600abc64248c69814b6e6088e11796b77e605df4022548
3
+ metadata.gz: 64b522414fe0b7fa86cb3df83c81bba74875f7c52b5ee3706b37bd573926bc13
4
+ data.tar.gz: 305bd9944bccb2a77e40c75042576d12b366d827366b2deee387d6f24b26cdaf
5
5
  SHA512:
6
- metadata.gz: 814db63f33f9a3b778c7644c9068238764564b71bce3904642f1ab8876c31ba49472a783cb03b32a9d1f75981632f014aa09a3cca1095f5c3ad2f1f5261fe33f
7
- data.tar.gz: b61c2ebac370564c48c36b14a1f9372bc47a4c0a6522757ed9a75fe5bdff740570e7af6ce3140eecdf1d72bc66d36f7943df359a3b2254f801b743c48a52be37
6
+ metadata.gz: 81acdccfca585e4e420833a6a859ff319e367fe72d4d20a908fc3c755d0e59832ff4ee87094aa69a83b12c266381862e103fa5a778de0dc3b884478fb9b21787
7
+ data.tar.gz: ded05312ca85dd45d648c215d6f9c725349a4e062ed3d76635b42f0e1af903e1beae70c59b7e7c53f873a32d719d6c75983c99a8e107746a91444ebac76ecf67
@@ -1,5 +1,6 @@
1
1
  import supportDom from '../decorators/supportDom'
2
2
  import { noop } from '../utils'
3
+ import domEval from '../utils/domEval'
3
4
 
4
5
  let globalModalId = 0
5
6
 
@@ -56,6 +57,9 @@ export default class Modal {
56
57
  this.modal.style.display = 'block'
57
58
  setTimeout(() => {
58
59
  this.modal.classList.add('js-active')
60
+ if (typeof $ === 'function') {
61
+ $(this.dom).trigger('beyond.modal.show')
62
+ }
59
63
  }, 50)
60
64
  }
61
65
 
@@ -64,6 +68,9 @@ export default class Modal {
64
68
  this.modal.classList.remove('js-active')
65
69
  setTimeout(() => {
66
70
  this.modal.style.display = 'none'
71
+ if (typeof $ === 'function') {
72
+ $(this.dom).trigger('beyond.modal.hide')
73
+ }
67
74
  }, 300)
68
75
  }
69
76
 
@@ -75,11 +82,21 @@ export default class Modal {
75
82
  const div = document.createElement('div')
76
83
  div.innerHTML = html.trim()
77
84
  const dom = div.firstChild
85
+
86
+ // keep the id that is created by $.uniqModal()
87
+ const originalDomId = this.dom.id
88
+ if (originalDomId === 'beyond-uniq-modal') {
89
+ dom.id = originalDomId
90
+ }
91
+
78
92
  this.dom.parentNode.replaceChild(dom, this.dom)
79
93
 
80
94
  this.dom = dom
81
95
  this.dom._modal = this
82
96
  this.init()
97
+
98
+ Array.from(dom.querySelectorAll('script'))
99
+ .forEach(script => domEval(script.text))
83
100
  }
84
101
 
85
102
  visible() {
@@ -0,0 +1,5 @@
1
+ export default function domEval(code) {
2
+ const script = document.createElement('script')
3
+ script.text = code
4
+ document.head.appendChild(script).parentNode.removeChild(script)
5
+ }
@@ -2,10 +2,8 @@
2
2
  [class^="icon-"] {
3
3
  font-size: 11px;
4
4
  color: #4f566b;
5
- margin-left: 4px;
5
+ margin-left: .7em;
6
6
  display: inline-block;
7
- vertical-align: middle;
8
- transform: translateY(-1px);
9
7
  }
10
8
  [class^="icon-"].no-text {
11
9
  margin-left: 0;
@@ -104,7 +104,7 @@ label.required {
104
104
  .hint.hint-danger {
105
105
  color: #e03953;
106
106
  &:before {
107
- font-family: 'icomoon';
107
+ font-family: $beyond-icon-font-name;
108
108
  margin-right: 4px;
109
109
  display: inline-block;
110
110
  transform: translateY(1px);
@@ -368,7 +368,15 @@ input[type="file"] {
368
368
  .input-group-prepend {
369
369
  margin-right: -1px;
370
370
  }
371
+ .input-group-append {
372
+ margin-left: -1px;
373
+ }
371
374
 
375
+ .input-group > .form-control:not(:last-child) {
376
+ border-top-right-radius: 0;
377
+ border-bottom-right-radius: 0;
378
+ z-index: 1;
379
+ }
372
380
  .input-group > .form-control:not(:first-child) {
373
381
  border-top-left-radius: 0;
374
382
  border-bottom-left-radius: 0;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyond-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.209
4
+ version: 0.0.214
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmsheng
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-09-24 00:00:00.000000000 Z
12
+ date: 2020-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sassc
@@ -173,6 +173,7 @@ files:
173
173
  - src/js/utils/dateGt.js
174
174
  - src/js/utils/dateLt.js
175
175
  - src/js/utils/docReady.js
176
+ - src/js/utils/domEval.js
176
177
  - src/js/utils/getFloatedTargetPos.js
177
178
  - src/js/utils/getKey.js
178
179
  - src/js/utils/index.js