spree_essentials 0.1.0.pre

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.
Files changed (58) hide show
  1. data/LICENSE +23 -0
  2. data/README.md +187 -0
  3. data/Rakefile +40 -0
  4. data/app/controllers/admin/markdown_controller.rb +7 -0
  5. data/app/controllers/admin/resource_controller.rb +222 -0
  6. data/app/controllers/admin/uploads_controller.rb +34 -0
  7. data/app/helpers/admin/base_helper_decorator.rb +18 -0
  8. data/app/models/image_decorator.rb +7 -0
  9. data/app/models/upload.rb +46 -0
  10. data/app/validators/datetime_validator.rb +6 -0
  11. data/app/views/admin/shared/_contents_sub_menu.html.erb +11 -0
  12. data/app/views/admin/shared/_contents_tab.html.erb +2 -0
  13. data/app/views/admin/uploads/_form.html.erb +8 -0
  14. data/app/views/admin/uploads/edit.html.erb +18 -0
  15. data/app/views/admin/uploads/index.html.erb +50 -0
  16. data/app/views/admin/uploads/new.html.erb +21 -0
  17. data/app/views/admin/uploads/picker.html.erb +11 -0
  18. data/config/locales/en.yml +79 -0
  19. data/config/routes.rb +10 -0
  20. data/lib/generators/essentials_base.rb +23 -0
  21. data/lib/generators/spree_essentials/install_generator.rb +16 -0
  22. data/lib/generators/templates/db/migrate/add_attachment_file_size_to_assets.rb +9 -0
  23. data/lib/spree_core/action_callbacks.rb +26 -0
  24. data/lib/spree_essentials/test_helper.rb +21 -0
  25. data/lib/spree_essentials/version.rb +3 -0
  26. data/lib/spree_essentials.rb +52 -0
  27. data/public/images/admin/icons/pages.png +0 -0
  28. data/public/images/blog/rss.png +0 -0
  29. data/public/images/markitup/bg-container.png +0 -0
  30. data/public/images/markitup/bg-editor.png +0 -0
  31. data/public/images/markitup/bg-picker.png +0 -0
  32. data/public/images/markitup/bold.png +0 -0
  33. data/public/images/markitup/code.png +0 -0
  34. data/public/images/markitup/h1.png +0 -0
  35. data/public/images/markitup/h2.png +0 -0
  36. data/public/images/markitup/h3.png +0 -0
  37. data/public/images/markitup/h4.png +0 -0
  38. data/public/images/markitup/h5.png +0 -0
  39. data/public/images/markitup/h6.png +0 -0
  40. data/public/images/markitup/handle.png +0 -0
  41. data/public/images/markitup/image-picker.png +0 -0
  42. data/public/images/markitup/italic.png +0 -0
  43. data/public/images/markitup/link.png +0 -0
  44. data/public/images/markitup/list-bullet.png +0 -0
  45. data/public/images/markitup/list-numeric.png +0 -0
  46. data/public/images/markitup/menu.png +0 -0
  47. data/public/images/markitup/more-tag.png +0 -0
  48. data/public/images/markitup/picture.png +0 -0
  49. data/public/images/markitup/preview.png +0 -0
  50. data/public/images/markitup/quotes.png +0 -0
  51. data/public/images/markitup/submenu.png +0 -0
  52. data/public/javascripts/date.js +145 -0
  53. data/public/javascripts/jquery.autodate.js +112 -0
  54. data/public/javascripts/jquery.markitup.js +574 -0
  55. data/public/javascripts/markdown.set.js +95 -0
  56. data/public/stylesheets/essentials.css +35 -0
  57. data/public/stylesheets/markitup.css +278 -0
  58. metadata +245 -0
