From e4bf35a1b824891869ae71b15a4e2ce8aa434d9a Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 23 Feb 2016 15:22:44 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=95=99=E8=A8=80?= =?UTF-8?q?=E7=9A=84=E5=9B=9E=E5=A4=8D=E4=B8=8D=E8=83=BD=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/words_controller.rb | 7 ++++++- app/views/users/_user_journalsformessage.html.erb | 2 +- app/views/words/create_reply.js.erb | 4 ++-- app/views/words/destroy.js.erb | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 351be4e64..d1aa67483 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -74,9 +74,10 @@ class WordsController < ApplicationController # render 'test/index' # } format.js { + #@reply_type = params[:reply_type] @user_activity_id = params[:user_activity_id] @activity = JournalsForMessage.find(parent_id) - @is_activity = params[:is_activity] + @is_activity = params[:is_activity] if params[:is_activity] } end @@ -98,6 +99,10 @@ class WordsController < ApplicationController @user_activity_id = params[:user_activity_id] if params[:user_activity_id] @is_activity = params[:is_activity].to_i if params[:is_activity] @activity = @journal_destroyed.parent if @journal_destroyed.parent + unless @activity + redirect_to feedback_path(@user) + return + end elsif @journal_destroyed.jour_type == 'HomeworkCommon' @homework = HomeworkCommon.find @journal_destroyed.jour_id if params[:user_activity_id] diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb index 4b2fcb486..f49a65262 100644 --- a/app/views/users/_user_journalsformessage.html.erb +++ b/app/views/users/_user_journalsformessage.html.erb @@ -47,7 +47,7 @@
  • <%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => activity, :user_id => activity.user,:user_activity_id => user_activity_id,:is_activity=>is_activity}, - :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', + :confirm => l(:text_are_you_sure), :method => 'delete', :class => "postOptionLink", :title => l(:button_delete)) %>
  • diff --git a/app/views/words/create_reply.js.erb b/app/views/words/create_reply.js.erb index a5c572049..ded05887f 100644 --- a/app/views/words/create_reply.js.erb +++ b/app/views/words/create_reply.js.erb @@ -1,11 +1,11 @@ <% if @save_succ %> <% if @user_activity_id %> - <% if @reply_type == 'user' %> + <% if @is_activity %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id,:is_activity=>@is_activity}) %>"); <% else %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>"); <% end %> - #init_activity_KindEditor_data('<%= @user_activity_id%>', "", "87%", "UserActivity"); + //init_activity_KindEditor_data('<%#= @user_activity_id%>', "", "87%", "UserActivity"); sd_create_editor_from_data('<%= @user_activity_id%>', "", "100%", "UserActivity"); <% else %> <% if !@jfm.nil? && @jfm.jour_type == 'Principal' %> diff --git a/app/views/words/destroy.js.erb b/app/views/words/destroy.js.erb index 819936f9f..a2d606e76 100644 --- a/app/views/words/destroy.js.erb +++ b/app/views/words/destroy.js.erb @@ -4,7 +4,8 @@ <% if @is_user%> <% if @activity %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id,:is_activity=>@is_activity}) %>"); - init_activity_KindEditor_data('<%= @user_activity_id%>', "", "87%", "UserActivity"); + //init_activity_KindEditor_data('<%#= @user_activity_id%>', "", "87%", "UserActivity"); + sd_create_editor_from_data('<%= @user_activity_id%>', "", "100%", "UserActivity"); <% else %> $("#user_activity_<%= @user_activity_id%>").hide(); <% end %> From 87f5f9c380b57052c00fc989eb9258b5accdea4b Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 23 Feb 2016 15:26:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=9B=BE=E7=89=87=E6=8E=92=E7=89=88=EF=BC=8C?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=85=B3=E8=81=94=E7=BB=84=E7=BB=87=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/settings/_join_org.html.erb | 4 ++-- app/views/layouts/new_base_user.html.erb | 1 + public/stylesheets/org.css | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/courses/settings/_join_org.html.erb b/app/views/courses/settings/_join_org.html.erb index fff0f807c..f7b4d7551 100644 --- a/app/views/courses/settings/_join_org.html.erb +++ b/app/views/courses/settings/_join_org.html.erb @@ -15,8 +15,8 @@
    - 关联 - 取消 + 关联 + 取消 <% end %>
    diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 7c4b4fad4..731162920 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -272,6 +272,7 @@

    预览

    <%= image_tag(url_to_avatar(@user), :style=>"width:96px;height:96px;",:class=>"mb5 mt10",:nhname=>'avatar_image') %> +
    96px*96px
    <%= image_tag(url_to_avatar(@user), :style=>"width:48px;height:48px;",:class=>"mb5",:nhname=>'avatar_image') %> diff --git a/public/stylesheets/org.css b/public/stylesheets/org.css index 06c8022c6..aa2d0be18 100644 --- a/public/stylesheets/org.css +++ b/public/stylesheets/org.css @@ -40,6 +40,8 @@ a.org_member_btn{ padding:1px 5px; background:#15bccf; color:#fff;} .searchOrg {height:24px; width:200px; color:#9b9b9b; border:1px solid #15bccf;} a.cancelBtn {padding:3px 5px; background-color:#D9D9D9; color:#656565;} a.cancelBtn:hover {background-color:#717171; color:#ffffff;} +a.org-cancel-btn {padding:3px 5px; background-color:#D9D9D9; color:#656565;} +a.org-cancel-btn:hover {background-color:#717171; color:#ffffff;} .relatedList ul li {border-bottom:1px solid #e4e4e4; width:320px; height:22px; vertical-align:middle; line-height:22px;} .relatedListName {width:240px; text-align:left; max-width:240px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;} .relatedListOption {width:80px; text-align:center;} From c6d203d18676ae3a77afdcd4efb1e9f0acd25d0d Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 23 Feb 2016 15:51:33 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BD=8E=E7=89=88=E6=9C=AC=E7=9A=84?= =?UTF-8?q?=E8=B0=B7=E6=AD=8C=E6=B5=8F=E8=A7=88=E5=99=A8=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index ef0c2eb16..2c8387349 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -252,6 +252,7 @@ class CoursesService def edit_course(params,course,current_user) course.send(:safe_attributes=, params[:course], current_user) #course.safe_attributes = params[:course] + course.password = params[:course][:password] course.time = params[:time] course.term = params[:term] course.end_time = params[:end_time]