tao_form 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets/javascripts/tao/form/shared/fields/datetime_picker.coffee +3 -0
- data/lib/assets/javascripts/tao/form/shared/fields/moment_picker/segment_list/base.coffee +3 -0
- data/lib/assets/javascripts/tao/form/shared/fields/moment_picker/segments/base.coffee +3 -0
- data/lib/assets/javascripts/tao/form/shared/fields/moment_picker/segments/date_segment.coffee +5 -2
- data/lib/assets/stylesheets/tao/form/layout.scss +1 -1
- data/lib/assets/stylesheets/tao/form/mobile/layout.scss +1 -1
- data/lib/tao_form/components/form_component.rb +10 -2
- data/lib/tao_form/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83d90b3525b49b6b8255b3b63f226c9ac99d0c90
|
4
|
+
data.tar.gz: 64d8b5cceb9d36961cb5f65f4583c356ae91da2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06e00b140ebb057161661b08d740e4c15331a8f9fc6bfc67ad05856225dfb72744895c0a9ae9a8936248e6e8e19f61ad858f2b36665a39eb72d0176115b8dd5e
|
7
|
+
data.tar.gz: c710aae81181adbf7062ba89a85adff27c4559bfcdb74bb135f85515910f2a2cc7ca857c8a3f7eb848f2189b4f8053bc4672cd4afd0b2283f8c5a3b6bef16817
|
data/lib/assets/javascripts/tao/form/shared/fields/moment_picker/segments/date_segment.coffee
CHANGED
@@ -10,10 +10,13 @@ class MomentPicker.DateSegment extends MomentPicker.SegmentBase
|
|
10
10
|
|
11
11
|
dateFormat: 'YYYY-MM-DD'
|
12
12
|
|
13
|
+
_init: ->
|
14
|
+
super
|
15
|
+
@_renderWeekdays()
|
16
|
+
|
13
17
|
_connected: ->
|
14
18
|
super
|
15
19
|
@momentData = {}
|
16
|
-
@_renderWeekdays()
|
17
20
|
|
18
21
|
_bind: ->
|
19
22
|
@on 'click', '.day', (e) =>
|
@@ -86,7 +89,7 @@ class MomentPicker.DateSegment extends MomentPicker.SegmentBase
|
|
86
89
|
startDate.add 1, 'days'
|
87
90
|
|
88
91
|
_renderWeekdays: ->
|
89
|
-
$head = @jq.find('.weekdays')
|
92
|
+
$head = @jq.find('.weekdays').empty()
|
90
93
|
$.each moment.weekdaysMin(true), (i, weekdayName) ->
|
91
94
|
$('<span>', class: 'weekday', text: weekdayName)
|
92
95
|
.appendTo $head
|
@@ -7,11 +7,15 @@ module TaoForm
|
|
7
7
|
def initialize view, record, options
|
8
8
|
super view, options
|
9
9
|
@record = record
|
10
|
-
@html_options = transform_html_options(@options.delete(:html) || {})
|
10
|
+
@html_options = transform_html_options(@options.delete(:html) || {}, default_html_options)
|
11
11
|
end
|
12
12
|
|
13
13
|
def render &block
|
14
|
-
|
14
|
+
if block_given?
|
15
|
+
view.content_tag tag_name, view.simple_form_for(record, options, &block), html_options
|
16
|
+
else
|
17
|
+
super
|
18
|
+
end
|
15
19
|
end
|
16
20
|
|
17
21
|
def self.component_name
|
@@ -27,6 +31,10 @@ module TaoForm
|
|
27
31
|
}
|
28
32
|
end
|
29
33
|
|
34
|
+
def default_html_options
|
35
|
+
{class: 'tao-form'}
|
36
|
+
end
|
37
|
+
|
30
38
|
end
|
31
39
|
end
|
32
40
|
end
|
data/lib/tao_form/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tao_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- your name
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tao_on_rails
|