scrivito_accordion_widget 1.0.7 → 1.0.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
  SHA1:
3
- metadata.gz: 67a0aac0a0eab6c3dd83829091b441026da842d0
4
- data.tar.gz: 76545c505700a72414013a59c30992ffd4de6f3c
3
+ metadata.gz: 9df3a5713ded233e49006e054850b0db0117265a
4
+ data.tar.gz: b7d5c14d4fbdfd96fd4f539ab33790b1a7b45e54
5
5
  SHA512:
6
- metadata.gz: 547d159281e664166dfdf62fe8e6c2b21bd83d1766e9aff960b3e2aa5091f0a7fe4ba810dd0429263af3fd115ad0ee93832a471c7224def566d09c40d7c473b8
7
- data.tar.gz: 081dc173d75c8efd0ade40159b98492b624a64d3bd867af68d8e1e32ad50f5cd00b332087332b2ec6cbe756f29a6d4e31b15c24abc4c0283badb8f499c9defb0
6
+ metadata.gz: f5968ba71d3c93339326247928b44d00bbe62a7b35c32beb2304e918c2be6e98e58f88338d6b48b2ab6acd3345f24f8ea6066b79964a2fbdc7ea58010d724aa3
7
+ data.tar.gz: c9f50c0a7bb98a3a4370fa502ed35c8b1634e7656ae6de9238e52745c6f5019caba6224728e53ba98b07308967f388f7427842e4ed331ba1d5048b1b5734aefe
@@ -0,0 +1,11 @@
1
+ $(function() {
2
+ $.each($("[data-scrivito-widget-obj-class='AccordionWidget']"), function(index, accordion) {
3
+ $(accordion).scrivito("menu").add("add_panel_to_accordion", {
4
+ title: "Add Panel",
5
+ icon: "plus",
6
+ execute: function(dom_element) {
7
+ // TODO: create new widget
8
+ },
9
+ });
10
+ });
11
+ });
@@ -1,5 +1,9 @@
1
- *[data-scrivito-display-mode="editing"] *[data-scrivito-widget-obj-class] .panel-group *[data-scrivito-field-type="widget"] {
2
- margin-top: 0;
1
+ .scrivito_editing_active .panel-group .panel-body.scrivito_empty_widget_field {
2
+ margin: 10px !important;
3
+ }
4
+
5
+ .scrivito_editing_active .panel-group .panel-body {
6
+ margin: 0px !important;
3
7
  }
4
8
 
5
9
  .scrivito_editing_active .panel-group {
@@ -1,4 +1,6 @@
1
1
  class AccordionPanelWidget < Widget
2
+ attribute :headline, :string
3
+ attribute :content, :widgetlist
2
4
 
3
5
  def active_class
4
6
  "in" if self.container.panels.first == self
@@ -1,4 +1,5 @@
1
1
  class AccordionWidget < Widget
2
+ attribute :panels, :widgetlist
2
3
 
3
4
  def description_for_editor
4
5
  "Accordion"
@@ -1,3 +1,12 @@
1
1
  <div class='panel-group' id='<%= "accordion-#{widget.id}" %>' role="tablist" aria-multiselectable="true">
2
- <%= scrivito_tag(:div, widget, :panels) %>
2
+
3
+ <% widget.panels.each do |panel| %>
4
+ <%= render 'accordion_panel_widget/show', widget: panel %>
5
+ <% end %>
6
+
3
7
  </div>
8
+
9
+
10
+
11
+
12
+ <%#= scrivito_tag(:div, widget, :panels, class: 'panel-group', id: "accordion-#{widget.id}", role: "tablist") %>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoAccordionWidget
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_accordion_widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-17 00:00:00.000000000 Z
11
+ date: 2015-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -63,10 +63,11 @@ files:
63
63
  - README.md
64
64
  - Rakefile
65
65
  - app/assets/images/widget_preview_accordion.png
66
+ - app/assets/javascripts/scrivito_accordion_widget.js
66
67
  - app/assets/stylesheets/scrivito_accordion_widget.css
67
68
  - app/models/accordion_panel_widget.rb
68
69
  - app/models/accordion_widget.rb
69
- - app/views/accordion_panel_widget/show.html.erb
70
+ - app/views/accordion_panel_widget/_show.html.erb
70
71
  - app/views/accordion_panel_widget/thumbnail.html.erb
71
72
  - app/views/accordion_widget/show.html.erb
72
73
  - app/views/accordion_widget/thumbnail.html.erb