radiant-forum-extension 2.1.6 → 3.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. data/README.md +20 -16
  2. data/Rakefile +0 -16
  3. data/app/controllers/forum_base_controller.rb +32 -10
  4. data/app/controllers/posts_controller.rb +37 -14
  5. data/app/helpers/forum_helper.rb +23 -16
  6. data/app/models/forum.rb +11 -7
  7. data/app/models/post.rb +53 -14
  8. data/app/models/post_attachment.rb +1 -1
  9. data/app/models/topic.rb +21 -8
  10. data/app/views/admin/dashboard/_forum_dashboard.html.haml +51 -0
  11. data/app/views/admin/forums/_form.html.haml +12 -0
  12. data/app/views/admin/forums/edit.html.haml +1 -1
  13. data/app/views/admin/forums/index.html.haml +16 -20
  14. data/app/views/admin/posts/_form.html.haml +2 -2
  15. data/app/views/admin/posts/edit.html.haml +1 -1
  16. data/app/views/admin/posts/index.html.haml +5 -5
  17. data/app/views/admin/reader_configuration/_edit_forum.html.haml +6 -0
  18. data/app/views/admin/reader_configuration/_forum.html.haml +5 -1
  19. data/app/views/admin/topics/_form.html.haml +3 -5
  20. data/app/views/admin/topics/edit.html.haml +1 -1
  21. data/app/views/admin/topics/index.html.haml +5 -5
  22. data/app/views/forums/_forum.html.haml +6 -5
  23. data/app/views/forums/_latest.html.haml +14 -12
  24. data/app/views/forums/_statistics.html.haml +4 -4
  25. data/app/views/forums/index.html.haml +8 -10
  26. data/app/views/forums/index.rss.builder +2 -2
  27. data/app/views/forums/show.html.haml +12 -15
  28. data/app/views/pages/_add_comment.html.haml +9 -8
  29. data/app/views/pages/_comments.html.haml +3 -3
  30. data/app/views/posts/_attachments.html.haml +1 -1
  31. data/app/views/posts/_confirm_delete.html.haml +7 -2
  32. data/app/views/posts/_context.html.haml +5 -5
  33. data/app/views/posts/_edit_links.html.haml +4 -4
  34. data/app/views/posts/_form.html.haml +15 -12
  35. data/app/views/posts/_ineditable.html.haml +7 -0
  36. data/app/views/posts/_latest.html.haml +3 -8
  37. data/app/views/posts/_minimal.html.haml +7 -0
  38. data/app/views/posts/_post.html.haml +20 -17
  39. data/app/views/posts/_post.rss.builder +2 -2
  40. data/app/views/posts/_search_form.html.haml +13 -13
  41. data/app/views/posts/_search_results.html.haml +15 -0
  42. data/app/views/posts/_search_summary.html.haml +13 -0
  43. data/app/views/posts/_uploader.html.haml +1 -1
  44. data/app/views/posts/edit.html.haml +22 -21
  45. data/app/views/posts/index.html.haml +12 -19
  46. data/app/views/posts/index.rss.builder +6 -6
  47. data/app/views/posts/new.html.haml +19 -22
  48. data/app/views/posts/remove.html.haml +15 -15
  49. data/app/views/posts/show.html.haml +16 -10
  50. data/app/views/readers/_forum_messages.html.haml +9 -6
  51. data/app/views/readers/_messages_summary.html.haml +1 -1
  52. data/app/views/shared/_standard_forum_parts.html.haml +41 -0
  53. data/app/views/topics/_busiest.html.haml +9 -8
  54. data/app/views/topics/_context.html.haml +11 -8
  55. data/app/views/topics/_latest.html.haml +2 -2
  56. data/app/views/topics/_locked.html.haml +1 -1
  57. data/app/views/topics/_minimal.html.haml +2 -2
  58. data/app/views/topics/_replies.html.haml +4 -3
  59. data/app/views/topics/_reply.html.haml +13 -8
  60. data/app/views/topics/_topic.html.haml +5 -9
  61. data/app/views/topics/_topic.rss.builder +1 -1
  62. data/app/views/topics/index.html.haml +14 -10
  63. data/app/views/topics/index.rss.builder +2 -2
  64. data/app/views/topics/show.html.haml +20 -19
  65. data/app/views/topics/show.rss.builder +3 -3
  66. data/config/initializers/radiant_config.rb +4 -1
  67. data/config/locales/en.yml +202 -178
  68. data/db/migrate/002_pages_commentable.rb +1 -2
  69. data/db/migrate/004_sample_layout.rb +38 -15
  70. data/db/migrate/20110111080550_detach_observer.rb +4 -4
  71. data/db/migrate/20110613112823_search_text.rb +9 -0
  72. data/db/migrate/20110613130230_tidy_up.rb +27 -0
  73. data/db/migrate/20110630083446_page_replied_at.rb +11 -0
  74. data/forum_extension.rb +13 -11
  75. data/lib/commentable_model.rb +13 -9
  76. data/lib/forum_admin_ui.rb +6 -6
  77. data/lib/forum_page.rb +5 -3
  78. data/lib/forum_reader.rb +7 -1
  79. data/lib/forum_reader_sessions_controller.rb +2 -3
  80. data/lib/forum_tags.rb +126 -11
  81. data/lib/radiant-forum-extension.rb +8 -0
  82. data/public/cleditor/images/buttons.gif +0 -0
  83. data/public/cleditor/images/icons/1.gif +0 -0
  84. data/public/cleditor/images/icons/10.gif +0 -0
  85. data/public/cleditor/images/icons/11.gif +0 -0
  86. data/public/cleditor/images/icons/12.gif +0 -0
  87. data/public/cleditor/images/icons/2.gif +0 -0
  88. data/public/cleditor/images/icons/3.gif +0 -0
  89. data/public/cleditor/images/icons/4.gif +0 -0
  90. data/public/cleditor/images/icons/5.gif +0 -0
  91. data/public/cleditor/images/icons/6.gif +0 -0
  92. data/public/cleditor/images/icons/7.gif +0 -0
  93. data/public/cleditor/images/icons/8.gif +0 -0
  94. data/public/cleditor/images/icons/9.gif +0 -0
  95. data/public/cleditor/images/icons/icons.gif +0 -0
  96. data/public/cleditor/images/toolbar.gif +0 -0
  97. data/public/cleditor/jquery.cleditor.css +24 -0
  98. data/public/cleditor/jquery.cleditor.icon.js +65 -0
  99. data/public/cleditor/jquery.cleditor.js +1132 -0
  100. data/public/cleditor/jquery.cleditor.xhtml.js +230 -0
  101. data/public/javascripts/forum.js +146 -107
  102. data/public/stylesheets/sass/forum.sass +94 -58
  103. data/radiant-forum-extension.gemspec +25 -276
  104. data/spec/controllers/forums_controller_spec.rb +0 -7
  105. data/spec/controllers/posts_controller_spec.rb +20 -37
  106. data/spec/controllers/topics_controller_spec.rb +1 -7
  107. data/spec/datasets/forums_dataset.rb +38 -40
  108. data/spec/lib/commentable_model_spec.rb +26 -38
  109. data/spec/lib/forum_reader_spec.rb +0 -4
  110. data/spec/models/forum_spec.rb +46 -16
  111. data/spec/models/post_spec.rb +10 -6
  112. data/spec/models/topic_spec.rb +26 -17
  113. data/spec/spec_helper.rb +1 -0
  114. metadata +66 -99
  115. data/VERSION +0 -1
  116. data/app/views/forums/_standard_parts.html.haml +0 -59
  117. data/lib/sanitize/config/forum.rb +0 -49
  118. data/public/javascripts/gallery.js +0 -275
  119. data/public/punymce/blank.htm +0 -1
  120. data/public/punymce/css/content.css +0 -4
  121. data/public/punymce/css/editor.css +0 -58
  122. data/public/punymce/i18n/sv.js +0 -28
  123. data/public/punymce/img/icons.gif +0 -0
  124. data/public/punymce/img/icons_uncompressed.png +0 -0
  125. data/public/punymce/plugins/bbcode.js +0 -1
  126. data/public/punymce/plugins/bbcode_src.js +0 -50
  127. data/public/punymce/plugins/editsource/css/editor.css +0 -3
  128. data/public/punymce/plugins/editsource/editsource.js +0 -1
  129. data/public/punymce/plugins/editsource/editsource_src.js +0 -81
  130. data/public/punymce/plugins/editsource/img/icons.gif +0 -0
  131. data/public/punymce/plugins/emoticons/css/content.css +0 -13
  132. data/public/punymce/plugins/emoticons/css/editor.css +0 -17
  133. data/public/punymce/plugins/emoticons/emoticons.js +0 -1
  134. data/public/punymce/plugins/emoticons/emoticons_src.js +0 -303
  135. data/public/punymce/plugins/emoticons/img/emoticons.gif +0 -0
  136. data/public/punymce/plugins/emoticons/img/emoticons.png +0 -0
  137. data/public/punymce/plugins/emoticons/img/trans.gif +0 -0
  138. data/public/punymce/plugins/entities.js +0 -1
  139. data/public/punymce/plugins/entities_src.js +0 -37
  140. data/public/punymce/plugins/forceblocks.js +0 -1
  141. data/public/punymce/plugins/forceblocks_src.js +0 -465
  142. data/public/punymce/plugins/forcenl.js +0 -1
  143. data/public/punymce/plugins/forcenl_src.js +0 -26
  144. data/public/punymce/plugins/image/css/editor.css +0 -1
  145. data/public/punymce/plugins/image/image.js +0 -1
  146. data/public/punymce/plugins/image/image_src.js +0 -30
  147. data/public/punymce/plugins/image/img/icons.gif +0 -0
  148. data/public/punymce/plugins/link/css/editor.css +0 -2
  149. data/public/punymce/plugins/link/img/icons.gif +0 -0
  150. data/public/punymce/plugins/link/link.js +0 -1
  151. data/public/punymce/plugins/link/link_src.js +0 -36
  152. data/public/punymce/plugins/paste.js +0 -1
  153. data/public/punymce/plugins/paste_src.js +0 -169
  154. data/public/punymce/plugins/protect.js +0 -1
  155. data/public/punymce/plugins/protect_src.js +0 -30
  156. data/public/punymce/plugins/safari2x.js +0 -1
  157. data/public/punymce/plugins/safari2x_src.js +0 -284
  158. data/public/punymce/plugins/tabfocus.js +0 -1
  159. data/public/punymce/plugins/tabfocus_src.js +0 -45
  160. data/public/punymce/plugins/textcolor/css/editor.css +0 -7
  161. data/public/punymce/plugins/textcolor/img/icons.gif +0 -0
  162. data/public/punymce/plugins/textcolor/textcolor.js +0 -1
  163. data/public/punymce/plugins/textcolor/textcolor_src.js +0 -73
  164. data/public/punymce/puny_mce.js +0 -1
  165. data/public/punymce/puny_mce_full.js +0 -1
  166. data/public/punymce/puny_mce_src.js +0 -1460
