beyond-rails 0.0.276 → 0.0.281

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0587787bc9b1b01ca9b6adfee2492dbd79f4a83b275df96ea58c90bde40e7d55'
4
- data.tar.gz: 8ef857ab342e1d0935de5fef72c256ff684c57ecc53f3b26f219b8401b06972d
3
+ metadata.gz: 4fdbef0c60df577d5177297214104a62d44879abf628e92ba2ac9b263e344d22
4
+ data.tar.gz: 91e93ce0cc411b0721d5172b1813d347ce40268ae0815c404a34cf9c50960026
5
5
  SHA512:
6
- metadata.gz: fa68191ab050166c130c418089b0127286b3998b61688ced221c0627ed055aa4a7f391273f74de49debeb13a3942ed209e47e5f17ad77e0bfa50e00d76a68a74
7
- data.tar.gz: 07bbf67a42392542a4fb26532f4970ff47fce89b0c5c7458099fcc10fa6023bcc856064e9d21829ca246b64f1aa5f9d482bb045e21d6cd498fba8c195d41e44a
6
+ metadata.gz: aadf392da4fb29588d3871759b48aecaacd6e5250c9e6fcff7ec08f6d19232cb5260461565741a53c55a2397f8c6ae07a0ed7384325c9ddf2dc4066c3e19faea
7
+ data.tar.gz: e93b2ed5099895a980dcb14466a70a7e985b10cf020b83658130420050845c6c8e99043fc185f030ea060b34fcee4e61ca734b0479e67f47b0da1778d3e329f1
@@ -11,8 +11,11 @@ export default class Btn {
11
11
  }
12
12
 
13
13
  showLoader() {
14
+ if (this.loading) {
15
+ return
16
+ }
14
17
  const { dom } = this
15
- this._innerHtml = dom.innerHTML
18
+ this.innerHtml = dom.innerHTML
16
19
  dom.style.height = toPixel(dom.offsetHeight)
17
20
  dom.style.width = toPixel(dom.offsetWidth)
18
21
  dom.innerHTML = `
@@ -28,14 +31,23 @@ export default class Btn {
28
31
  }
29
32
 
30
33
  hideLoader() {
34
+
35
+ if (! this.loading) {
36
+ return
37
+ }
31
38
  const { dom } = this
32
39
  dom.style.removeProperty('width')
33
40
  dom.style.removeProperty('height')
34
- dom.innerHTML = this._innerHtml
41
+
42
+ const { innerHtml } = this
43
+
44
+ if (innerHtml) {
45
+ dom.innerHTML = innerHtml
46
+ }
35
47
  }
36
48
 
37
49
  setLoading(loading) {
38
- this.loading = loading
39
50
  loading ? this.showLoader() : this.hideLoader()
51
+ this.loading = loading
40
52
  }
41
53
  }
@@ -26,6 +26,7 @@ export default class SearchDropdown {
26
26
  this.offsetTop = options.offsetTop || 0
27
27
  this.offsetLeft = options.offsetLeft || 0
28
28
  this.noDataMsg = options.noDataMsg || '沒有資料'
29
+ this.getFloatedTargetPos = options.getFloatedTargetPos || getFloatedTargetPos
29
30
  this.isMenuVisible = false
30
31
  this.lastKeyword = null
31
32
  this.selectedIndex = 0
@@ -164,7 +165,7 @@ export default class SearchDropdown {
164
165
 
165
166
  adjustMenuPos() {
166
167
  const { menu, dom, offset, offsetLeft, offsetTop } = this
167
- const { pos, place, align } = getFloatedTargetPos({
168
+ const { pos, place, align } = this.getFloatedTargetPos({
168
169
  src: dom,
169
170
  target: menu,
170
171
  place: this.place,
@@ -40,6 +40,10 @@
40
40
  }
41
41
  }
42
42
  }
43
+
44
+ .alert.alert-dismissible {
45
+ padding-right: 3rem;
46
+ }
43
47
  .alert-dismissible .close {
44
48
  position: absolute;
45
49
  top: 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.276
4
+ version: 0.0.281
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: 2021-01-21 00:00:00.000000000 Z
12
+ date: 2021-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sassc