scrivito_elastic_slider_widget 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/scrivito_elastic_slider_widget/editing.js +11 -6
- data/app/assets/stylesheets/scrivito_elastic_slider_widget/application.css +0 -19
- data/app/assets/stylesheets/scrivito_elastic_slider_widget/editing.css +20 -7
- data/app/views/elastic_slider_widget/details.html.erb +1 -0
- data/app/views/elastic_slider_widget/show.html.erb +3 -1
- data/lib/scrivito_elastic_slider_widget/version.rb +1 -1
- data/scrivito/migrate/0_create_elastic_slider_widget.rb +21 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3327448bde84b1403e41a79b4c1803d2b22bc69a
|
4
|
+
data.tar.gz: 1d971436ac580e42f1eed58ccdf7d5e574d2a359
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b53ee1715c2f9b14695b4d22723a963ead69dc8f56d8467d5e8879782688028f0a839f812f4b21d5f6148eb94acfcb2ef0da540b3618c6ce9567688ecf3ce5a
|
7
|
+
data.tar.gz: 49b208126ce26fe38607c3d22a69a0ee47ed1f0aee37aaa23791d981de089d73dcb3f873d3474e3085bc819c773a192013520b222ce0ffedda8a7906ccceb60d
|
@@ -1,7 +1,12 @@
|
|
1
|
-
$(
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
$(function() {
|
2
|
+
$("body").on("click", ".scrivito_elastic_slider_widget_add-new-panel", function(e) {
|
3
|
+
e.preventDefault();
|
4
|
+
var pageid = $(this).attr("pageid");
|
5
|
+
var widgetid = $(this).attr("widgetid");
|
6
|
+
$.get("/scrivito_elastic_slider_widget/add_new_panel?obj=" + pageid + "&widget=" + widgetid, function(data) {
|
7
|
+
// TBD: trigger("scrivito_reload") is deprecated but new method wasn't yet documented in March '15
|
8
|
+
$("#carousel" + widgetid).trigger("scrivito_reload");
|
9
|
+
});
|
6
10
|
|
7
|
-
});
|
11
|
+
});
|
12
|
+
});
|
@@ -1,22 +1,3 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
16
|
-
|
17
|
-
/* Carousel
|
18
|
-
================================================== */
|
19
|
-
|
20
1
|
.carousel-inner .item {height:400px;}
|
21
2
|
.carousel-inner .item > img,
|
22
3
|
.carousel-inner .item > a > img { display: block; height: auto; line-height: 1; min-width: 1200px; width: 100%;}
|
@@ -1,11 +1,24 @@
|
|
1
|
-
/* Editing styles for the Elastic Slider */
|
2
|
-
|
3
|
-
/* basic display settings */
|
4
|
-
|
5
|
-
body[data-scrivito-display-mode='editing'] .carousel {padding-top: 30px;}
|
6
|
-
|
7
1
|
/* additional tools */
|
8
|
-
.scrivito_elastic_slider_widget_add-new-panel {
|
2
|
+
.scrivito_elastic_slider_widget_add-new-panel {
|
3
|
+
background-color: #33312d;
|
4
|
+
color: white;
|
5
|
+
display: block;
|
6
|
+
padding: 5px;
|
7
|
+
position: absolute;
|
8
|
+
left: 10px;
|
9
|
+
top: 10px;
|
10
|
+
z-index: 1;
|
11
|
+
width: auto;
|
12
|
+
height: 24px;
|
13
|
+
font-size: 15px;
|
14
|
+
line-height: 15px;
|
15
|
+
text-align: center;
|
16
|
+
cursor: pointer;
|
17
|
+
}
|
18
|
+
|
19
|
+
.scrivito_elastic_slider_widget_add-new-panel * {
|
20
|
+
margin-right: 5px;
|
21
|
+
}
|
9
22
|
|
10
23
|
/* Details view */
|
11
24
|
.details-view .item {display: block; height: 100px; margin-bottom: 10px; overflow: hidden;}
|
@@ -1,7 +1,9 @@
|
|
1
1
|
<!-- Carousel -->
|
2
2
|
<div id="carousel<%= widget.id %>" class="carousel slide" data-ride="carousel">
|
3
3
|
<% if scrivito_in_editable_view? %>
|
4
|
-
|
4
|
+
<div pageid="<%= @obj.id %>" widgetid="<%= widget.id %>" class="scrivito_elastic_slider_widget_add-new-panel">
|
5
|
+
<%= content_tag(:i, '', class: 'fa fa-plus') + "new panel" %>
|
6
|
+
</div>
|
5
7
|
<% end %>
|
6
8
|
<ol class="carousel-indicators">
|
7
9
|
<% (0..widget.panels.size-1).each do |index| %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class CreateElasticSliderWidget < ::Scrivito::Migration
|
2
|
+
def up
|
3
|
+
Scrivito::ObjClass.create(
|
4
|
+
name: 'ElasticSliderWidget',
|
5
|
+
is_binary: false,
|
6
|
+
attributes: [
|
7
|
+
{name: 'panels', type: :widget},
|
8
|
+
]
|
9
|
+
)
|
10
|
+
Scrivito::ObjClass.create(
|
11
|
+
name: 'ElasticSliderPanelWidget',
|
12
|
+
is_binary: false,
|
13
|
+
attributes: [
|
14
|
+
{name: 'image', type: :reference},
|
15
|
+
{name: 'headline', type: :string },
|
16
|
+
{name: 'content', type: :text},
|
17
|
+
{name: 'button', type: :link},
|
18
|
+
]
|
19
|
+
)
|
20
|
+
end
|
21
|
+
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.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- lib/scrivito_elastic_slider_widget/engine.rb
|
84
84
|
- lib/scrivito_elastic_slider_widget/version.rb
|
85
85
|
- lib/tasks/scrivito_elastic_slider_tasks.rake
|
86
|
+
- scrivito/migrate/0_create_elastic_slider_widget.rb
|
86
87
|
homepage: https://www.scrivito.com
|
87
88
|
licenses:
|
88
89
|
- LGPL-3.0
|