diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index be6543be2..14c2f3a11 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -296,7 +296,7 @@ class ForumsController < ApplicationController #检查forum的名字 def check_forum_name - forum_name_exist = Forum.where("name = '#{params[:forum_name]}'").count >= 1 ? true : false + forum_name_exist = Forum.where("name = '#{params[:forum_name]}' and id != #{params[:forum_id]}").count >= 1 ? true : false render :text => forum_name_exist end diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb index b2c7ab79f..03c5c0ac4 100644 --- a/app/views/files/_tag_yun.html.erb +++ b/app/views/files/_tag_yun.html.erb @@ -3,7 +3,7 @@ <% if tag_name && tag_name == k%> <%= k%>×<%= v%> <% else%> - <%= k%>×<%= v%> + <%= k%>×<%= v%> <% end%> <% end%> <% end%> \ No newline at end of file diff --git a/app/views/forums/edit.html.erb b/app/views/forums/edit.html.erb index 24130e727..ef1fbc12b 100644 --- a/app/views/forums/edit.html.erb +++ b/app/views/forums/edit.html.erb @@ -43,13 +43,10 @@ function check_forum_name(){ check_pass = true; name = $("textarea[name='forum[name]']").val().trim(); - if(name == '<%= @forum.name%>'){ - return; - } if( name != ""){ $.get( '<%= check_forum_name_forums_path %>', - {"forum_name":name}, + {"forum_name":name,"forum_id":<%= @forum.id%>}, function(data){ if( data == 'true'){ diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index f1928f6da..143329d78 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -615,7 +615,8 @@ a.wzan_visited{background:url(../images/new_project/public_icon.png) 0px -503px .newwork_btn a:hover{ background:#329cbd;} .files_tag{ width:670px; min-height:22px;margin-bottom:10px;}/* overflow:hidden; */ /*padding:1px 10px 修改原因,padding会导致内部输入框和外边框有边距*/ -a.files_tag_icon{ background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 1px; float:left; margin-right:10px;margin-bottom:10px; } +a.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px; } +span.files_tag_icon{ width:auto;background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 5px; float:left; margin-right:10px;margin-bottom:10px; } a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px;} /* 20150423作业评分*/ diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 02f908f50..57541e149 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -550,9 +550,9 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} .homepageNewsPublisher { max-width:100px; font-size:12px; color:#269ac9; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; } .homepageNewsType {padding-left: 5px; font-size:12px; color:#888888; display:block;} .homepageNewsTypeHomework {width:160px; padding-left: 5px; font-size:12px; color:#888888; display:block; overflow:hidden; height:49px;word-break:break-all; word-wrap:break-word; text-overflow:ellipsis;} -.homepageNewsPubType {width:220px; font-size:12px; color:#888888; display: block;} +.homepageNewsPubType {width:230px; font-size:12px; color:#888888; display: block;} .homepageNewsPubTypeHomework {width:270px; font-size:12px; color:#888888; display: block; white-space:nowrap;} -.homepageNewsContent {width:365px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } +.homepageNewsContent {width:355px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } .homepageSystenMessageContent {width:291px; max-width:291px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; } .homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } .homepageHomeworkContent {width:245px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } @@ -1062,7 +1062,7 @@ img.ui-datepicker-trigger { margin: 7px; } /*消息*/ -.homepageNewsTypeNotRead {width:100px; padding-left: 5px; font-size:12px; color:#4b4b4b; font-weight:bold; display:block;} +.homepageNewsTypeNotRead {padding-left: 5px; font-size:12px; color:#4b4b4b; font-weight:bold; display:block;} .homepageNewsTypeNotReadHomework {width:170px; padding-left: 5px; font-size:12px; color:#4b4b4b; font-weight:bold; display:block;overflow:hidden; height:49px; word-break:break-all; word-wrap:break-word;text-overflow:ellipsis;} .calendar_input{border-left:none !important;border-bottom: none!important; border-top: none!important; border-right: 1px solid #d9d9d9;} .calendar_div{border: 1px solid #d9d9d9;}