scrivito_advanced_editors 1.2.0 → 1.2.1

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: aa7284e9cfcaf9ed385cfa8ed52ed8e64ce85e51
4
- data.tar.gz: faae731d850059b8a61056a6124accd33ccbd681
3
+ metadata.gz: b6fd08bd82c7f14733a887638792caedc53d439d
4
+ data.tar.gz: bc316de26ba6d3489f0cc0480e27d4d4e52fb8c6
5
5
  SHA512:
6
- metadata.gz: 8b79e44f86ba6cdaa7f608257742fed730d7953c84d5db2db846eecd7e8f03eb00bde3582c0654fba34ce8de9f947024e61bda8d16ae76318dec33eccf0f1191
7
- data.tar.gz: 08747c35827c08143ffd0dde72aa5a22906114aa93603d1c78e84e8fe4376efb28049fb82ff72692376a22e05e579d4d9524bf058584a87c244d28e36f594d4d
6
+ metadata.gz: 450faca01ac84e7ddf2fdb6dd98b9bd612e565393dd454b0228f5dcf7ba692627244218b69152fe871343cdecc4a3b65ceffc0b9feb5ddf7d0d7d3ab9005a16f
7
+ data.tar.gz: 69ea06ba2536d7ffc4fc644e5c5ef614fe8c08c9fb14e22678cc1f26d4aca4b5119debb5139dae0bc82604ec492dcd241ff53413b137486964e8222f59c65987
@@ -0,0 +1,10 @@
1
+ (function($, App) {
2
+ 'use strict';
3
+
4
+ scrivito.on('load', function() {
5
+ $('.scrivito_colapsable_headline').on('click', function() {
6
+ $(this).parent().toggleClass('in');
7
+ $(this).siblings().stop().slideToggle(300);
8
+ });
9
+ });
10
+ })(jQuery, this);
@@ -4,7 +4,7 @@
4
4
  var activate, handleClick, renderTemplate,
5
5
  indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
6
6
 
