My favorites
▼
|
Sign in
substruct
Open-source Ruby on Rails E-Commerce
Project Home
Downloads
Wiki
Issues
Source
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
25
attachment: center_images_v4.patch
(8.2 KB)
1
2
3
4
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/controllers/store_controller.rb
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/controllers/store_controller.rb (revision 78)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/controllers/store_controller.rb (working copy)
@@ -138,7 +138,14 @@
render :layout => 'modal' and return
end
-
+ def show_image
+ image = Image.find_by_id(params[:id])
+ if image
+ @image_path = image.public_filename
+ end
+ render :layout => 'modal' and return
+ end
+
# Adds an item to the cart, then redirects to checkout
#
# This is the old way of doing things before the AJAX cart.
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/helpers/application_helper.rb
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/helpers/application_helper.rb (revision 78)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/helpers/application_helper.rb (working copy)
@@ -47,7 +47,9 @@
<div class="product_top"><\/div>
<div class="product_main">
<div class="product_image">
- <a href="#{link}">#{image_tag(image_path, :alt => title)}<\/a><br\/>
+ <a href="#{link}">
+ <div id="wraptocenter_small" class="wraptocenter"><span><\/span>
+ #{image_tag(image_path)}
+ <\/div>
+ <\/a><br\/>
<\/div>
<div class="product_title">
<a href="#{link}\">#{title}<\/a><br\/>
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/image.rb
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/image.rb (revision 78)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/image.rb (working copy)
@@ -10,7 +10,7 @@
has_attachment :content_type => :image,
:storage => :file_system,
:max_size => MAX_SIZE,
- :thumbnails => { :thumb => '50x50>', :small => '200x200' },
+ :thumbnails => { :thumb => '50x50>', :small => '115x115>', :medium => '200x200>' },
:processor => 'MiniMagick',
:path_prefix => 'public/system/'
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/layouts/main.rhtml
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/layouts/main.rhtml (revision 78)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/layouts/main.rhtml (working copy)
@@ -12,6 +12,10 @@
<%= javascript_include_tag :defaults %>
<%= javascript_include_tag 'substruct', 'subModal', :plugin => 'substruct' %>
<%= stylesheet_link_tag 'main', 'subModal', :plugin => 'substruct' %>
+ <%= stylesheet_link_tag "generic", :plugin => 'substruct' %>
+ <!--[if IE]>
+ <style type="text/css">@import url(/stylesheets/ie.css);</style>
+ <![endif]-->
<%= yield :header %>
</head>
<body>
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/layouts/modal.rhtml
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/layouts/modal.rhtml (revision 78)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/layouts/modal.rhtml (working copy)
@@ -10,6 +10,10 @@
<%= javascript_include_tag "prototype", "effects" %>
<%= javascript_include_tag "substruct", :plugin => 'substruct' %>
<%= stylesheet_link_tag "main", :plugin => 'substruct' %>
+ <%= stylesheet_link_tag "generic", :plugin => 'substruct' %>
+ <!--[if IE]>
+ <style type="text/css">@import url(/stylesheets/ie.css);</style>
+ <![endif]-->
<style type="text/css">
body {
background-image: none;
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/store/show.rhtml
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/store/show.rhtml (revision 78)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/store/show.rhtml (working copy)
@@ -9,8 +9,10 @@
</ul>
<% if @default_image %>
<div style="float:left; margin:20px; width: 200px;">
- <% if @default_image.public_filename(:small) then %>
- <%= image_tag(@default_image.public_filename(:small)) %>
+ <% if @default_image.public_filename(:medium) then %>
+ <div id="wraptocenter_medium" class="wraptocenter"><span></span>
+ <%= image_tag(@default_image.public_filename(:medium)) %>
+ </div><br/>
<% end %>
<!-- thumbnails! -->
<% if @images.size > 1 %>
@@ -20,7 +22,11 @@
<!-- product image for reordering -->
<div class="float" style="margin:5px;">
<% if @p_image.public_filename(:thumb) then %>
- <a href="<%= @p_image.public_filename %>" class="submodal-800-400"><%= image_tag @p_image.public_filename(:thumb) %></a>
+ <a href="/store/show_image/<%= @p_image.id %>" class="submodal-600-420">
+ <div id="wraptocenter_thumb" class="wraptocenter"><span></span>
+ <%= image_tag(@p_image.public_filename(:thumb)) %>
+ </div>
+ </a>
<% end %>
</div>
<% end %>
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/store/show_image.rhtml
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/store/show_image.rhtml (revision 0)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/views/store/show_image.rhtml (revision 0)
@@ -0,0 +1,8 @@
+<div id="wraptocenter_modal" class="wraptocenter"><span></span>
+ <% if @image_path %>
+ <%= image_tag(@image_path) %>
+ <% else %>
+ The image specified doesn't exist.
+ <% end %>
+</div>
+
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/assets/stylesheets/generic.css
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/assets/stylesheets/generic.css (revision 0)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/assets/stylesheets/generic.css (revision 0)
@@ -0,0 +1,47 @@
+#wraptocenter_medium {
+ display: table-cell;
+ text-align: center;
+ vertical-align: middle;
+ width: 200px;
+ height: 200px;
+}
+
+#wraptocenter_small {
+ display: table-cell;
+ text-align: center;
+ vertical-align: middle;
+ width: 115px;
+ height: 130px;
+}
+
+#wraptocenter_thumb {
+ display: table-cell;
+ text-align: center;
+ vertical-align: middle;
+ width: 60px;
+ height: 60px;
+ border: 1px solid #CCC;
+}
+
+#wraptocenter_modal {
+ display: table-cell;
+ text-align: center;
+ vertical-align: middle;
+ width: 576px;
+ height: 380px;
+}
+
+.wraptocenter * {
+ vertical-align: middle;
+}
+
+/*\*//*/
+.wraptocenter {
+ display: block;
+}
+.wraptocenter span {
+ display: inline-block;
+ height: 100%;
+ width: 1px;
+}
+/**/
Property changes on: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/assets/stylesheets/generic.css
___________________________________________________________________
Name: svn:executable
+ *
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/assets/stylesheets/ie.css
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/assets/stylesheets/ie.css (revision 0)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/assets/stylesheets/ie.css (revision 0)
@@ -0,0 +1,4 @@
+.wraptocenter span {
+ display: inline-block;
+ height: 100%;
+}
Powered by
Google Project Hosting