Permalink
Browse files

merge

  • Loading branch information...
2 parents 9beef1b + 7cda366 commit c473a7522102e3043d251064f08b13e691bf69c8 @xdite committed Jan 4, 2012
Showing with 2,114 additions and 188 deletions.
  1. +2 −0 .gitignore
  2. +10 −7 Gemfile
  3. +63 −45 Gemfile.lock
  4. +3 −0 app/assets/javascripts/topics.coffee
  5. +98 −0 app/assets/stylesheets/mobile.scss
  6. +6 −1 app/assets/stylesheets/search.scss
  7. +6 −6 app/assets/stylesheets/sprites/{share_icons.scss.erb → share_icons.scss}
  8. +40 −0 app/assets/stylesheets/sprites/small.scss
  9. +0 −40 app/assets/stylesheets/sprites/small.scss.erb
  10. +19 −3 app/controllers/search_controller.rb
  11. +2 −2 app/controllers/topics_controller.rb
  12. +10 −27 app/helpers/application_helper.rb
  13. +5 −0 app/helpers/search_helper.rb
  14. +1 −1 app/helpers/topics_helper.rb
  15. +14 −0 app/models/mongoid/base_model.rb
  16. +8 −0 app/models/page.rb
  17. +46 −0 app/models/sunspot/mongoid.rb
  18. +12 −0 app/models/topic.rb
  19. +5 −1 app/views/common/_feeds.html.erb
  20. +1 −0 app/views/common/_user_nav.html.erb
  21. +1 −1 app/views/cpanel/comments/index.html.erb
  22. +1 −1 app/views/cpanel/page_versions/index.html.erb
  23. +1 −1 app/views/cpanel/pages/index.html.erb
  24. +1 −1 app/views/cpanel/photos/index.html.erb
  25. +1 −1 app/views/cpanel/posts/index.html.erb
  26. +1 −1 app/views/cpanel/replies/index.html.erb
  27. +1 −1 app/views/cpanel/topics/index.html.erb
  28. +1 −1 app/views/cpanel/users/index.html.erb
  29. +11 −3 app/views/layouts/application.html.erb
  30. +1 −1 app/views/notes/index.html.erb
  31. +1 −1 app/views/notifications/index.html.erb
  32. +1 −1 app/views/posts/index.html.erb
  33. +1 −0 app/views/search/_menu.html.erb
  34. +8 −0 app/views/search/_page.html.erb
  35. +8 −0 app/views/search/_topic.html.erb
  36. +0 −11 app/views/search/_topics_pane.html.erb
  37. +9 −6 app/views/search/index.html.erb
  38. +20 −0 app/views/search/wiki.html.erb
  39. +1 −1 app/views/topics/_form.html.erb
  40. +1 −1 app/views/topics/index.html.erb
  41. +2 −7 app/views/topics/show.html.erb
  42. +1 −1 app/views/users/likes.html.erb
  43. +1 −1 app/views/users/location.html.erb
  44. +1 −1 app/views/users/show.html.erb
  45. +1 −0 config/application.rb
  46. +3 −2 config/environments/production.rb
  47. +7 −0 config/initializers/devise.rb
  48. +1 −8 config/initializers/will_paginate.rb
  49. +1 −0 config/locales/menu.en.yml
  50. +1 −0 config/locales/menu.zh-CN.yml
  51. +1 −0 config/locales/menu.zh-TW.yml
  52. +5 −0 config/locales/will_paginate.en.yml
  53. +5 −0 config/locales/will_paginate.zh-CN.yml
  54. +5 −0 config/locales/will_paginate.zh-TW.yml
  55. +1 −0 config/mongoid.yml.default
  56. +17 −0 config/sunspot.yml
  57. +17 −0 lib/segment.rb
  58. +2 −2 lib/tasks/assets/resprite.rake
  59. +31 −0 solr/conf/admin-extra.html
  60. +36 −0 solr/conf/elevate.xml
  61. +246 −0 solr/conf/mapping-ISOLatin1Accent.txt
  62. +21 −0 solr/conf/protwords.txt
  63. +238 −0 solr/conf/schema.xml
  64. +24 −0 solr/conf/scripts.conf
  65. +934 −0 solr/conf/solrconfig.xml
  66. +2 −0 solr/conf/spellings.txt
  67. +58 −0 solr/conf/stopwords.txt
  68. +31 −0 solr/conf/synonyms.txt
