scrivito_elastic_slider_widget 0.92.2 → 0.93.0

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: 992f876fe6f35c9d74e4e9402dec858717e9a547
4
- data.tar.gz: fc6b621e24015aab6b3788f4e0500e13a73b480f
3
+ metadata.gz: f73a10f0244d137a1366f36e296a1a2dc65c9281
4
+ data.tar.gz: 9a13a85478124d712755f593139318b94a58acf5
5
5
  SHA512:
6
- metadata.gz: bd7dd4de2288c03783e69269eb06d843ee3d8df188d2d9abd2f7324f6832c73d5d51349074339f41c159be2bf4a9630c22432320217c06665992098f9eb0ad45
7
- data.tar.gz: 5f8a2e258f2dc5af589b58f12af21f394e3e72136fa22df99a42748a5821d1946c53c7f2e5f48b54edd9c402c7777f2bc2342416a4a8655f492b449737bc4fd1
6
+ metadata.gz: 5d73a3b2e891405a98a8913cdcc328084dfc08378453902247e435cbe5305912596074bda8f3a52030109f76c13f54f7fa50e843ebd64ea60fe0ce2a5062bc2f
7
+ data.tar.gz: bec55009bea3e900462a68bce0776b97954d1409673b4688325093e2fb32fbd31604e0a8808ada84823c7e01cc1d3dd4ccaf4b6bf1b96554cc63791984ab5433
@@ -1,6 +1,7 @@
1
1
  class ElasticSliderWidget < Widget
2
2
  attribute :panels, :widgetlist
3
3
  attribute :height, :string, default: '300px'
4
+ attribute :interval, :integer, default: 5000
4
5
 
5
6
  default_for :panels do |attributes|
6
7
  [
@@ -20,4 +21,9 @@ class ElasticSliderWidget < Widget
20
21
  def slider_height
21
22
  height.presence || '300px'
22
23
  end
24
+
25
+ def _interval(in_editable_view)
26
+ return false if in_editable_view
27
+ (interval || 0).zero? ? 5000 : interval
28
+ end
23
29
  end
@@ -1,8 +1,28 @@
1
1
  <%= scrivito_large_dialog do %>
2
- <%= scrivito_details_for '' do %>
3
- <%= scrivito_tag :div, widget, :height, data: {toggle_button_list: ['200px','300px','400px','500px', '50vh', '100vh'], toggle_button_caption: {'200px': 'small', '300px': 'default', '400px': 'large', '500px': 'extra large', '50vh': 'half screen', '100vh': 'full screen'}} %>
2
+ <%= scrivito_details_for 'Height' do %>
3
+ <%= scrivito_tag :div, widget, :height, data: {
4
+ toggle_button_list: ['200px','300px','400px','500px', '50vh', '100vh'],
5
+ toggle_button_caption: {
6
+ '200px': 'small',
7
+ '300px': 'default',
8
+ '400px': 'large',
9
+ '500px': 'extra large',
10
+ '50vh': 'half screen',
11
+ '100vh': 'full screen'
12
+ }
13
+ } %>
4
14
  <% end %>
5
15
 
6
- <h3>Panels</h3>
7
- <%= scrivito_tag :div, widget, :panels %>
16
+ <%= scrivito_details_for "Interval" do %>
17
+ <%= scrivito_tag(:div, widget, :interval, data: {
18
+ scrivito_editors_min: 1000,
19
+ scrivito_editors_max: 10000,
20
+ scrivito_editors_step: 1,
21
+ scrivito_editors_allow_delete: false,
22
+ }) %>
23
+ <% end %>
24
+
25
+ <%= scrivito_details_for "Panels" do %>
26
+ <%= scrivito_tag :div, widget, :panels %>
27
+ <% end %>
8
28
  <% end %>
@@ -1,4 +1,4 @@
1
- <div id="carousel<%= widget.id %>" class="carousel slide elastic-slider" data-ride="carousel" data-keyboard="false">
1
+ <div id="carousel<%= widget.id %>" class="carousel slide elastic-slider" data-ride="carousel" data-keyboard="false" data-interval="<%= widget._interval(scrivito_in_editable_view?) %>">
2
2
  <% if widget.panels.present?%>
3
3
  <ol class="carousel-indicators">
4
4
  <% (0..widget.panels.size-1).each do |index| %>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoElasticSliderWidget
2
- VERSION = "0.92.2"
2
+ VERSION = "0.93.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_elastic_slider_widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.92.2
4
+ version: 0.93.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-04 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler