sinatra-hexacta 0.9.3 → 0.9.8

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: 0b63ced983a9ed988a44fc0d9372b974311c161e6a62eda6c86c522ea57c65cd
4
- data.tar.gz: c5b3afa56953ffcd4b32470a33f795e8b5f288aefec1c4e266153619c53b2fea
3
+ metadata.gz: 3b09731f11bb84a5c0cdf375704854f8221af4551f0b19a2215c2c6501695f1f
4
+ data.tar.gz: f303c526ff69d7e2c1d077842807c5c2efe6961262d23d821d34cb020c30024f
5
5
  SHA512:
6
- metadata.gz: 348e7dea6a1134c12bab47fa82e791b04b1943e26c9e87dc9c5f047a717af822b9e2dcda51d754bae367b3d1d8d44d058d7e223714c1818d44e6488836111bf2
7
- data.tar.gz: bdb1f871698710ce3d72028c5b197538adf5779b88de7d111af9ff38755cdee9cb853e1ebc1796f1d2eb3c1e7239d55272a10f60a9e59a814433441d6b9b2c40
6
+ metadata.gz: 9ab7ed10ae230ba1ea869c047ff81f49eae1f3b5cc51916848cf40ee97ac3a34d38fe6ee33f90b5f1130a933842022f446bfa835d01be7adf3b8a6a0d872716a
7
+ data.tar.gz: 4625603c05c8ec901ff9fd8e183cbf9691a2b6f501902c2cefdbd1ec346000593e26c398aeee49cea683fd866072f23f5c569c3d70dcf0d9d6101696ec088352
@@ -17,8 +17,8 @@ class Antiquity
17
17
  months.divmod(12).first
18
18
  end
19
19
 
20
- def to_s
21
- date = (@periods.last && @periods.last.end_date) || Date.today
20
+ def to_s(upto_date=Date.today)
21
+ date = (@periods.last && @periods.last.end_date) || upto_date
22
22
  result = ""
23
23
  return result if @periods.empty?
24
24
  if date >= @periods.first.start_date
@@ -10,21 +10,23 @@
10
10
  -readonly = false
11
11
  - unless defined? clazz
12
12
  - clazz = nil
13
+ - unless defined? step
14
+ - step = 1
13
15
 
14
16
  -if required
15
17
  .form-group.has-feedback.has-success
16
18
  label #{title}
17
19
  .fg-line
18
20
  -if readonly
19
- input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" required="" value="#{value}" class="#{clazz}" onkeyup="#{onkeyup}" readonly=''
21
+ input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" required="" value="#{value}" class="#{clazz}" onkeyup="#{onkeyup}" readonly='' step="#{step}"
20
22
  -else
21
- input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" required="" value="#{value}" class="#{clazz}" onkeyup="#{onkeyup}"
23
+ input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" required="" value="#{value}" class="#{clazz}" onkeyup="#{onkeyup}" step="#{step}"
22
24
 
23
25
  -else
24
26
  .form-group
25
27
  label #{title}
26
28
  .fg-line
27
29
  -if readonly
28
- input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" value="#{value}" onkeyup="#{onkeyup}" class="#{clazz}" readonly=''
30
+ input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" value="#{value}" onkeyup="#{onkeyup}" class="#{clazz}" readonly='' step="#{step}"
29
31
  -else
30
- input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" value="#{value}" onkeyup="#{onkeyup}" class="#{clazz}"
32
+ input.form-control.fg-input id="#{id}" type="#{type}" placeholder="#{placeholder}" name="#{name}" value="#{value}" onkeyup="#{onkeyup}" class="#{clazz}" step="#{step}"
@@ -10,6 +10,8 @@
10
10
  - selected_elements = []
11
11
  - if selected_elements.nil?
12
12
  - selected_elements = []
13
+ - if !selected_elements.kind_of?(Array)
14
+ - selected_elements = selected_elements.to_s.split(',')
13
15
  - selected_elements = selected_elements.collect { |element| element.to_s }
14
16
 
15
17
  -if required
@@ -3,11 +3,11 @@
3
3
 
4
4
  .actions-menu.hidden
5
5
  -for item in menu
6
- -idx = menu.index(item)
6
+ -idx = menu.index(item) + 1
7
7
  -if item[:type] == 'link'
8
- a.text.btn.bgm-white.c-gray type="button" href="#{item[:link]}" target="#{item[:target]}" style="bottom:#{50+idx*45}px;animation-duration: 0.#{idx+1}s" #{item[:text]}
8
+ a.text.btn.bgm-white.c-gray type="button" href="#{item[:link]}" target="#{item[:target]}" style="bottom:#{50+idx*45}px;animation-duration: #{(idx.to_f/10.0).round(2)}s" #{item[:text]}
9
9
  -if item[:type] == 'modal'
10
- a.text.btn.bgm-white.c-gray type="button" data-toggle="modal" data-target="#{item[:link]}" style="bottom:#{50+idx*45}px;animation-duration: 0.#{idx+1}s" #{item[:text]}
10
+ a.text.btn.bgm-white.c-gray type="button" data-toggle="modal" data-target="#{item[:link]}" style="bottom:#{50+idx*45}px;animation-duration: #{(idx.to_f/10.0).round(2)}s" #{item[:text]}
11
11
 
12
12
  .footer-btn
13
13
  a.btn.btn-float.bgm-blue.m-btn.waves-effect.waves-circle.waves-float onclick='toggle_menu()'
@@ -15,13 +15,13 @@
15
15
 
16
16
  .actions-menu.hidden
17
17
  -for item in menu
18
- -idx = menu.index(item)
18
+ -idx = menu.index(item) + 1
19
19
  -if item[:type] == 'link'
20
- a.btn.btn-float.bgm-blue.m-btn.waves-effect.waves-circle.waves-float type="button" href="#{item[:link]}" target="#{item[:target]}" style="bottom:#{50+idx*45}px;animation-duration: 0.#{idx+1}s"
20
+ a.btn.btn-float.bgm-blue.m-btn.waves-effect.waves-circle.waves-float type="button" href="#{item[:link]}" target="#{item[:target]}" style="bottom:#{50+idx*45}px;animation-duration: #{(idx.to_f/10.0).round(2)}s"
21
21
  i.zmdi class="zmdi-#{item[:icon]}"
22
22
 
23
23
  -if item[:type] == 'modal'
24
- a.btn.btn-float.bgm-blue.m-btn.waves-effect.waves-circle.waves-float type="button" data-toggle="modal" data-target="#{item[:link]}" style="bottom:#{50+idx*45}px;animation-duration: 0.#{idx+1}s"
24
+ a.btn.btn-float.bgm-blue.m-btn.waves-effect.waves-circle.waves-float type="button" data-toggle="modal" data-target="#{item[:link]}" style="bottom:#{50+idx*45}px;animation-duration: #{(idx.to_f/10.0).round(2)}s"
25
25
  i.zmdi class="zmdi-#{item[:icon]}"
26
26
 
27
27
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-hexacta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Zanger