Merge branch 'szzh' into develop
This commit is contained in:
commit
c95c021289
|
@ -125,6 +125,7 @@ GEM
|
|||
mocha (1.1.0)
|
||||
metaclass (~> 0.0.1)
|
||||
multi_json (1.10.1)
|
||||
mysql2 (0.3.11)
|
||||
mysql2 (0.3.11-x86-mingw32)
|
||||
net-ldap (0.3.1)
|
||||
nokogiri (1.6.3)
|
||||
|
|
|
@ -312,8 +312,8 @@ class AccountController < ApplicationController
|
|||
else
|
||||
#by young
|
||||
#redirect_back_or_default my_page_path
|
||||
#sredirect_back_or_default User.current
|
||||
redirect_to my_account_url
|
||||
redirect_back_or_default User.current
|
||||
#redirect_to my_account_url
|
||||
#redirect_to User.current
|
||||
end
|
||||
end
|
||||
|
|
|
@ -64,7 +64,7 @@ class AttachmentsController < ApplicationController
|
|||
# modify by nwb
|
||||
# 下载添加权限设置
|
||||
candown = false
|
||||
if (@attachment.container.has_attribute?(:project) || @attachment.container.has_attribute?(:project_id)) && @attachment.container.project
|
||||
if @attachment.container.class.to_s != "HomeworkAttach" &&(@attachment.container.has_attribute?(:project) || @attachment.container.has_attribute?(:project_id)) && @attachment.container.project
|
||||
project = @attachment.container.project
|
||||
candown= User.current.member_of?(project) || (project.is_public && @attachment.is_public == 1)
|
||||
elsif @attachment.container.is_a?(Project)
|
||||
|
@ -89,7 +89,6 @@ class AttachmentsController < ApplicationController
|
|||
elsif @attachment.container_type == "Bid" && @attachment.container && @attachment.container.courses
|
||||
candown = User.current.member_of_course?(@attachment.container.courses.first) || (course.is_public == 1 && @attachment.is_public == 1)
|
||||
else
|
||||
|
||||
candown = @attachment.is_public == 1
|
||||
end
|
||||
if candown || User.current.admin? || User.current.id == @attachment.author_id
|
||||
|
|
|
@ -433,8 +433,8 @@ class HomeworkAttachController < ApplicationController
|
|||
|
||||
#删除留言
|
||||
def destroy_jour
|
||||
|
||||
@homework = HomeworkAttach.find(params[:jour_id])
|
||||
@course=@homework.bid.courses.first
|
||||
@journal_destroyed = JournalsForMessage.find(params[:object_id])
|
||||
@is_comprehensive_evaluation = @journal_destroyed.is_comprehensive_evaluation
|
||||
@journal_destroyed.destroy
|
||||
|
|
|
@ -21,7 +21,13 @@ class ZipdownController < ApplicationController
|
|||
def assort
|
||||
if params[:obj_class] == "Bid"
|
||||
bid = Bid.find params[:obj_id]
|
||||
file_count = 0
|
||||
bid.homeworks.map { |homework| file_count += homework.attachments.count}
|
||||
if file_count > 0
|
||||
zipfile = zip_bid bid
|
||||
else
|
||||
render file: 'public/no_file_found.html'
|
||||
end
|
||||
else
|
||||
logger.error "[ZipDown#assort] ===> #{params[:obj_class]} unKown !!"
|
||||
end
|
||||
|
|
|
@ -54,6 +54,17 @@ module FilesHelper
|
|||
s.html_safe
|
||||
end
|
||||
|
||||
#判断用户是否拥有课程,需用户在该课程中角色为教师
|
||||
def has_course? user
|
||||
result = false
|
||||
user.courses.each do |course|
|
||||
if is_course_teacher(user,course)
|
||||
return true
|
||||
end
|
||||
end
|
||||
result
|
||||
end
|
||||
|
||||
# 判断指定的资源时候符合类型
|
||||
def isTypeOk(attachment, type, contentType)
|
||||
result = false
|
||||
|
|
|
@ -364,7 +364,9 @@ class User < Principal
|
|||
end
|
||||
end
|
||||
end
|
||||
unless user.nil?
|
||||
last_login_on = user.last_login_on.nil? ? '' : user.last_login_on.to_s
|
||||
end
|
||||
user.update_column(:last_login_on, Time.now) if user && !user.new_record?
|
||||
[user, last_login_on]
|
||||
rescue => text
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>开启匿评功能</title>
|
||||
<style>
|
||||
body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
|
||||
body{ font-size:12px; font-family:"微软雅黑","宋体"; background:#fff; font-style:normal;}
|
||||
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,textarea{ margin:0; padding:0;}
|
||||
div,img,tr,td,textarea{ border:0;}
|
||||
table,tr,td{border:0; cellspacing:0; cellpadding:0;}
|
||||
|
@ -19,7 +19,7 @@
|
|||
.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;}
|
||||
.ni_con p{ color:#808181; }
|
||||
.ni_con a:hover{ text-decoration:none;}
|
||||
.ni_btn{ width:190px; margin:15px auto; }
|
||||
.ni_btn{ width:190px; margin:15px auto; line-height:1.9;}
|
||||
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:15px;}
|
||||
a:hover.tijiao{ background:#0f99a9;}
|
||||
.c_blue{ color:#0195bd;}
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
<% when 1 %>
|
||||
<%= link_to '关闭匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true %>
|
||||
<% when 2 %>
|
||||
匿评结束
|
||||
<a href="#" style="background:#8e8e8e;">匿评结束</a>
|
||||
<% end %>
|
||||
</span>
|
||||
<%end%>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
alert('关闭成功');
|
||||
$("#<%= @bid.id %>_anonymous_comment").html('匿评结束');
|
||||
$("#<%= @bid.id %>_anonymous_comment").html('<a href="#" style="background:#8e8e8e;">匿评结束</a>');
|
||||
|
|
|
@ -18,8 +18,9 @@
|
|||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||
<p>
|
||||
<input type="button" onclick="submitProjectBoard();" class = "whiteButton m3p10 h30" value="<%= l(:button_submit)%>">
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;', :class => 'whiteButton m3p10' %></p>
|
||||
<!--<input type="button" onclick="submitProjectBoard();" class = "ButtonColor m3p10" value="<%= l(:button_submit)%>">-->
|
||||
<a herf="#" onclick="submitProjectBoard();" class="ButtonColor m3p10"><%= l(:button_submit)%></a>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;', :class => 'ButtonColor m3p10' %></p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
<% end %>
|
||||
|
|
|
@ -20,8 +20,10 @@
|
|||
<% members.each do |member| %>
|
||||
<% next if member.new_record? %>
|
||||
<tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
|
||||
<td class="<%= member.principal.class.name.downcase %>" style="text-align: center"><%= link_to_user member.principal %></td>
|
||||
<td class="roles" style="text-align: center">
|
||||
<td class="<%= member.principal.class.name.downcase %>">
|
||||
<%= link_to_user member.principal %>
|
||||
</td>
|
||||
<td class="roles">
|
||||
<span id="member-<%= member.id %>-roles">
|
||||
<%= h member.roles.sort.collect(&:to_s).join(', ') %>
|
||||
</span>
|
||||
|
@ -31,9 +33,14 @@
|
|||
) do |f| %>
|
||||
<p>
|
||||
<% roles.each do |role| %>
|
||||
<label><%= radio_button_tag 'membership[role_ids][]', role.id, member.roles.include?(role),
|
||||
:disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %> <%= h role %></label><br/>
|
||||
<% end %></p>
|
||||
<label>
|
||||
<%= radio_button_tag 'membership[role_ids][]', role.id, member.roles.include?(role),
|
||||
:disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %>
|
||||
<%= h role %>
|
||||
</label>
|
||||
<br/>
|
||||
<% end %>
|
||||
</p>
|
||||
<%= hidden_field_tag 'membership[role_ids][]', '' %>
|
||||
<p><%= submit_tag l(:button_change), :class => "small" %>
|
||||
<%= link_to_function l(:button_cancel),
|
||||
|
@ -43,7 +50,9 @@
|
|||
</td>
|
||||
<!--modified by huang for: if the user'roles is Manager that he will can't modified himself-->
|
||||
<% if member.roles.first.to_s == "Manager" %>
|
||||
<td class="buttons"></td>
|
||||
<td class="buttons">
|
||||
|
||||
</td>
|
||||
<% else %>
|
||||
<td class="buttons">
|
||||
<%= link_to_function l(:button_edit),
|
||||
|
@ -61,7 +70,9 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
@ -69,9 +80,14 @@
|
|||
<% if roles.any? %>
|
||||
<%= form_for(@member, {:as => :membership, :url => course_memberships_path(@course), :remote => true, :method => :post}) do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_member_new) %></legend>
|
||||
<legend>
|
||||
<%= l(:label_member_new) %>
|
||||
</legend>
|
||||
|
||||
<p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p>
|
||||
<p>
|
||||
<%= label_tag "principal_search", l(:label_principal_search) %>
|
||||
<%= text_field_tag 'principal_search', nil %>
|
||||
</p>
|
||||
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_course_memberships_path(@course, :format => 'js') }')" %>
|
||||
|
||||
<div id="principals_for_new_member">
|
||||
|
@ -83,13 +99,22 @@
|
|||
<% roles.each do |role| %>
|
||||
|
||||
<% if role.id == 10 %> <!-- 默认学生角色 -->
|
||||
<label><%= radio_button_tag 'membership[role_ids][]', role.id, true %> <%= h role %></label>
|
||||
<label>
|
||||
<%= radio_button_tag 'membership[role_ids][]', role.id, true %>
|
||||
<%= h role %>
|
||||
</label>
|
||||
<% else %>
|
||||
<label><%= radio_button_tag 'membership[role_ids][]', role.id %> <%= h role %></label>
|
||||
<label>
|
||||
<%= radio_button_tag 'membership[role_ids][]', role.id %>
|
||||
<%= h role %>
|
||||
</label>
|
||||
<% end %>
|
||||
<% end %></p>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
|
||||
<p>
|
||||
<%= submit_tag l(:button_add), :id => 'member-add-submit' %>
|
||||
</p>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -31,6 +31,11 @@
|
|||
$('#insite').attr("class", "re_schbtn b_dblue");
|
||||
}
|
||||
}
|
||||
function buttoncss()
|
||||
{
|
||||
$('#incourse').attr("class", "re_schbtn b_lblue");
|
||||
$('#insite').attr("class", "re_schbtn b_lblue");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -39,8 +44,8 @@
|
|||
<div class="re_top">
|
||||
<%= form_tag( search_course_files_path(@course), method: 'get',:class => "re_search f_l",:remote=>true) do %>
|
||||
<%= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%>
|
||||
<%= submit_tag "课内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onclick => "presscss('incourse')"%>
|
||||
<%= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onclick => "presscss('insite')" %>
|
||||
<%= submit_tag "课内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onmouseover => "presscss('incourse')",:onmouseout =>"buttoncss()" %>
|
||||
<%= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %>
|
||||
<% end %>
|
||||
<% if is_course_teacher(User.current,@course) %>
|
||||
<a href="javascript:void(0)" class="re_fabu f_r b_lblue" onclick="show_upload()">上传资源</a>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||
<% if User.current.logged? %>
|
||||
<% if is_course_teacher(User.current,@course) && file.author_id == User.current.id %>
|
||||
<%= link_to "选入我的其他课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true %>
|
||||
<%= link_to("选入我的其他课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true) if has_course?(User.current) %>
|
||||
|
||||
<% if delete_allowed && file.container_id == @course.id && file.container_type == "Course" %>
|
||||
<span id="is_public_<%= file.id %>">
|
||||
|
@ -31,7 +31,7 @@
|
|||
<!-- <#%= link_to (file.is_public? ? "公开":"私有"),"javascript:void(0)",:class=>"f_l re_open" %> -->
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to "选入我的课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true %>
|
||||
<%= link_to("选入我的课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true) if has_course?(User.current) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% end %>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
</span>
|
||||
</li>
|
||||
<li class="c_red" style="margin:25px 0 0 20px;"> 您还没交作业,请创建作业!</li>
|
||||
<% if @bid.comment_status == 0 || @bid.comment_status == 1%>
|
||||
<% if @bid.comment_status == 0 || @bid.open_anonymous_evaluation == 0%>
|
||||
<!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 -->
|
||||
<li class="wping">
|
||||
<%= link_to "提交作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<span style="float:left">
|
||||
<%= l(:label_work_rating) %>:
|
||||
</span>
|
||||
<%= render :partial => 'show_score', locals: {:stars => get_homework_score(jour.user,@homework ) } %>
|
||||
<%= render :partial => 'homework_attach/show_score', locals: {:stars => get_homework_score(jour.user,@homework ) } %>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => jour,:show_name=> show_name } %>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => jour,:show_name=> show_name, :show_real_name => true } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,23 +1,19 @@
|
|||
//教师评论
|
||||
<% if @add_jour.is_comprehensive_evaluation == 1 %>
|
||||
//$('#comprehensive_evaluation').html('<#%= escape_javascript(render(:partial => 'comprehensive_evaluation',
|
||||
//:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework,:teaher_score => @teaher_score} )) %>');
|
||||
HoverLi(4);
|
||||
$('#jour_count_4').html('<%= @comprehensive_evaluation.count %>')
|
||||
$('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @comprehensive_evaluation,:show_score => true,:show_name => true,:is_jour => false})) %>')
|
||||
$('#jour_count_4').html('<%= @comprehensive_evaluation.count %>');
|
||||
$('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @comprehensive_evaluation,:show_score => true,:show_name => true,:is_jour => false})) %>');
|
||||
//匿评
|
||||
<% elsif @add_jour.is_comprehensive_evaluation == 2 %>
|
||||
// $('#message').html('<#%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false,:homework => @homework} )) %>');
|
||||
// $('#pre_show').html('<#%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
||||
$('#add_jour').html('<%= escape_javascript(render(:partial => 'addjour', :locals => {:homework_attach => @homework, :sta => 0, :is_comprehensive_evaluation => @is_comprehensive_evaluation})) %>')
|
||||
$('#add_jour').html('<%= escape_javascript(render(:partial => 'addjour', :locals => {:homework_attach => @homework, :sta => 0, :is_comprehensive_evaluation => @is_comprehensive_evaluation})) %>');
|
||||
HoverLi(5);
|
||||
$('#jour_count_5').html('<%= @anonymous_comments.count %>')
|
||||
$('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @anonymous_comments,:show_score => true,:show_name => false,:is_jour => false})) %>')
|
||||
$('#jour_count_5').html('<%= @anonymous_comments.count %>');
|
||||
$('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @anonymous_comments,:show_score => true,:show_name => false,:is_jour => false})) %>');
|
||||
//留言
|
||||
<% else %>
|
||||
HoverLi(3);
|
||||
$('#jour_count_3').html('<%= @jours.count %>')
|
||||
$('#tbc_03').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jour,:show_score => false,:show_name => true,:is_jour => true})) %>')
|
||||
$('#jour_count_3').html('<%= @jours.count %>');
|
||||
$('#tbc_03').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jour,:show_score => false,:show_name => true,:is_jour => true})) %>');
|
||||
<% end %>
|
||||
$('#new_form_user_message').val("");
|
||||
$('#new_form_reference_user_id').val("");
|
|
@ -1,24 +1,19 @@
|
|||
<% if @journal_destroyed.nil? %>
|
||||
alert('<%=l(:notice_failed_delete)%>');
|
||||
<% else %>
|
||||
//教师评论
|
||||
<% if @is_comprehensive_evaluation == 1 %>
|
||||
//$('#comprehensive_evaluation').html('<#%= escape_javascript(render(:partial => 'comprehensive_evaluation',
|
||||
//:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework,:teaher_score => @teaher_score} )) %>');
|
||||
HoverLi(4);
|
||||
$('#jour_count_4').html('<%= @comprehensive_evaluation.count %>')
|
||||
$('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @comprehensive_evaluation,:show_score => true,:show_name => true,:is_jour => false})) %>')
|
||||
//匿评
|
||||
<% elsif @is_comprehensive_evaluation == 2 %>
|
||||
// $('#message').html('<#%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false,:homework => @homework} )) %>');
|
||||
// $('#pre_show').html('<#%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
||||
HoverLi(5);
|
||||
$('#jour_count_5').html('<%= @anonymous_comments.count %>')
|
||||
$('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @anonymous_comments,:show_score => true,:show_name => false,:is_jour => false})) %>')
|
||||
//留言
|
||||
<% else %>
|
||||
HoverLi(3);
|
||||
$('#jour_count_3').html('<%= @jours.count %>')
|
||||
$('#tbc_03').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jour,:show_score => false,:show_name => true,:is_jour => true})) %>')
|
||||
<% end %>
|
||||
<% if @is_comprehensive_evaluation == 1 %>
|
||||
HoverLi(4);
|
||||
$('#jour_count_4').html('<%= @comprehensive_evaluation.count %>');
|
||||
$('#tbc_04').html('<%= escape_javascript(render(:partial => "homework_attach/jour",:locals => {:jours => @comprehensive_evaluation,:show_score => true,:show_name => true,:is_jour => false})) %>');
|
||||
//匿评
|
||||
<% elsif @is_comprehensive_evaluation == 2 %>
|
||||
HoverLi(5);
|
||||
$('#jour_count_5').html('<%= @anonymous_comments.count %>');
|
||||
$('#tbc_05').html('<%= escape_javascript(render(:partial => "homework_attach/jour",:locals => {:jours => @anonymous_comments,:show_score => true,:show_name => false,:is_jour => false})) %>');
|
||||
//留言
|
||||
<% else %>
|
||||
HoverLi(3);
|
||||
$('#jour_count_3').html('<%= @jours.count %>');
|
||||
$('#tbc_03').html('<%= escape_javascript(render(:partial => "homework_attach/jour",:locals => {:jours => @jour,:show_score => false,:show_name => true,:is_jour => true})) %>');
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
<% when 1 %>
|
||||
<%= link_to '关闭匿评', alert_anonymous_comment_bid_path(@bid), id: "#{@bid.id}_stop_anonymous_comment", remote: true %>
|
||||
<% when 2 %>
|
||||
匿评结束
|
||||
<a href="#" style="background:#8e8e8e;">匿评结束</a>
|
||||
<% end %>
|
||||
</span>
|
||||
<%end%>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
$.ajax({
|
||||
url: '<%= update_score_user_path(:format => 'js') %>',
|
||||
type: 'get',
|
||||
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
|
||||
data: 'id=<%= @user.id %>',
|
||||
remote: true
|
||||
}) ;
|
||||
|
@ -81,7 +82,11 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
document.getElementById('td_tech_title').innerHTML = title1;
|
||||
var obj = document.getElementById('td_tech_title');
|
||||
if(!(obj == "undefined" || obj == null))
|
||||
{
|
||||
obj.innerHTML = title1;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
<script type="text/javascript">
|
||||
function formSubmit()
|
||||
{
|
||||
document.getElementById("tag_for_save").submit()
|
||||
}
|
||||
</script>
|
||||
<div id="tags">
|
||||
<%#begin
|
||||
1 代表是user类型
|
||||
|
@ -76,9 +82,9 @@
|
|||
<%= f.text_field :name ,:id => "tags_name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %>
|
||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||
<%= f.submit l(:button_project_tags_add),:class => "ButtonAddTags" %>
|
||||
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();',:class=>'ButtonColor'%>
|
||||
|
||||
<!--<%#= f.submit l(:button_project_tags_add),:class => "ButtonColor m3p10" %>-->
|
||||
<a href="#" onclick='$("form").submit()' class="ButtonColor m3p10" ><%= l(:button_project_tags_add)%></a>
|
||||
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();',:class=>'ButtonColor m3p10'%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
|
||||
<% id = "journal_reply_ul_" + journal.id.to_s%>
|
||||
<% show_real_name ||= false%>
|
||||
<div id = '<%= id %>' >
|
||||
<% fetch_user_leaveWord_reply(journal).each do |reply|%>
|
||||
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name} %>
|
||||
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name, :show_real_name => show_real_name} %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<% show_real_name ||= false %>
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
|
||||
<div class="recall" id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
|
||||
|
@ -10,10 +11,19 @@
|
|||
</div>
|
||||
<div class="recall_con">
|
||||
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
||||
<% if show_real_name%>
|
||||
<%= link_to reply.user.lastname+reply.user.firstname, user_path(reply.user) %>
|
||||
<% else %>
|
||||
<%= link_to reply.user.name, user_path(reply.user) %>
|
||||
<% end %>
|
||||
回复
|
||||
<% if show_name %>
|
||||
<%= link_to reply.at_user.name,user_path(reply.at_user) %>
|
||||
<% parent_jour = JournalsForMessage.find reply.m_reply_id %>
|
||||
<% if show_name && parent_jour %>
|
||||
<% if show_real_name%>
|
||||
<%= link_to parent_jour.user.lastname+reply.user.firstname, user_path(parent_jour.user) %>
|
||||
<% else %>
|
||||
<%= link_to parent_jour.user.name, user_path(parent_jour.user) %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= l(:label_anonymous) %>
|
||||
<% end %>
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
/* Redmine - project management software
|
||||
Copyright (C) 2006-2013 Jean-Philippe Lang */
|
||||
|
||||
|
||||
|
||||
function cleanArray (actual){
|
||||
var newArray = new Array();
|
||||
for (var i = 0; i< actual.length; i++){
|
||||
|
@ -389,6 +391,7 @@ function submitPreview(url, form, target) {
|
|||
$.ajax({
|
||||
url: url,
|
||||
type: 'post',
|
||||
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))},
|
||||
data: $('#'+form).serialize(),
|
||||
success: function(data){
|
||||
$('#'+target).html(data);
|
||||
|
@ -621,6 +624,14 @@ function transpotUrl (scope) {
|
|||
$(document).ready(setupAjaxIndicator);
|
||||
$(document).ready(hideOnLoad);
|
||||
$(document).ready(addFormObserversForDoubleSubmit);
|
||||
$(document).ready(function(){
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
}
|
||||
)
|
||||
|
||||
function img_thumbnails() {
|
||||
$('.thumbnails a').colorbox({rel:'nofollow'});
|
||||
|
|
|
@ -1580,7 +1580,7 @@ form {display: inline;}
|
|||
/*added by bai*/
|
||||
input[type="submit"].bid_btn {
|
||||
padding-bottom: 5px;
|
||||
width: 50px;
|
||||
width: auto;
|
||||
height: 25px;
|
||||
text-align: center;
|
||||
font-family: '微软雅黑', Arial, Helvetica, sans-serif;
|
||||
|
@ -1607,12 +1607,13 @@ input[type="submit"].ButtonAddTags {
|
|||
text-align: center ;
|
||||
margin:0 auto;
|
||||
border-radius: 0px !important;
|
||||
background: #15bccf;
|
||||
background: #15bccf ;
|
||||
border: 0px solid #15bccf !important;
|
||||
position: relative;
|
||||
top:3px;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
input[type="button"].bid_btn {
|
||||
|
|
|
@ -83,7 +83,7 @@ a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
|
|||
.ping_star span a{ float:right; width:20px; height:20px; background:url(images/star.png) -2px 0 no-repeat; margin-right:3px;}
|
||||
.ping_star span a:hover{background:url(images/star.png) -24px 0 no-repeat;}
|
||||
.ping_con textarea{ height:76px; border:1px solid #15bccf; margin-bottom:5px; color:#666; font-size:12px;}
|
||||
a.ping_sub{ float:right; height:22px; width:60px; margin-right:20px; background:#15bccf; color:#fff; text-align:center;}
|
||||
a.ping_sub{ float:right; height:22px; width:60px; margin-right:20px; background:#15bccf; color:#fff; text-align:center;padding-top: 5px;}
|
||||
a.ping_sub1{ float:right; height:22px; width:60px; background:#15bccf; color:#fff; text-align:center;line-height: 1.9;}
|
||||
a:hover.ping_sub{ background:#14a8b9;}
|
||||
.recall{ border-top:1px solid #CCC; padding:5px 0;}
|
||||
|
|
|
@ -483,7 +483,6 @@ input[class~='ButtonClolr'],.ButtonColor{
|
|||
font-family: '微软雅黑',Arial,Helvetica,sans-serif;
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
padding: 0px;
|
||||
background: #15bccf !important;
|
||||
border: 0px solid #15bccf ;
|
||||
display:inline-block
|
||||
|
@ -540,7 +539,7 @@ input[class~='whiteButton']:active, .whiteButton:active {
|
|||
|
||||
input[class~='m3p10'], .m3p10 {
|
||||
margin: 0;
|
||||
padding: 3px 10px;
|
||||
padding: 3px 10px !important;
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
color: #ffffff;
|
||||
|
|
Loading…
Reference in New Issue