修改《新建课程时:课程名中有空格或者特殊符号会提示名称无效,》
《 缺陷 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
|
||||
|
||||
def course
|
||||
def
|
||||
course
|
||||
@school_id = params[:school_id]
|
||||
per_page_option = 10
|
||||
if @school_id == "0" or @school_id.nil?
|
||||
|
|
|
@ -114,7 +114,7 @@ module CoursesHelper
|
|||
# 学生人数计算
|
||||
# add by nwb
|
||||
def studentCount course
|
||||
searchStudent(course).count.to_s#course.student.count
|
||||
course.student.count.to_s#course.student.count
|
||||
end
|
||||
|
||||
#课程成员数计算
|
||||
|
|
|
@ -38,7 +38,7 @@ class Course < ActiveRecord::Base
|
|||
|
||||
validates_presence_of :password, :term,:name
|
||||
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
|
||||
before_save :self_validate
|
||||
after_create :create_board_sync
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
var $group_name = $('#group_name')
|
||||
$group_name.blur(function (event) {
|
||||
if ($(this).is('#group_name')) {
|
||||
$.get(
|
||||
'<%=valid_ajax_course_path%>',
|
||||
{ valid: "name",
|
||||
value: this.value },
|
||||
function (data) {
|
||||
if (!data.valid) {
|
||||
alert('<%= l(:label_groupname_repeat) %>');
|
||||
}
|
||||
});
|
||||
}
|
||||
function check_groupname() {
|
||||
var $group_name = $('#group_name');
|
||||
|
||||
$.get(
|
||||
'<%=valid_ajax_course_path%>',
|
||||
{ valid: "name",
|
||||
value: this.value },
|
||||
function (data) {
|
||||
if (!data.valid) {
|
||||
alert('<%= l(:label_groupname_repeat) %>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type=" text/javascript" charset="utf-8">
|
||||
function validate_groupname(value1) {
|
||||
|
@ -49,6 +47,7 @@
|
|||
}
|
||||
function validate_add_group() {
|
||||
value1 = document.getElementById('group_name').value;
|
||||
check_groupname();
|
||||
validate_groupname(value1);
|
||||
validate_groupname_null(value1);
|
||||
|
||||
|
|
|
@ -41,11 +41,14 @@
|
|||
</td>
|
||||
<td rowspan="2" width="250px">
|
||||
<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 %>
|
||||
<%= hidden_field_tag 'reward_type', @bid.reward_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 %>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -46,9 +46,13 @@
|
|||
</td>
|
||||
<td rowspan="2" width="250px">
|
||||
<div class="top-content-search">
|
||||
<%= form_tag(:controller => 'courses', :action => 'search', :method => :get) do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20 %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
|
||||
<%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get) do %>
|
||||
<%= 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 %>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -61,14 +61,14 @@
|
|||
if(regexName1()){$("#contst_search_form").submit();}
|
||||
}
|
||||
</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 %>
|
||||
<%= 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] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="padding-top: 7px !important;">
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<br />
|
||||
<span id="contest_name_span_head"></span>
|
||||
<% end %>
|
||||
|
|
|
@ -64,10 +64,10 @@
|
|||
}
|
||||
</script>
|
||||
<%= 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] %>
|
||||
<%#= 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)%>
|
||||
</a>
|
||||
<br />
|
||||
|
|
|
@ -221,16 +221,16 @@
|
|||
<div class="inf_user_context">
|
||||
<table style="font-family:'微软雅黑'" width="240">
|
||||
<tr>
|
||||
<td style="padding-left: 5px" width="70px">
|
||||
<%= l(:label_user_joinin) %>:
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"> <%= l(:label_user_joinin) %>:</span>
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= format_time(@user.created_on) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 5px">
|
||||
<%= l(:label_user_login) %>:
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"> <%= l(:label_user_login) %>:</span>
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px">
|
||||
<%= format_time(@user.last_login_on) %>
|
||||
|
@ -239,8 +239,8 @@
|
|||
<% unless @user.user_extensions.nil? %>
|
||||
<% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %>
|
||||
<tr>
|
||||
<td style="padding-left: 5px" width="70px">
|
||||
<%= l(:field_occupation) %>:
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"><%= l(:field_occupation) %>:</span>
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<% unless @user.user_extensions.school.nil? %>
|
||||
|
@ -250,8 +250,8 @@
|
|||
</tr>
|
||||
<% elsif @user.user_extensions.identity == 3 %>
|
||||
<tr>
|
||||
<td style="padding-left: 5px" width="70px">
|
||||
<%= l(:field_occupation) %>:
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"> <%= l(:field_occupation) %>:</span>
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= @user.user_extensions.occupation %>
|
||||
|
@ -259,8 +259,8 @@
|
|||
</tr>
|
||||
<% elsif @user.user_extensions.identity == 2 %>
|
||||
<tr>
|
||||
<td style="padding-left: 18px" width="70px">
|
||||
<%= l(:label_company_name) %>:
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"> <%= l(:label_company_name) %>:</span>
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= @user.firstname %>
|
||||
|
@ -268,8 +268,8 @@
|
|||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td style="padding-left: 31px" width="76px">
|
||||
<%= l(:label_location) %>:
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"> <%= l(:label_location) %>:</span>
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= @user.user_extensions.location %>
|
||||
|
@ -278,8 +278,8 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<% if @user.user_extensions.identity == 0 %>
|
||||
<td style="padding-left: 31px" width="76px" >
|
||||
<%= l(:label_technical_title) %>:
|
||||
<td style=" float: right" width="70px" >
|
||||
<span style="float: right"> <%= l(:label_technical_title) %>:</span>
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<span id = "td_tech_title"></span>
|
||||
|
@ -289,8 +289,8 @@
|
|||
<% if @user.user_extensions.identity == 1 %>
|
||||
<% if(is_watching?(@user) ) %>
|
||||
<tr>
|
||||
<td style="padding-left: 31px" width="70px" >
|
||||
<%= l(:label_bidding_user_studentcode)%>:
|
||||
<td style=" float: right" width="70px" >
|
||||
<span style="float: right"> <%= l(:label_bidding_user_studentcode)%>:</span>
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= @user.user_extensions.student_id %>
|
||||
|
@ -298,7 +298,7 @@
|
|||
</tr>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td style="padding-left: 31px" width="70px" >
|
||||
<td style=" float: right" width="70px" >
|
||||
<%= l(:label_identity)%>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
|
@ -309,7 +309,7 @@
|
|||
<% end %>
|
||||
<% elsif @user.user_extensions.identity == 3 %>
|
||||
<tr>
|
||||
<td style="padding-left: 31px" width="70px" >
|
||||
<td style=" float: right" width="70px" >
|
||||
<%= l(:label_identity)%>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
|
|
|
@ -2912,7 +2912,7 @@ input[class~='ButtonClolr'],.ButtonColor{
|
|||
|
||||
input[class~='m3p10'], .m3p10 {
|
||||
margin-top: 5px;
|
||||
padding: 5px 10px !important;
|
||||
padding: 5px 10px;
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
color: #ffffff;
|
||||
|
|
Loading…
Reference in New Issue