Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
ouyangxuhua 2016-02-23 16:20:07 +08:00
commit 5c9d8954ec
8 changed files with 17 additions and 7 deletions

View File

@ -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]

View File

@ -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]

View File

@ -15,8 +15,8 @@
<input type="text" name="orgs" class="searchOrg mb5 ml20" placeholder="请输入组织名称" />
<div id="search_orgs_result_list" class="ml20"></div>
<ul id="paginator" class="wlist ml20" style="float:none;"></ul>
<a href="javascript:void(0);" class="saveBtn db fl ml20 mr15 mb5" onclick="course_join_org(<%= @course.id %>);">关联</a>
<a href="javascript:void(0);" class="cancelBtn db fl" onclick="cancel_join_orgs();">取消</a>
<a href="javascript:void(0);" class="saveBtn db fl ml20 mr15 mt5" onclick="course_join_org(<%= @course.id %>);">关联</a>
<a href="javascript:void(0);" class="org-cancel-btn db fl mt5" onclick="cancel_join_orgs();">取消</a>
<% end %>
</div>
<div class="relatedList fr">

View File

@ -272,6 +272,7 @@
<div class="showpicBox">
<p>预览</p>
<%= image_tag(url_to_avatar(@user), :style=>"width:96px;height:96px;",:class=>"mb5 mt10",:nhname=>'avatar_image') %>
<br/>
<span >96px*96px</span> <br />
<div class="mb20"></div>
<%= image_tag(url_to_avatar(@user), :style=>"width:48px;height:48px;",:class=>"mb5",:nhname=>'avatar_image') %>

View File

@ -47,7 +47,7 @@
<li>
<%= 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)) %>
</li>
</ul>

View File

@ -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' %>

View File

@ -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 %>

View File

@ -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;}