scrivito_advanced_editors 0.0.12 → 0.0.13

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: af77a23fa670392e4bc74bc1d477b9909e05d519
4
- data.tar.gz: 68308ab407999cc610bae5a09cd1c9b1bbe00225
3
+ metadata.gz: b27b6cd44c8c7986a24697828d93333a7b5a1488
4
+ data.tar.gz: 77e6a7c4bea27ba81948013f6672f6dd566d10c2
5
5
  SHA512:
6
- metadata.gz: 01e13c2acf6de13c20d0826f7b7d66edfa2d9811424964363610569af2230de15c5bb6b7d8f5305d87573df766a87b1edff4eb770f97dc060f590fd715cb2a04
7
- data.tar.gz: 2034a6ee9f968413784ebd9ebb946d78d7b8c1daba4eb40990afe2b1b6341a220b82d31a1aa30abad79d6a7c0121d41341c7d66ba994c00255e2f16d2419cfd1
6
+ metadata.gz: 7964f367f3909d6ae991e5150adc5a1da9919b27bbcf10d75e44a2cdc9680a08390f72ca2c47b1171d199091df1620ee2e390285d3e3df58167bb208e1bbaad7
7
+ data.tar.gz: a16d7ec6d09949fd94227c913f83bd10551ffc62fd738791b65096c2979f495939f45cacbda5b1990c3ae38e5abf30185410e85c1b404ec78b49f9874a83c8ba
@@ -10,10 +10,12 @@
10
10
 
11
11
  tab_list.on('click', 'li', function() {
12
12
  var target = $(this).data('panel-target');
13
- $(target).siblings('.active').removeClass('active');
14
- $(this).siblings('.active').removeClass('active');
15
- $(target).addClass('active');
16
- $(this).addClass('active');
13
+ if(!$(this).hasClass('inactive')) {
14
+ $(target).siblings('.active').removeClass('active');
15
+ $(this).siblings('.active').removeClass('active');
16
+ $(target).addClass('active');
17
+ $(this).addClass('active');
18
+ }
17
19
  });
18
20
  });
19
21
  });
@@ -0,0 +1,10 @@
1
+ .scrivito_dialog .button_list button[data-editor="scrivito-toggle-button"].color-select {
2
+ padding: 3px;
3
+ font-size: 0px;
4
+ line-height: 10px;
5
+ width: 45px;
6
+ height: 45px;
7
+ &.none {
8
+ font-size: 10px;
9
+ }
10
+ }
@@ -1,9 +1,9 @@
1
- .details-view abbr {
1
+ .scrivito_dialog abbr {
2
2
  color: #444;
3
3
  font-size: 13px;
4
4
  }
5
5
 
6
- .details-view abbr:after {
6
+ .scrivito_dialog abbr:after {
7
7
  content: "?";
8
8
  }
9
9
 
@@ -27,4 +27,13 @@
27
27
  background: #eee;
28
28
  padding: 10px;
29
29
  margin: 5px -10px -10px;
30
+ }
31
+
32
+ .scrivito_content_group {
33
+ h1,h2,h3,h4,h5,h6 {
34
+ small {
35
+ color: #bbb;
36
+ margin-left: 20px;
37
+ }
38
+ }
30
39
  }
@@ -8,28 +8,33 @@
8
8
  border-radius: 4px;
9
9
  }
10
10
 
11
- .tab-list li {
11
+ .tab-list li[data-panel-target] {
12
12
  float: left;
13
- padding: 5px 10px;
14
13
  cursor: pointer;
15
14
  background: #f3f3f3;
16
15
  color: #666;
17
16
  padding: 8px;
18
17
  }
19
18
 
20
- .tab-list li:hover {
19
+ .tab-list li[data-panel-target]:hover {
21
20
  background: #fff;
22
21
  }
23
22
 
24
- .tab-list li.active {
23
+ .tab-list li[data-panel-target].active {
25
24
  background: #444;
26
25
  color: #f3f3f3;
27
26
  }
28
27
 
29
- .tab-list li.active:hover {
28
+ .tab-list li[data-panel-target].active:hover {
30
29
  background: #888;
31
30
  }
32
31
 
32
+ .tab-list li.inactive {
33
+ color: #aaa;
34
+ float: left;
35
+ padding: 8px;
36
+ }
37
+
33
38
  .tab-panels .tab-panel {
34
39
  display: none;
35
40
  }
@@ -39,7 +39,7 @@ module ScrivitoAdvancedEditors
39
39
 
40
40
  def fallback_toggle_button(obj, attribute, elem, active, type)
41
41
  content = elem.is_a?(Hash) ? elem : content_hash(elem)
42
- scrivito_tag(:button, obj, attribute, class: (css_class(elem, active,) + content[:css]), style: content[:style], data: data_attribute(content, type)) do
42
+ scrivito_tag(:button, obj, attribute, class: (content[:css] + " " + css_class(elem, active)), style: content[:style], data: data_attribute(content, type)) do
43
43
  content[:caption]
44
44
  end
45
45
  end
@@ -58,7 +58,7 @@ module ScrivitoAdvancedEditors
58
58
  content: color,
59
59
  caption: (color.present? ? color : 'no selection'),
60
60
  style: '',
61
- css: color,
61
+ css: "color-select #{color == "" ? "none" : color}",
62
62
  }
63
63
  end
64
64
 
@@ -75,7 +75,8 @@ module ScrivitoAdvancedEditors
75
75
 
76
76
  def css_class(elem, active)
77
77
  return '' if active.nil?
78
- return active == elem ? 'active' : '' if active.is_a? String
78
+ return active == elem[:content] ? 'active' : '' if elem.is_a? Hash
79
+ return active == elem ? 'active' : '' if elem.is_a? String
79
80
  active.include?(elem) ? 'active' : ''
80
81
  end
81
82
  end
@@ -1,3 +1,3 @@
1
1
  module ScrivitoAdvancedEditors
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
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: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-15 00:00:00.000000000 Z
11
+ date: 2015-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,9 +86,10 @@ files:
86
86
  - app/assets/javascripts/scripts/scrivito_toggle_button.js
87
87
  - app/assets/javascripts/scrivito_advanced_editors.js
88
88
  - app/assets/stylesheets/scrivito_advanced_editors.css
89
+ - app/assets/stylesheets/scrivito_advanced_editors/color_picker.css.scss
89
90
  - app/assets/stylesheets/scrivito_advanced_editors/create_obj.css
90
91
  - app/assets/stylesheets/scrivito_advanced_editors/jquery.tag-editor.css
91
- - app/assets/stylesheets/scrivito_advanced_editors/scrivito_dialog.css
92
+ - app/assets/stylesheets/scrivito_advanced_editors/scrivito_dialog.css.scss
92
93
  - app/assets/stylesheets/scrivito_advanced_editors/scrivito_mutli_select_button.css.scss
93
94
  - app/assets/stylesheets/scrivito_advanced_editors/scrivito_tabs.css
94
95
  - app/assets/stylesheets/scrivito_advanced_editors/scrivito_toggle_button.css