metadata CHANGED
@@ -1,67 +1,52 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-forum-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
5
- prerelease: false
4
+ hash: 15424115
5
+ prerelease: 6
6
6
  segments:
7
- - 2
8
- - 1
9
- - 6
10
- version: 2.1.6
7
+ - 3
8
+ - 0
9
+ - 0
10
+ - rc
11
+ - 3
12
+ version: 3.0.0.rc3
11
13
  platform: ruby
12
14
  authors:
13
- - spanner
15
+ - William Ross
14
16
  autorequire:
15
17
  bindir: bin
16
18
  cert_chain: []
17
19
 
18
- date: 2011-02-16 00:00:00 +00:00
19
- default_executable:
20
+ date: 2011-07-05 00:00:00 Z
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
- name: radiant
23
+ name: radiant-reader-extension
23
24
  prerelease: false
24
25
  requirement: &id001 !ruby/object:Gem::Requirement
25
26
  none: false
26
27
  requirements:
27
- - - ">="
28
+ - - ~>
28
29
  - !ruby/object:Gem::Version
29
- hash: 59
30
+ hash: 15424083
30
31
  segments:
32
+ - 2
31
33
  - 0
32
- - 9
33
34
  - 0
34
- version: 0.9.0
35
- type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: radiant-reader-extension
39
- prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- hash: 27
46
- segments:
47
- - 1
35
+ - rc
48
36
  - 3
