修改缺陷不能显示的bug

This commit is contained in:
huang 2015-04-09 09:22:09 +08:00
parent b415575e0e
commit 45fa01c773
3 changed files with 126 additions and 126 deletions

View File

@ -67,15 +67,15 @@ module IssuesHelper
s.html_safe
end
def link_to_issue_type
if column_content[1].to_s == "缺陷"
def link_to_issue_type(value)
if value == "缺陷"
class_type = "red_btn_cir ml10"
elsif column_content[1] == "功能"
class="blue_btn_cir ml10"
elsif column_content[1] == "支持"
class="green_btn_cir ml10"
elsif value == "功能"
class_type = "blue_btn_cir ml10"
elsif value == "支持"
class_type = "green_btn_cir ml10"
else
class_type="orange_btn_cir ml10">
class_type = "orange_btn_cir ml10"
end
end

View File

@ -1,76 +1,76 @@
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_course_modify_settings)%></h2>
</div>
<div class="hwork_new">
<div id="tb_" class="hwork_tb_">
<ul>
<li id="tb_1" class="hwork_hovertab" onclick="course_setting(1);" >
基本信息
</li>
<li id="tb_2" class="hwork_normaltab" onclick="course_setting(2);">
成员
</li>
</ul>
</div>
<div class="hwork_dis" id="tbc_01" style="padding-top: 10px;">
<ul>
<%= labelled_form_for @course do |f| %>
<li class="ml45 mb10">
<%= render :partial => "avatar/new_avatar_form", :locals => {source: @course} %>
<div class="cl"></div>
</li>
<li class="ml45">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_tags_course_name)%>&nbsp;&nbsp;</label>
<input type="text" name="course[name]" id="course_name" class="courses_input" maxlength="100" onkeyup="regex_course_name();" value="<%= @course.name%>">
<span class="c_red" id="course_name_notice" style="display: none;">课程名称不能为空</span>
</li>
<div class="cl"></div>
<li class="ml45">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_class_period)%>&nbsp;&nbsp;</label>
<input type="text" name="class_period" id="class_period" class="hwork_input02" onkeyup="regex_course_class_period();" maxlength="6" value="<%= @course.class_period%>">
<span class="c_red" id="course_class_period_notice" style="display: none;"></span>
</li>
<div class="cl"></div>
<li class="ml45 mb10">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_course_term)%>&nbsp;&nbsp;</label>
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {} %>
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{} %>
</li>
<div class="cl"></div>
<li class="ml45 mb10">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_new_course_password)%>&nbsp;&nbsp;</label>
<input type="text" name="course[password]" id="course_course_password" class="hwork_input02" value="<%= @course.password%>">
<div class="cl"></div>
<span class=" ml80 c_orange">学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。</span>
</li>
<li class="ml45">
<label class="fl" >&nbsp;&nbsp;<%= l(:label_new_course_description)%>&nbsp;&nbsp;</label>
<textarea name="course[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="courses_text fl" maxlength="6000"><%= @course.description%></textarea>
<div class="cl"></div>
</li>
<li class=" mb5 ml80">
<label >公开&nbsp;&nbsp;</label>
<input <%= @course.is_public == 1 ? 'checked' : ''%> id="course_is_public" name="course[is_public]" type="checkbox">
<span class="c_grey">(打钩为公开,不打钩则不公开,若不公开,仅课程成员可见该课程。)</span>
<div class="cl"></div>
</li>
<li class=" mb5 ml30">
<label >学生列表公开&nbsp;&nbsp;</label>
<input <%= @course.open_student == 1 ? 'checked' : ''%> id="course_open_student" name="course[open_student]" type="checkbox" style="margin-left: 1px;"/>
<span class="c_grey">(打钩为"学生列表公开",不打钩为不公开,若不公开,则课程外部人员看不到学生列表)</span>
<div class="cl"></div>
</li>
<li class=" ml90" >
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_edit_course(<%= @course.id%>);" >提交</a>
<%= link_to l(:button_cancel), course_path(@course), :class => "blue_btn grey_btn fl c_white" %>
<div class="cl"></div>
</li>
<% end %>
</ul>
</div>
<div class="hwork_undis" id="tbc_02">
<%= render :partial => "course_members" %>
</div><!---成员结束-->
</div><!--talknew end-->
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_course_modify_settings)%></h2>
</div>
<div class="hwork_new">
<div id="tb_" class="hwork_tb_">
<ul>
<li id="tb_1" class="hwork_hovertab" onclick="course_setting(1);" >
基本信息
</li>
<li id="tb_2" class="hwork_normaltab" onclick="course_setting(2);">
成员
</li>
</ul>
</div>
<div class="hwork_dis" id="tbc_01" style="padding-top: 10px;">
<ul>
<%= labelled_form_for @course do |f| %>
<li class="ml45 mb10">
<%= render :partial => "avatar/new_avatar_form", :locals => {source: @course} %>
<div class="cl"></div>
</li>
<li class="ml45">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_tags_course_name)%>&nbsp;&nbsp;</label>
<input type="text" name="course[name]" id="course_name" class="courses_input" maxlength="100" onkeyup="regex_course_name();" value="<%= @course.name%>">
<span class="c_red" id="course_name_notice" style="display: none;">课程名称不能为空</span>
</li>
<div class="cl"></div>
<li class="ml45">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_class_period)%>&nbsp;&nbsp;</label>
<input type="text" name="class_period" id="class_period" class="hwork_input02" onkeyup="regex_course_class_period();" maxlength="6" value="<%= @course.class_period%>">
<span class="c_red" id="course_class_period_notice" style="display: none;"></span>
</li>
<div class="cl"></div>
<li class="ml45 mb10">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_course_term)%>&nbsp;&nbsp;</label>
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {} %>
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{} %>
</li>
<div class="cl"></div>
<li class="ml45 mb10">
<label><span class="c_red">*</span>&nbsp;<%= l(:label_new_course_password)%>&nbsp;&nbsp;</label>
<input type="text" name="course[password]" id="course_course_password" class="hwork_input02" value="<%= @course.password%>">
<div class="cl"></div>
<span class=" ml80 c_orange">学生或其他成员申请加入课程时候需要使用该口令,该口令可以由老师在课堂上公布。</span>
</li>
<li class="ml45">
<label class="fl" >&nbsp;&nbsp;<%= l(:label_new_course_description)%>&nbsp;&nbsp;</label>
<textarea name="course[description]" placeholder="最多3000个汉字(或6000个英文字符)" class="courses_text fl" maxlength="6000"><%= @course.description%></textarea>
<div class="cl"></div>
</li>
<li class=" mb5 ml80">
<label >公开&nbsp;&nbsp;</label>
<input <%= @course.is_public == 1 ? 'checked' : ''%> id="course_is_public" name="course[is_public]" type="checkbox">
<span class="c_grey">(打钩为公开,不打钩则不公开,若不公开,仅课程成员可见该课程。)</span>
<div class="cl"></div>
</li>
<li class=" mb5 ml30">
<label >学生列表公开&nbsp;&nbsp;</label>
<input <%= @course.open_student == 1 ? 'checked' : ''%> id="course_open_student" name="course[open_student]" type="checkbox" style="margin-left: 1px;"/>
<span class="c_grey">(打钩为"学生列表公开",不打钩为不公开,若不公开,则课程外部人员看不到学生列表)</span>
<div class="cl"></div>
</li>
<li class=" ml90" >
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_edit_course(<%= @course.id%>);" >提交</a>
<%= link_to l(:button_cancel), course_path(@course), :class => "blue_btn grey_btn fl c_white" %>
<div class="cl"></div>
</li>
<% end %>
</ul>
</div>
<div class="hwork_undis" id="tbc_02">
<%= render :partial => "course_members" %>
</div><!---成员结束-->
</div><!--talknew end-->
<div class="cl"></div>