7
- scrivito.editors.multienum_editor = {
7
+ var multienum_editor = {
8
8
  can_edit: function(element) {
9
9
  var is_multienum = $(element).is('[data-scrivito-field-type=multienum]')
10
10
  var has_list = $(element).is('[data-multi-select-list]');
@@ -16,7 +16,7 @@
16
16
  };
17
17
 
18
18
  scrivito.on('load', function() {
19
- return scrivito.define_editor('multienum', scrivito.editors.enum_editor);
19
+ return scrivito.define_editor('multienum', multienum_editor);
20
20
  });
21
21
 
22
22
  activate = function(cmsField) {
@@ -3,7 +3,7 @@
3
3
 
4
4
  var activate, handleClick, renderTemplate, save;
5
5
 
6
- scrivito.editors.enum_editor = {
6
+ var enum_editor = {
7
7
  can_edit: function(element) {
8
8
  var is_enum = $(element).is('[data-scrivito-field-type=enum]');
9
9
  var has_list = $(element).is('[data-toggle-button-list]');
@@ -15,7 +15,7 @@
15
15
  };
16
16
 
17
17
  scrivito.on('load', function() {
18
- return scrivito.define_editor('toggle_button_editor', scrivito.editors.enum_editor);
18
+ return scrivito.define_editor('toggle_button_editor', enum_editor);
19
19
  });
20
20
 
21
21
  activate = function(cmsField) {
@@ -0,0 +1,81 @@
1
+ div.scrivito_colapsable_for_container {
2
+ margin: 0px -10px 0px;
3
+ padding: 0px 10px 0px;
4
+ overflow: hidden;
5
+ transition: background 0.3s;
6
+ }
7
+
8
+ .scrivito_colapsable_for_container h4.scrivito_colapsable_headline {
9
+ cursor: pointer;
10
+ margin: 0 !important;
11
+ padding: 7px 0px 7px 25px;
12
+ position: relative;
13
+ display: inline-block;
14
+ color: inherit;
15
+ }
16
+
17
+ .scrivito_colapsable_headline i {
18
+ transition: transform 0.5s;
19
+ position: absolute;
20
+ left: 0;
21
+ }
22
+
23
+ .in .scrivito_colapsable_headline i {
24
+ transform: rotate(180deg);
25
+ }
26
+
27
+ .scrivito_colapsable_content {
28
+ display: none;
29
+ padding-bottom: 10px;
30
+ margin-left: 25px;
31
+ }
32
+
33
+ .scrivito_colapsable_for_container.warning {
34
+ color: #d8d63a;
35
+ }
36
+
37
+ .scrivito_colapsable_for_container.danger {
38
+ color: #aa4040;
39
+ }
40
+
41
+ .scrivito_colapsable_for_container.help {
42
+ color: #516b8b;
43
+ }
44
+
45
+ .scrivito_colapsable_for_container.editing {
46
+ color: #666666;
47
+ }
48
+
49
+ .scrivito_colapsable_for_container.small,
50
+ .scrivito_colapsable_for_container.small h4.scrivito_colapsable_headline {
51
+ font-size: 12px;
52
+ }
53
+
54
+ .scrivito_colapsable_for_container.small .scrivito_colapsable_headline i {
55
+ left: 2px;
56
+ }
57
+
58
+ .scrivito_colapsable_for_container.small h4.scrivito_colapsable_headline {
59
+ padding: 3px 0 3px 25px;
60
+ }
61
+
62
+ .scrivito_colapsable_for_container.mark {
63
+ background: #fafafa;
64
+ border-top: 1px solid #eaeaea;
65
+ }
66
+
67
+ .scrivito_colapsable_for_container.mark:last-child {
68
+ border-radius: 0 0px 5px 5px;
69
+ margin-bottom: -10px;
70
+ }
71
+
72
+ .scrivito_content_group + .scrivito_colapsable_for_container.mark {
73
+ font-size: 12px;
74
+ margin: -15px 20px 0px;
75
+ padding: 0px 10px 0px;
76
+ background: #fafafa;
77
+ border-radius: 0 0px 5px 5px;
78
+ box-shadow: 0 2px 3px rgba(0,0,0,0.1);
79
+ z-index: 0;
80
+ border-top: 1px solid #eaeaea;
81
+ }
@@ -1,6 +1,15 @@
1
1
  module ScrivitoAdvancedEditors
2
2
  module ScrivitoAdvancedTagHelper
3
3
 
4
+ def scrivito_colapsable_for(headline, type = "editing", &block)
5
+ content_tag :div, class: "scrivito_colapsable_for_container #{type}" do
6
+ capture do
7
+ concat content_tag(:h4, content_tag(:i,'', class: "fa fa-angle-down") + headline, class: 'scrivito_colapsable_headline')
8
+ concat content_tag(:div, capture(&block), class: 'scrivito_colapsable_content')
9
+ end
10
+ end
11
+ end
12
+
4
13
  def scrivito_multi_select_button_editor(obj, attribute, list=nil)
5
14
  if list
6
15
  scrivito_tag(:div, obj, attribute, data: {multi_select_list: list})
@@ -1,3 +1,3 @@
1
1
  module ScrivitoAdvancedEditors
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_advanced_editors
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-03 00:00:00.000000000 Z
11
+ date: 2016-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,6 +76,7 @@ files:
76
76
  - LICENSE
77
77
  - Rakefile
78
78
  - app/assets/javascripts/scripts/button_activate.js
79
+ - app/assets/javascripts/scripts/colapsable.js
79
80
  - app/assets/javascripts/scripts/color_picker.js
80
81
  - app/assets/javascripts/scripts/create_obj.js
81
82
  - app/assets/javascripts/scripts/details_accordion.js
@@ -85,6 +86,7 @@ files:
85
86
  - app/assets/javascripts/scripts/scrivito_toggle_button.js
86
87
  - app/assets/javascripts/scrivito_advanced_editors.js
87
88
  - app/assets/stylesheets/scrivito_advanced_editors.css
89
+ - app/assets/stylesheets/scrivito_advanced_editors/colapsable.css
88
90
  - app/assets/stylesheets/scrivito_advanced_editors/color_picker.css
89
91
  - app/assets/stylesheets/scrivito_advanced_editors/create_obj.css
90
92
  - app/assets/stylesheets/scrivito_advanced_editors/scrivito_dialog.css