49
- - 0
50
- version: 1.3.0
37
+ version: 2.0.0.rc3
51
38
  type: :runtime
52
- version_requirements: *id002
53
- description: Nice clean forums and page comments for inclusion in your radiant site. Derived long ago from beast. Requires the reader extension and share_layouts.
54
- email: will@spanner.org
39
+ version_requirements: *id001
40
+ description: Nice clean forums and page comments for inclusion in your radiant site.
41
+ email:
42
+ - radiant@spanner.org
55
43
  executables: []
56
44
 
57
45
  extensions: []
58
46
 
59
- extra_rdoc_files:
60
- - README.md
47
+ extra_rdoc_files: []
48
+
61
49
  files:
62
- - README.md
63
- - Rakefile
64
- - VERSION
65
50
  - app/controllers/admin/forums_controller.rb
66
51
  - app/controllers/admin/posts_controller.rb
67
52
  - app/controllers/admin/topics_controller.rb
@@ -76,6 +61,7 @@ files:
76
61
  - app/models/post.rb
77
62
  - app/models/post_attachment.rb
78
63
  - app/models/topic.rb
64
+ - app/views/admin/dashboard/_forum_dashboard.html.haml
79
65
  - app/views/admin/forums/_form.html.haml
80
66
  - app/views/admin/forums/edit.html.haml
81
67
  - app/views/admin/forums/index.html.haml
@@ -95,7 +81,6 @@ files:
95
81
  - app/views/forums/_forum.html.haml
96
82
  - app/views/forums/_forum.rss.builder
97
83
  - app/views/forums/_latest.html.haml
