alchemy_spree 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ Spree::BaseController.class_eval do
2
+ include AlchemyCrm::AlchemyLanguageIdStore
3
+ end
@@ -0,0 +1,3 @@
1
+ Spree::UserSessionsController.class_eval do
2
+ include AlchemyCrm::AlchemyLanguageIdStore
3
+ end
@@ -1,13 +1,13 @@
1
+ <% prefix = Rails.application.config.assets.prefix -%>
1
2
  <script type="text/javascript">
2
3
  var tinyMCEPreInit = {
3
- base: '/assets/tiny_mce',
4
+ base: '<%= prefix -%>/tiny_mce',
4
5
  suffix: ''
5
6
  };
6
7
  </script>
7
- <script type="text/javascript" src="/assets/tiny_mce/tiny_mce"></script>
8
+ <script type="text/javascript" src="<%= prefix -%>/tiny_mce/tiny_mce.js"></script>
8
9
  <script type="text/javascript">
9
10
  jQuery(function($) {
10
- var myConfig = { dompath: true };
11
11
  if ($('textarea#product_description').length > 0) {
12
12
  tinyMCE.init({
13
13
  mode : "exact",
@@ -17,8 +17,8 @@
17
17
  skin : "o2k7",
18
18
  skin_variant : 'silver',
19
19
  inlinepopups_skin : 'alchemy',
20
- popup_css : "/assets/alchemy/tinymce_dialog.css",
21
- content_css : "/assets/alchemy/tinymce_content.css",
20
+ popup_css : "<%= prefix -%>/alchemy/tinymce_dialog.css",
21
+ content_css : "<%= prefix -%>/alchemy/tinymce_content.css",
22
22
  width : "100%",
23
23
  plugins : "paste,inlinepopups",
24
24
 
@@ -0,0 +1,14 @@
1
+ module AlchemyCrm
2
+ module AlchemyLanguageIdStore
3
+ def self.included(c)
4
+ c.send(:before_filter, :store_alchemy_language_id)
5
+ end
6
+
7
+ private
8
+
9
+ def store_alchemy_language_id
10
+ session[:language_id] ||= Alchemy::Language.get_default.id
11
+ end
12
+
13
+ end
14
+ end
@@ -1,17 +1,16 @@
1
1
  require "alchemy_spree/alchemy_module"
2
+ require 'alchemy_spree/alchemy_language_id_store'
2
3
 
3
4
  module AlchemySpree
4
- class Engine < ::Rails::Engine
5
- engine_name 'alchemy_spree'
5
+ class Engine < ::Rails::Engine
6
+ engine_name 'alchemy_spree'
6
7
 
7
- config.autoload_paths += %W(#{config.root}/lib)
8
+ def self.activate
9
+ Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")) do |c|
10
+ Rails.configuration.cache_classes ? require(c) : load(c)
11
+ end
12
+ end
8
13
 
9
- def self.activate
10
- Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/**/*.rb")) do |c|
11
- Rails.application.config.cache_classes ? require(c) : load(c)
12
- end
13
- end
14
-
15
- config.to_prepare &method(:activate).to_proc
16
- end
14
+ config.to_prepare &method(:activate).to_proc
15
+ end
17
16
  end
@@ -1,3 +1,3 @@
1
1
  module AlchemySpree
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_spree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-10 00:00:00.000000000 Z
12
+ date: 2012-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: alchemy_cms
16
- requirement: &70180004895480 !ruby/object:Gem::Requirement
16
+ requirement: &70101865134720 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.1.6
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70180004895480
24
+ version_requirements: *70101865134720
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: spree
27
- requirement: &70180004894260 !ruby/object:Gem::Requirement
27
+ requirement: &70101865133520 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 1.0.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70180004894260
35
+ version_requirements: *70101865133520
36
36
  description: A Alchemy CMS and Spree connector
37
37
  email:
38
38
  - tvd@magiclabs.de
@@ -49,6 +49,8 @@ files:
49
49
  - alchemy_spree.gemspec
50
50
  - app/assets/images/alchemy_spree/alchemy_module_icon.png
51
51
  - app/controllers/alchemy/admin/spree_controller.rb
52
+ - app/controllers/spree/base_controller_decorator.rb
53
+ - app/controllers/spree/user_sessions_controller_decorator.rb
52
54
  - app/models/alchemy/essence_spree_product.rb
53
55
  - app/overrides/include_tinymce_js.rb
54
56
  - app/views/alchemy/admin/spree/index.html.erb
@@ -59,6 +61,7 @@ files:
59
61
  - config/routes.rb
60
62
  - db/migrate/20120229160509_create_alchemy_essence_spree_products.rb
61
63
  - lib/alchemy_spree.rb
64
+ - lib/alchemy_spree/alchemy_language_id_store.rb
62
65
  - lib/alchemy_spree/alchemy_module.rb
63
66
  - lib/alchemy_spree/engine.rb
64
67
  - lib/alchemy_spree/version.rb
@@ -111,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
114
  version: '0'
112
115
  segments:
113
116
  - 0
114
- hash: 2926926103786300071
117
+ hash: -4177371760149923254
115
118
  required_rubygems_version: !ruby/object:Gem::Requirement
116
119
  none: false
117
120
  requirements:
@@ -120,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
123
  version: '0'
121
124
  segments:
122
125
  - 0
123
- hash: 2926926103786300071
126
+ hash: -4177371760149923254
124
127
  requirements: []
125
128
  rubyforge_project:
126
129
  rubygems_version: 1.8.15