kolo 0.6.3 → 0.6.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acdf7d7cd0bb17aa888ed1965d1ee228695e222a
|
4
|
+
data.tar.gz: 8d7fb513eecca72635aaa338ae83c9b24574635d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eed313f0e2d717b82719c1da828f4cb6e10e5071368bfe9931db09b7acb9c4bab5b0aaf08bd85814dba5366475971385c3d2b579d3ee790bfb5726079fdc070
|
7
|
+
data.tar.gz: 4016a3df873d11943ad60fbf77c151f310544b0b7a864f2e818a8fe154261c309a4b97c72428e2eac4b9b2714eebcf184926ff841bcc7082ce408b8cb99e0372
|
@@ -7,6 +7,7 @@ ko.bindingHandlers.appearif =
|
|
7
7
|
duration = allBindingsAccessor().duration || 400
|
8
8
|
if appear
|
9
9
|
$(element).fadeIn(duration)
|
10
|
+
$(element).focus()
|
10
11
|
else
|
11
12
|
$(element).fadeOut(duration)
|
12
13
|
|
@@ -19,6 +20,7 @@ ko.bindingHandlers.appearifnot =
|
|
19
20
|
duration = allBindingsAccessor().duration || 400
|
20
21
|
if !appear
|
21
22
|
$(element).fadeIn(duration)
|
23
|
+
$(element).focus()
|
22
24
|
else
|
23
25
|
$(element).fadeOut(duration)
|
24
26
|
|
@@ -31,6 +33,7 @@ ko.bindingHandlers.slidedownif =
|
|
31
33
|
duration = allBindingsAccessor().duration || 1000
|
32
34
|
if appear
|
33
35
|
$(element).slideDown(duration)
|
36
|
+
$(element).focus()
|
34
37
|
else
|
35
38
|
$(element).slideUp(duration)
|
36
39
|
|
@@ -43,6 +46,7 @@ ko.bindingHandlers.slidedownifnot =
|
|
43
46
|
duration = allBindingsAccessor().duration || 1000
|
44
47
|
if !appear
|
45
48
|
$(element).slideDown(duration)
|
49
|
+
$(element).focus()
|
46
50
|
else
|
47
51
|
$(element).slideUp(duration)
|
48
52
|
|
@@ -54,6 +58,7 @@ ko.bindingHandlers.slideleftif =
|
|
54
58
|
$(element).transition({ x: '10000px' }, 1)
|
55
59
|
else
|
56
60
|
$(element).show()
|
61
|
+
$(element).focus()
|
57
62
|
|
58
63
|
update: (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext)->
|
59
64
|
appear = ko.utils.unwrapObservable valueAccessor()
|
@@ -74,6 +79,7 @@ ko.bindingHandlers.slideleftifnot =
|
|
74
79
|
$(element).transition({ x: '10000px' }, 1)
|
75
80
|
else
|
76
81
|
$(element).show()
|
82
|
+
$(element).focus()
|
77
83
|
|
78
84
|
update: (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext)->
|
79
85
|
appear = ko.utils.unwrapObservable valueAccessor()
|
@@ -94,6 +100,7 @@ ko.bindingHandlers.sliderightif =
|
|
94
100
|
$(element).transition({ x: '-10000px' }, 1)
|
95
101
|
else
|
96
102
|
$(element).show()
|
103
|
+
$(element).focus()
|
97
104
|
|
98
105
|
update: (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext)->
|
99
106
|
appear = ko.utils.unwrapObservable valueAccessor()
|
@@ -114,6 +121,7 @@ ko.bindingHandlers.sliderightifnot =
|
|
114
121
|
$(element).transition({ x: '-10000px' }, 1)
|
115
122
|
else
|
116
123
|
$(element).show()
|
124
|
+
$(element).focus()
|
117
125
|
|
118
126
|
update: (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext)->
|
119
127
|
appear = ko.utils.unwrapObservable valueAccessor()
|
@@ -58,7 +58,7 @@ class Db
|
|
58
58
|
@selected = ko.observable null
|
59
59
|
@selected.subscribe (newValue)=>
|
60
60
|
return unless @selected()?
|
61
|
-
@selected().hasBeenSelected()
|
61
|
+
@selected().hasBeenSelected() if @selected().hasBeenSelected
|
62
62
|
@plural = "#{@name}s"
|
63
63
|
@sortFunction = null
|
64
64
|
@onAfterLoad = null
|
@@ -231,6 +231,8 @@ class Model
|
|
231
231
|
@editing = ko.observable false
|
232
232
|
@deleting = ko.observable false
|
233
233
|
@updating = ko.observable false
|
234
|
+
@selected = ko.computed =>
|
235
|
+
@db.selected() == this
|
234
236
|
|
235
237
|
viewModel: =>
|
236
238
|
@db.viewModel
|
data/lib/kolo/version.rb
CHANGED