98
- - app/views/forums/_standard_parts.html.haml
99
84
  - app/views/forums/_statistics.html.haml
100
85
  - app/views/forums/index.html.haml
101
86
  - app/views/forums/index.rss.builder
@@ -110,11 +95,15 @@ files:
110
95
  - app/views/posts/_context.html.haml
111
96
  - app/views/posts/_edit_links.html.haml
112
97
  - app/views/posts/_form.html.haml
98
+ - app/views/posts/_ineditable.html.haml
113
99
  - app/views/posts/_latest.html.haml
100
+ - app/views/posts/_minimal.html.haml
114
101
  - app/views/posts/_new_attachment.html.haml
115
102
  - app/views/posts/_post.html.haml
116
103
  - app/views/posts/_post.rss.builder
117
104
  - app/views/posts/_search_form.html.haml
105
+ - app/views/posts/_search_results.html.haml
106
+ - app/views/posts/_search_summary.html.haml
118
107
  - app/views/posts/_uploader.html.haml
119
108
  - app/views/posts/edit.html.haml
120
109
  - app/views/posts/index.html.haml
@@ -125,6 +114,7 @@ files:
125
114
  - app/views/reader_notifier/post.rhtml
126
115
  - app/views/readers/_forum_messages.html.haml
127
116
  - app/views/readers/_messages_summary.html.haml
117
+ - app/views/shared/_standard_forum_parts.html.haml
128
118
  - app/views/topics/_busiest.html.haml
129
119
  - app/views/topics/_context.html.haml
130
120
  - app/views/topics/_latest.html.haml
@@ -156,6 +146,9 @@ files:
156
146
  - db/migrate/20110105103827_topic_merely_associative.rb
157
147
  - db/migrate/20110111080550_detach_observer.rb
158
148
  - db/migrate/20110127113852_import_attachments.rb
149
+ - db/migrate/20110613112823_search_text.rb
150
+ - db/migrate/20110613130230_tidy_up.rb
151
+ - db/migrate/20110630083446_page_replied_at.rb
159
152
  - forum_extension.rb
160
153
  - lib/commentable_model.rb
161
154
  - lib/forum_admin_ui.rb
@@ -168,8 +161,27 @@ files:
168
161
  - lib/forum_red_cloth4.rb
169
162
  - lib/forum_site.rb
170
163
  - lib/forum_tags.rb
171
- - lib/sanitize/config/forum.rb
164
+ - lib/radiant-forum-extension.rb
172
165
  - lib/tasks/radiant_forum_extension_tasks.rake
166
+ - public/cleditor/images/buttons.gif
167
+ - public/cleditor/images/icons/1.gif
168
+ - public/cleditor/images/icons/10.gif
169
+ - public/cleditor/images/icons/11.gif
170
+ - public/cleditor/images/icons/12.gif
171
+ - public/cleditor/images/icons/2.gif
172
+ - public/cleditor/images/icons/3.gif
173
+ - public/cleditor/images/icons/4.gif
174
+ - public/cleditor/images/icons/5.gif
175
+ - public/cleditor/images/icons/6.gif
176
+ - public/cleditor/images/icons/7.gif
177
+ - public/cleditor/images/icons/8.gif
178
+ - public/cleditor/images/icons/9.gif
179
+ - public/cleditor/images/icons/icons.gif
180
+ - public/cleditor/images/toolbar.gif
181
+ - public/cleditor/jquery.cleditor.css
182
+ - public/cleditor/jquery.cleditor.icon.js
183
+ - public/cleditor/jquery.cleditor.js
184
+ - public/cleditor/jquery.cleditor.xhtml.js
173
185
  - public/images/admin/forum.png
174
186
  - public/images/admin/new-forum.png
175
187
  - public/images/admin/nominus.png
@@ -203,59 +215,12 @@ files:
203
215
  - public/images/furniture/rdo_on.png
204
216
  - public/images/furniture/wait_16_grey.gif
205
217
  - public/javascripts/forum.js