View File

@ -129,7 +129,7 @@ function regexSubject()
}
function regexContent()
{
var content = message_content_editor.html();
var content = message_content_editor.html();
if(content.length ==0)
{
$("#message_content_span").text("描述不能为空");
@ -146,7 +146,7 @@ function regexContent()
}
function submitCoursesBoard()
{
message_content_editor.sync();
message_content_editor.sync();
if(regexSubject()&&regexContent()){$("#message-form").submit();}
}
///////////////////////////////////////////////////////////////
@ -178,7 +178,7 @@ function regexTitle()
function regexDescription()
{
var name = news_description_editor.html();
var name = news_description_editor.html();
if(name.length ==0)
{
$("#description_notice_span").text("描述不能为空");
@ -186,12 +186,12 @@ function regexDescription()
$("#description_notice_span").focus();
return false;
}
else if(name.length >=6000){
$("#description_notice_span").text("描述最多3000个汉字(或6000个英文字符)");
$("#description_notice_span").css('color','#ff0000');
$("#description_notice_span").focus();
return false;
}
else if(name.length >=6000){
$("#description_notice_span").text("描述最多3000个汉字(或6000个英文字符)");
$("#description_notice_span").css('color','#ff0000');
$("#description_notice_span").focus();
return false;
}
else
{
$("#description_notice_span").text("填写正确");
@ -200,12 +200,12 @@ function regexDescription()
}
}
function submitNews(is_new)
function submitNews(is_new)
{
alert(is_new)
alert(is_new)
if(regexTitle() && regexDescription())
{
news_description_editor.sync();
news_description_editor.sync();
$("#news-form").submit();
}
}
@ -214,31 +214,31 @@ function submitFocus(obj)
{
$(obj).focus();
}
/////////////////////////////////////////////////课程讨论区
function course_board_submit_message_replay()
{
if(MessageReplayVevify())
{
message_content_editor.sync();//提交内容之前要sync不然服务器端取不到值
$("#message_form").submit();
}
}
function MessageReplayVevify() {
var content = message_content_editor.html();//$.trim($("#message_content").val());
if (content.length == 0) {
$("#message_content_span").text("<%= l(:label_reply_empty) %>");
$("#message_content_span").css('color', '#ff0000');
return false;
}
else {
$("#message_content_span").text("<%= l(:label_field_correct) %>");
$("#message_content_span").css('color', '#008000');
return true;
}
}
//////////////////////////////////////////////////
/////////////////////////////////////////////////课程讨论区
function course_board_submit_message_replay()
{
if(MessageReplayVevify())
{
message_content_editor.sync();//提交内容之前要sync不然服务器端取不到值
$("#message_form").submit();
}
}
function MessageReplayVevify() {
var content = message_content_editor.html();//$.trim($("#message_content").val());
if (content.length == 0) {
$("#message_content_span").text("<%= l(:label_reply_empty) %>");
$("#message_content_span").css('color', '#ff0000');
return false;
}
else {
$("#message_content_span").text("<%= l(:label_field_correct) %>");
$("#message_content_span").css('color', '#008000');
return true;
}
}
//////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
//验证搜索时输入名字
@ -370,7 +370,7 @@ function submit_new_bid(id)
{
if(regex_bid_name()&&regex_evaluation_num())
{
bid_description_editor.sync();
bid_description_editor.sync();
$("#"+id).submit();
}
}
@ -404,10 +404,10 @@ $(function(){
//将右侧的最小高度设置成左侧高度,美化界面
$(document).ready(function () {
$("#RSide").css("min-height",$("#LSide").height()-30);
});
// 日历选择日期后关闭
function regexDeadLine()
{
('#ui-datepicker-div').hide;
});
// 日历选择日期后关闭
function regexDeadLine()
{
('#ui-datepicker-div').hide;
}