View
@@ -23,3 +23,5 @@ public/topics/**/*
.rvmrc
vendor/ruby
doc/wiki_repo
+solr/data/
+solr/pids/
View
17 Gemfile
@@ -1,9 +1,8 @@
-source 'http://rubygems.org'
+source 'http://ruby.taobao.org'
-gem "rails", "3.1.1"
-gem "bson", "1.3.1"
-gem "bson_ext", "1.3.1"
-gem "mongoid", "2.2.4"
+gem "rails", "3.1.3"
+gem "bson_ext", "1.5.2"
+gem "mongoid", "2.3.4"
# 上传组件
gem 'carrierwave', '0.5.6'
@@ -13,12 +12,13 @@ gem 'mini_magick','3.3'
# Mongoid 辅助插件
gem 'mongo-rails-instrumentation','0.2.4'
# Mongoid 使用自增整形ID
-gem 'mongoid_auto_increment_id', "0.2.2"
+gem 'mongoid_auto_increment_id', "0.3.1"
# 用户系统
gem 'devise', '1.5.2'
# 分页
-gem 'will_paginate', '3.0.pre2'
+gem 'will_paginate', '3.0.2'
+gem 'bootstrap-will_paginate', '0.0.3'
# 三方平台 OAuth 验证登陆
gem "omniauth"
@@ -62,8 +62,11 @@ gem "unicorn"
gem "sprite-factory", "1.4.1"
# Simple form last commit: 2011-12-03
gem 'simple_form', :git => "git://github.com/plataformatec/simple_form.git"
+
gem 'anjlab-bootstrap-rails', :git => "git://github.com/anjlab/bootstrap-rails.git", :require => "bootstrap-rails"
gem 'bootstrap_helper', :git => "git://github.com/xdite/bootstrap_helper.git"
+gem 'sunspot_rails', "~> 1.3.0"
+gem 'sunspot_solr'
group :assets do
gem 'sass-rails', " ~> 3.1.4"
View
@@ -39,35 +39,35 @@ GIT
thor (~> 0.14)
GEM
- remote: http://rubygems.org/
+ remote: http://ruby.taobao.org/
specs:
- actionmailer (3.1.1)
- actionpack (= 3.1.1)
+ actionmailer (3.1.3)
+ actionpack (= 3.1.3)
mail (~> 2.3.0)
- actionpack (3.1.1)
- activemodel (= 3.1.1)
- activesupport (= 3.1.1)
+ actionpack (3.1.3)
+ activemodel (= 3.1.3)
+ activesupport (= 3.1.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
- rack (~> 1.3.2)
+ rack (~> 1.3.5)
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)
+ sprockets (~> 2.0.3)
+ activemodel (3.1.3)
+ activesupport (= 3.1.3)
builder (~> 3.0.0)
i18n (~> 0.6)
- activerecord (3.1.1)
- activemodel (= 3.1.1)
- activesupport (= 3.1.1)
+ activerecord (3.1.3)
+ activemodel (= 3.1.3)
+ activesupport (= 3.1.3)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
- activeresource (3.1.1)
- activemodel (= 3.1.1)
- activesupport (= 3.1.1)
- activesupport (3.1.1)
+ activeresource (3.1.3)
+ activemodel (= 3.1.3)
+ activesupport (= 3.1.3)
+ activesupport (3.1.3)
multi_json (~> 1.0)
addressable (2.2.6)
arel (2.2.1)
@@ -78,8 +78,11 @@ GEM
xml-simple
bcrypt-ruby (3.0.1)
blankslate (2.1.2.4)
- bson (1.3.1)
- bson_ext (1.3.1)
+ bootstrap-will_paginate (0.0.3)
+ will_paginate
+ bson (1.5.2)
+ bson_ext (1.5.2)
+ bson (= 1.5.2)
builder (3.0.0)
cancan (1.6.7)
capistrano (2.9.0)
@@ -113,6 +116,7 @@ GEM
warden (~> 1.1)
diff-lcs (1.1.3)
erubis (2.7.0)
+ escape (0.0.4)
execjs (1.2.9)
multi_json (~> 1.0)
factory_girl (2.3.2)
@@ -133,7 +137,7 @@ GEM
jquery-rails (1.0.16)
railties (~> 3.0)
thor (~> 0.14)
- json (1.6.3)
+ json (1.6.4)
kgio (2.6.0)
mail (2.3.0)
i18n (>= 0.4.0)
@@ -143,15 +147,15 @@ GEM
mime-types (1.17.2)
mini_magick (3.3)
subexec (~> 0.1.0)
- mongo (1.3.1)
- bson (>= 1.3.1)
+ mongo (1.5.2)
+ bson (= 1.5.2)
mongo-rails-instrumentation (0.2.4)
- mongoid (2.2.4)
- activemodel (~> 3.0)
+ mongoid (2.3.4)
+ activemodel (~> 3.1)
mongo (~> 1.3)
tzinfo (~> 0.3.22)
- mongoid_auto_increment_id (0.2.2)
- mongoid (~> 2.2.0)
+ mongoid_auto_increment_id (0.3.1)
+ mongoid (~> 2.3.0)
multi_json (1.0.4)
multipart-post (1.1.4)
net-scp (1.0.4)
@@ -185,9 +189,10 @@ GEM
omniauth-oauth (~> 1.0)
orm_adapter (0.0.5)
polyglot (0.3.3)
+ pr_geohash (1.0.0)
pygments.rb (0.2.4)
rubypython (~> 0.5.3)
- rack (1.3.5)
+ rack (1.3.6)
rack-cache (1.1)
rack (>= 0.4)
rack-mount (0.8.3)
@@ -201,28 +206,28 @@ GEM
rack
rack-test (0.6.1)
rack (>= 1.0)
- rails (3.1.1)
- actionmailer (= 3.1.1)
- actionpack (= 3.1.1)
- activerecord (= 3.1.1)
- activeresource (= 3.1.1)
- activesupport (= 3.1.1)
+ rails (3.1.3)
+ actionmailer (= 3.1.3)
+ actionpack (= 3.1.3)
+ activerecord (= 3.1.3)
+ activeresource (= 3.1.3)
+ activesupport (= 3.1.3)
bundler (~> 1.0)
- railties (= 3.1.1)
+ railties (= 3.1.3)
rails-i18n (0.1.8)
i18n (~> 0.5)
rails_autolink (1.0.4)
rails (>= 3.1.0)
- railties (3.1.1)
- actionpack (= 3.1.1)
- activesupport (= 3.1.1)
+ railties (3.1.3)
+ actionpack (= 3.1.3)
+ activesupport (= 3.1.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
raindrops (0.8.0)
rake (0.9.2.2)
- rdoc (3.11)
+ rdoc (3.12)
json (~> 1.4)
redcarpet (2.0.0)
redis (2.2.2)
@@ -244,6 +249,8 @@ GEM
actionmailer (>= 3.0.0)
resque (>= 1.2.3)
rmmseg-cpp-huacnlee (0.2.8)
+ rsolr (1.0.6)
+ builder (>= 2.1.2)
rspec (2.7.0)
rspec-core (~> 2.7.0)
rspec-expectations (~> 2.7.0)
@@ -278,6 +285,15 @@ GEM
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
subexec (0.1.0)
+ sunspot (1.3.0)
+ escape (~> 0.0.4)
+ pr_geohash (~> 1.0)
+ rsolr (~> 1.0.6)
+ sunspot_rails (1.3.0)
+ nokogiri
+ sunspot (= 1.3.0)
+ sunspot_solr (1.3.0)
+ escape (~> 0.0.4)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
@@ -295,7 +311,7 @@ GEM
rack (>= 1.0.0)
warden (1.1.0)
rack (>= 1.0)
- will_paginate (3.0.pre2)
+ will_paginate (3.0.2)
xml-simple (1.1.1)
PLATFORMS
@@ -304,9 +320,9 @@ PLATFORMS
DEPENDENCIES
anjlab-bootstrap-rails!
aws-ses (~> 0.4.3)
+ bootstrap-will_paginate (= 0.0.3)
bootstrap_helper!
- bson (= 1.3.1)
- bson_ext (= 1.3.1)
+ bson_ext (= 1.5.2)
cancan
capistrano (= 2.9.0)
carrierwave (= 0.5.6)
@@ -325,16 +341,16 @@ DEPENDENCIES
memcache-client (= 1.8.5)
mini_magick (= 3.3)
mongo-rails-instrumentation (= 0.2.4)
- mongoid (= 2.2.4)
- mongoid_auto_increment_id (= 0.2.2)
+ mongoid (= 2.3.4)
+ mongoid_auto_increment_id (= 0.3.1)
nokogiri (= 1.5.0)
omniauth
omniauth-douban!
omniauth-github
omniauth-openid
omniauth-twitter
pygments.rb
- rails (= 3.1.1)
+ rails (= 3.1.3)
rails-i18n (= 0.1.8)
rails_autolink (>= 1.0.4)
redcarpet (~> 2.0.0)
@@ -349,6 +365,8 @@ DEPENDENCIES
settingslogic (~> 2.0.6)
simple_form!
sprite-factory (= 1.4.1)
+ sunspot_rails (~> 1.3.0)
+ sunspot_solr
uglifier
unicorn
- will_paginate (= 3.0.pre2)
+ will_paginate (= 3.0.2)
@@ -88,6 +88,9 @@ $(document).ready ->
$("textarea").autogrow()
+ $("#new_reply").submit () ->
+ $('#btn_reply').button('loading')
+
Topics.hookPreview($(".editor_toolbar"), $(".topic_editor"))
return
@@ -0,0 +1,98 @@
+body {
+
+}
+.topbar h3 a, .topbar .brand{
+ display:none;
+}
+.topbar input { display:none; }
+.container { width:auto; margin:0 10px; }
+.container-fluid { width:auto; min-width:0; }
+.sidebar { display:none; }
+.container-fluid > .content {
+ margin:0;
+}
+.topbar div > ul, .nav {
+ margin:0;
+ li {
+ a { padding: 10px 6px 11px; }
+ }
+}
+.breadcrumb { margin-right:95px;}
+.feed_link {
+ margin-top:-49px;
+ margin-right:0;
+ a {color:#B70000;}
+}
+#reply.form {
+ textarea { width: 98%; height: 80px; }
+ .submit_buttons {
+ float:none; margin-top:8px;
+ .help-inline { display:none; }
+ }
+ .helpblock { display:none; }
+ #preview { width: 98%; padding:0; }
+}
+textarea.long { width: 98%; height: 80px; }
+.help-block { display:none; }
+.editor_toolbar {
+ width:100%;
+ .pull-right { display:none; }
+}
+form {
+ margin-bottom: 0px;
+
+ fieldset {
+ margin-bottom: 18px;
+ padding-top: 18px;
+ legend {
+ display: block;
+ padding-left: 0px;
+ font-size:16px;
+ line-height: 1;
+ color: #404040;
+ }
+ }
+ label {
+ padding-top: 6px;
+ font-size: 13px;
+ line-height: 18px;
+ float:none;
+ width:auto;
+ display:block;
+ text-align:left;
+ color: #404040;
+ }
+ .input {
+ margin-left: 0px;
+ }
+ .clearfix { margin-bottom:8px; }
+ .actions {
+ padding:0; padding-top:10px; background:#FFF; margin-bottom:0;
+ }
+}
+.input-xxlarge, input.xxlarge, textarea.xxlarge, select.xxlarge {
+ width:98%;
+}
+#sections li label {
+ display:block;
+ text-align:left;
+ float:none;
+}
+
+#notifications {
+ blockquote {
+ font-size:12px;
+ border:0;
+ padding:0;
+ }
+ td.last { display:none;}
+}
+.topics .topic .infos { padding-right:40px; }
+.topics .topic .replies { display:inline; width:auto; margin-right:10px; }
+.topics .topic .replies a.count, .topics .topic .replies a.count:visited {
+ margin:0; padding:0px 5px; font-size:10px; font-weight:normal;
+}
+#main .topics .topic h1 { font-size:16px; }
+.topics .body img { max-width:98%; }
+#replies .reply .body img { max-width:98%; }
+.secondary-nav .notifications a .count { padding:4px; }
Oops, something went wrong.

0 comments on commit c473a75

Please sign in to comment.