206
- - public/javascripts/gallery.js
207
- - public/punymce/blank.htm
208
- - public/punymce/css/content.css
209
- - public/punymce/css/editor.css
210
- - public/punymce/i18n/sv.js
211
- - public/punymce/img/icons.gif
212
- - public/punymce/img/icons_uncompressed.png
213
- - public/punymce/plugins/bbcode.js
214
- - public/punymce/plugins/bbcode_src.js
215
- - public/punymce/plugins/editsource/css/editor.css
216
- - public/punymce/plugins/editsource/editsource.js
217
- - public/punymce/plugins/editsource/editsource_src.js
218
- - public/punymce/plugins/editsource/img/icons.gif
219
- - public/punymce/plugins/emoticons/css/content.css
220
- - public/punymce/plugins/emoticons/css/editor.css
221
- - public/punymce/plugins/emoticons/emoticons.js
222
- - public/punymce/plugins/emoticons/emoticons_src.js
223
- - public/punymce/plugins/emoticons/img/emoticons.gif
224
- - public/punymce/plugins/emoticons/img/emoticons.png
225
- - public/punymce/plugins/emoticons/img/trans.gif
226
- - public/punymce/plugins/entities.js
227
- - public/punymce/plugins/entities_src.js
228
- - public/punymce/plugins/forceblocks.js
229
- - public/punymce/plugins/forceblocks_src.js
230
- - public/punymce/plugins/forcenl.js
231
- - public/punymce/plugins/forcenl_src.js
232
- - public/punymce/plugins/image/css/editor.css
233
- - public/punymce/plugins/image/image.js
234
- - public/punymce/plugins/image/image_src.js
235
- - public/punymce/plugins/image/img/icons.gif
236
- - public/punymce/plugins/link/css/editor.css
237
- - public/punymce/plugins/link/img/icons.gif
238
- - public/punymce/plugins/link/link.js
239
- - public/punymce/plugins/link/link_src.js
240
- - public/punymce/plugins/paste.js
241
- - public/punymce/plugins/paste_src.js
242
- - public/punymce/plugins/protect.js
243
- - public/punymce/plugins/protect_src.js
244
- - public/punymce/plugins/safari2x.js
245
- - public/punymce/plugins/safari2x_src.js
246
- - public/punymce/plugins/tabfocus.js
247
- - public/punymce/plugins/tabfocus_src.js
248
- - public/punymce/plugins/textcolor/css/editor.css
249
- - public/punymce/plugins/textcolor/img/icons.gif
250
- - public/punymce/plugins/textcolor/textcolor.js
251
- - public/punymce/plugins/textcolor/textcolor_src.js
252
- - public/punymce/puny_mce.js
253
- - public/punymce/puny_mce_full.js
254
- - public/punymce/puny_mce_src.js
255
218
  - public/stylesheets/sass/admin/forum.sass
256
219
  - public/stylesheets/sass/forum.sass
257
220
  - public/stylesheets/sass/gallery.sass
258
221
  - radiant-forum-extension.gemspec
222
+ - Rakefile
223
+ - README.md
259
224
  - spec/controllers/admin/forums_controller_spec.rb
260
225
  - spec/controllers/forums_controller_spec.rb
261
226
  - spec/controllers/posts_controller_spec.rb
@@ -276,17 +241,16 @@ files:
276
241
  - spec/models/topic_spec.rb
277
242
  - spec/spec.opts
278
243
  - spec/spec_helper.rb
279
- - vendor/plugins/acts_as_list/README
280
244
  - vendor/plugins/acts_as_list/init.rb
281
245
  - vendor/plugins/acts_as_list/lib/active_record/acts/list.rb
246
+ - vendor/plugins/acts_as_list/README
282
247
  - vendor/plugins/acts_as_list/test/list_test.rb
283
- has_rdoc: true
284
- homepage: http://github.com/spanner/radiant-forum-extension
248
+ homepage: http://radiant.spanner.org/forum
285
249
  licenses: []
286
250
 
287
- post_install_message:
288
- rdoc_options:
289
- - --charset=UTF-8
251
+ post_install_message: "\n Add this to your radiant project with:\n\n config.gem 'radiant-forum-extension', :version => '~> 3.0.0.rc3'\n\n "
252
+ rdoc_options: []
253
+
290
254
  require_paths:
291
255
  - lib
292
256
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -301,16 +265,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
301
265
  required_rubygems_version: !ruby/object:Gem::Requirement
302
266
  none: false
303
267
  requirements:
304
- - - ">="
268
+ - - ">"
305
269
  - !ruby/object:Gem::Version
306
- hash: 3
270
+ hash: 25
307
271
  segments:
308
- - 0
309
- version: "0"
272
+ - 1
273
+ - 3
274
+ - 1
275
+ version: 1.3.1
310
276
  requirements: []
311
277
 
312
278
  rubyforge_project:
313
- rubygems_version: 1.3.7
279
+ rubygems_version: 1.7.2
314
280
  signing_key:
315
281
  specification_version: 3
316
282
  summary: Forum and Comment Extension for Radiant CMS
@@ -333,4 +299,5 @@ test_files:
333
299
  - spec/models/forum_spec.rb
334
300
  - spec/models/post_spec.rb
335
301
  - spec/models/topic_spec.rb
302
+ - spec/spec.opts
336
303
  - spec/spec_helper.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 2.1.6
