scrivito_advanced_editors 0.90.0.rc2 → 0.90.0.rc3

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: 4243352121b93e07d83c8af9721d4b94f5e22795
4
- data.tar.gz: 537e46abbb489c2e323ab5f1ce6643b142205ad4
3
+ metadata.gz: e81bb74fcd6d9f88e99950a88d83344574926ebc
4
+ data.tar.gz: 8a78c9c49fd30b10b2f1e025e97fa0ee7b62f90e
5
5
  SHA512:
6
- metadata.gz: ffaef98fc5ede4a582d89a1b36ffca0a14a873d4e0b819277fa1a0a19f9754709c6182d88f88b9bde1c0a5a2338fc168bb87a79c01766003b09b759096226165
7
- data.tar.gz: 338380b99235f45c3eb4600a074f09653d53fd953d140fc013f29f9f4ad84ffe0fa1b3b01105ee8526016cccf6599ef58bfed010d19f4c3ac17fbfa36a3fdbb7
6
+ metadata.gz: 96615ded3031f433bd198ceca125d3b71257b1df0a8c412c9aa099eca03632c7a7953a40946a4e540bdfb3bb186ad12a0227ac00882fbbffb8bd4cea80022144
7
+ data.tar.gz: 657e37b66c1812465dea4b22dc8223c0c06824d2103492435173e33d92d3b7d8bc971e4f311489a04314e9f1b731cd6ec7f55f7ed81cb092d50cba8f21947938
@@ -31,17 +31,17 @@
31
31
  var array_content = Array.isArray(content) ? content : content.split('%|%')
32
32
  if(content === "") array_content = []
33
33
 
34
- if($.inArray(newValue, content) >= 0) {
35
- array_content.splice( content.indexOf(newValue), 1 );
34
+ if($.inArray(newValue, array_content) >= 0) {
35
+ array_content.splice( array_content.indexOf(newValue), 1 );
36
36
  } else {
37
37
  array_content.push(newValue);
38
38
  }
39
39
 
40
- $(event.currentTarget).toggleClass('active');
41
-
42
40
  var to_save = $(scrivito_tag).is('[data-scrivito-field-type=multienum]') ? array_content : array_content.join('%|%');
43
41
 
44
- scrivito_tag.scrivito('save', to_save);
42
+ scrivito_tag.scrivito('save', to_save).then(function() {
43
+ $(event.currentTarget).toggleClass('active');
44
+ });
45
45
  },
46
46
  };
47
47
 
@@ -24,10 +24,10 @@
24
24
  var text = $(event.currentTarget).data('content');
25
25
  var scrivito_tag = $(event.currentTarget).parent();
26
26
 
27
- scrivito_tag.find('.active').removeClass('active');
28
- $(event.currentTarget).addClass('active');
29
-
30
- scrivito_tag.scrivito('save', text);
27
+ scrivito_tag.scrivito('save', text).then(function() {
28
+ scrivito_tag.find('.active').removeClass('active');
29
+ $(event.currentTarget).addClass('active');
30
+ });
31
31
  },
32
32
  };
33
33
 
@@ -1,3 +1,3 @@
1
1
  module ScrivitoAdvancedEditors
2
- VERSION = "0.90.0.rc2"
2
+ VERSION = "0.90.0.rc3"
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.90.0.rc2
4
+ version: 0.90.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-25 00:00:00.000000000 Z
11
+ date: 2015-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -77,8 +77,8 @@ files:
77
77
  - Rakefile
78
78
  - app/assets/javascripts/scripts/color_picker.js
79
79
  - app/assets/javascripts/scripts/create_obj.js
80
- - app/assets/javascripts/scripts/scrivito_dialog.js
81
- - app/assets/javascripts/scripts/scrivito_multi_select_button.js
80
+ - app/assets/javascripts/scripts/details_accordion.js
81
+ - app/assets/javascripts/scripts/multi_select_button.js
82
82
  - app/assets/javascripts/scripts/scrivito_tabs.js
83
83
  - app/assets/javascripts/scripts/scrivito_textarea_editor.js
84
84
  - app/assets/javascripts/scripts/scrivito_toggle_button.js