scrivito_advanced_editors 1.2.3 → 1.2.4

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: 8e285a69994a394b04dd38adab85a8f1e31239b9
4
- data.tar.gz: d5d2a8079fac734f1c31e7f2dd60bbd12d216353
3
+ metadata.gz: 1f75cf3e2c78f6dfaa7ad21ad7f42faa1bc07cd1
4
+ data.tar.gz: efdfa0d0dd59a03d0193e32123a11f81e25bbd52
5
5
  SHA512:
6
- metadata.gz: bb5ebcef0c835b0edffd6217b86af49674765878aad0040abe07cc72b014d7be4bc9477e9b101736f1b472b3e28f72de6fef7ea44643598caf457d2ad599d718
7
- data.tar.gz: 05a43045aab8fb26f9bb918c197527b3b026ecfafc907482eea02d72efd0448b7b263c23f3992f919c2ece203224d3bc017c7d96ac36f82c834c42697b6242d5
6
+ metadata.gz: 7ce1b61cff155e561bce8ad4d78dc2a06d8c85815e6be22313cb47d8397f134a5a3d71783c619a88ed3c89163dafa3e41ad9905e23b8e30bdbb77046d0fc0732
7
+ data.tar.gz: 6986ae134f285a913ebdce35a33d28ad3d2cb247822049c429e2ec26f68254303eccb16082be1c1db80708ffe77f95d0ffb2aed5bddb71a3ecf70b435039ec27
@@ -1,8 +1,8 @@
1
1
  (function($, App) {
2
2
  'use strict';
3
3
 
4
- scrivito.on('content', function() {
5
- $('.scrivito_colapsable_headline').on('click', function() {
4
+ scrivito.on('load', function() {
5
+ $(document).on('click', '.scrivito_colapsable_headline', function() {
6
6
  $(this).parent().toggleClass('in');
7
7
  $(this).siblings().stop().slideToggle(300);
8
8
  });
@@ -35,15 +35,17 @@
35
35
  };
36
36
 
37
37
  scrivito.on('content', function() {
38
- scrivito.define_editor("color_picker", {
39
- can_edit: function(element) {
40
- return $(element).is('[data-colors-list]');
41
- },
42
- activate: function(element) {
43
- ScrivitoColorPicker.init_function(element);
44
- $(element).on('click', '.scrivito-color-select', ScrivitoColorPicker.clickFunction);
45
- }
46
- });
38
+ if(scrivito.in_editable_view()) {
39
+ scrivito.define_editor("color_picker", {
40
+ can_edit: function(element) {
41
+ return $(element).is('[data-colors-list]');
42
+ },
43
+ activate: function(element) {
44
+ ScrivitoColorPicker.init_function(element);
45
+ $(element).on('click', '.scrivito-color-select', ScrivitoColorPicker.clickFunction);
46
+ }
47
+ });
48
+ }
47
49
  });
48
50
 
49
51
  })(jQuery, this);
@@ -16,7 +16,9 @@
16
16
  };
17
17
 
18
18
  scrivito.on('content', function() {
19
- return scrivito.define_editor('toggle_multi_select_editor', multienum_editor);
19
+ if(scrivito.in_editable_view()) {
20
+ scrivito.define_editor('toggle_multi_select_editor', multienum_editor);
21
+ }
20
22
  });
21
23
 
22
24
  activate = function(cmsField) {
@@ -15,7 +15,9 @@
15
15
  };
16
16
 
17
17
  scrivito.on('content', function() {
18
- return scrivito.define_editor('toggle_button_editor', enum_editor);
18
+ if(scrivito.in_editable_view()) {
19
+ scrivito.define_editor('toggle_button_editor', enum_editor);
20
+ }
19
21
  });
20
22
 
21
23
  activate = function(cmsField) {
@@ -37,7 +39,8 @@
37
39
  li = $('<li></li>');
38
40
  li.html(caption);
39
41
  li.data('scrivito-toggle-value', validValue);
40
- if (validValue === value) {
42
+
43
+ if (validValue === parseInt(value)) {
41
44
  li.addClass('scrivito_enum_active');
42
45
  }
43
46
  ul.append(li);
@@ -1,3 +1,3 @@
1
1
  module ScrivitoAdvancedEditors
2
- VERSION = "1.2.3"
2
+ VERSION = "1.2.4"
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.3
4
+ version: 1.2.4
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-23 00:00:00.000000000 Z
11
+ date: 2016-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler