spree_summernote 3.0.0 → 3.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 171140b3bf6ea165c59f04295497cb4fb04dc6f7
|
4
|
+
data.tar.gz: d9aa23922e6db0d68e2f9f6f29e166fda43a94fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5e2c861b5b859d51f4b1a92e8400a09fd871abe39384354d0788e27953deaf5323289640125ac86ae7983b5a11206d5c99c729f17de5b73c041c8dc86937b78
|
7
|
+
data.tar.gz: aa88686e43f3f8c4a182451c8dc90209f765e54a4e0b688e2b54766a927a5248921f3bf66a2767771c0430e62718de36e354402d522e7e22a762bfe64aeab8d4
|
@@ -1,49 +1,60 @@
|
|
1
1
|
(function() {
|
2
2
|
// Spree's locales are different to Summernotes
|
3
3
|
// Summernote defaults to english if it doesn't get what's being set
|
4
|
-
var
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
4
|
+
var SpreeSummernote = {
|
5
|
+
localeMap: function(value){
|
6
|
+
var locales = {
|
7
|
+
"ca": "ca-ES",
|
8
|
+
"cs": "cs-CZ",
|
9
|
+
"da": "da-DK",
|
10
|
+
"de": "de-DE",
|
11
|
+
"es": "es-ES",
|
12
|
+
"fa": "fa-FA",
|
13
|
+
"fi": "fi-FI",
|
14
|
+
"fr": "fr-FR",
|
15
|
+
"id": "id-ID",
|
16
|
+
"it": "it-IT",
|
17
|
+
"ja": "ja-JP",
|
18
|
+
"ko": "ko-KR",
|
19
|
+
"nb": "nb-NO",
|
20
|
+
"nl": "nl-NL",
|
21
|
+
"pl": "pl-PL",
|
22
|
+
"pt": "pt-PT",
|
23
|
+
"ro": "ro-RO",
|
24
|
+
"ru": "ru-RU",
|
25
|
+
"sk": "sk-SK",
|
26
|
+
"sl-SI": "sl-SI",
|
27
|
+
"sv": "sv-SE",
|
28
|
+
"th": "th-TH",
|
29
|
+
"uk": "uk-UA",
|
30
|
+
"vi": "vi-VN",
|
31
|
+
"zh-CN": "zh-CN",
|
32
|
+
"zh-TW": "zh-TW"
|
33
|
+
};
|
34
|
+
return ((value in locales) ? locales[value] : value);
|
35
|
+
},
|
36
|
+
locale: function() {
|
37
|
+
return document.documentElement.lang
|
38
|
+
},
|
39
|
+
translatedLocale: function() {
|
40
|
+
return this.localeMap(document.documentElement.lang);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
window.Spree.SpreeSummernote = SpreeSummernote;
|
32
45
|
|
33
46
|
$(document).ready(function() {
|
34
47
|
|
35
|
-
var locale = $('html').attr('lang');
|
36
|
-
var translation = metaTranslations[locale];
|
37
48
|
var selectors = [
|
38
49
|
'.summernote',
|
39
|
-
'.description .panel-body textarea',
|
50
|
+
'.description .panel-body textarea',
|
40
51
|
'#product_description',
|
41
52
|
'#taxon_description',
|
42
53
|
'#promotion_description'
|
43
54
|
].join(',');
|
44
55
|
|
45
56
|
$(selectors).summernote({
|
46
|
-
lang:
|
57
|
+
lang: SpreeSummernote.translatedLocale()
|
47
58
|
});
|
48
59
|
|
49
60
|
});
|
data/spree_summernote.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
4
4
|
s.name = 'spree_summernote'
|
5
|
-
s.version = '3.0.
|
5
|
+
s.version = '3.0.1'
|
6
6
|
s.summary = 'Adds Summernote RTE to Spree 3.0.0 backend'
|
7
7
|
s.description = 'Adds Summernote RTE to Spree 3.0.0 backend'
|
8
8
|
s.required_ruby_version = '>= 2.0.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_summernote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominic Stockdale
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|