tao_ui 0.2.8 → 0.2.9

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
  SHA1:
3
- metadata.gz: 7e136c86cc51a8855686d7f8b2794f1385fb80e2
4
- data.tar.gz: da267bc319f6db8d62705d74498c359361c1290f
3
+ metadata.gz: 271fa5537047fcc2e80b6918c448a292b430b199
4
+ data.tar.gz: 8975fc4ecabea2b2c8d46e5e6236f0839caccd2b
5
5
  SHA512:
6
- metadata.gz: fa36a0f1c28a1e52189cf4a08ede5ae829768ff0531b66e5ff5e0d9c7ebab3e522ec5b3d12b36a396d246986909bef8dfe09c03faeea395d334551a6c19d34c2
7
- data.tar.gz: c32087c1b0921fc33f6225c98aa7ea1a074b2122530c4a34083539e78f0b4ec03f1cc2a4ff54855cf6a0b96932649e2bd509e8c555181facbd334828ae1f4ddb
6
+ metadata.gz: 0fe9cdb244e100a2f93b1530f9204c31c4b7bcfc5bd2cd18f0167c4e7cb38d9b9e5f298df7ae762d77a10015f149cc76fea61141e33104f81ce1784d9002ce60
7
+ data.tar.gz: 07ef13e5c1f4cf69c01d068390fb414b3c5278c68e2777a8dfc2499750ccf14f2ad4dc4727915cbf281ef4b2b8ec50bf343474d125ee725380bf429f90d111a6
File without changes
@@ -94,8 +94,12 @@ class Tao.Popover.Element extends TaoComponent
94
94
  _enableAutoHide: ->
95
95
  $(document).on "mousedown.tao-popover-#{@taoId}", (e) =>
96
96
  return unless @active
97
- target = $ e.target
98
- return if target.is(@target) or @jq.has(target).length or target.is(@)
97
+ target = e.target
98
+ inTarget = @target.is(target) || @target.has(target).length
99
+ inTrigger = @triggerEl && (@triggerEl.is(target) || @triggerEl.has(target).length)
100
+ inPopover = @jq.is(target) || @jq.has(target).length
101
+
102
+ return if inTarget || inTrigger || inPopover
99
103
  @active = false
100
104
  null
101
105
 
@@ -11,25 +11,29 @@ class Tao.Tree.Item extends TaoComponent
11
11
  @attribute 'remote', type: 'hash'
12
12
 
13
13
  _connected: ->
14
- @checkbox = @findComponent '> .tao-tree-item-content tao-check-box', =>
15
- @_selectedChanged() if @selected
16
- @_bind()
14
+ @_initSelectable() if @selectable
15
+ @_initExpandable() if @expandable
17
16
 
18
17
  _disconnected: ->
19
18
  @off()
20
- @checkbox.off()
19
+ @checkbox?.off()
21
20
  @checkbox = null
22
21
 
23
- _bind: ->
24
- @on 'click', '> .tao-tree-item-content > .link-toggle-item', (e) =>
25
- @_toggleExpanded() if @expandable && !@jq.hasClass('expanding')
26
- null
22
+ _initSelectable: ->
23
+ @checkbox = @findComponent '> .tao-tree-item-content tao-check-box', =>
24
+ @_selectedChanged() if @selected
27
25
 
28
26
  @checkbox.on 'tao:change', (e) =>
29
27
  @selected = e.currentTarget.checked
30
28
  @trigger 'tao-tree-item:selectedChange', [@selected]
31
29
  null
32
30
 
31
+ _initExpandable: ->
32
+ @on 'click', '> .tao-tree-item-content > .link-toggle-item', (e) =>
33
+ return if @jq.hasClass('expanding')
34
+ @_toggleExpanded()
35
+ null
36
+
33
37
  _beforeExpandedChanged: (expanded) ->
34
38
  $list = @jq.find('> .tao-tree-list')
35
39
  @jq.addClass 'expanding'
@@ -40,6 +44,7 @@ class Tao.Tree.Item extends TaoComponent
40
44
  null
41
45
 
42
46
  _expandedChanged: ->
47
+ return unless @expandable
43
48
  $list = @jq.find('> .tao-tree-list')
44
49
  if @expanded
45
50
  $list.css 'height', $list.get(0).scrollHeight
@@ -42,8 +42,6 @@ body.tao-dialog-active {
42
42
  padding: 1rem 2rem;
43
43
 
44
44
  .tao-dialog-content {
45
- overflow-y: auto;
46
-
47
45
  h3:first-child,
48
46
  .title:first-child {
49
47
  margin-bottom: 2rem;
@@ -1,3 +1,3 @@
1
1
  module TaoUi
2
- VERSION = '0.2.8'
2
+ VERSION = '0.2.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tao_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - farthinker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-11 00:00:00.000000000 Z
11
+ date: 2017-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tao_on_rails
@@ -111,8 +111,8 @@ files:
111
111
  - config/locales/tao_ui/components/slide_box/zh-CN.yml
112
112
  - config/locales/tao_ui/components/tree/en.yml
113
113
  - config/locales/tao_ui/components/tree/zh-CN.yml
114
+ - lib/assets/icons/Loading.svg
114
115
  - lib/assets/icons/close.svg
115
- - lib/assets/icons/loading.svg
116
116
  - lib/assets/javascripts/tao/ui/dialog/confirm.coffee
117
117
  - lib/assets/javascripts/tao/ui/dialog/element.coffee
118
118
  - lib/assets/javascripts/tao/ui/dialog/index.coffee