Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit of app rewrite for version 2.

  • Loading branch information...
commit cbeedc54b47629d17130dd9f127ac731cefa59e4 1 parent 8b0ca06
Andy authored
Showing with 708 additions and 9,804 deletions.
  1. +2 −2 .gitignore
  2. +18 −22 Gemfile
  3. +107 −86 Gemfile.lock
  4. +13 −8 README
  5. +1 −1  Rakefile
  6. 0  {public → app/assets}/images/rails.png
  7. +9 −0 app/assets/javascripts/application.js
  8. +7 −0 app/assets/stylesheets/application.css
  9. +0 −50 app/controllers/application_controller.rb
  10. +0 −33 app/controllers/folders_controller.rb
  11. +0 −80 app/controllers/msg_threads_controller.rb
  12. +0 −15 app/controllers/pages_controller.rb
  13. +0 −125 app/controllers/posts_controller.rb
  14. +0 −89 app/controllers/users_controller.rb
  15. +0 −10 app/helpers/application_helper.rb
  16. +0 −2  app/helpers/folders_helper.rb
  17. +0 −2  app/helpers/msg_threads_helper.rb
  18. +0 −2  app/helpers/pages_helper.rb
  19. +0 −2  app/helpers/posts_helper.rb
  20. +0 −2  app/helpers/users_helper.rb
  21. 0  {public/stylesheets → app/mailers}/.gitkeep
  22. 0  app/models/.gitkeep
  23. +0 −21 app/models/folder.rb
  24. +0 −51 app/models/msg_thread.rb
  25. +0 −34 app/models/post.rb
  26. +0 −89 app/models/user.rb
  27. +0 −257 app/stylesheets/_colors.scss
  28. +0 −127 app/stylesheets/_colours_sea.scss
  29. +0 −33 app/stylesheets/_emotes.scss
  30. +0 −24 app/stylesheets/_jquery-ui-selectmenu.scss
  31. +0 −619 app/stylesheets/_jquery-ui.scss
  32. +0 −495 app/stylesheets/_layout.scss
  33. +0 −175 app/stylesheets/_unused-icons.scss
  34. +0 −31 app/stylesheets/screen.scss
  35. +0 −12 app/views/devise/confirmations/new.html.erb
  36. +0 −5 app/views/devise/mailer/confirmation_instructions.html.erb
  37. +0 −8 app/views/devise/mailer/reset_password_instructions.html.erb
  38. +0 −7 app/views/devise/mailer/unlock_instructions.html.erb
  39. +0 −16 app/views/devise/passwords/edit.html.erb
  40. +0 −12 app/views/devise/passwords/new.html.erb
  41. +0 −40 app/views/devise/registrations/edit.html.erb
  42. +0 −26 app/views/devise/registrations/new.html.erb
  43. +0 −19 app/views/devise/sessions/new.html.erb
  44. +0 −19 app/views/devise/shared/_links.erb
  45. +0 −12 app/views/devise/unlocks/new.html.erb
  46. +0 −1  app/views/layouts/_all_javascript.erb
  47. +0 −20 app/views/layouts/_folderedit_partial.html.erb
  48. +0 −29 app/views/layouts/_post_partial.html.erb
  49. +0 −27 app/views/layouts/_useredit_partial.html.erb
  50. +6 −54 app/views/layouts/application.html.erb
  51. +0 −3  app/views/pages/_all_javascript.erb
  52. +0 −12 app/views/pages/about.html.erb
  53. +0 −85 app/views/pages/home.html.erb
  54. +0 −143 app/views/pages/test.html.erb
  55. +0 −2  app/views/users/new.html.erb
  56. +0 −1  app/views/users/show.html.erb
  57. +12 −7 config/application.rb
  58. +0 −42 config/application.rb~
  59. +3 −10 config/boot.rb
  60. +0 −11 config/compass.rb
  61. +4 −1 config/database.yml
  62. +8 −5 config/environments/development.rb
  63. +24 −14 config/environments/production.rb
  64. +6 −2 config/environments/test.rb
  65. +0 −165 config/extras/common_functions.rb
  66. +0 −3  config/initializers/compass.rb
  67. +0 −142 config/initializers/devise.rb
  68. +1 −1  config/initializers/secret_token.rb
  69. +2 −2 config/initializers/session_store.rb
  70. +14 −0 config/initializers/wrap_parameters.rb
  71. +0 −39 config/locales/devise.en.yml
  72. +1 −1  config/locales/en.yml
  73. +56 −23 config/routes.rb
  74. BIN  db/forumtest.db
  75. +0 −14 db/migrate/20101016185704_create_users.rb
  76. +0 −9 db/migrate/20101017142025_add_uniqueness_index.rb
  77. +0 −17 db/migrate/20101019203503_create_posts.rb
  78. +0 −8 db/migrate/20101019204129_add_thread_id_index.rb
  79. +0 −7 db/migrate/20101020184450_build_relations.rb
  80. +0 −17 db/migrate/20101021164015_create_msg_threads.rb
  81. +0 −16 db/migrate/20101021164015_create_msg_threads.rb~
  82. +0 −8 db/migrate/20101025184049_bigger_posts.rb
  83. +0 −7 db/migrate/20101025185527_even_bigger_posts.rb
  84. +0 −8 db/migrate/20101025190148_over_nine_thousand.rb
  85. +0 −28 db/migrate/20101026184807_devise_create_users.rb
  86. +0 −9 db/migrate/20101026191727_add_admin_role.rb
  87. +0 −15 db/migrate/20101103201541_create_folders.rb
  88. +0 −9 db/migrate/20101107160529_index_posts_thread_id.rb
  89. +0 −9 db/migrate/20101114171513_add_user_unread.rb
  90. +0 −32 db/migrate/20101121155800_thread_cleanup.rb
  91. +0 −32 db/migrate/20101121155800_thread_cleanup.rb~
  92. +0 −14 db/migrate/20101121163134_user_level.rb
  93. +0 −23 db/migrate/20101121163822_set_new_defaults.rb
  94. +0 −24 db/migrate/20101121163822_set_new_defaults.rb~
  95. +0 −8 db/migrate/20101121184226_userless_threads.rb
  96. +0 −16 db/migrate/20101121194222_better_defaults.rb
  97. +0 −16 db/migrate/20101121194222_better_defaults.rb~
  98. +0 −14 db/migrate/20101122002322_ranks_to_default.rb
  99. +0 −10 db/migrate/20101122002322_ranks_to_default.rb~
  100. +0 −67 db/schema.rb
  101. +2 −2 db/seeds.rb
  102. +0 −6 devise.txt
  103. 0  lib/assets/.gitkeep
  104. +0 −37 lib/common_functions.rb
  105. 0  log/.gitkeep
  106. +127 −0 new_css.css
  107. BIN  public/bggrad.png
  108. BIN  public/brFC5.png
  109. +0 −29 public/colours.html
  110. BIN  public/favicon.ico
  111. BIN  public/fonts/Ubuntu-B-webfont.eot
  112. +0 −245 public/fonts/Ubuntu-B-webfont.svg
  113. BIN  public/fonts/Ubuntu-B-webfont.ttf
  114. BIN  public/fonts/Ubuntu-B-webfont.woff
  115. BIN  public/fonts/Ubuntu-BI-webfont.eot
  116. +0 −245 public/fonts/Ubuntu-BI-webfont.svg
  117. BIN  public/fonts/Ubuntu-BI-webfont.ttf
  118. BIN  public/fonts/Ubuntu-BI-webfont.woff
  119. BIN  public/fonts/Ubuntu-I-webfont.eot
  120. +0 −245 public/fonts/Ubuntu-I-webfont.svg
  121. BIN  public/fonts/Ubuntu-I-webfont.ttf
  122. BIN  public/fonts/Ubuntu-I-webfont.woff
  123. BIN  public/fonts/Ubuntu-R-webfont.eot
  124. +0 −245 public/fonts/Ubuntu-R-webfont.svg
  125. BIN  public/fonts/Ubuntu-R-webfont.ttf
  126. BIN  public/fonts/Ubuntu-R-webfont.woff
  127. BIN  public/images/emote_angry.png
  128. BIN  public/images/emote_cry.png
  129. BIN  public/images/emote_gasp.png
  130. BIN  public/images/emote_gasp2.png
  131. BIN  public/images/emote_gasp3.png
  132. BIN  public/images/emote_joy.png
  133. BIN  public/images/emote_joy15.png
  134. BIN  public/images/emote_sad.png
  135. BIN  public/images/emote_shame.png
  136. BIN  public/images/emote_smile.png
  137. BIN  public/images/emote_tongue.png
  138. BIN  public/images/emote_unamused.png
  139. BIN  public/images/emote_unamused16.png
  140. BIN  public/images/emote_wink.png
  141. BIN  public/images/emotes.png
  142. BIN  public/images/icon_blank16.png
  143. BIN  public/images/icon_contract.png
  144. BIN  public/images/icon_expand.png
  145. BIN  public/images/icon_ignore.png
  146. BIN  public/images/icon_interesting.png
  147. BIN  public/images/icon_newposts.png
  148. BIN  public/images/icon_newposts_pinned.png
  149. BIN  public/images/icon_nonewposts.png
  150. BIN  public/images/icon_nonewposts_pinned.png
  151. BIN  public/images/icon_pin.png
  152. BIN  public/images/icon_settings.png
  153. BIN  public/images/icon_settings_1.png
  154. BIN  public/images/icon_settings_2.png
  155. BIN  public/images/icon_thread_draft.png
  156. BIN  public/images/loading_blue.gif
  157. BIN  public/images/path3863.png
  158. BIN  public/images/ui-icon-first_posts.png
  159. BIN  public/images/ui-icon-last_posts.png
  160. BIN  public/images/ui-icon-next_posts.png
  161. BIN  public/images/ui-icon-prev_posts.png
  162. BIN  public/images/ui-icon-reload.png
  163. +241 −0 public/index.html
  164. +0 −321 public/javascripts/all.js
  165. +0 −45 public/javascripts/application-min.js
  166. +0 −1,591 public/javascripts/application.js
  167. +0 −154 public/javascripts/jquery-min.js
  168. +0 −149 public/javascripts/jquery-ui-all-min.js
  169. +0 −148 public/javascripts/jquery-ui-min.js
  170. +0 −58 public/javascripts/jquery-ui-min.js.old
  171. +0 −1  public/javascripts/jquery-ui-selectmenu-min.js
  172. +0 −571 public/javascripts/jquery-ui-selectmenu.js
  173. +0 −11 public/javascripts/scrollto-min.js
  174. +0 −1  public/javascripts/showdown-min.js
  175. +0 −18 public/javascripts/showdown-underscore-min.js
  176. +0 −1,311 public/javascripts/showdown.js
  177. +0 −17 public/javascripts/underscore-min.js
  178. BIN  public/oldlogo.png
  179. BIN  public/semitrans.png
  180. BIN  public/semitransEC4.png
  181. BIN  public/semitransFC5.png
  182. BIN  public/stylesheets/images/grid.png
  183. BIN  public/stylesheets/images/ui-bg_flat_0_aaaaaa_40x100.png
  184. BIN  public/stylesheets/images/ui-bg_flat_50_aaaaaa_40x100.png
  185. BIN  public/stylesheets/images/ui-bg_flat_65_ddeeff_40x100.png
  186. BIN  public/stylesheets/images/ui-bg_flat_75_eeeeee_40x100.png
  187. BIN  public/stylesheets/images/ui-bg_flat_75_ffeeaa_40x100.png
  188. BIN  public/stylesheets/images/ui-bg_flat_75_ffffdd_40x100.png
  189. BIN  public/stylesheets/images/ui-bg_glass_55_ffeecc_1x400.png
  190. BIN  public/stylesheets/images/ui-bg_glass_95_fef1ec_1x400.png
  191. BIN  public/stylesheets/images/ui-bg_highlight-hard_75_ddeeff_1x100.png
  192. BIN  public/stylesheets/images/ui-icons_222222_256x240.png
  193. BIN  public/stylesheets/images/ui-icons_2e83ff_256x240.png
  194. BIN  public/stylesheets/images/ui-icons_454545_256x240.png
  195. BIN  public/stylesheets/images/ui-icons_888888_256x240.png
  196. BIN  public/stylesheets/images/ui-icons_cd0a0a_256x240.png
  197. +0 −1  public/stylesheets/screen.css
  198. +0 −130 public/test.html
  199. +0 −130 public/test.html~
  200. +40 −0 rant.md
  201. 0  test/fixtures/.gitkeep
  202. +0 −11 test/fixtures/folders.yml
  203. +0 −13 test/fixtures/msg_threads.yml
  204. +0 −15 test/fixtures/posts.yml
  205. +0 −9 test/fixtures/users.yml
  206. 0  test/functional/.gitkeep
  207. +0 −8 test/functional/folders_controller_test.rb
  208. +0 −8 test/functional/msg_threads_controller_test.rb
  209. +0 −14 test/functional/pages_controller_test.rb
  210. +0 −8 test/functional/posts_controller_test.rb
  211. +0 −9 test/functional/users_controller_test.rb
  212. 0  test/integration/.gitkeep
  213. +4 −1 test/performance/browsing_test.rb
  214. 0  test/unit/.gitkeep
  215. +0 −8 test/unit/folder_test.rb
  216. +0 −4 test/unit/helpers/folders_helper_test.rb
  217. +0 −4 test/unit/helpers/msg_threads_helper_test.rb
  218. +0 −4 test/unit/helpers/pages_helper_test.rb
  219. +0 −4 test/unit/helpers/posts_helper_test.rb
  220. +0 −4 test/unit/helpers/users_helper_test.rb
  221. +0 −8 test/unit/msg_thread_test.rb
  222. +0 −8 test/unit/post_test.rb
  223. +0 −8 test/unit/user_test.rb
  224. 0  vendor/assets/stylesheets/.gitkeep
