alchemy_spree 0.1.0 → 0.1.2
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.
- data/Gemfile +0 -3
- data/README.md +2 -1
- data/Versionfile +1 -0
- data/alchemy_spree.gemspec +4 -4
- data/app/overrides/include_tinymce_js.rb +6 -0
- data/app/views/alchemy/admin/spree/index.html.erb +3 -1
- data/app/views/alchemy/essences/_essence_spree_product_editor.html.erb +2 -1
- data/app/views/partials/_tinymce_javascript.html.erb +36 -0
- data/lib/alchemy_spree/engine.rb +10 -0
- data/lib/alchemy_spree/version.rb +1 -1
- metadata +17 -13
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -4,10 +4,11 @@ The World's Most Flexible E-Commerce Platform meets The World's Most Flexible Co
|
|
4
4
|
|
5
5
|
This gem is a [Alchemy CMS](https://github.com/magiclabs/alchemy_cms) and [Spree](https://github.com/spree/spree) connector.
|
6
6
|
|
7
|
-
### For now it does
|
7
|
+
### For now it does this:
|
8
8
|
|
9
9
|
1. It provides an Alchemy module that displays Spree admin in an iframe inside Alchemy admin.
|
10
10
|
2. It gives you a new Essence for Alchemy called EssenceSpreeProduct that you can use to place a Spree product on your page.
|
11
|
+
3. It adds a TinyMCE editor to the Spree product description textarea.
|
11
12
|
|
12
13
|
### TODO:
|
13
14
|
|
data/Versionfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
'1.0.x' => {:branch => 'master'}
|
data/alchemy_spree.gemspec
CHANGED
@@ -4,8 +4,8 @@ require File.expand_path('../lib/alchemy_spree/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["Thomas von Deyen"]
|
6
6
|
gem.email = ["tvd@magiclabs.de"]
|
7
|
-
gem.description = %q{
|
8
|
-
gem.summary = %q{
|
7
|
+
gem.description = %q{A Alchemy CMS and Spree connector}
|
8
|
+
gem.summary = %q{The World's Most Flexible E-Commerce Platform meets The World's Most Flexible Content Management System!}
|
9
9
|
gem.homepage = "https://github.com/magiclabs/alchemy_spree"
|
10
10
|
|
11
11
|
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
@@ -15,6 +15,6 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = AlchemySpree::VERSION
|
17
17
|
|
18
|
-
gem.add_dependency('alchemy_cms', ['~> 2.1.
|
19
|
-
gem.add_dependency('spree', ['
|
18
|
+
gem.add_dependency('alchemy_cms', ['~> 2.1.6'])
|
19
|
+
gem.add_dependency('spree', ['~> 1.0.1'])
|
20
20
|
end
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
<%= image_tag('alchemy/ajax_loader.gif', :id => "frame_load_info", :style => "position: absolute; top: 50%; left: 50%; margin-top: -12px; margin-left: -12px") %>
|
2
|
+
<iframe src="<%= spree.admin_url(:protocol => Rails.env.production? ? 'https' : nil) %>" frameborder=0 width="100%" id="spree_admin" style="display: none"></iframe>
|
2
3
|
<script type="text/javascript">
|
3
4
|
jQuery(document).ready(function($) {
|
4
5
|
var $frame = $('iframe#spree_admin');
|
@@ -9,6 +10,7 @@
|
|
9
10
|
$frame.on('load', function() {
|
10
11
|
$('#main_content').css({'background-color': '#162F54'});
|
11
12
|
sizeSpreeFrame();
|
13
|
+
$('#frame_load_info').hide();
|
12
14
|
$frame.show();
|
13
15
|
});
|
14
16
|
$(window).on('resize', sizeSpreeFrame);
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<%= select_tag(
|
4
4
|
content.form_field_name,
|
5
5
|
options_from_collection_for_select(Spree::Product.not_deleted, :id, :name, content.essence.spree_product_id),
|
6
|
-
:class => 'alchemy_select'
|
6
|
+
:class => ['alchemy_select', html_options[:class]].join(' '),
|
7
|
+
:style => html_options[:style]
|
7
8
|
) %>
|
8
9
|
</div>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<script type="text/javascript">
|
2
|
+
var tinyMCEPreInit = {
|
3
|
+
base: '/assets/tiny_mce',
|
4
|
+
suffix: ''
|
5
|
+
};
|
6
|
+
</script>
|
7
|
+
<script type="text/javascript" src="/assets/tiny_mce/tiny_mce"></script>
|
8
|
+
<script type="text/javascript">
|
9
|
+
jQuery(function($) {
|
10
|
+
var myConfig = { dompath: true };
|
11
|
+
if ($('textarea#product_description').length > 0) {
|
12
|
+
tinyMCE.init({
|
13
|
+
mode : "exact",
|
14
|
+
elements : 'product_description',
|
15
|
+
theme : "advanced",
|
16
|
+
language : '<%= ::I18n.locale.to_s.split('-')[0].downcase -%>',
|
17
|
+
skin : "o2k7",
|
18
|
+
skin_variant : 'silver',
|
19
|
+
inlinepopups_skin : 'alchemy',
|
20
|
+
popup_css : "/assets/alchemy/tinymce_dialog.css",
|
21
|
+
content_css : "/assets/alchemy/tinymce_content.css",
|
22
|
+
width : "100%",
|
23
|
+
plugins : "paste,inlinepopups",
|
24
|
+
|
25
|
+
// Theme options
|
26
|
+
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,sub,sup,|,numlist,bullist,indent,outdent,|,removeformat,cleanup",
|
27
|
+
theme_advanced_buttons2 : "pastetext,pasteword,|,link,unlink,|,charmap,code,help",
|
28
|
+
theme_advanced_buttons3 : "",
|
29
|
+
theme_advanced_toolbar_location : "top",
|
30
|
+
theme_advanced_toolbar_align : "left",
|
31
|
+
theme_advanced_statusbar_location : "bottom",
|
32
|
+
theme_advanced_resizing : true
|
33
|
+
});
|
34
|
+
}
|
35
|
+
});
|
36
|
+
</script>
|
data/lib/alchemy_spree/engine.rb
CHANGED
@@ -3,5 +3,15 @@ require "alchemy_spree/alchemy_module"
|
|
3
3
|
module AlchemySpree
|
4
4
|
class Engine < ::Rails::Engine
|
5
5
|
engine_name 'alchemy_spree'
|
6
|
+
|
7
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
8
|
+
|
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
|
6
16
|
end
|
7
17
|
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.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,31 +9,31 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: alchemy_cms
|
16
|
-
requirement: &
|
16
|
+
requirement: &70180004895480 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 2.1.
|
21
|
+
version: 2.1.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70180004895480
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: spree
|
27
|
-
requirement: &
|
27
|
+
requirement: &70180004894260 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
|
-
- -
|
30
|
+
- - ~>
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.0.
|
32
|
+
version: 1.0.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
-
description:
|
35
|
+
version_requirements: *70180004894260
|
36
|
+
description: A Alchemy CMS and Spree connector
|
37
37
|
email:
|
38
38
|
- tvd@magiclabs.de
|
39
39
|
executables: []
|
@@ -45,13 +45,16 @@ files:
|
|
45
45
|
- LICENSE
|
46
46
|
- README.md
|
47
47
|
- Rakefile
|
48
|
+
- Versionfile
|
48
49
|
- alchemy_spree.gemspec
|
49
50
|
- app/assets/images/alchemy_spree/alchemy_module_icon.png
|
50
51
|
- app/controllers/alchemy/admin/spree_controller.rb
|
51
52
|
- app/models/alchemy/essence_spree_product.rb
|
53
|
+
- app/overrides/include_tinymce_js.rb
|
52
54
|
- app/views/alchemy/admin/spree/index.html.erb
|
53
55
|
- app/views/alchemy/essences/_essence_spree_product_editor.html.erb
|
54
56
|
- app/views/alchemy/essences/_essence_spree_product_view.html.erb
|
57
|
+
- app/views/partials/_tinymce_javascript.html.erb
|
55
58
|
- config/authorization_rules.rb
|
56
59
|
- config/routes.rb
|
57
60
|
- db/migrate/20120229160509_create_alchemy_essence_spree_products.rb
|
@@ -108,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
111
|
version: '0'
|
109
112
|
segments:
|
110
113
|
- 0
|
111
|
-
hash:
|
114
|
+
hash: 2926926103786300071
|
112
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
116
|
none: false
|
114
117
|
requirements:
|
@@ -117,13 +120,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
120
|
version: '0'
|
118
121
|
segments:
|
119
122
|
- 0
|
120
|
-
hash:
|
123
|
+
hash: 2926926103786300071
|
121
124
|
requirements: []
|
122
125
|
rubyforge_project:
|
123
126
|
rubygems_version: 1.8.15
|
124
127
|
signing_key:
|
125
128
|
specification_version: 3
|
126
|
-
summary:
|
129
|
+
summary: The World's Most Flexible E-Commerce Platform meets The World's Most Flexible
|
130
|
+
Content Management System!
|
127
131
|
test_files:
|
128
132
|
- test/alchemy_spree_test.rb
|
129
133
|
- test/dummy/Rakefile
|