Permalink
Browse files

Now can work as a Rails Engine.

  • Loading branch information...
1 parent ce88a6d commit cdb42fabcfe3b0644a05dc9c81bdbf11bfe85bba @huacnlee huacnlee committed Apr 17, 2012
Showing with 320 additions and 8,592 deletions.
  1. +8 −18 README.markdown
  2. +0 −14 app/assets/javascripts/application.js
  3. +4 −1 app/assets/javascripts/{topics.coffee → homeland.coffee}
  4. +0 −8,316 app/assets/javascripts/jquery.js
  5. +82 −0 app/assets/stylesheets/homeland.scss
  6. +11 −10 app/controllers/homeland/application_controller.rb
  7. +2 −1 app/controllers/homeland/replies_controller.rb
  8. +3 −13 app/controllers/homeland/topics_controller.rb
  9. +12 −0 app/helpers/homeland/application_helper.rb
  10. +0 −9 app/helpers/homeland/topics_helper.rb
  11. +4 −35 app/models/homeland/node.rb
  12. +7 −13 app/models/homeland/reply.rb
  13. +1 −1 app/models/homeland/section.rb
  14. +14 −67 app/models/homeland/topic.rb
  15. +0 −1 app/views/homeland/replies/edit.html.erb
  16. +3 −3 app/views/homeland/topics/_sidebar.html.erb
  17. +26 −0 app/views/homeland/topics/_topic.html.erb
  18. +4 −52 app/views/homeland/topics/index.html.erb
  19. +8 −11 app/views/homeland/topics/show.html.erb
  20. +2 −0 config/routes.rb
  21. +8 −0 lib/generators/homeland/install/templates/initializer.rb
  22. 0 {app/assets → lib/generators/homeland/install/templates}/javascripts/jquery.hotkeys.js
  23. 0 {app/assets → lib/generators/homeland/install/templates}/javascripts/jquery.timeago.js
  24. +32 −0 lib/generators/homeland/install_generator.rb
  25. +23 −0 lib/generators/homeland/views_generator.rb
  26. +1 −2 lib/homeland.rb
  27. +32 −0 lib/homeland/engine.rb
  28. +0 −23 lib/homeland/rails.rb
  29. +33 −2 lib/homeland/setting.rb
  30. 0 lib/tasks/.gitkeep
View
@@ -3,28 +3,18 @@ Support for Twitter, Facebook, Google, Github account login.
## Install
- * You need install *Ruby 1.9.2*, *Rubygems* and *Rails 3.1* first.
- * Install *Redis*, *MongoDb*
+ * You need install *Ruby 1.9.2*, *Rubygems* and *Rails 3.1* and *Mongoid* first.
Install thought this commands:
```
- cp config/config.yml.default config/config.yml
- cp config/mongoid.yml.default config/mongoid.yml
- cp config/redis.yml.default config/redis.yml
- bundle install
- bundle update rails
- rake assets:precompile
- rails s
- ```
-
-## Try it first.
-
-[Demo App](http://put.im)
+ rails g homeland:install
+ ``
-## Contributors
+## Generate views to custom
-* [Jason Lee](http://github.com/huacnlee)
-* [Qiu Yun](http://github.com/qiuyun8m)
+ ```
+ rails g homeland:views
+ ```
-Thanks [Twitter Bootstrap](http://twitter.github.com/bootstrap) and [V2EX](http://v2ex.com)
+Thanks [V2EX](http://v2ex.com) forum idea.
@@ -1,14 +0,0 @@
-//= require jquery
-//= require jquery_ujs
-//= require bootstrap-alerts
-//= require bootstrap-dropdown
-//= require bootstrap-twipsy
-//= require jquery.jdialog
-//= require jquery.timeago
-//= require jquery.hotkeys
-//= require_self
-$(document).ready(function() {
- $("abbr.timeago").timeago();
- $(".alert-message").alert();
- $("a[rel=twipsy]").twipsy({ live: true });
-});
@@ -1,3 +1,6 @@
+#= require jquery.hotkeys
+#= require jquery.timeago
+#= require_self
# TopicsController 下所有页面的 JS 功能
window.Topics =
# 往话题编辑器里面插入图片代码
@@ -38,8 +41,8 @@ window.Topics =
# Page.ready
$(document).ready ->
+ $("abbr.timeago").timeago()
$("textarea").bind "keydown","ctrl+return",(el) ->
if $(el.target).val().trim().length > 0
$("#reply form").submit()
- return false
Oops, something went wrong.

0 comments on commit cdb42fa

Please sign in to comment.