@@ -1,59 +0,0 @@
1
- - content_for :forum_css do
2
- %link{:rel => 'stylesheet', :type => 'text/css', :href => '/stylesheets/forum.css', :media => 'all'}
3
-
4
- - content_for :gallery_js do
5
- %script{:src => '/javascripts/gallery.js', :type => 'text/javascript'}
6
-
7
- - content_for :forum_js do
8
- %script{:src => '/javascripts/forum.js', :type => 'text/javascript'}
9
-
10
- - content_for :toolbar_js do
11
- - if Radiant::Config['forum.toolbar?']
12
- %script{:src => '/punymce/puny_mce_src.js', :type => 'text/javascript'}
13
- %script{:src => '/punymce/plugins/link/link.js', :type => 'text/javascript'}
14
- %script{:src => '/punymce/plugins/image/image.js', :type => 'text/javascript'}
15
- %script{:src => '/punymce/plugins/emoticons/emoticons.js', :type => 'text/javascript'}
16
- %script{:src => '/punymce/plugins/editsource/editsource.js', :type => 'text/javascript'}
17
- %script{:src => '/punymce/plugins/paste.js', :type => 'text/javascript'}
18
-
19
- - content_for :all_forum_js do
20
- = yield :forum_js
21
- = yield :gallery_js
22
- = yield :toolbar_js
23
-
24
- - content_for :section_navigation do
25
- = link_to t('navigation.forum'), topics_url, :class => 'section'
26
- = link_to t('navigation.topics'), topics_url
27
- = link_to t('navigation.forums'), forums_url
28
- = link_to t('navigation.search'), posts_url
29
- - if current_reader
30
- = link_to t('navigation.new_topic'), new_post_url
31
- = render :partial => 'readers/controls'
32
- - if Radiant::Config['forum.help_url']
33
- = link_to t('navigation.forum_help'), Radiant::Config['forum.help_url']
34
-
35
- - content_for :controls do
36
- = render :partial => 'readers/controls'
37
-
38
- - content_for :signals do
39
- = render :partial => 'readers/flasher'
40
-
41
- - content_for :reader_css do
42
- - reader_css_paths.each do |path|
43
- %link{:rel => 'stylesheet', :href => path, :type => 'text/css'}
44
-
45
- - content_for :reader_js do
46
- - reader_js_paths.each do |path|
47
- %script{:src => path, :type => 'text/javascript'}
48
-
49
- - content_for :person do
50
- - if @reader
51
- = standard_gravatar_for(@reader)
52
-
53
- - content_for :search do
54
- = render :partial => 'posts/search_form'
55
-
56
- - content_for :newtopic do
57
- .newmessage
58
- = link_to t('new_topic'), new_post_url
59
-
@@ -1,49 +0,0 @@
1
- #--
2
- # Copyright (c) 2011 Ryan Grove <ryan@wonko.com>
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy
5
- # of this software and associated documentation files (the 'Software'), to deal
6
- # in the Software without restriction, including without limitation the rights
7
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- # copies of the Software, and to permit persons to whom the Software is
9
- # furnished to do so, subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in all
12
- # copies or substantial portions of the Software.
13
- #
14
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
- # SOFTWARE.
21
- #++
22
-
23
- class Sanitize
24
- module Config
25
- FORUM = {
26
- :elements => %w[
27
- a b blockquote br caption cite code dd del dl dt em h1 h2 h3 h4 h5 h6 i img li ol p pre small span strike strong sub sup table tbody td th thead tr u ul
28
- ],
29
-
30
- :attributes => {
31
- :all => ['dir', 'lang', 'title', 'class'],
32
- 'a' => ['href'],
33
- 'blockquote' => ['cite'],
34
- 'img' => ['align', 'alt', 'height', 'src', 'width'],
35
- 'ol' => ['start', 'reversed', 'type'],
36
- 'ul' => ['type'],
37
- 'th' => ['colspan', 'rowspan'],
38
- 'td' => ['colspan', 'rowspan']
39
- },
40
-
41
- :protocols => {
42
- 'a' => {'href' => ['ftp', 'http', 'https', 'mailto', :relative]},
43
- 'blockquote' => {'cite' => ['http', 'https', :relative]},
44
- 'del' => {'cite' => ['http', 'https', :relative]},
45
- 'img' => {'src' => ['http', 'https', :relative]},
46
- }
47
- }
48
- end
49
- end
@@ -1,275 +0,0 @@
1
- (function($) {
2
-
3
- /*
4
- * Some easing functions borrowed from the effects library to save loading the whole lot.
5
- * Glide is really quartic out. Boing is back out. Bounce is bounce out.
6
- */
7
-
8
- $.easing.glide = function (x, t, b, c, d) {
9
- return -c * ((t=t/d-1)*t*t*t - 1) + b;
10
- }
11
-
12
- $.easing.boing = function (x, t, b, c, d, s) {
13
- if (s == undefined) s = 1.70158;
14
- return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
15
- };
16
-
17
- function Gallery() {
18
- var self = this;
19
- var container = $('<div class="gallery"><img class="preview" /><p class="caption" /><div class="controls"><a href="#" class="previous" /><a href="#" class="download" /><a href="#" class="next" /></a></div><div class="closer"><a href="#" /></div></div>').hide().appendTo($('body'));
20
- $.extend(self, {
21
- container: container,
22
- zoomer: new Zoomer(),
23
- image: container.find('img.preview'),
24
- caption: container.find('p.caption'),
25
- controls: container.find('div.controls'),
26
- closer: container.find('div.closer'),
27
- stack: [],
28
- item: null,
29
- click_outside: null,
30
- escape_key: null,
31
- add: function (a) {
32
- self.stack.push(new GalleryItem(a));
33
- },
34
- display: function (item) {
35
- self.item = item;
36
- if (self.visible()) self.crossfade();
37
- else self.zoomUp();
38
- },
39
-
40
- mimic: function () {
41
- self.zoomer.setImage(self.item.src);
42
- self.image.attr('src', self.item.src);
43
- self.controls.find('a.download').attr('href', self.item.download_url());
44
- if (self.item.caption.html()) self.caption.html(self.item.caption.html()).show();
45
- else self.caption.hide();
46
- },
47
- zoomUp: function () {
48
- self.hide();
49
- self.mimic();
50
- self.zoomer.zoomUp(self.item, self.show);
51
- self.setClosers();
52
- },
53
- zoomDown: function () {
54
- self.zoomer.zoomDown(self.item);
55
- self.unsetClosers();
56
- self.hide();
57
- },
58
- crossfade: function () {
59
- self.fadeDown(self.fadeUp);
60
- },
61
- fadeDown: function (onFade) {
62
- self.caption.fadeTo('fast', 0.2);
63
- self.image.fadeTo('fast', 0.2, onFade);
64
- },
65
- fadeUp: function (onFade) {
66
- self.mimic();
67
- self.resize();
68
- self.caption.fadeTo('fast', 1);
69
- self.image.fadeTo('fast', 1, onFade);
70
- },
71
-
72
- current: function () {
73
- return self.stack.indexOf(self.item);
74
- },
75
- next: function (e) {
76
- if (e) e.preventDefault();
77
- var at = self.current();
78
- var next = (at == self.stack.length-1) ? 0 : at + 1;
79
- self.display(self.stack[next]);
80
- },
81
- previous: function (e) {
82
- if (e) e.preventDefault();
83
- var at = self.current();
84
- var previous = (at == 0) ? self.stack.length-1 : at - 1;
85
- self.display(self.stack[previous]);
86
- },
87
- close: function (e) {
88
- if (e) e.preventDefault();
89
- if (self.visible) self.zoomDown();
90
- },
91
- setClosers: function (argument) {
92
- self.escape_key = $(document).keyup(function(e) {
93
- if (e.keyCode == 27) self.close(e);
94
- if (!e.metaKey) {
95
- if (e.keyCode == 39) self.next(e);
96
- if (e.keyCode == 37) self.previous(e);
97
- }
98
- return false;
99
- });
100
- },
101
- unsetClosers: function (argument) {
102
- if (self.escape_key) $(document).unbind('keyup', self.escape_key);
103
- },
104
-
105
-
106
- show: function () {
107
- self.zoomer.hide();
108
- self.container.show();
109
- },
110
- hide: function () {
111
- self.container.hide();
112
- },
113
- visible: function () {
114
- return self.container.is(':visible');
115
- },
116
- showControls: function (e) {
117
- self.controls.fadeIn("fast");
118
- self.closer.fadeIn("fast");
119
- },
120
- hideControls: function (e) {
121
- self.controls.fadeOut("fast");
122
- self.closer.fadeOut("fast");
123
- },
124
-
125
- resize: function (item) {
126
- if (!item) item = self.item;
127
- var w = $(window);
128
- var d = item.imageSize();
129
- var p = self.container.offset();
130
- var r = {
131
- left: p.left + (self.image.innerWidth() - d.width)/2,
132
- top: p.top + (self.image.innerHeight() - d.height)/2
133
- };
134
- if (r.top <= 10) r.top = 10;
135
- self.image.animate(d, 'fast');
136
- self.container.animate(r, 'fast');
137
- self.controls.css({left: (d.width - 96)/2});
138
- },
139
- reposition: function (item) {
140
- if (!item) item = self.item;
141
- var w = $(window);
142
- var d = item.imageSize();
143
- var p = {
144
- top: w.scrollTop() + (w.height() - d.height)/2,
145
- left: w.scrollLeft() + (w.width() - d.width)/2
146
- };
147
- if (p.top <= 10) p.top = 10;
148
- if (self.visible) {
149
- self.image.animate(d, 'fast');
150
- self.container.animate(p, 'fast');
151
- } else {
152
- self.image.css(d);
153
- self.container.css(p);
154
- }
155
- self.controls.css({left: (d.width - 96)/2});
156
- return $.extend(d,p);
157
- },
158
- currentPosition: function () {
159
- var p = self.container.offset();
160
- return {
161
- left: p.left,
162
- top: p.top,
163
- width: self.image.innerWidth(),
164
- height: self.image.innerHeight()
165
- };
166
- }
167
- });
168
-
169
- self.closer.find('a').click(self.close);
170
- self.controls.find('a.previous').click(self.previous);
171
- self.controls.find('a.next').click(self.next);
172
- self.container.hover(self.showControls, self.hideControls);
173
- };
174
-
175
- function Zoomer() {
176
- var self = this;
177
- var sprite = $('<img class="grower" />').hide().appendTo($('body'));
178
- $.extend(self, {
179
- sprite: sprite,
180
- defaultUpState: {position: 'absolute', opacity: 1, borderLeftWidth: 20, borderRightWidth: 20, borderTopWidth: 20, borderBottomWidth: 20},
181
- defaultDownState: {position: 'absolute', opacity: 0, borderLeftWidth: 4, borderRightWidth: 4, borderTopWidth: 4, borderBottomWidth: 4},
182
- zoomDuration: 'slow',
183
- setImage: function (src) {
184
- self.sprite.attr('src', src);
185
- },
186
- zoomUp: function (item, onZoom) {
187
- if (!onZoom) onZoom = self.hide;
188
- self.sprite.css($.extend(self.defaultDownState, item.position()));
189
- self.show();
190
- self.sprite.animate($.extend({}, self.defaultUpState, $.gallery.reposition()), self.zoomDuration, onZoom);
191
- },
192
- zoomDown: function (item, onZoom) {
193
- if (!onZoom) onZoom = self.hide;
194
- self.interrupt();
195
- self.show();
196
- self.sprite.css($.extend(self.defaultUpState, $.gallery.currentPosition()));
197
- self.sprite.animate($.extend({}, self.defaultDownState, item.position()), self.zoomDuration, onZoom);
198
- },
199
- interrupt: function () {
200
- self.sprite.stop(true, false);
201
- },
202
- show: function () {
203
- self.sprite.show();
204
- },
205
- hide: function () {
206
- self.sprite.hide();
207
- }
208
- });
209
- }
210
-
211
-
212
- function GalleryItem(a) {
213
- var self = this;
214
- var link = $(a);
215
- $.extend(self, {
216
- link: link,
217
- thumb: link.find('img'),
218
- image: $('<img class="preloader" />').css({visibility: 'hidden'}).appendTo($('body')),
219
- caption: link.next('.caption'),
220
- src: link.attr('href'),
221
- deactivate: function (event) {
222
- self.thumb.fadeTo('slow', 0.3);
223
- self.thumb.css('cursor', 'text');
224
- self.image.bind("load", self.activate);
225
- self.image.attr('src', self.src);
226
- },
227
- activate: function () {
228
- self.thumb.fadeTo('slow', 1);
229
- self.thumb.css('cursor', 'pointer');
230
- self.link.click(function (e) {
231
- if (e) {
232
- e.preventDefault();
233
- e.stopPropagation();
234
- }
235
- $.gallery.display(self);
236
- });
237
- },
238
- position: function () {
239
- var p = self.thumb.offset();
240
- return {
241
- left: p.left,
242
- top: p.top,
243
- width: self.thumb.outerWidth(),
244
- height: self.thumb.outerHeight()
245
- };
246
- },
247
- imageSize: function () {
248
- return {
249
- width: self.image.innerWidth(),
250
- height: self.image.innerHeight()
251
- };
252
- },
253
- download_url: function () {
254
- return self.link.attr('rel');
255
- }
256
- });
257
- if (!self.image.complete) {
258
- self.deactivate();
259
- } else {
260
- self.activate();
261
- }
262
- }
263
-
264
- $.fn.galleried = function() {
265
- this.each(function() {
266
- if (!$.gallery) $.gallery = new Gallery();
267
- $.gallery.add(this);
268
- });
269
- };
270
-
271
- })(jQuery);
272
-
273
- $(function() {
274
- $("a.thumbnail").galleried();
275
- });
@@ -1 +0,0 @@
1
- <!-- WebKit -->
@@ -1,4 +0,0 @@
1
- /* Area CSS */
2
-
3
- body, td { margin: 0; padding: 0; background: #FFF; font-family: Arial; }
4
- a { color: blue !important; } /* FF needs important */