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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f73a10f0244d137a1366f36e296a1a2dc65c9281
|
4
|
+
data.tar.gz: 9a13a85478124d712755f593139318b94a58acf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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: {
|
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
|
-
|
7
|
-
|
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| %>
|
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.
|
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-
|
11
|
+
date: 2017-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|