<%#= calendar_for('attachment_publish_time')%>
From 97d07134a5458ae918d83625f29e2e69daf34bad Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Tue, 21 Jun 2016 16:20:07 +0800
Subject: [PATCH 005/104] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=BC=A0?=
=?UTF-8?q?=E8=B5=84=E6=BA=90=E5=90=8D=E8=BF=87=E9=95=BF=E9=80=A0=E6=88=90?=
=?UTF-8?q?=E6=BA=A2=E5=87=BA=E6=A1=86=E6=9E=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/files/_resource_detail.html.erb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/views/files/_resource_detail.html.erb b/app/views/files/_resource_detail.html.erb
index 1c4c3a387..28f04b922 100644
--- a/app/views/files/_resource_detail.html.erb
+++ b/app/views/files/_resource_detail.html.erb
@@ -8,11 +8,11 @@
<%# 如果有历史版本则提供历史版本下载 %>
<% if file.attachment_histories.count == 0 %>
- <%= link_to truncate(file.filename,length: file.filename.length, omission: '...'),
+ <%= link_to truncate(file.filename,length: 40, omission: '...'),
download_named_attachment_path(file.id, file.filename),
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %>
<% else %>
- <%= link_to truncate(file.filename,length: file.filename.length, omission: '...'), attachment_history_download_path(file.id),
+ <%= link_to truncate(file.filename,length: 40, omission: '...'), attachment_history_download_path(file.id),
:title => file.filename+"\n"+file.description.to_s,
:class => "linkGrey3 f_14",
:style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;", :remote=>true %>
From ad3626d53a999fddf2b7437e7d66c4296f0175e2 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 27 Jun 2016 15:36:31 +0800
Subject: [PATCH 006/104] =?UTF-8?q?=E5=B0=86=E6=90=9C=E7=B4=A2=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=EF=BC=9A=E2=80=9C=E7=99=BB=E9=99=86=E2=80=9D=E6=94=B9?=
=?UTF-8?q?=E4=B8=BA=E2=80=9C=E7=99=BB=E5=BD=95=E2=80=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/welcome/_search_all_results.html.erb | 2 +-
app/views/welcome/_search_user_results.html.erb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/views/welcome/_search_all_results.html.erb b/app/views/welcome/_search_all_results.html.erb
index a714f53d2..af407c848 100644
--- a/app/views/welcome/_search_all_results.html.erb
+++ b/app/views/welcome/_search_all_results.html.erb
@@ -19,7 +19,7 @@
<%= User.find(item.id).user_extensions && User.find(item.id).user_extensions.brief_introduction.present? ? User.find(item.id).user_extensions.brief_introduction : '这位童鞋很懒,什么也没有留下~'%>
加入时间:<%= format_date( User.find(item.id).created_on)%>
- 最后登陆时间:<%= format_date( User.find(item.id).last_login_on)%>
+ 最后登录时间:<%= format_date( User.find(item.id).last_login_on)%>
<%= User.find(item.id).user_extensions.occupation.present? ? '单位:'+User.find(item.id).user_extensions.occupation : ''%>
diff --git a/app/views/welcome/_search_user_results.html.erb b/app/views/welcome/_search_user_results.html.erb
index d1c8c2393..06a40d021 100644
--- a/app/views/welcome/_search_user_results.html.erb
+++ b/app/views/welcome/_search_user_results.html.erb
@@ -13,7 +13,7 @@
<%= User.find(user.id).user_extensions && User.find(user.id).user_extensions.brief_introduction.present? ? User.find(user.id).user_extensions.brief_introduction : '这位童鞋很懒,什么也没有留下~'%>
加入时间:<%= format_date( User.find(user.id).created_on)%>
- 最后登陆时间:<%= format_date( User.find(user.id).last_login_on)%>
+ 最后登录时间:<%= format_date( User.find(user.id).last_login_on)%>
<%= User.find(user.id).user_extensions.occupation.present? ? '单位:'+User.find(user.id).user_extensions.occupation : ''%>
From 863cdee37c9f26562b62a887fa055be58f72cc90 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Tue, 28 Jun 2016 14:39:43 +0800
Subject: [PATCH 007/104] =?UTF-8?q?=E5=9C=A8=E7=B2=BE=E5=93=81=E8=AF=BE?=
=?UTF-8?q?=E7=A8=8B=E7=9A=84=E5=85=A8=E9=83=A8=E8=AF=BE=E7=A8=8B=E7=95=8C?=
=?UTF-8?q?=E9=9D=A2=E4=B8=8B=E5=A2=9E=E5=8A=A0=E5=85=AC=E5=BC=80=E5=B1=9E?=
=?UTF-8?q?=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/admin/_course_detail_tr.html.erb | 3 +++
app/views/admin/excellent_all_courses.html.erb | 17 ++++++++++-------
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/app/views/admin/_course_detail_tr.html.erb b/app/views/admin/_course_detail_tr.html.erb
index ca15a6696..4de9cb001 100644
--- a/app/views/admin/_course_detail_tr.html.erb
+++ b/app/views/admin/_course_detail_tr.html.erb
@@ -6,6 +6,9 @@
<%= link_to(course.name, course_path(course.id)) %>
+
+ <%= checked_image course.is_public? %>
+ |
<%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
|
diff --git a/app/views/admin/excellent_all_courses.html.erb b/app/views/admin/excellent_all_courses.html.erb
index 86e4556f9..8c7f246fc 100644
--- a/app/views/admin/excellent_all_courses.html.erb
+++ b/app/views/admin/excellent_all_courses.html.erb
@@ -27,28 +27,31 @@
序号
|
-
+ |
课程名
|
-
+ |
+ 公开
+ |
+
主讲老师
|
学生数
|
-
+ |
作业数
|
-
+ |
作品数
|
-
+ |
资源数
|
-
+ |
帖子数
|
-
+ |
<%=link_to '动态数', excellent_all_courses_path(:order=> @order == "desc" ? 'asc' : 'desc') %>
|
From b2b6536a0f85a66c7ca8e3aabf1780155e50a244 Mon Sep 17 00:00:00 2001
From: txz
Date: Tue, 28 Jun 2016 14:48:33 +0800
Subject: [PATCH 008/104] =?UTF-8?q?=E5=BE=AE=E4=BF=A1css=E6=A0=B7=E5=BC=8F?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Gemfile~ | 114 +++++++++++++++++++++++++++++
db/schema.rb | 31 ++++----
public/stylesheets/weui/weixin.css | 13 ++--
3 files changed, 134 insertions(+), 24 deletions(-)
create mode 100644 Gemfile~
diff --git a/Gemfile~ b/Gemfile~
new file mode 100644
index 000000000..334f15853
--- /dev/null
+++ b/Gemfile~
@@ -0,0 +1,114 @@
+source 'https://ruby.taobao.org/'
+
+unless RUBY_PLATFORM =~ /w32/
+ # unix-like only
+ gem 'iconv'
+ gem "rmagick", ">= 2.0.0"
+ gem 'certified'
+end
+
+gem 'net-ssh', '2.9.1'
+gem 'jenkins_api_client'
+gem 'nokogiri'
+
+gem 'wechat',path: 'lib/wechat'
+gem 'grack', path:'lib/grack'
+gem 'gitlab', path: 'lib/gitlab-cli'
+gem 'rest-client'
+gem "mysql2", "= 0.3.18"
+gem 'redis-rails'
+gem 'rubyzip'
+gem 'delayed_job_active_record'#, :group => :production
+gem 'daemons'
+gem 'grape', '~> 0.9.0'
+gem 'grape-entity'
+gem 'rack-cors', :require => 'rack/cors'
+gem 'seems_rateable', '~> 1.0.13'
+gem 'rails', '~> 3.2'
+gem "jquery-rails", "~> 2.0.2"
+gem "i18n", "~> 0.6.0"
+gem 'coderay', '~> 1.1.0'
+gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
+gem "builder", "3.0.0"
+gem 'acts-as-taggable-on', '2.4.1'
+gem 'spreadsheet'
+gem 'ruby-ole'
+gem 'rails_kindeditor',path:'lib/rails_kindeditor'
+gem 'binding_of_caller'
+gem 'chinese_pinyin'
+# gem 'sunspot_rails', '~> 1.3.3'
+# gem 'sunspot_solr'
+# gem 'sunspot'
+# gem 'progress_bar'
+gem 'ansi'
+
+gem 'kaminari'
+gem 'elasticsearch-model'
+gem 'elasticsearch-rails'
+
+
+### profile
+#gem 'oneapm_rpm'
+
+group :development do
+ gem 'grape-swagger'
+ gem 'better_errors', '~> 1.1.0'
+ # gem "query_reviewer"
+ # gem 'rack-mini-profiler', '~> 0.9.3'
+ if RUBY_PLATFORM =~ /w32/
+ gem 'win32console'
+ end
+end
+
+group :development, :test do
+ unless RUBY_PLATFORM =~ /w32/
+ gem 'pry-rails'
+ if RUBY_VERSION >= '2.0.0'
+ gem 'pry-byebug'
+ end
+ gem 'pry-stack_explorer'
+ if RUBY_PLATFORM =~ /darwin/
+ gem 'puma'
+ end
+ end
+
+ gem 'rspec-rails', '~> 3.0'
+ gem 'factory_girl_rails'
+end
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails', '~> 3.2.3'
+ gem 'coffee-rails', '~> 3.2.1'
+
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
+ # gem 'therubyracer', :platforms => :ruby
+
+ gem 'uglifier', '>= 1.0.3'
+end
+
+# Optional gem for LDAP authentication
+group :ldap do
+ gem "net-ldap", "~> 0.3.1"
+end
+
+
+# Optional gem for OpenID authentication
+group :openid do
+ gem "ruby-openid", "~> 2.1.4", :require => "openid"
+ gem "rack-openid"
+end
+
+
+database_file = File.join(File.dirname(__FILE__), "config/database.yml")
+if File.exist?(database_file)
+else
+ warn("Please configure your config/database.yml first")
+end
+
+# Load plugins' Gemfiles
+Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
+ puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
+ instance_eval File.read(file)
+end
diff --git a/db/schema.rb b/db/schema.rb
index 148a6e21b..24c769ac8 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20160624032138) do
+ActiveRecord::Schema.define(:version => 20160624103411) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -1125,23 +1125,6 @@ ActiveRecord::Schema.define(:version => 20160624032138) do
t.integer "viewed_count", :default => 0
end
- create_table "mess", :id => false, :force => true do |t|
- t.string "课程名"
- t.integer "课程ID", :default => 0, :null => false
- t.string "教师姓", :default => "", :null => false
- t.string "教师名", :limit => 30, :default => "", :null => false
- t.string "主贴名", :default => "", :null => false
- t.integer "主贴或回帖ID", :default => 0, :null => false
- t.integer "回帖对应主贴ID"
- t.integer "帖子点赞数"
- t.integer "主贴回复数", :default => 0, :null => false
- t.text "主贴或回帖内容"
- t.datetime "发帖时间", :null => false
- t.integer "发帖或回帖用户ID", :default => 0, :null => false
- t.string "发帖或回帖用户姓", :default => "", :null => false
- t.string "发帖或回帖用户名", :limit => 30, :default => "", :null => false
- end
-
create_table "message_alls", :force => true do |t|
t.integer "user_id"
t.integer "message_id"
@@ -1539,6 +1522,18 @@ ActiveRecord::Schema.define(:version => 20160624032138) do
add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true
add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id"
+ create_table "quality_analyses", :force => true do |t|
+ t.integer "project_id"
+ t.string "author_login"
+ t.string "rep_identifier"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "sonar_version", :default => 0
+ t.string "path"
+ t.string "branch"
+ t.string "language"
+ end
+
create_table "queries", :force => true do |t|
t.integer "project_id"
t.string "name", :default => "", :null => false
diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css
index 3360d81ee..3bbab9b6c 100644
--- a/public/stylesheets/weui/weixin.css
+++ b/public/stylesheets/weui/weixin.css
@@ -4,7 +4,7 @@
/*基本样式*/
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体","Helvetica Neue", Helvetica, Arial, sans-serif;}
body, ul, h1,h2,h3,h4,h5,p,pre,input {padding:0px; margin:0px;}
-body{background-color: #EFEFF4;}
+body{background-color: #efeff4;}
ul li {list-style:none;}
img {max-width:100%;}
blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin-right: 0.4em; border-radius: 4px; font-family: "Microsoft YaHei"; background-size: 100% 100%; margin-top:5px;}
@@ -19,6 +19,7 @@ blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin
.mt5 {margin-top:5px;}
.mt10 {margin-top:10px;}
.mt11 {margin-top:11px;}
+.mt12 {margin-top:12px;}
.mt15 {margin-top:15px;}
.mt30 {margin-top:30px;}
.mt70 {margin-top:70px;}
@@ -44,6 +45,7 @@ blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin
.c-grey5 {color:#aaaaaa;}
.c-grey6 {color:#777777;}
.c-blue {color:#3b94d6;}
+.c-white {color:#ffffff;}
a {color:#707070;}
a.c-grey {color:#707070;}
a.c-grey2 {color:#9a9a9a;}
@@ -73,7 +75,7 @@ a.underline {text-decoration:underline;}
.btn1 {width:100%; height:40px; line-height:40px; vertical-align:middle; text-align:center; color:#fff; display:block; border-radius:5px;}
.bg-blue:not(.btn-disabled):active {background-color:#2780c2;}
.btn-disabled {background-color:#ccc;}
-
+.btn2 {width:145px; height:35px; color:#fff; font-size:15px; line-height:35px; text-align:center; vertical-align:middle; margin:18px auto 20px auto; border-radius:50px; display:block;}
/*tab*/
.tab-wrap {position:relative; line-height:38px; display:flex; font-size:13px; background-color:#fff;}
@@ -87,7 +89,6 @@ a.underline {text-decoration:underline;}
.bottom-tab-wrap a {display:block; flex:1; position:relative;}
.bottom-tab-wrap a:after {content:" "; position:absolute; left:0; top:0; width:1px; height:100%; border-left:1px solid #ccc; color:#707070;}
-
/*动态样式*/
.post-container {width:100%;}
.post-wrapper {width:98%; border-radius:3px; box-shadow:0px 0px 8px rgba(146, 153, 169, 0.5); background-color:#ffffff; margin:10px auto;}
@@ -134,7 +135,7 @@ a.underline {text-decoration:underline;}
.locked_btn_cir {background: url("/images/wechat/locked.png") 0 0 no-repeat; cursor: default;}
/*20150612加入班级样式*/
-.add-class-box {width:80%; max-width:300px; min-width:240px; height:150px; font-size:15px; color:#444; background-color:#fff; margin:0 auto; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); border-radius:5px; margin-top:100px;}
+.add-class-box {position:fixed; width:80%; max-width:300px; min-width:240px; font-size:15px; color:#444; background-color:#fff; margin:0 auto; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); border-radius:5px; top:50%; left:50%; transform: translate(-50%,-50%);}
.add-class-tip {padding-top:20px; padding-bottom:20px;}
.class-number-input {width:80%; max-width:240px; height:28px; border:1px solid #ccc; padding-left:5px; margin:0 auto; display:block;}
.cancel-btn {width:49%; height:37px; line-height:37px; text-align:center; vertical-align:middle; border-top:1px solid #ccc;}
@@ -191,7 +192,7 @@ a.underline {text-decoration:underline;}
.input-box { -webkit-appearance: none; font-size: 16px;width:100%; height:16px; padding: 10px 0px 10px 5px; line-height:16px; border:1px solid #ccc; border-radius:5px;}
.login-op-wrap {height:30px; line-height:30px; vertical-align:middle;}
.login-box{display:inline-block; width:14px; height:14px; line-height:14px; text-align:center; vertical-align:middle; border:1px solid #ccc; background:#fff; border-radius:3px; color:#fff; cursor:pointer;}
-.login-box.checked{background:#63c360;}
+.login-box.checked{background:#63c360; border:1px solid #63c360;}
.login-box.checked:after{content:url(/images/wechat/checked.png);}
.forget-psw-wrap {width:60px; margin:0 auto;}
-.forget-psw {position:fixed; bottom:10px;}
+.forget-psw {position:fixed; bottom:10px;}
\ No newline at end of file
From d8284e45eda042ab58fc669c0a5142da88322e84 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Tue, 28 Jun 2016 15:06:08 +0800
Subject: [PATCH 009/104] =?UTF-8?q?=E5=9C=A8=E8=AF=BE=E7=A8=8B=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E4=B8=8B=E5=A2=9E=E5=8A=A0=E5=8A=A8=E6=80=81=E6=97=B6?=
=?UTF-8?q?=E9=97=B4=E4=B8=80=E6=A0=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/admin/courses.html.erb | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/app/views/admin/courses.html.erb b/app/views/admin/courses.html.erb
index 8e2f146a0..65e442a3e 100644
--- a/app/views/admin/courses.html.erb
+++ b/app/views/admin/courses.html.erb
@@ -25,10 +25,10 @@
序号
|
-
+ |
课程
|
-
+ |
主讲老师
|
@@ -37,9 +37,12 @@
|
<%=l(:field_is_public)%>
|
-
+ |
<%=l(:field_created_on)%>
|
+
+ 动态时间
+ |
@@ -65,6 +68,9 @@
<%= format_date(course.created_at) %>
|
+
+ <%= course.updated_at.strftime('%Y-%m-%d %H:%M:%S') %>
+ |
<% end %>
From 2596231ce7d262c895a393d7865cd69fd0aba6ff Mon Sep 17 00:00:00 2001
From: txz
Date: Wed, 29 Jun 2016 15:44:32 +0800
Subject: [PATCH 010/104] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=96=B0=E5=8A=A8?=
=?UTF-8?q?=E6=80=81=E6=A0=B7=E5=BC=8F=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/weui/weixin.css | 35 ++++++++++++++++++++----------
1 file changed, 24 insertions(+), 11 deletions(-)
diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css
index 3bbab9b6c..5b1c1df95 100644
--- a/public/stylesheets/weui/weixin.css
+++ b/public/stylesheets/weui/weixin.css
@@ -11,7 +11,9 @@ blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin
.text-control {word-break:normal; word-wrap:break-word;}
.f12 {font-size:12px;}
.f13 {font-size:13px;}
+.f14 {font-size:14px;}
.f15 {font-size:15px;}
+.f16 {font-size:16px;}
.fb {font-weight:bold;}
.mt2 {margin-top:2px;}
.mt3 {margin-top:3px;}
@@ -26,6 +28,7 @@ blockquote {border:1px solid #d4d4d4; padding: 0.6em; margin-left: 1.4em; margin
.mb5 {margin-bottom:5px;}
.mb10 {margin-bottom:10px;}
.mb20 {margin-bottom:20px;}
+.ml5 {margin-left:5px;}
.ml10 {margin-left:10px;}
.mr5 {margin-right:5px;}
.mr10 {margin-right:10px;}
@@ -91,15 +94,15 @@ a.underline {text-decoration:underline;}
/*动态样式*/
.post-container {width:100%;}
-.post-wrapper {width:98%; border-radius:3px; box-shadow:0px 0px 8px rgba(146, 153, 169, 0.5); background-color:#ffffff; margin:10px auto;}
-.post-main {padding:10px; color:#9a9a9a;}
-.post-avatar {width:40px; height:40px; margin-right:5px;}
+.post-wrapper {width:100%; background-color:#ffffff; margin:10px auto;}
+.post-main {padding:10px 15px; color:#9a9a9a;}
+.post-avatar {width:30px; height:30px;}
.post-title {font-size:13px; text-align:left;}
.post-detail-info {font-size:13px; text-align:left; color:#9a9a9a;}
.fl {float:left;}
.fr {float:right;}
.cl {clear:both; overflow:hidden;}
-.post-content {width:100%; font-size:13px; line-height:18px; height:90px; overflow:hidden; word-break:break-all; word-wrap:break-word;}
+.post-content {width:100%; font-size:14px; line-height:20px; height:100px; overflow:hidden; word-break:break-all; word-wrap:break-word;}
.post-all-content a {color:#136ec2;}
.post-interactive {width:100%; height:35px; line-height:35px; vertical-align:middle; border-top:1px solid #e6e6e6; background-color:#f8f9fb;}
.post-interactive-column,
@@ -108,23 +111,32 @@ a.underline {text-decoration:underline;}
.more-wrap {width:100%;}
.more-events {width:98%; font-size:13px; text-align:center; margin:0 auto; padding: 5px 0; border:1px solid #e6e6e6; border-radius:3px; background-color:#f8f9fb; }
.border-bottom {border-bottom:1px solid #e6e6e6;}
-.post-reply-wrap, .post-input-wrap {width:100%; background-color:#f8f9fb;}
-.post-reply-row {padding:10px; color:#9a9a9a;}
+.post-reply-wrap {width:100%;}
+.post-input-wrap {width:100%; position:fixed; bottom:0;}
+.post-input-wrap2 {width:100%;}
+.post-reply-row {padding:10px 15px; color:#9a9a9a; background-color:#fff;}
.post-reply-avatar {width:45px; height:30px; text-align:center; margin-right:10px;}
.post-reply-user {font-size:13px; text-align:left; margin-bottom:10px;}
-.post-reply-content {font-size:13px; text-align:left; word-break:break-all; word-wrap:break-word; overflow:hidden;}
+.post-reply-content {font-size:13px; text-align:left; word-break:break-all; word-wrap:break-word; overflow:hidden; padding-bottom:15px; border-bottom:1px solid #ccc;}
.post-reply-content img {max-width:100%;}
.post-reply-date, .post-reply-trigger {font-size:13px;}
-.post-input-container {padding-right:12px;}
+.post-input-container {position:relative; padding-right:70px;}
.copy-input {width:100%; height:28px; line-height:28px; padding:0 5px; vertical-align: middle; font-size:12px; border-radius:3px; position:absolute; left:-9999em;}
-.post-reply-input {width:100%; height:28px; max-height:84px; line-height:28px; vertical-align: middle; font-size:12px; border:1px solid #e6e6e6; outline:none; padding:0 5px; margin:0; border-radius:3px; overflow-y:auto; resize:none;}
-.post-reply-submit {font-size:13px; padding:3px 8px; color:#fff; background-color:#269ac9; outline:none; border:none; display:inline-block;}
+.post-reply-input {width:100%; height:28px; max-height:84px; line-height:28px; vertical-align: middle; font-size:13px; border:1px solid #e6e6e6; outline:none; padding:0 5px; margin:0; border-radius:3px; overflow-y:auto; resize:none; background-color:#f0eff4;}
+.post-reply-submit {position:absolute; font-size:13px; height:30px; line-height:30px; vertical-align:middle; padding:0 8px; color:#fff; background-color:#269ac9; outline:none; border:none; top:0; right:0;}
.reply-icon {background:url(/images/wechat/icon_list.gif) -150px -155px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
.praise-icon {background:url(/images/wechat/icon_list.gif) -36px -88px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
.praised-icon {background:url(/images/wechat/icon_list.gif) -152px -86px no-repeat; width:20px; height:20px; display:inline-block; vertical-align:middle;}
.num-block {display:inline-block; vertical-align:top;}
.post-op-banner {height:20px; line-height:20px; vertical-align:middle;}
+/*20160628动态新样式*/
+.post-dynamic-author {width:50%; height:30px; line-height:30px; font-size:14px; color:#5b5b5b; vertical-align:middle;}
+.post-dynamic-time {height:30px; line-height:30px; vertical-align:middle;}
+.post-dynamic-title {font-size:15px;}
+.post-dynamic-from {width:50%; font-size:13px;}
+.post-box-shadow {box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
+
/* loading 弹框*/
.loading-bg {position:fixed; width:100%; height:100%; left:0; top:0; z-index:99; background:rgba(206, 206, 206, 0.3); overflow:hidden;}
.loading-box {position:absolute; top:50%; background:rgba(240,240,240, 0.5); width:160px; height:72px; left:50%; margin-top:-36px; margin-left:-80px; text-align:center;}
@@ -163,7 +175,8 @@ a.underline {text-decoration:underline;}
.class-detail-tab {width:23%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;}
.class-detail-tab2 {width:32%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;}
.class-detail-tab3 {width:48%; height:38px; line-height:38px; font-size:13px; color:#444; background-color:#fff; float:left; text-align:center; vertical-align:middle; border-bottom:1px solid #ccc;}
-.class-tab-active {border-bottom:1px solid #3b94d6;}
+.class-tab-active {border-bottom:3px solid #3b94d6;}
+.tab-active-arrow {border-width:4px; position:absolute; top:41px; left:50%; transform:translate(-50%,0); border-color:#3b94d6 transparent transparent transparent; border-style:solid dashed dashed dashed;}
.class-search-wrap {padding:8px 12px; position:relative;}
.class-search-inner {padding:0 30px; background-color:#fff;}
.class-search-icon {position:absolute; top:16px; left:16px;}
From 0bb5c8b5fb14c9e852d3b7cf742791569add4a69 Mon Sep 17 00:00:00 2001
From: guange <8863824@gmail.com>
Date: Wed, 29 Jun 2016 21:09:49 +0800
Subject: [PATCH 011/104] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E7=BB=91=E5=AE=9A?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/api/mobile/apis/users.rb | 12 ++++-
app/views/wechats/user_activities.html.erb | 46 ++++++++++----------
public/assets/wechat/reg.html | 3 +-
public/javascripts/wechat/controllers/reg.js | 11 +++--
4 files changed, 43 insertions(+), 29 deletions(-)
diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb
index b5ee14d19..a6536e73e 100644
--- a/app/api/mobile/apis/users.rb
+++ b/app/api/mobile/apis/users.rb
@@ -53,10 +53,20 @@ module Mobile
requires :password, type: String, desc: 'password'
end
post do
+
+ openid = session[:wechat_openid]
+ logger.debug "openid ============== #{openid}"
+ raise "无法获取到openid,请在微信中打开本页面" unless openid
+
+
us = UsersService.new
user = us.register params.merge(:password_confirmation => params[:password],
:should_confirmation_password => true)
- raise "该邮箱已经被注册过了" if user.new_record?
+ raise user.errors.full_messages.first if user.new_record?
+ UserWechat.create!(
+ openid: openid,
+ user: user
+ )
present :data, user, with: Mobile::Entities::User
present :status, 0
diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb
index 1e3957ea9..7b7cb95e5 100644
--- a/app/views/wechats/user_activities.html.erb
+++ b/app/views/wechats/user_activities.html.erb
@@ -28,29 +28,29 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|