rails_cacheable_flash 0.0.24 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module RailsCacheableFlash
2
- VERSION = "0.0.24"
2
+ VERSION = "0.0.25"
3
3
  end
@@ -2,6 +2,14 @@ var Flash = new Object();
2
2
 
3
3
  Flash.data = {};
4
4
 
5
+ function encode_utf8(s) {
6
+ return unescape( encodeURIComponent( s ) );
7
+ }
8
+
9
+ function decode_utf8(s) {
10
+ return decodeURIComponent(escape(s));
11
+ }
12
+
5
13
  Flash.transferFromCookies = function() {
6
14
  var data = JSON.parse(unescape(Cookie.get("flash")));
7
15
  if(!data) data = {};
@@ -24,6 +32,6 @@ Flash.writeDataFrom = function(name, before_selector) {
24
32
  content = Flash.data[name].toString().replace(/\+/g, ' ');
25
33
  }
26
34
  if (content != ""){
27
- $('<div id="flash" class="flash flash-'+name+'"><div class="closer" id="closer">x</div><div class="message">'+unescape(content)+'</div></div>').insertBefore(before_selector);
35
+ $('<div id="flash" class="flash flash-'+name+'"><div class="closer" id="closer">x</div><div class="message">'+decode_utf8(unescape(content))+'</div></div>').insertBefore(before_selector);
28
36
  }
29
37
  };
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_cacheable_flash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-05 00:00:00.000000000 Z
12
+ date: 2013-07-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Кэшируемый флеш
15
15
  email:
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  requirements: []
55
55
  rubyforge_project:
56
- rubygems_version: 1.8.23
56
+ rubygems_version: 1.8.19
57
57
  signing_key:
58
58
  specification_version: 3
59
59
  summary: Суммари