View
4 .gitignore
@@ -1,5 +1,5 @@
.bundle
db/*.sqlite3
log/*.log
-tmp/**/*
-*.swp
+tmp/
+.sass-cache/
View
40 Gemfile
@@ -1,21 +1,25 @@
source 'http://rubygems.org'
-gem 'rails', '3.0.0'
+gem 'rails', '3.1.1'
# Bundle edge Rails instead:
-# gem 'rails', :git => 'git://github.com/rails/rails.git'
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
-gem 'sqlite3-ruby', :require => 'sqlite3', :group => :development
+gem 'sqlite3'
-gem 'devise'
-group :development do
- gem "rails-erd"
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails', '~> 3.1.4'
+ gem 'coffee-rails', '~> 3.1.1'
+ gem 'uglifier', '>= 1.0.3'
end
-gem "compass", ">= 0.10.6"
+gem 'jquery-rails'
-gem "thin"
+# To use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the web server
# gem 'unicorn'
@@ -24,17 +28,9 @@ gem "thin"
# gem 'capistrano'
# To use debugger
-# gem 'ruby-debug'
-
-# Bundle the extra gems:
-# gem 'bj'
-# gem 'nokogiri'
-# gem 'sqlite3-ruby', :require => 'sqlite3'
-# gem 'aws-s3', :require => 'aws/s3'
-
-# Bundle gems for the local environment. Make sure to
-# put test-only gems in this group so their generators
-# and rake tasks are available in development mode:
-# group :development, :test do
-# gem 'webrat'
-# end
+# gem 'ruby-debug19', :require => 'ruby-debug'
+
+group :test do
+ # Pretty printed test output
+ gem 'turn', :require => false
+end
View
193 Gemfile.lock
@@ -1,97 +1,118 @@
GEM
remote: http://rubygems.org/
specs:
- abstract (1.0.0)
- actionmailer (3.0.0)
- actionpack (= 3.0.0)
- mail (~> 2.2.5)
- actionpack (3.0.0)
- activemodel (= 3.0.0)
- activesupport (= 3.0.0)
- builder (~> 2.1.2)
- erubis (~> 2.6.6)
- i18n (~> 0.4.1)
- rack (~> 1.2.1)
- rack-mount (~> 0.6.12)
- rack-test (~> 0.5.4)
- tzinfo (~> 0.3.23)
- activemodel (3.0.0)
- activesupport (= 3.0.0)
- builder (~> 2.1.2)
- i18n (~> 0.4.1)
- activerecord (3.0.0)
- activemodel (= 3.0.0)
- activesupport (= 3.0.0)
- arel (~> 1.0.0)
- tzinfo (~> 0.3.23)
- activeresource (3.0.0)
- activemodel (= 3.0.0)
- activesupport (= 3.0.0)
- activesupport (3.0.0)
- arel (1.0.1)
- activesupport (~> 3.0.0)
- bcrypt-ruby (2.1.2)
- builder (2.1.2)
- compass (0.10.6)
- haml (>= 3.0.4)
- daemons (1.1.2)
- devise (1.1.3)
- bcrypt-ruby (~> 2.1.2)
- warden (~> 0.10.7)
- erubis (2.6.6)
- abstract (>= 1.0.0)
- eventmachine (0.12.10)
- haml (3.0.25)
- i18n (0.4.1)
- mail (2.2.7)
- activesupport (>= 2.3.6)
- mime-types
- treetop (>= 1.4.5)
- mime-types (1.16)
- polyglot (0.3.1)
- rack (1.2.1)
- rack-mount (0.6.13)
+ actionmailer (3.1.1)
+ actionpack (= 3.1.1)
+ mail (~> 2.3.0)
+ actionpack (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.2)
+ rack-cache (~> 1.1)
+ rack-mount (~> 0.8.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.0.2)
+ activemodel (3.1.1)
+ activesupport (= 3.1.1)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ arel (~> 2.2.1)
+ tzinfo (~> 0.3.29)
+ activeresource (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ activesupport (3.1.1)
+ multi_json (~> 1.0)
+ ansi (1.4.1)
+ arel (2.2.1)
+ builder (3.0.0)
+ coffee-rails (3.1.1)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.1.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.1.3)
+ erubis (2.7.0)
+ execjs (1.2.9)
+ multi_json (~> 1.0)
+ hike (1.2.1)
+ i18n (0.6.0)
+ jquery-rails (1.0.19)
+ railties (~> 3.0)
+ thor (~> 0.14)
+ json (1.6.3)
+ mail (2.3.0)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.17.2)
+ multi_json (1.0.4)
+ polyglot (0.3.3)
+ rack (1.3.5)
+ rack-cache (1.1)
+ rack (>= 0.4)
+ rack-mount (0.8.3)
rack (>= 1.0.0)
- rack-test (0.5.6)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
rack (>= 1.0)
- rails (3.0.0)
- actionmailer (= 3.0.0)
- actionpack (= 3.0.0)
- activerecord (= 3.0.0)
- activeresource (= 3.0.0)
- activesupport (= 3.0.0)
- bundler (~> 1.0.0)
- railties (= 3.0.0)
- rails-erd (0.4.1)
- activerecord (~> 3.0)
- activesupport (~> 3.0)
- ruby-graphviz (~> 0.9.18)
- railties (3.0.0)
- actionpack (= 3.0.0)
- activesupport (= 3.0.0)
- rake (>= 0.8.4)
- thor (~> 0.14.0)
- rake (0.8.7)
- ruby-graphviz (0.9.19)
- sqlite3-ruby (1.3.1)
- thin (1.2.11)
- daemons (>= 1.0.9)
- eventmachine (>= 0.12.6)
- rack (>= 1.0.0)
- thor (0.14.3)
- treetop (1.4.8)
+ rails (3.1.1)
+ actionmailer (= 3.1.1)
+ actionpack (= 3.1.1)
+ activerecord (= 3.1.1)
+ activeresource (= 3.1.1)
+ activesupport (= 3.1.1)
+ bundler (~> 1.0)
+ railties (= 3.1.1)
+ railties (3.1.1)
+ actionpack (= 3.1.1)
+ activesupport (= 3.1.1)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rdoc (3.11)
+ json (~> 1.4)
+ sass (3.1.11)
+ sass-rails (3.1.5)
+ actionpack (~> 3.1.0)
+ railties (~> 3.1.0)
+ sass (~> 3.1.10)
+ tilt (~> 1.3.2)
+ sprockets (2.0.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.5)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.23)
- warden (0.10.7)
- rack (>= 1.0.0)
+ turn (0.8.3)
+ ansi
+ tzinfo (0.3.31)
+ uglifier (1.1.0)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
PLATFORMS
ruby
DEPENDENCIES
- compass (>= 0.10.6)
- devise
- rails (= 3.0.0)
- rails-erd
- sqlite3-ruby
- thin
+ coffee-rails (~> 3.1.1)
+ jquery-rails
+ rails (= 3.1.1)
+ sass-rails (~> 3.1.4)
+ sqlite3
+ turn
+ uglifier (>= 1.0.3)
View
21 README
@@ -91,7 +91,7 @@ mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
class WeblogController < ActionController::Base
def index
- @posts = Post.find(:all)
+ @posts = Post.all
debugger
end
end
@@ -139,7 +139,7 @@ To reload your controllers and models after launching the console run
<tt>reload!</tt>
More information about irb can be found at:
-link:http://www.rubycentral.com/pickaxe/irb.html
+link:http://www.rubycentral.org/pickaxe/irb.html
== dbconsole
@@ -156,8 +156,13 @@ PostgreSQL and SQLite 3.
The default directory structure of a generated Ruby on Rails application:
|-- app
+ | |-- assets
+ | |-- images
+ | |-- javascripts
+ | `-- stylesheets
| |-- controllers
| |-- helpers
+ | |-- mailers
| |-- models
| `-- views
| `-- layouts
@@ -171,11 +176,7 @@ The default directory structure of a generated Ruby on Rails application:
| `-- tasks
|-- log
|-- public
- | |-- images
- | |-- javascripts
- | `-- stylesheets
|-- script
- | `-- performance
|-- test
| |-- fixtures
| |-- functional
@@ -188,11 +189,16 @@ The default directory structure of a generated Ruby on Rails application:
| |-- sessions
| `-- sockets
`-- vendor
+ |-- assets
+ `-- stylesheets
`-- plugins
app
Holds all the code that's specific to this particular application.
+app/assets
+ Contains subdirectories for images, stylesheets, and JavaScript files.
+
app/controllers
Holds controllers that should be named like weblogs_controller.rb for
automated URL mapping. All controllers should descend from
@@ -237,8 +243,7 @@ lib
the load path.
public
- The directory available for the web server. Contains subdirectories for
- images, stylesheets, and javascripts. Also contains the dispatchers and the
+ The directory available for the web server. Also contains the dispatchers and the
default HTML files. This should be set as the DOCUMENT_ROOT of your web
server.
View
2  Rakefile
@@ -1,7 +1,7 @@
+#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
-require 'rake'
Forj::Application.load_tasks
View
0  public/images/rails.png → app/assets/images/rails.png
File renamed without changes
View
9 app/assets/javascripts/application.js
@@ -0,0 +1,9 @@
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
View
7 app/assets/stylesheets/application.css
@@ -0,0 +1,7 @@
+/*
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
+ *= require_self
+ *= require_tree .
+*/
View
50 app/controllers/application_controller.rb
@@ -1,53 +1,3 @@
-# Common functions accessible to controllers and models:
-def create_post thread, post_details
- thread.posts.build(
- :content => post_details[:content],
- :post_index => post_details[:post_index] || 0,
- :reply_index => post_details[:reply_index] || 0,
- :reply_user_id => post_details[:reply_user_id] || 0,
- :user_id => user_signed_in? ? current_user.id : 0
- )
-end
-
-# Returns an hash containing each part of the given date as a number
-def date_to_parts(date)
- {
- :day => date.mday,
- :month => date.month - 1, # JavaScript months start at 0
- :year => date.year,
- :hour => date.to_time.hour,
- :minute => date.to_time.min
- }
-end
-
-def format_date(date)
- date_str = date.strftime(" at %H:%M")
-
- if date.to_date == Date.today
- date_str = "Today" + date_str
- else
- if date.to_date == Date.today.-(1)
- date_str = "Yesterday" + date_str
- else
- date_str = date.to_date.to_s + date_str
- end
- end
-
- if date.to_time > Time.now.-(3600)
- minutes = Time.now.min - date.to_time.min
- minutes += 60 if minutes < 0
- return date_str + " (#{minutes} minute#{minutes == 1 ? "" : "s"} ago)"
-
- elsif date.to_time > Time.now.-(60 * 60 * 24)
- hours = Time.now.hour - date.to_time.hour
- hours += 24 if hours < 0
- return date_str + " (about #{hours} hour#{hours == 1 ? "" : "s"} ago)"
-
- else
- return date_str
- end
-end
-
class ApplicationController < ActionController::Base
protect_from_forgery
end
View
33 app/controllers/folders_controller.rb
@@ -1,33 +0,0 @@
-class FoldersController < ApplicationController
- def create
- folder = Folder.create(
- :name => params[:name]
- )
- folder.save
- redirect_to msg_threads_path
- end
-
- def destroy
- folder = Folder.find(params[:id])
- if current_user.rank < 1
- return render :text => "UNAUTHORISED"
- end
-
- folder.destroy
-
- redirect_to msg_threads_path
- end
-
- def edit
- folder = Folder.find(params[:id])
- if current_user.rank < 1
- return render :text => "UNAUTHORISED"
- end
-
- folder.clearance = params[:clearance]
- folder.name = params[:newname]
- folder.save
-
- render :json => { :name => folder.name, :clearance => folder.clearance }.to_json
- end
-end
View
80 app/controllers/msg_threads_controller.rb
@@ -1,80 +0,0 @@
-def user_clearance
- if user_signed_in?
- current_user.rank
- else
- 0
- end
-end
-
-class MsgThreadsController < ApplicationController
- def index
- result = []
-
- folders = Folder.all(
- :order => "updated_at DESC",
- :include => :msg_threads,
- :conditions => "clearance <= #{user_clearance}")
-
- last_read = user_signed_in? ? current_user.last_read : ""
- # Add each folder, and for each folder, add info for its threads
- folders.each do |folder|
- f = folder.to_h
-
- folder.msg_threads.all(
- :order => "updated_at DESC"
- ).each do |thread|
- f[:threads].push thread.to_h last_read
- end
-
- result.push f
- end
-
- # Add 'Uncategorised' threads. Once FORJ is production-ready this won't
- # be necessary.
- threads = MsgThread.all(
- :conditions => "folder_id = 0",
- :order => "updated_at DESC")
- result.push :name => "Uncategorised", :id => 0, :threads => [],
- :thread_count => threads.length
-
- # Need to make a class variable available because the user_signed_in?
- # and current_user helpers are not accessible from within model methods
- threads.each do |thread|
- result.last[:threads].push thread.to_h last_read
- end
-
- render :json => result.to_json
- end
-
- def create
- folder = Folder.exists?(params[:folder]) ? Folder.find(params[:folder]) : nil
- # Put the new thread in 'Uncategorised' if user does not have
- # sufficient clearance to post in the given folder. This is a security
- # precaution, since on client side the user won't even see folders to
- # which they don't have access, but it prevents access via query
- # string manipulation.
- if folder.nil? or folder.clearance > user_clearance
- thread = MsgThread.create(
- :title => params[:title],
- :folder_id => 0
- )
- else
- thread = folder.msg_threads.build(
- :title => params[:title]
- )
- end
-
- create_post thread, :content => params[:textData]
-
- thread.save
-
- render :json => thread.posts.first.to_h.to_json
- end
-
- def destroy
- thread = MsgThread.find(params[:id])
- thread.destroy
- render :text => ""
- end
-
-end
View
15 app/controllers/pages_controller.rb
@@ -1,15 +0,0 @@
-class PagesController < ApplicationController
- def home
- @title = "Home"
- end
-
- def about
- @title = "About"
- response.headers['Cache-Control'] = 'public, max-age=300'
- end
-
- def test
- @title = "Test Page"
- end
-
-end
View
125 app/controllers/posts_controller.rb
@@ -1,125 +0,0 @@
-class PostsController < ApplicationController
- def create_lots_of_test_posts thread_id
- thread = MsgThread.find(thread_id)
- first_index = thread.posts.last.post_index
- (1...50).each do |i|
- post = thread.posts.build(
- :content => lorem(5 + rand(200)),
- :post_index => first_index + i,
- :user_id => rand(User.all.length) + 1,
- :reply_user_id => rand(User.all.length) + 1,
- :reply_index => rand(first_index + i))
- post.save
- end
- end
-
- def index
- # Assums the presence of a 'thread' parameter in the query string,
- # otherwise it won't load anything.
-
- # It's up to the JS to set appropriate :limit and :offset
- post_array = []
- thread = MsgThread.find(params[:thread])
- thread.posts.all(
- :order => "id",
- :limit => params[:limit],
- :offset => params[:offset],
- :include => [:user, :reply_user]
- ).each do |post|
- post_array.push post.to_h #get_post_info(post)
- end
-
- post_count = params[:offset].to_i + params[:limit].to_i
-
- post_count = thread.posts.length if post_count > thread.posts.length
-
- if user_signed_in?
- current_user.update_last_read thread.id, post_count
- end
-
- result = [
- {
- :posts => post_array,
- :count => thread.posts.length
- },
- thread.to_h
- ]
-
- render :json => result.to_json
- end
-
- def create
- # Testing/debug options
- if params[:textData] == "DOTEST"
- create_lots_of_test_posts params[:thread].to_i
- render :text => "CREATED TEST POSTS"
- elsif params[:textData] == "RESET_LAST_READ"
- reset_last_read
- render :text => "RESET OK"
- else
- thread = MsgThread.find(params[:thread])
-
- create_post thread,
- :content => params[:textData],
- :post_index => thread.posts.last.post_index + 1,
- :reply_index => params[:reply_index].to_i,
- :reply_user_id => params[:reply_user].to_i
- thread.save
-
- render :json => thread.posts.last.to_h.to_json
- end
- end
-
- def show
- post = Post.find(params[:id])
- render :json => post.to_h.to_json
- end
-
- def destroy
- post = Post.find(params[:id])
-
- if post.user.id != current_user.id and current_user.rank < 2
- return render :text => "WRONG_USER"
- end
-
- if post.post_index == 0
- # Destroy thread if first post is deleted
- thread = MsgThread.find(post.msg_thread_id)
- thread.destroy # callback in thread model deletes all thread's posts
- render :json => nil
- else
- # Find post_index of next post, then delete post
- thread_posts = Post.find(:all,
- :conditions => ["msg_thread_id = ?",
- post.msg_thread_id],
- :order => "created_at")
- result = -1
- thread_posts.each_index do |post_index|
- if thread_posts[post_index].id == post.id
- if post_index < (thread_posts.length - 1)
- result = thread_posts[post_index + 1].id
- else
- result = thread_posts[post_index - 1].id
- end
- end
- end
-
- post.destroy
- render :json => result
- end
- end
-
- def edit
- post = Post.find(params[:id])
-
- if post.user.id != current_user.id and current_user.rank < 2
- return render :text => "WRONG_USER"
- end
-
- post.content = params[:textData]
- post.reply_user_id = params[:reply_user].to_i
- post.save
-
- render :json => post.to_h.to_json
- end
-end
View
89 app/controllers/users_controller.rb
@@ -1,89 +0,0 @@
-def reset_last_read
- # Resets the last_read for all users to blank
- User.all.each do |user|
- user.last_read = ""
- user.save
- end
-end
-
-def update_last_read(thread_id, post_count)
- if user_signed_in?
- # Read the user's last_read string, then see if the given thread is
- # mentioned in it. If so, update the post_count for it.
- # The last_read string looks like this:
- # "1:33,2:20,3:50,5:11"
- # The digit before the : is the thread_id, the one after is the number
- # of posts in that thread that the user has seen.
- lr = current_user.last_read || ""
- if lr != ""
- old_count = lr.match /(^|,)#{thread_id}:(\d+)(,|$)/
- last = 0
- last = old_count[2].to_i if old_count
- numposts = MsgThread.find(thread_id).posts.length
-
- return if last >= numposts
-
- if last < post_count and old_count
- new_lr = lr.gsub /(^|,)(#{thread_id}):(\d+)(,|$)/,
- "\\1\\2:#{post_count}\\4"
- else
- new_lr = lr + "," + [thread_id, post_count].join(":")
- end
- else
- new_lr = [thread_id, post_count].join(":")
- end
-
- current_user.last_read = new_lr
- current_user.save
- end
-end
-
-class UsersController < ApplicationController
- # Nothing fancy in here - most actions just return JSON data
- def show
- user = User.find(params[:id].to_i)
- if user_signed_in?
- rank = current_user.rank
- else
- rank = 0
- end
- render :json => user.to_h_full(rank).to_json
- end
-
- def index
- allusers = User.all :order => "name"
-
- result = []
-
- allusers.each do |user|
- result.push user.to_h_basic
- end
- render :json => result.to_json
- end
-
- def edit
- return render :text => "NOT_SIGNED_IN" unless user_signed_in?
- return render :text => "NOT_ADMIN - rank of #{current_user.rank}" if current_user.rank < 2
-
- user = User.find(params[:id])
-
- # Prevent admins from demoting themselves
- return render :text => "SAME_USER" if user.id == current_user.id
-
- user.rank = params[:newrank].to_i
- user.save
- render :text => "UPDATE_OK"
- end
-
- def create
- puts "*************************************************************"
- puts "Creating NEW USER, count:"
- puts User.count
- user = User.count == 1
- if user.id == 1
- user.rank = 3
- user.save
- end
- end
-
-end
View
10 app/helpers/application_helper.rb
@@ -1,12 +1,2 @@
module ApplicationHelper
-
- #Return a default title if none is specified
- def title
- base_title = "FORJ Forum"
- if @title.nil?
- base_title
- else
- "#{@title} - #{base_title}"
- end
- end
end
View
2  app/helpers/folders_helper.rb
@@ -1,2 +0,0 @@
-module FoldersHelper
-end
View
2  app/helpers/msg_threads_helper.rb
@@ -1,2 +0,0 @@
-module MsgThreadsHelper
-end
View
2  app/helpers/pages_helper.rb
@@ -1,2 +0,0 @@
-module PagesHelper
-end
View
2  app/helpers/posts_helper.rb
@@ -1,2 +0,0 @@
-module PostsHelper
-end
View
2  app/helpers/users_helper.rb
@@ -1,2 +0,0 @@
-module UsersHelper
-end
View
0  public/stylesheets/.gitkeep → app/mailers/.gitkeep
File renamed without changes
View
0  app/models/.gitkeep
No changes.
View
21 app/models/folder.rb
@@ -1,21 +0,0 @@
-class Folder < ActiveRecord::Base
- has_many :msg_threads
-
- # Move all of the folder's threads to the 'Uncategorised' folder
- before_destroy do |folder|
- folder.msg_threads.all.each do |thread|
- thread.folder_id = 0;
- thread.save
- end
- end
-
- def to_h
- {
- :name => self.name,
- :id => self.id,
- :clearance => self.clearance,
- :threads => [],
- :thread_count => self.msg_threads.length
- }
- end
-end
View
51 app/models/msg_thread.rb
@@ -1,51 +0,0 @@
-class MsgThread < ActiveRecord::Base
- has_many :posts
- belongs_to :folder
- validates :title, :presence => true
-
- after_create :timestamp_folder
-
- before_destroy do |thread|
- # This does not work, it just sets each of the posts' msg_thread_id to
- # null:
- #thread.posts.delete_all
- Post.delete_all "msg_thread_id = #{thread.id}"
- end
-
- def to_h last_read_s = ""
- # The last read string needs to be passed as a parameter because the
- # Devise current_user helper is not accessible from here (unless I'm
- # doing something wrong)
- f_id = self.folder.nil? ? 0 : self.folder.id
-
- last_read = 0
- if last_read_s
- # Extract the number of posts the user has read in this thread, if
- # possible
- m = last_read_s.match(/(^|,)#{self.id}:(\d+)(,|$)/)
- if m
- last_read = m[2].to_i
- else
- last_read = 0
- end
- end
-
- unread_count = self.posts.length - last_read
- unread_count = 0 if unread_count < 0
-
- { :title => self.title,
- :id => self.id,
- :folder_id => f_id,
- :unread_count => unread_count,
- :post_count => self.posts.length }
- end
-
- private
- # Ensure folder is marked as updated when a new thread is added to it, so
- # folders can be sorted properly
- def timestamp_folder
- unless folder.nil?
- folder.update_attribute(:updated_at, Time.now)
- end
- end
-end
View
34 app/models/post.rb
@@ -1,34 +0,0 @@
-class Post < ActiveRecord::Base
- belongs_to :user
- belongs_to :reply_user, :class_name => "User"
- belongs_to :msg_thread
-
- after_create :timestamp_thread
- after_save :timestamp_thread
-
- def to_h
- {
- :from => self.user.nil? ?
- nil : self.user.to_h_basic,
- :to_index => self.reply_index,
- :to_user => self.reply_user.nil? ?
- nil : self.reply_user.to_h_basic,
- :date => date_to_parts(self.created_at),
- :post_index => self.post_index,
- :body => self.content,
- :thread => self.msg_thread_id,
- :id => self.id
- }
- end
-
- private
- # Ensure folder is marked as updated when a new thread is added to it, so
- # folders can be sorted properly
- def timestamp_thread
- msg_thread.update_attribute(:updated_at, Time.now)
- f = msg_thread.folder
- unless f.nil?
- f.update_attribute(:updated_at, Time.now)
- end
- end
-end
View
89 app/models/user.rb
@@ -1,89 +0,0 @@
-class User < ActiveRecord::Base
- # Include default devise modules. Others available are:
- # :token_authenticatable, :confirmable, :lockable and :timeoutable
- devise :database_authenticatable, :registerable,
- :recoverable, :rememberable, :trackable, :validatable
-
-
- # Setup accessible (or protected) attributes for your model
- attr_accessible :name, :sig, :email, :password, :password_confirmation,
- :remember_me
-
- has_many :posts
- validates :email,
- :presence => true,
- :uniqueness => { :case_sensitive => false }
- validates :name,
- :presence => true,
- :uniqueness => { :case_sensitive => false }
-
- after_create :maybe_admin
-
- def update_last_read(thread_id, post_count)
- # Read the user's last_read string, then see if the given thread is
- # mentioned in it. If so, update the post_count for it.
- # The last_read string looks like this:
- # "1:33,2:20,3:50,5:11"
- # The digit before the : is the thread_id, the one after is the number
- # of posts in that thread that the user has seen.
- lr = self.last_read || ""
- if lr != ""
- old_count = lr.match /(^|,)#{thread_id}:(\d+)(,|$)/
- last = 0
- last = old_count[2].to_i if old_count
- numposts = MsgThread.find(thread_id).posts.length
-
- return if last >= numposts
-
- if last < post_count and old_count
- new_lr = lr.gsub /(^|,)(#{thread_id}):(\d+)(,|$)/,
- "\\1\\2:#{post_count}\\4"
- else
- new_lr = lr + "," + [thread_id, post_count].join(":")
- end
- else
- new_lr = [thread_id, post_count].join(":")
- end
-
- self.last_read = new_lr
- self.save
- end
-
- def to_h_basic
- {
- :name => self.name,
- :sig => self.sig,
- :id => self.id
- }
- end
-
- def to_h_full user_rank = 0
- # The supplied user_rank should normally be the currently signed in
- # user's rank, which is inaccessible from within this method
- result = self.to_h_basic
- result.merge!(
- :last_login => format_date(self.last_sign_in_at),
- :rank => self.rank)
-
- # Display more information if the supplied rank is high enough
- if user_rank > 0
- result.merge!({
- :email => self.email,
- :id => self.id
- })
- end
- return result
- end
-
- private
- def maybe_admin
- # If this is the only user, make it an administrator
- if User.count == 1
- self.rank = 3
- self.save
- else # Otherwise make it a normal user
- self.rank = 1
- self.save
- end
- end
-end
View
257 app/stylesheets/_colors.scss
@@ -1,257 +0,0 @@
-/*
- * There are 3 main colours: the header/footer, the threads and posts, and the
- * 'accent' colour, used for things like the logo, signin links and loading
- * message.
- */
-
-
-/* This is the colour of the header and footer. */
-.clr1 {
- background-color: $bg1;
- border-color: $bo1;
- color: #333;
-}
-
-/* This is the colour of the threads pane and individual posts. */
-.clr2, .folder_list_item, input[type="text"], input[type="password"], textarea {
- border-color: $bo2;
-}
-.clr2 {
- background-color: $bg2;
-}
-
-/* Items in thread lists that are not the current thread and don't have the
- * mouse cursor over them still have a border, but it's the same colour as the
- * background. This is to prevent the layout jumping around if we just add a
- * border to something in the list.
- *
- * NOTE: this needs to come before .current_thread in order for that rule to
- * take precedence when setting border colour.
- */
-.thread_list_item {
- border-color: $bg2;
- border-color: rgba(0, 0, 0, 0);
- background-image: inline-image('/icon_nonewposts.png');
-}
-.has_unread {
- background-image: inline-image("/icon_newposts.png");
-}
-.pinned {
- background-image: inline-image("/icon_newposts_pinned.png");
-}
-.has_unread.pinned {
- background-image: inline-image("/icon_nonewposts_pinned.png");
-}
-
-/* This is the accent colour. Static page elements can have the "clr3" class
- * added to them, but for dynamic elements it's easier to just include their
- * class specifically in the selector here.
- */
-.clr3, .loading_msg, .current_thread, .post_preview {
- background-color: $accentBg;
- border-color: $accentBo;
-}
-
-.loading_msg {
- background-image: inline-image("/loading_blue.gif");
- -moz-box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
- -webkit-box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
- box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
- border-width: 1px;
-}
-
-.btn-icon-reload {
- background-image: inline-image("/ui-icon-reload.png") !important;
- background-position: right bottom;
-}
-
-.posts_nav .ui-icon {
- background-position: right 60%;
-}
-
-#btnFirstPosts, #btnLastPosts {
- width: 10em;
-}
-
-#btnPrevPosts, #btnNextPosts {
- width: 15em;
-}
-
-.btn-icon-firstposts { background-image: inline-image("/ui-icon-first_posts.png") !important;
-}
-
-.btn-icon-prevposts { background-image: inline-image("/ui-icon-prev_posts.png") !important;
-}
-
-.btn-icon-nextposts { background-image: inline-image("/ui-icon-next_posts.png") !important;
-}
-
-.btn-icon-lastposts { background-image: inline-image("/ui-icon-last_posts.png") !important;
-}
-
-.folder_name {
- background-image: inline-image('/icon_contract.png');
- border-color: $bg2 * 0.9;
-}
-
-.folder_name:hover {
- background-color: $folderHover;
-}
-
-.folder_contracted {
- background-image: inline-image('/icon_expand.png');
-}
-
-.folder_settings {
- background-image: inline-image("/icon_settings_1.png");
-}
-
-.folder_settings:hover {
- background-image: inline-image("/icon_settings_2.png");
-}
-
-/* Common grey border colour */
-.post_body, .post_sig, pre {
- border-color: #CCC;
-}
-
-.thread_list_item:hover {
- background-color: #F8F8F8;
- border-color: $linkHover;
-}
-
-.thread_list_item:hover a {
- color: $linkHover;
-}
-
-/* Inline <code> elements look better with a slightly lighter border */
-code {
- border-color: #DDD;
-}
-
-pre, code {
- background-color: #EEE;
-}
-
-/* This is needed to prevent each line of code being clipped by the one below
- * it if the line-height property is too low. */
-pre code {
- background: none;
-}
-
-.item_count {
- color: $itemCount; /* Similar to .clr2 border colour, but a bit darker */
-}
-
-#threadspane {
- border-width: 1px;
- border-radius: 0 5px 5px 0;
- background: -webkit-linear-gradient(right, #F5F5F5 0%, #EEE 100%);
- background: -moz-linear-gradient(right, #F5F5F5 0%, #EEE 100%);
- background: linear-gradient(right, #F5F5F5 0%, #EEE 100%);
- -webkit-box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
- -moz-box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
- box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
-}
-
-#postspane:before {
- content: "";
- position: fixed;
- top: 5.5em;
- left: 29em;
- right: 16px;
- height: 10px;
- background: -moz-linear-gradient(top, $bodyBg 0%, rgba(237, 240, 242, 0) 100%);
- background: -webkit-linear-gradient(top, $bodyBg 0%, rgba(237, 240, 242, 0) 100%);
- background: linear-gradient(top, $bodyBg 0%, rgba(237, 240, 242, 0) 100%);
- z-index: 4;
-}
-
-#postspane:after {
- content: "";
- position: fixed;
- height: 1em;
- bottom: 4.2em;
- left: 29em;
- right: 16px;
- background: -moz-linear-gradient(bottom, $bodyBg 0%, rgba(237, 240, 242, 0) 100%);
- background: -webkit-linear-gradient(bottom, $bodyBg 0%, rgba(237, 240, 242, 0) 100%);
- background: linear-gradient(bottom, $bodyBg 0%, rgba(237, 240, 242, 0) 100%);
- z-index: 4;
-}
-
-.post {
- -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
- -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
- box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
- border-width: 1px;
- border-radius: 5px;
- overflow: hidden;
-}
-
-.post_head, .post_foot {
- background-color: $bg2;
-}
-
-.post_head {
- background: -webkit-linear-gradient(top, #F5F5F5 0%, #E0E0E0 100%);
- background: -moz-linear-gradient(top, #F5F5F5 0%, #E0E0E0 100%);
- background: linear-gradient(top, #F5F5F5 0%, #E0E0E0 100%);
- border-radius: 6px 6px 0 0;
-}
-
-.post_body, .post_sig {
- background-color: #FFF;
-}
-
-.post_foot {
- background: -webkit-linear-gradient(top, #F5F5F5 0%, #EEE 100%);
- background: -moz-linear-gradient(top, #F5F5F5 0%, #EEE 100%);
- background: linear-gradient(top, #F5F5F5 0%, #EEE 100%);
- border-top: 1px solid #E0E0E0;
- border-radius: 0 0 6px 6px;
-}
-
-/* Colour of the dummy text shown when a user is editing their sig */
-del, .sig_body_preview {
- color: #AAA;
-}
-
-/* Shown when the wrong password is entered on signup (and similar
- * errors), and when the a post is longer than the max length (9001 by
- * default). */
-.field_with_errors {
- color: #F00;
-}
-
-/* Element styles
- * ============== */
-
-body, html {
- background-color: $bodyBg;
-}
-
-blockquote {
- background-color: $quoteBg;
- border-color: $quoteBo; /* same as .clr1 background-color */
-}
-
-.post {
- color: #333;
-}
-
-a {
- color: $linkColor;
-}
-
-a:hover {
- color: $linkHover;
-}
-
-hr {
- border-color: #CCC #F8F8F8;
-}
-
-//blockquote hr {
- //border-color: #EC4 #FEA;
-//}
View
127 app/stylesheets/_colours_sea.scss
@@ -1,127 +0,0 @@
-/*
- * There are 3 main colours: the header/footer, the threads and posts, and the
- * 'accent' colour, used for things like the logo, signin links and loading
- * message.
- * #F4F7ED - bleached sand
- * #FEA - wet sand
- * #EBEBCC - underwater sand
- * #A3C8D9 tropical blue
-
- * #F4F7ED - pale yellow (page bg)
- * #FEA - mid yellow (header/footer bg)
- * #CFD9BA - dark yellow
- *
- * #FEC - pale orange (threads/posts bg)
- * #FC5 - mid orange
- * #D86 - red-orange (post counts etc.)
- *
- * #A3C8D9 - pale blue (accent colour bg)
- * #ACD - mid pastel blue
- * #157 - dark blue (links)
- * #4AC - mid blue-green (link mouseover)
- */
-
-/* This is the colour of the header and footer. */
-.clr1, html {
- background-color: #CFD9BA;
- border-color: #B6BFA4;
- color: #000;
-}
-
-/* This is the colour of the threads pane and individual posts. */
-.clr2, .folder_list_item, input[type="text"], input[type="password"], textarea {
- border-color: #C9C9AF;
-}
-.clr2 {
- background-color: #EBEBCC;
-}
-
-/* Items in thread lists that are not the current thread and don't have the
- * mouse cursor over them still have a border, but it's the same colour as the
- * background. This is to prevent the layout jumping around if we just add a
- * border to something in the list.
- *
- * NOTE: this needs to come before .current_thread in order for that rule to
- * take precedence when setting border colour.
- */
-.thread_list_item {
- border-color: #EBEBCC;
- background-image: url('/images/icon_nonewposts.png');
-}
-
-/* This is the accent colour. Static page elements can have the "clr3" class
- * added to them, but for dynamic elements it's easier to just include their
- * class specifically in the selector here.
- */
-.clr3, .loading_msg, .current_thread, .post_preview {
- background-color: #A3C8D9;
- border-color: #244C5E;
-}
-
-.loading_msg {
- background-image: url("/images/loading_blue.gif");
-}
-
-.folder_name {
- background-image: url('/images/icon_contract.gif');
-}
-
-.folder_contracted {
- background-image: url('/images/icon_expand.gif');
-}
-
-/* Common grey border colour */
-.thread_list_item:hover, .post_body, .post_sig, pre {
- border-color: #CCC;
-}
-
-.thread_list_item:hover, pre, code {
- background-color: #EEE;
-}
-
-.item_count {
- color: #D86; /* Similar to .clr2 border colour, but a bit darker */
-}
-
-.pinned_thread {
- background-image: url('/images/icon_pin.png');
-}
-
-.post_body, .post_sig {
- background-color: #FFF;
-}
-
-/* Colour of the dummy text shown when a user is editing their sig */
-del, .sig_body_preview {
- color: #AAA;
-}
-
-/* Shown when the wrong password is entered on signup (and similar
- * errors), and when the a post is longer than the max length (9001 by
- * default). */
-.field_with_errors {
- color: #F00;
-}
-
-/* Element styles
- * ============== */
-
-body, blockquote {
- border-color: #CFD9BA; /* same as .clr1 background-color */
-}
-
-body {
- background-color: #F4F7ED;
-}
-
-blockquote {
- background-color: #FFE;
-}
-
-a, .thread_list_item a:hover {
- color: #157;
-}
-
-a:hover {
- color: #4AC;
-}
View
33 app/stylesheets/_emotes.scss
@@ -1,33 +0,0 @@
-.emote {
- display: inline-block;
- width: 12px;
- height: 12px;
- margin-top: 1px;
- margin-bottom: -1px;
- background-image: url("/images/emotes.png");
-}
-
-.emote span {
- display: none;
-}
-
-.emote.fail { background-position: 0px 0px }
-.emote.tache { background-position: -12px 0px }
-.emote.cool { background-position: -24px 0px }
-.emote.rolleyes { background-position: -36px 0px }
-.emote.blank { background-position: -48px 0px }
-.emote.unsure { background-position: 0px -12px; }
-.emote.erm { background-position: -12px -12px; }
-.emote.grumpy { background-position: -24px -12px; }
-.emote.yuck { background-position: -36px -12px; }
-.emote.joytear { background-position: -48px -12px; }
-.emote.gasp { background-position: 0px -24px; }
-.emote.sad { background-position: -12px -24px; }
-.emote.unamused { background-position: -24px -24px; }
-.emote.cry { background-position: -36px -24px; }
-.emote.angry { background-position: -48px -24px; }
-.emote.joy { background-position: 0px -36px; }
-.emote.smile { background-position: -12px -36px; }
-.emote.wink { background-position: -24px -36px; }
-.emote.tongue { background-position: -36px -36px; }
-.emote.shame { background-position: -48px -36px; }
View
24 app/stylesheets/_jquery-ui-selectmenu.scss
@@ -1,24 +0,0 @@
-/* Selectmenu
-----------------------------------*/
-.ui-selectmenu { display: block; position:relative; height:1.5em; text-decoration: none; overflow:hidden; vertical-align: middle;}
-.ui-selectmenu-icon { position:absolute; right:6px; margin-top:-8px; top: 50%; }
-.ui-selectmenu-menu { padding:0; margin:0; list-style:none; position:absolute; top: 0; visibility: hidden; overflow: auto; z-index: 5; }
-.ui-selectmenu-open { visibility: visible; }
-.ui-selectmenu-menu-popup { margin-top: -1px; }
-.ui-selectmenu-menu-dropdown { }
-.ui-selectmenu-menu li { padding:0; margin:0; display: block; border-top: 1px dotted transparent; border-bottom: 1px dotted transparent; border-right-width: 0 !important; border-left-width: 0 !important; font-weight: normal !important; }
-.ui-selectmenu-menu li a,.ui-selectmenu-status {line-height: 1em; display:block; padding: 0.25em 1em .3em 1em; outline:none; text-decoration:none; }
-.ui-selectmenu-menu li.ui-selectmenu-hasIcon a,
-.ui-selectmenu-hasIcon .ui-selectmenu-status { padding-left: 20px; position: relative; margin-left: 5px; }
-.ui-selectmenu-menu li .ui-icon, .ui-selectmenu-status .ui-icon { position: absolute; top: 1em; margin-top: -8px; left: 0; }
-/*.ui-selectmenu-status { line-height: 1.4em; }*/
-.ui-selectmenu-open li.ui-selectmenu-item-focus a { }
-.ui-selectmenu-open li.ui-selectmenu-item-selected { }
-.ui-selectmenu-menu li span,.ui-selectmenu-status span { display:block; margin-bottom: .2em; }
-.ui-selectmenu-menu li .ui-selectmenu-item-header { font-weight: bold; }
-.ui-selectmenu-menu li .ui-selectmenu-item-content { }
-.ui-selectmenu-menu li .ui-selectmenu-item-footer { opacity: .8; }
-/*for optgroups*/
-.ui-selectmenu-menu .ui-selectmenu-group { font-size: 1em; }
-.ui-selectmenu-menu .ui-selectmenu-group .ui-selectmenu-group-label { line-height: 1.4em; display:block; padding:.6em .5em 0; font-weight: bold; }
-.ui-selectmenu-menu .ui-selectmenu-group ul { margin: 0; padding: 0; }
View
619 app/stylesheets/_jquery-ui.scss
@@ -1,619 +0,0 @@
-/*
- * jQuery UI CSS Framework 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- */
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden {
- display: none;
-}
-
-.ui-helper-hidden-accessible {
- position: absolute;
- left: -99999999px;
-}
-
-.ui-helper-reset {
- margin: 0;
- padding: 0;
- border: 0;
- outline: 0;
- line-height: 1.3;
- text-decoration: none;
- font-size: 100%;
- list-style: none;
-}
-
-.ui-helper-clearfix:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}
-
-.ui-helper-clearfix {
- display: inline-block;
-}
-
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix {
- height:1%;
-}
-
-.ui-helper-clearfix {
- display:block;
-}
-
-/* end clearfix */
-.ui-helper-zfix {
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- position: absolute;
- opacity: 0;
- filter:Alpha(Opacity=0);
-}
-
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled {
- cursor: default !important;
-}
-
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon {
- display: block;
- text-indent: -99999px;
- overflow: hidden;
- background-repeat: no-repeat;
-}
-
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
-}
-
-
-
-/*
- * jQuery UI CSS Framework 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- *
- */
-
-
-/* Component containers
-----------------------------------*/
-.ui-widget {
- font-size: 100%;
-}
-
-.ui-widget .ui-widget {
- font-size: 1em;
-}
-
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
- font-size: 1em;
-}
-
-.ui-widget-content {
- border: 1px solid $bo2;
- background-color: $bg2;
- color: #333;
-}
-
-.ui-widget-content a {
- color: #222222;
-}
-
-.ui-widget-header {
- border: 1px solid $accentBo;
- background-color: $accentBg;
- color: #333;
- font-weight: bold;
-}
-
-.ui-widget-header a {
- color: #333;
-}
-
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header
-.ui-state-default {
- border: 1px solid #cccccc;
- background: #FFF;
- font-weight: normal;
- color: $accentBo;
-}
-
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited {
- color: $accentBo;
- text-decoration: none;
-}
-
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {
- border: 1px solid #aaccdd;
- background: #ddeeff url(images/ui-bg_highlight-hard_75_ddeeff_1x100.png) 50% 50% repeat-x;
- font-weight: normal;
- color: $accentBo;
-}
-
-.ui-state-hover a, .ui-state-hover a:hover {
- color: $accentBo;
- text-decoration: none;
-}
-
-.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
- border: 1px solid #aaccdd;
- background: #ddeeff;
- font-weight: normal;
- color: #212121;
-}
-
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {
- color: #212121;
- text-decoration: none;
-}
-
-.ui-widget :active {
- outline: none;
-}
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #ffcc55;
- background: #ffeecc url(images/ui-bg_glass_55_ffeecc_1x400.png) 50% 50% repeat-x;
- color: #363636;
-}
-
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a {
- color: #363636;
-}
-
-.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a;
- background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
- color: #cd0a0a;
-}
-
-.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a {
- color: #cd0a0a;
-}
-
-.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text {
- color: #cd0a0a;
-}
-
-.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary {
- font-weight: bold;
-}
-
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary {
- opacity: .7;
- filter:Alpha(Opacity=70);
- font-weight: normal;
-}
-
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled {
- opacity: .35;
- filter:Alpha(Opacity=35);
- background-image: none;
-}
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon {
- width: 16px;
- height: 16px;
- background-image: url(images/ui-icons_222222_256x240.png);
-}
-
-.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png);
-}
-
-.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png);
-}
-
-.ui-state-default .ui-icon {
- background-image: url(images/ui-icons_888888_256x240.png);
-}
-
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png);
-}
-
-.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png);
-}
-
-.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png);
-}
-
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png);
-}
-
-
-/* positioning */
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-// See _unused-icons.scss for other position info
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-tl {
- -moz-border-radius-topleft: 2px;
- -webkit-border-top-left-radius: 2px;
- border-top-left-radius: 2px;
-}
-
-.ui-corner-tr {
- -moz-border-radius-topright: 2px;
- -webkit-border-top-right-radius: 2px;
- border-top-right-radius: 2px;
-}
-
-.ui-corner-bl {
- -moz-border-radius-bottomleft: 2px;
- -webkit-border-bottom-left-radius: 2px;
- border-bottom-left-radius: 2px;
-}
-
-.ui-corner-br {
- -moz-border-radius-bottomright: 2px;
- -webkit-border-bottom-right-radius: 2px;
- border-bottom-right-radius: 2px;
-}
-
-.ui-corner-top {
- -moz-border-radius-topleft: 2px;
- -webkit-border-top-left-radius: 2px;
- border-top-left-radius: 2px;
- -moz-border-radius-topright: 2px;
- -webkit-border-top-right-radius: 2px;
- border-top-right-radius: 2px;
-}
-
-.ui-corner-bottom {
- -moz-border-radius-bottomleft: 2px;
- -webkit-border-bottom-left-radius: 2px;
- border-bottom-left-radius: 2px;
- -moz-border-radius-bottomright: 2px;
- -webkit-border-bottom-right-radius: 2px;
- border-bottom-right-radius: 2px;
-}
-
-.ui-corner-right {
- -moz-border-radius-topright: 2px;
- -webkit-border-top-right-radius: 2px;
- border-top-right-radius: 2px;
- -moz-border-radius-bottomright: 2px;
- -webkit-border-bottom-right-radius: 2px;
- border-bottom-right-radius: 2px;
-}
-
-.ui-corner-left {
- -moz-border-radius-topleft: 2px;
- -webkit-border-top-left-radius: 2px;
- border-top-left-radius: 2px;
- -moz-border-radius-bottomleft: 2px;
- -webkit-border-bottom-left-radius: 2px;
- border-bottom-left-radius: 2px;
-}
-
-.ui-corner-all {
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
- border-radius: 2px;
-}
-
-
-/* Overlays */
-.ui-widget-overlay {
- background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
- opacity: .30;
- filter:Alpha(Opacity=30);
-}
-
-.ui-widget-shadow {
- margin: 8px 0 0 8px;
- padding: 1px;
- background: #aaaaaa url(images/ui-bg_flat_50_aaaaaa_40x100.png) 50% 50% repeat-x;
- opacity: .30;
- filter:Alpha(Opacity=30);
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
- border-radius: 2px;
-}
-/*
- * jQuery UI Button 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Button#theming
- */
-.ui-button {
- display: inline-block;
- position: relative;
- padding: 0;
- margin-right: .1em;
- text-decoration: none !important;
- cursor: pointer;
- text-align: center;
- zoom: 1;
- overflow: visible;
-}
- /* the overflow property removes extra width in IE */
-.ui-button-icon-only {
- width: 2.2em;
-}
- /* to make room for the icon, a width needs to be set here */
-button.ui-button-icon-only {
- width: 2.4em;
-}
- /* button elements seem to need a little more width */
-.ui-button-icons-only {
- width: 3.4em;
-}
-
-button.ui-button-icons-only {
- width: 3.7em;
-}
-
-
-/*button text element */
-.ui-button .ui-button-text {
- display: block;
- line-height: 1.4;
-
-}
-
-.ui-button-text-only .ui-button-text {
- padding: .4em 1em;
-}
-
-.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text {
- padding: .4em;
- text-indent: -9999999px;
-}
-
-.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text {
- padding: .4em 1em .4em 2.1em;
-}
-
-.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text {
- padding: .4em 2.1em .4em 1em;
-}
-
-.ui-button-text-icons .ui-button-text {
- padding-left: 2.1em;
- padding-right: 2.1em;
-}
-
-/* no icon support for input elements, provide padding by default */
-input.ui-button {
- padding: .4em 1em;
-}
-
-
-/*button icon element(s) */
-.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon {
- position: absolute;
- top: 50%;
- margin-top: -8px;
-}
-
-.ui-button-icon-only .ui-icon {
- left: 50%;
- margin-left: -8px;
-}
-
-.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary {
- left: .5em;
-}
-
-.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary {
- right: .5em;
-}
-
-.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary {
- right: .5em;
-}
-
-
-/*button sets*/
-.ui-buttonset {
- margin-right: 7px;
-}
-
-.ui-buttonset .ui-button {
- margin-left: 0;
- margin-right: -.3em;
-}
-
-
-/* workarounds */
-button.ui-button::-moz-focus-inner {
- border: 0;
- padding: 0;
-}
- /* reset extra padding in Firefox */
-/*
- * jQuery UI Dialog 1.8.6
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Dialog#theming
- */
-.ui-dialog {
- position: absolute;
- padding: .2em;
- width: 300px;
- overflow: hidden;
- border-width: 2px}
-
-.ui-dialog .ui-dialog-titlebar {
- padding: .5em 1em .3em;
- position: relative;
-
-}
-
-.ui-dialog .ui-dialog-title {
- float: left;
- margin: .1em 16px .2em 0;
-}
-
-.ui-dialog .ui-dialog-titlebar-close {
- position: absolute;
- right: .3em;
- top: 50%;
- width: 19px;
- margin: -10px 0 0 0;
- padding: 1px;
- height: 18px;
-}
-
-.ui-dialog .ui-dialog-titlebar-close span {
- display: block;
- margin: 1px;
-}
-
-.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus {
- padding: 0;
-}
-
-.ui-dialog .ui-dialog-content {
- position: relative;
- border: 0;
- padding: .5em 1em;
- background: none;
- overflow: auto;
- zoom: 1;
-}
-
-.ui-dialog .ui-dialog-buttonpane {
- text-align: left;
- border-width: