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 +4 -4
- data/lib/assets/icons/{loading.svg → Loading.svg} +0 -0
- data/lib/assets/javascripts/tao/ui/popover/element.coffee +6 -2
- data/lib/assets/javascripts/tao/ui/tree/item.coffee +13 -8
- data/lib/assets/stylesheets/tao/ui/dialog.scss +0 -2
- data/lib/tao_ui/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 271fa5537047fcc2e80b6918c448a292b430b199
|
4
|
+
data.tar.gz: 8975fc4ecabea2b2c8d46e5e6236f0839caccd2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
98
|
-
|
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
|
-
@
|
15
|
-
|
16
|
-
@_bind()
|
14
|
+
@_initSelectable() if @selectable
|
15
|
+
@_initExpandable() if @expandable
|
17
16
|
|
18
17
|
_disconnected: ->
|
19
18
|
@off()
|
20
|
-
@checkbox
|
19
|
+
@checkbox?.off()
|
21
20
|
@checkbox = null
|
22
21
|
|
23
|
-
|
24
|
-
@
|
25
|
-
@
|
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
|
data/lib/tao_ui/version.rb
CHANGED
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.
|
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
|
+
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
|