spree_summernote 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +1 -0
- data/Gemfile +7 -0
- data/LICENSE +21 -0
- data/README.md +32 -0
- data/Rakefile +46 -0
- data/app/assets/javascripts/spree/backend/spree_summernote.js +3 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-ar-AR.js +97 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-ca-ES.js +95 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-cs-CZ.js +96 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-da-DK.js +107 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-de-DE.js +97 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-es-ES.js +98 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-es-EU.js +96 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-fa-IR.js +98 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-fi-FI.js +97 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-fr-FR.js +100 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-he-IL.js +100 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-hu-HU.js +98 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-id-ID.js +96 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-it-IT.js +97 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-ja-JP.js +97 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-ko-KR.js +103 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-nb-NO.js +97 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-nl-NL.js +97 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-pl-PL.js +105 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-pt-BR.js +96 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-pt-PT.js +96 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-ro-RO.js +95 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-ru-RU.js +100 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-sk-SK.js +95 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-sl-SI.js +99 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-sr-RS-Latin.js +97 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-sr-RS.js +97 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-sv-SE.js +97 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-th-TH.js +99 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-tr-TR.js +104 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-uk-UA.js +99 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-vi-VN.js +97 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-zh-CN.js +96 -0
- data/app/assets/javascripts/spree_summernote/locales/summernote-zh-TW.js +95 -0
- data/app/assets/javascripts/spree_summernote/summernote.js +7006 -0
- data/app/assets/javascripts/spree_summernote/summernote_locales.js +2 -0
- data/app/assets/javascripts/spree_summernote/summernote_settings.js +50 -0
- data/app/assets/stylesheets/spree/backend/spree_summernote.css +5 -0
- data/app/assets/stylesheets/spree_summernote/summernote-bs3.css +5442 -0
- data/app/assets/stylesheets/spree_summernote/summernote.css +1 -0
- data/bin/rails +7 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +3 -0
- data/lib/generators/spree_summernote/install/install_generator.rb +15 -0
- data/lib/spree_summernote/engine.rb +20 -0
- data/lib/spree_summernote/factories.rb +6 -0
- data/lib/spree_summernote.rb +2 -0
- data/spec/spec_helper.rb +87 -0
- data/spree_summernote.gemspec +32 -0
- metadata +268 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
(function() {
|
2
|
+
// Spree's locales are different to Summernotes
|
3
|
+
// Summernote defaults to english if it doesn't get what's being set
|
4
|
+
var metaTranslations = {
|
5
|
+
"ca": "ca-ES",
|
6
|
+
"cs": "cs-CZ",
|
7
|
+
"da": "da-DK",
|
8
|
+
"de": "de-DE",
|
9
|
+
"es": "es-ES",
|
10
|
+
"fa": "fa-FA",
|
11
|
+
"fi": "fi-FI",
|
12
|
+
"fr": "fr-FR",
|
13
|
+
"id": "id-ID",
|
14
|
+
"it": "it-IT",
|
15
|
+
"ja": "ja-JP",
|
16
|
+
"ko": "ko-KR",
|
17
|
+
"nb": "nb-NO",
|
18
|
+
"nl": "nl-NL",
|
19
|
+
"pl": "pl-PL",
|
20
|
+
"pt": "pt-PT",
|
21
|
+
"ro": "ro-RO",
|
22
|
+
"ru": "ru-RU",
|
23
|
+
"sk": "sk-SK",
|
24
|
+
"sl-SI": "sl-SI",
|
25
|
+
"sv": "sv-SE",
|
26
|
+
"th": "th-TH",
|
27
|
+
"uk": "uk-UA",
|
28
|
+
"vi": "vi-VN",
|
29
|
+
"zh-CN": "zh-CN",
|
30
|
+
"zh-TW": "zh-TW"
|
31
|
+
};
|
32
|
+
|
33
|
+
$(document).ready(function() {
|
34
|
+
|
35
|
+
var locale = $('html').attr('lang');
|
36
|
+
var translation = metaTranslations[locale];
|
37
|
+
var selectors = [
|
38
|
+
'.summernote',
|
39
|
+
'.description .panel-body textarea',
|
40
|
+
'#product_description',
|
41
|
+
'#taxon_description',
|
42
|
+
'#promotion_description'
|
43
|
+
].join(',');
|
44
|
+
|
45
|
+
$(selectors).summernote({
|
46
|
+
lang: translation
|
47
|
+
});
|
48
|
+
|
49
|
+
});
|
50
|
+
})();
|