@@ -0,0 +1,278 @@
1
+ /* -------------------------------------------------------------------
2
+ // markItUp! Universal MarkUp Engine, JQuery plugin
3
+ // By Jay Salvat - http://markitup.jaysalvat.com/
4
+ // ------------------------------------------------------------------*/
5
+ .markItUp * {
6
+ margin:0px; padding:0px;
7
+ outline:none;
8
+ }
9
+ .markItUp a:link,
10
+ .markItUp a:visited {
11
+ color:#000;
12
+ text-decoration:none;
13
+ }
14
+ .markItUp {
15
+ position: relative;
16
+ width: 100%;
17
+ min-width: 475px;
18
+ margin:5px 0 5px 0;
19
+ }
20
+ .markItUpContainer {
21
+ border:1px solid #3C769D;
22
+ background:#FFF url(../images/markitup/bg-container.png) repeat-x top left;
23
+ padding:5px 27px 2px 5px;
24
+ font:11px Verdana, Arial, Helvetica, sans-serif;
25
+ }
26
+ .markItUpEditor {
27
+ font:12px 'Courier New', Courier, monospace;
28
+ padding:10px;
29
+ border:1px solid #3C769D;
30
+ width:100%;
31
+ height:320px;
32
+ background:#FFF url(../images/markitup/bg-editor.png) repeat-x top right;
33
+ clear:both;
34
+ line-height:18px;
35
+ overflow:auto;
36
+ }
37
+ .markItUpEditor:focus {
38
+ /* border:1px solid #eee; */
39
+ }
40
+ .markItUpPreviewFrame {
41
+ overflow:auto;
42
+ background-color:#FFFFFF;
43
+ border:1px solid #3C769D;
44
+ width:99.9%;
45
+ height:300px;
46
+ margin:5px 0;
47
+ }
48
+ .markItUpFooter {
49
+ width:100%;
50
+ cursor:n-resize;
51
+ }
52
+ .markItUpResizeHandle {
53
+ overflow:hidden;
54
+ width:22px; height:5px;
55
+ margin-left:auto;
56
+ margin-right:auto;
57
+ background-image:url(../images/markitup/handle.png);
58
+ cursor:n-resize;
59
+ }
60
+ /***************************************************************************************/
61
+ /* first row of buttons */
62
+ .markItUpHeader ul li {
63
+ list-style:none;
64
+ float:left;
65
+ position:relative;
66
+ }
67
+ .markItUpHeader ul li ul{
68
+ display:none;
69
+ }
70
+ .markItUpHeader ul li:hover > ul{
71
+ display:block;
72
+ }
73
+ .markItUpHeader ul .markItUpDropMenu {
74
+ background:transparent url(../images/markitup/menu.png) no-repeat 115% 50%;
75
+ margin-right:5px;
76
+ }
77
+ .markItUpHeader ul .markItUpDropMenu li {
78
+ margin-right:0px;
79
+ }
80
+ .markItUpHeader ul .markItUpSeparator {
81
+ margin:0 10px;
82
+ width:1px;
83
+ height:16px;
84
+ overflow:hidden;
85
+ background-color:#CCC;
86
+ }
87
+ .markItUpHeader ul ul .markItUpSeparator {
88
+ width:auto; height:1px;
89
+ margin:0px;
90
+ }
91
+ /* next rows of buttons */
92
+ .markItUpHeader ul ul {
93
+ display:none;
94
+ position:absolute;
95
+ top:18px; left:0px;
96
+ background:#F5F5F5;
97
+ border:1px solid #3C769D;
98
+ height:inherit;
99
+ }
100
+ .markItUpHeader ul ul li {
101
+ float:none;
102
+ border-bottom:1px solid #3C769D;
103
+ }
104
+ .markItUpHeader ul ul .markItUpDropMenu {
105
+ background:#F5F5F5 url(../images/markitup/submenu.png) no-repeat 100% 50%;
106
+ }
107
+ /* next rows of buttons */
108
+ .markItUpHeader ul ul ul {
109
+ position:absolute;
110
+ top:-1px; left:150px;
111
+ }
112
+ .markItUpHeader ul ul ul li {
113
+ float:none;
114
+ }
115
+ .markItUpHeader ul a {
116
+ display:block;
117
+ width:16px; height:16px;
118
+ text-indent:-10000px;
119
+ background-repeat:no-repeat;
120
+ padding:3px;
121
+ margin:0px;
122
+ }
123
+ .markItUpHeader ul ul a {
124
+ display:block;
125
+ padding-left:0px;
126
+ text-indent:0;
127
+ width:120px;
128
+ padding:5px 5px 5px 25px;
129
+ background-position:2px 50%;
130
+ }
131
+ .markItUpHeader ul ul a:hover {
132
+ color:#FFF;
133
+ background-color:#3C769D;
134
+ }
135
+ /***************************************************************************************/
136
+ .html .markItUpEditor {
137
+ background-image:url(../images/markitup/bg-editor-html.png);
138
+ }
139
+ .markdown .markItUpEditor {
140
+ background-image:url(../images/markitup/bg-editor-markdown.png);
141
+ }
142
+ .textile .markItUpEditor {
143
+ background-image:url(../images/markitup/bg-editor-textile.png);
144
+ }
145
+ .bbcode .markItUpEditor {
146
+ background-image:url(../images/markitup/bg-editor-bbcode.png);
147
+ }
148
+ .wiki .markItUpEditor,
149
+ .dotclear .markItUpEditor {
150
+ background-image:url(../images/markitup/bg-editor-wiki.png);
151
+ }
152
+
153
+
154
+
155
+ /* -------------------------------------------------------------------
156
+ // markItUp!
157
+ // By Jay Salvat - http://markitup.jaysalvat.com/
158
+ // ------------------------------------------------------------------*/
159
+ .markItUp .markItUpButton1 a {
160
+ background-image:url(../images/markitup/h1.png);
161
+ }
162
+ .markItUp .markItUpButton2 a {
163
+ background-image:url(../images/markitup/h2.png);
164
+ }
165
+ .markItUp .markItUpButton3 a {
166
+ background-image:url(../images/markitup/h3.png);
167
+ }
168
+ .markItUp .markItUpButton4 a {
169
+ background-image:url(../images/markitup/h4.png);
170
+ }
171
+ .markItUp .markItUpButton5 a {
172
+ background-image:url(../images/markitup/h5.png);
173
+ }
174
+ .markItUp .markItUpButton6 a {
175
+ background-image:url(../images/markitup/h6.png);
176
+ }
177
+
178
+ .markItUp .markItUpButton7 a {
179
+ background-image:url(../images/markitup/bold.png);
180
+ }
181
+ .markItUp .markItUpButton8 a {
182
+ background-image:url(../images/markitup/italic.png);
183
+ }
184
+
185
+ .markItUp .markItUpButton9 a {
186
+ background-image:url(../images/markitup/list-bullet.png);
187
+ }
188
+ .markItUp .markItUpButton10 a {
189
+ background-image:url(../images/markitup/list-numeric.png);
190
+ }
191
+
192
+ .markItUp .markItUpButton11 a {
193
+ background-image:url(../images/markitup/picture.png);
194
+ }
195
+ .markItUp .markItUpButton12 a {
196
+ background-image:url(../images/markitup/link.png);
197
+ }
198
+
199
+ .markItUp .markItUpButton13 a {
200
+ background-image:url(../images/markitup/quotes.png);
201
+ }
202
+ .markItUp .markItUpButton14 a {
203
+ background-image:url(../images/markitup/code.png);
204
+ }
205
+ .markItUp .markItUpButton15 a {
206
+ background-image:url(../images/markitup/more-tag.png);
207
+ }
208
+ .markItUp .markItUpButton16 a {
209
+ background-image:url(../images/markitup/image-picker.png);
210
+ }
211
+ .markItUp .markItUpButton17 a {
212
+ background-image:url(../images/markitup/preview.png);
213
+ }
214
+
215
+
216
+
217
+ div.image-picker {
218
+ display: block;
219
+ position: absolute;
220
+ left: 0;
221
+ top: 0;
222
+ width: 100%;
223
+ height: 0;
224
+ overflow: hidden;
225
+ background: #fff url(../images/markitup/bg-picker.png) repeat-x bottom left;
226
+ border: 1px solid #ccc;
227
+ }
228
+ div.image-picker ul,
229
+ div.image-picker ul li {
230
+ display: block;
231
+ list-style: none;
232
+ margin: 0;
233
+ text-align: center;
234
+ border: 1px solid #fff;
235
+ background-color: #fff;
236
+ }
237
+
238
+
239
+ div.image-picker ul {
240
+ padding: 10px;
241
+ }
242
+ div.image-picker ul li {
243
+ position: relative;
244
+ float: left;
245
+ }
246
+ div.image-picker ul li:hover {
247
+ border: 1px solid #ccc;
248
+ background-color: #eee;
249
+ }
250
+ div.image-picker ul li a.option {
251
+ display: block;
252
+ padding: 7px;
253
+ width: 48px;
254
+ height: 48px;
255
+ }
256
+ div.image-picker ul li span.sizes {
257
+ display: block;
258
+ position: absolute;
259
+ width: 100%;
260
+ left: 0;
261
+ top: 0;
262
+ }
263
+ div.image-picker ul li span.sizes a {
264
+ display: block;
265
+ position: relative;
266
+ width: 100%;
267
+ padding: 3px 0 4px 0;
268
+ text-align: center;
269
+ background-color: #fff;
270
+ border-bottom: 1px solid #eee;
271
+ }
272
+ div.image-picker ul li span.sizes a:last-child {
273
+ border-bottom: 0;
274
+ }
275
+ #content div.image-picker span.sizes a:hover {
276
+ background-color: #3c7dfb;
277
+ color: #fff;
278
+ }
metadata ADDED
@@ -0,0 +1,245 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spree_essentials
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: 6
5
+ version: 0.1.0.pre
6
+ platform: ruby
7
+ authors:
8
+ - Spencer Steffen
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-04-28 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: spree_core
17
+ requirement: &id001 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.30.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: spree_auth
28
+ requirement: &id002 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.30.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
+ name: rdiscount
39
+ requirement: &id003 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 1.6.8
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
49
+ name: shoulda
50
+ requirement: &id004 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 2.11.3
56
+ type: :development
57
+ prerelease: false
58
+ version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
60
+ name: factory_girl
61
+ requirement: &id005 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 2.0.0.beta2
67
+ type: :development
68
+ prerelease: false
69
+ version_requirements: *id005
70
+ - !ruby/object:Gem::Dependency
71
+ name: cucumber
72
+ requirement: &id006 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: 0.10.2
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: *id006
81
+ - !ruby/object:Gem::Dependency
82
+ name: capybara
83
+ requirement: &id007 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: 0.4.1
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: *id007
92
+ - !ruby/object:Gem::Dependency
93
+ name: selenium-webdriver
94
+ requirement: &id008 !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 0.1.3
100
+ type: :development
101
+ prerelease: false
102
+ version_requirements: *id008
103
+ - !ruby/object:Gem::Dependency
104
+ name: sqlite3
105
+ requirement: &id009 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 1.3.3
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: *id009
114
+ - !ruby/object:Gem::Dependency
115
+ name: faker
116
+ requirement: &id010 !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: 0.9.5
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: *id010
125
+ - !ruby/object:Gem::Dependency
126
+ name: spork
127
+ requirement: &id011 !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 0.9.0.rc5
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: *id011
136
+ - !ruby/object:Gem::Dependency
137
+ name: spork-testunit
138
+ requirement: &id012 !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: 0.0.5
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: *id012
147
+ description: Spree Essentials provides a base for several other Spree Commerce extensions. The idea is to provide other extensions with common functionality such as an asset-upload interface, a markdown editor, and a common admin-navigation tab.
148
+ email:
149
+ - spencer@citrusme.com
150
+ executables: []
151
+
152
+ extensions: []
153
+
154
+ extra_rdoc_files: []
155
+
156
+ files:
157
+ - README.md
158
+ - LICENSE
159
+ - config/locales/en.yml
160
+ - config/routes.rb
161
+ - lib/generators/essentials_base.rb
162
+ - lib/generators/spree_essentials/install_generator.rb
163
+ - lib/generators/templates/db/migrate/add_attachment_file_size_to_assets.rb
164
+ - lib/spree_core/action_callbacks.rb
165
+ - lib/spree_essentials/test_helper.rb
166
+ - lib/spree_essentials/version.rb
167
+ - lib/spree_essentials.rb
168
+ - app/controllers/admin/markdown_controller.rb
169
+ - app/controllers/admin/resource_controller.rb
170
+ - app/controllers/admin/uploads_controller.rb
171
+ - app/helpers/admin/base_helper_decorator.rb
172
+ - app/models/image_decorator.rb
173
+ - app/models/upload.rb
174
+ - app/validators/datetime_validator.rb
175
+ - app/views/admin/shared/_contents_sub_menu.html.erb
176
+ - app/views/admin/shared/_contents_tab.html.erb
177
+ - app/views/admin/uploads/_form.html.erb
178
+ - app/views/admin/uploads/edit.html.erb
179
+ - app/views/admin/uploads/index.html.erb
180
+ - app/views/admin/uploads/new.html.erb
181
+ - app/views/admin/uploads/picker.html.erb
182
+ - public/images/admin/icons/pages.png
183
+ - public/images/blog/rss.png
184
+ - public/images/markitup/bg-container.png
185
+ - public/images/markitup/bg-editor.png
186
+ - public/images/markitup/bg-picker.png
187
+ - public/images/markitup/bold.png
188
+ - public/images/markitup/code.png
189
+ - public/images/markitup/h1.png
190
+ - public/images/markitup/h2.png
191
+ - public/images/markitup/h3.png
192
+ - public/images/markitup/h4.png
193
+ - public/images/markitup/h5.png
194
+ - public/images/markitup/h6.png
195
+ - public/images/markitup/handle.png
196
+ - public/images/markitup/image-picker.png
197
+ - public/images/markitup/italic.png
198
+ - public/images/markitup/link.png
199
+ - public/images/markitup/list-bullet.png
200
+ - public/images/markitup/list-numeric.png
201
+ - public/images/markitup/menu.png
202
+ - public/images/markitup/more-tag.png
203
+ - public/images/markitup/picture.png
204
+ - public/images/markitup/preview.png
205
+ - public/images/markitup/quotes.png
206
+ - public/images/markitup/submenu.png
207
+ - public/javascripts/date.js
208
+ - public/javascripts/jquery.autodate.js
209
+ - public/javascripts/jquery.markitup.js
210
+ - public/javascripts/markdown.set.js
211
+ - public/stylesheets/essentials.css
212
+ - public/stylesheets/markitup.css
213
+ - Rakefile
214
+ homepage: http://github.com/citrus/spree_essentials
215
+ licenses: []
216
+
217
+ post_install_message:
218
+ rdoc_options: []
219
+
220
+ require_paths:
221
+ - lib
222
+ required_ruby_version: !ruby/object:Gem::Requirement
223
+ none: false
224
+ requirements:
225
+ - - ">="
226
+ - !ruby/object:Gem::Version
227
+ hash: 1418238542394963550
228
+ segments:
229
+ - 0
230
+ version: "0"
231
+ required_rubygems_version: !ruby/object:Gem::Requirement
232
+ none: false
233
+ requirements:
234
+ - - ">"
235
+ - !ruby/object:Gem::Version
236
+ version: 1.3.1
237
+ requirements: []
238
+
239
+ rubyforge_project:
240
+ rubygems_version: 1.7.2
241
+ signing_key:
242
+ specification_version: 3
243
+ summary: Spree Essentials provides a base for several other Spree Commerce extensions. See readme for details...
244
+ test_files: []
245
+