修改《新建课程时:课程名中有空格或者特殊符号会提示名称无效,》
《 缺陷 Trustie-Forge#1782 (已解决): lable标签和对应的显示值之间间距过大的问题,例如个人主页左侧的信息,具体如图所示》 《本地版中关于学生列表的分组出现的问题:当前已存在A组,再次添加A组应给出提示“A组已存在”,该功能目前只有在学生列表首次加载时才正常》 《托管,课程,竞赛主页中任意点击某一项目,进入该项目主页,右上角的搜索按钮风格和大小不统一。》 《进入某竞赛主页,点击创新竞赛链接没反应》bug Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
parent
da85c3efb8
commit
2262997c31
|
@ -500,7 +500,8 @@ class CoursesController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def course
|
def
|
||||||
|
course
|
||||||
@school_id = params[:school_id]
|
@school_id = params[:school_id]
|
||||||
per_page_option = 10
|
per_page_option = 10
|
||||||
if @school_id == "0" or @school_id.nil?
|
if @school_id == "0" or @school_id.nil?
|
||||||
|
|
|
@ -114,7 +114,7 @@ module CoursesHelper
|
||||||
# 学生人数计算
|
# 学生人数计算
|
||||||
# add by nwb
|
# add by nwb
|
||||||
def studentCount course
|
def studentCount course
|
||||||
searchStudent(course).count.to_s#course.student.count
|
course.student.count.to_s#course.student.count
|
||||||
end
|
end
|
||||||
|
|
||||||
#课程成员数计算
|
#课程成员数计算
|
||||||
|
|
|
@ -38,7 +38,7 @@ class Course < ActiveRecord::Base
|
||||||
|
|
||||||
validates_presence_of :password, :term,:name
|
validates_presence_of :password, :term,:name
|
||||||
validates_format_of :class_period, :with =>/^[1-9]\d*$/
|
validates_format_of :class_period, :with =>/^[1-9]\d*$/
|
||||||
validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/
|
validates_format_of :name,:with =>/^[^ ]+[a-zA-Z0-9_\u4e00-\u9fa5\s\S]+$/
|
||||||
validates_length_of :description, :maximum => 10000
|
validates_length_of :description, :maximum => 10000
|
||||||
before_save :self_validate
|
before_save :self_validate
|
||||||
after_create :create_board_sync
|
after_create :create_board_sync
|
||||||
|
|
|
@ -1,21 +1,19 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function () {
|
function check_groupname() {
|
||||||
var $group_name = $('#group_name')
|
var $group_name = $('#group_name');
|
||||||
$group_name.blur(function (event) {
|
|
||||||
if ($(this).is('#group_name')) {
|
$.get(
|
||||||
$.get(
|
'<%=valid_ajax_course_path%>',
|
||||||
'<%=valid_ajax_course_path%>',
|
{ valid: "name",
|
||||||
{ valid: "name",
|
value: this.value },
|
||||||
value: this.value },
|
function (data) {
|
||||||
function (data) {
|
if (!data.valid) {
|
||||||
if (!data.valid) {
|
alert('<%= l(:label_groupname_repeat) %>');
|
||||||
alert('<%= l(:label_groupname_repeat) %>');
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
<script type=" text/javascript" charset="utf-8">
|
<script type=" text/javascript" charset="utf-8">
|
||||||
function validate_groupname(value1) {
|
function validate_groupname(value1) {
|
||||||
|
@ -49,6 +47,7 @@
|
||||||
}
|
}
|
||||||
function validate_add_group() {
|
function validate_add_group() {
|
||||||
value1 = document.getElementById('group_name').value;
|
value1 = document.getElementById('group_name').value;
|
||||||
|
check_groupname();
|
||||||
validate_groupname(value1);
|
validate_groupname(value1);
|
||||||
validate_groupname_null(value1);
|
validate_groupname_null(value1);
|
||||||
|
|
||||||
|
|
|
@ -41,11 +41,14 @@
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2" width="250px">
|
<td rowspan="2" width="250px">
|
||||||
<div class="project-search">
|
<div class="project-search">
|
||||||
<%= form_tag(:controller => 'bids', :action => 'contest', :method => :get) do %>
|
<%= form_tag({:controller => 'bids', :action => 'contest'}, :id => "contest_search_form",:method => :get) do %>
|
||||||
<%= text_field_tag 'name', params[:name], :size => 20 %>
|
<%= text_field_tag 'name', params[:name], :size => 20 %>
|
||||||
<%= hidden_field_tag 'reward_type', @bid.reward_type %>
|
<%= hidden_field_tag 'reward_type', @bid.reward_type %>
|
||||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
<a href="#" onclick="$('#contest_search_form').submit();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||||
|
<%= l(:label_search)%>
|
||||||
|
</a>
|
||||||
|
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -46,9 +46,13 @@
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2" width="250px">
|
<td rowspan="2" width="250px">
|
||||||
<div class="top-content-search">
|
<div class="top-content-search">
|
||||||
<%= form_tag(:controller => 'courses', :action => 'search', :method => :get) do %>
|
|
||||||
<%= text_field_tag 'name', params[:name], :size => 20 %>
|
<%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get) do %>
|
||||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
<%= text_field_tag 'name', params[:name], :size => 20, :style => "float:left" %>
|
||||||
|
<a href="#" onclick="$('#course_search_form').submit();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||||
|
<%= l(:label_search)%>
|
||||||
|
</a>
|
||||||
|
<%#= submit_tag l(:label_search), :class => "ButtonColor m3p10", :name => nil, :style => "float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -61,14 +61,14 @@
|
||||||
if(regexName1()){$("#contst_search_form").submit();}
|
if(regexName1()){$("#contst_search_form").submit();}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<div class="project-search">
|
<div class="project-search" style="float: left; margin: 0px">
|
||||||
<%= form_tag({controller: 'contests', action: 'index'}, method: :get, :id => "contst_search_form") do %>
|
<%= form_tag({controller: 'contests', action: 'index'}, method: :get, :id => "contst_search_form") do %>
|
||||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => 'regexName1();', :width => "125px" %>
|
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => 'regexName1();', :width => "125px", :style=>"float:left" %>
|
||||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="padding-top: 7px !important;">
|
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||||
<%= l(:label_search)%>
|
<%= l(:label_search)%>
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<span id="contest_name_span_head"></span>
|
<span id="contest_name_span_head"></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -64,10 +64,10 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form") do %>
|
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form") do %>
|
||||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();" %>
|
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();", :style => "float:left" %>
|
||||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" >
|
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||||
<%= l(:label_search)%>
|
<%= l(:label_search)%>
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -221,16 +221,16 @@
|
||||||
<div class="inf_user_context">
|
<div class="inf_user_context">
|
||||||
<table style="font-family:'微软雅黑'" width="240">
|
<table style="font-family:'微软雅黑'" width="240">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 5px" width="70px">
|
<td style=" float: right" width="70px">
|
||||||
<%= l(:label_user_joinin) %>:
|
<span style="float: right"> <%= l(:label_user_joinin) %>:</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||||
<%= format_time(@user.created_on) %>
|
<%= format_time(@user.created_on) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 5px">
|
<td style=" float: right" width="70px">
|
||||||
<%= l(:label_user_login) %>:
|
<span style="float: right"> <%= l(:label_user_login) %>:</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar" style="padding-left: 0px">
|
<td class="font_lighter_sidebar" style="padding-left: 0px">
|
||||||
<%= format_time(@user.last_login_on) %>
|
<%= format_time(@user.last_login_on) %>
|
||||||
|
@ -239,8 +239,8 @@
|
||||||
<% unless @user.user_extensions.nil? %>
|
<% unless @user.user_extensions.nil? %>
|
||||||
<% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %>
|
<% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 5px" width="70px">
|
<td style=" float: right" width="70px">
|
||||||
<%= l(:field_occupation) %>:
|
<span style="float: right"><%= l(:field_occupation) %>:</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||||
<% unless @user.user_extensions.school.nil? %>
|
<% unless @user.user_extensions.school.nil? %>
|
||||||
|
@ -250,8 +250,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
<% elsif @user.user_extensions.identity == 3 %>
|
<% elsif @user.user_extensions.identity == 3 %>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 5px" width="70px">
|
<td style=" float: right" width="70px">
|
||||||
<%= l(:field_occupation) %>:
|
<span style="float: right"> <%= l(:field_occupation) %>:</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||||
<%= @user.user_extensions.occupation %>
|
<%= @user.user_extensions.occupation %>
|
||||||
|
@ -259,8 +259,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
<% elsif @user.user_extensions.identity == 2 %>
|
<% elsif @user.user_extensions.identity == 2 %>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 18px" width="70px">
|
<td style=" float: right" width="70px">
|
||||||
<%= l(:label_company_name) %>:
|
<span style="float: right"> <%= l(:label_company_name) %>:</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||||
<%= @user.firstname %>
|
<%= @user.firstname %>
|
||||||
|
@ -268,8 +268,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 31px" width="76px">
|
<td style=" float: right" width="70px">
|
||||||
<%= l(:label_location) %>:
|
<span style="float: right"> <%= l(:label_location) %>:</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||||
<%= @user.user_extensions.location %>
|
<%= @user.user_extensions.location %>
|
||||||
|
@ -278,8 +278,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<% if @user.user_extensions.identity == 0 %>
|
<% if @user.user_extensions.identity == 0 %>
|
||||||
<td style="padding-left: 31px" width="76px" >
|
<td style=" float: right" width="70px" >
|
||||||
<%= l(:label_technical_title) %>:
|
<span style="float: right"> <%= l(:label_technical_title) %>:</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||||
<span id = "td_tech_title"></span>
|
<span id = "td_tech_title"></span>
|
||||||
|
@ -289,8 +289,8 @@
|
||||||
<% if @user.user_extensions.identity == 1 %>
|
<% if @user.user_extensions.identity == 1 %>
|
||||||
<% if(is_watching?(@user) ) %>
|
<% if(is_watching?(@user) ) %>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 31px" width="70px" >
|
<td style=" float: right" width="70px" >
|
||||||
<%= l(:label_bidding_user_studentcode)%>:
|
<span style="float: right"> <%= l(:label_bidding_user_studentcode)%>:</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||||
<%= @user.user_extensions.student_id %>
|
<%= @user.user_extensions.student_id %>
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<% else %>
|
<% else %>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 31px" width="70px" >
|
<td style=" float: right" width="70px" >
|
||||||
<%= l(:label_identity)%>:
|
<%= l(:label_identity)%>:
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||||
|
@ -309,7 +309,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% elsif @user.user_extensions.identity == 3 %>
|
<% elsif @user.user_extensions.identity == 3 %>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 31px" width="70px" >
|
<td style=" float: right" width="70px" >
|
||||||
<%= l(:label_identity)%>:
|
<%= l(:label_identity)%>:
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||||
|
|
|
@ -2912,7 +2912,7 @@ input[class~='ButtonClolr'],.ButtonColor{
|
||||||
|
|
||||||
input[class~='m3p10'], .m3p10 {
|
input[class~='m3p10'], .m3p10 {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
padding: 5px 10px !important;
|
padding: 5px 10px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|
Loading…
Reference in New Issue