diff --git a/app/views/avatar/_new_avatar_form.html.erb b/app/views/avatar/_new_avatar_form.html.erb index de3bf2b65..2593bf1f5 100644 --- a/app/views/avatar/_new_avatar_form.html.erb +++ b/app/views/avatar/_new_avatar_form.html.erb @@ -1,10 +1,11 @@ <%= image_tag(url_to_avatar(source), id: "avatar_image", :width =>"60", :height =>"60",:alt=>"上传图片")%> -<%= l(:button_upload_photo) %> +<%#= link_to l(:button_delete_file),{:controller => :avatar,:action => :delete_image,:remote=>true,:source_type=> source.class,:source_id=>source.id},:confirm => l(:text_are_you_sure), :method => :post, :class => "upbtn fl" %> +<%= l(:button_upload_photo) %> <%= file_field_tag 'avatar[image]', - :id => "upload_img", - :class => 'undis', + :id => 'upload_course_logo', + :class => 'undis upload_file', :size => "1", :multiple => true, :data => { diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index bb8bb546a..78f44aa31 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -17,9 +17,9 @@
  • <%= link_to "全部动态", {:controller => "courses", :action => "show", :type => nil}, :class =>"homepagePostTypeAll postTypeGrey"%>
  • <%= link_to "作业动态", {:controller => "courses", :action => "show", :type => "homework"}, :class => "homepagePostTypeAssignment postTypeGrey"%>
  • <%= link_to "通知动态", {:controller => "courses", :action => "show", :type => "news"}, :class => "homepagePostTypeNotice postTypeGrey"%>
  • -
  • <%= link_to "资源库动态", {:controller => "courses", :action => "show", :type => "attachment"}, :class => "resourcesTypeAtt resourcesGrey"%>
  • +
  • <%= link_to "资源库动态", {:controller => "courses", :action => "show", :type => "attachment"}, :class => "homepagePostTypeResource resourcesGrey"%>
  • <%= link_to "论坛动态", {:controller => "courses", :action => "show", :type => "message"}, :class => "homepagePostTypeForum postTypeGrey"%>
  • -
  • <%= link_to "留言动态", {:controller => "courses", :action => "show", :type => "journalsForMessage"}, :class => "homepagePostTypeQuiz postTypeGrey"%>
  • +
  • <%= link_to "留言动态", {:controller => "courses", :action => "show", :type => "journalsForMessage"}, :class => "homepagePostTypeMessage postTypeGrey"%>
  • <%= link_to "问卷动态", {:controller => "courses", :action => "show", :type => "poll"}, :class => "homepagePostTypeQuiz postTypeGrey"%>
  • diff --git a/public/images/homepage_icon.png b/public/images/homepage_icon.png index 28a7eb44a..a8548b1bc 100644 Binary files a/public/images/homepage_icon.png and b/public/images/homepage_icon.png differ diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 46a98ed6d..eeb11575a 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -410,22 +410,6 @@ function show_bid_dead_line(year,month,day,divname) + "

    作品提交还剩:

    "); } -//验证新建作业的名字 -function regex_homework_name() -{ - var name = $.trim($("#homework_name").val()); - - if(name=="") - { - $("#homework_name_span").text("名称不能为空"); - return false; - } - else - { - $("#homework_name_span").text(""); - return true; - } -} //处理迟交、缺评扣分 function check_late_penalty(id) @@ -579,22 +563,68 @@ function regex_evaluation_num(){ } //老师提交 新建/修改 作业 -//function submit_homework(id) -//{ -// if(!regex_homework_name()) -// { -// $("#homework_name").focus(); -// } -// else if(!regex_evaluation_num()) -// { -// $("#evaluation_num").focus(); -// } -// else -// { -// homework_description_editor.sync(); -// $("#"+id).submit(); -// } -//} +function submit_homework(id){ + if(!regex_homework_name()){ + $("#homework_name").focus(); + } + else if(!regex_homework_end_time()){ + $("#homework_end_time").focus(); + } + else if(!regex_course_id()){ + $("#course_id").focus(); + } + else{ + homework_description_editor.sync(); + $("#"+id).submit(); + } +} + +//验证新建作业的名字 +function regex_homework_name() +{ + var name = $.trim($("#homework_name").val()); + + if(name=="") + { + $("#homework_name_span").text("名称不能为空"); + return false; + } + else + { + $("#homework_name_span").text(""); + return true; + } +} +//验证截止时间 +function regex_homework_end_time() +{ + var name = $.trim($("#homework_end_time").val()); + if(name=="") + { + $("#homework_end_time_span").text("截止时间不能为空"); + return false; + } + else + { + $("#homework_end_time_span").text(""); + return true; + } +} + +//验证发送到课程 +function regex_course_id(){ + var course_id = $("#course_id").val(); + if(course_id == -1) + { + $("#homework_course_id_span").text("发布课程不能为空"); + return false; + } + else + { + $("#homework_course_id_span").text(""); + return true; + } +} function regexHomeworkCommonName() { diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index 28fa9597f..be3119257 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -63,17 +63,10 @@ function submit_homework(id){ else if(!regex_homework_end_time()){ $("#homework_end_time").focus(); } - //else if(!regex_evaluation_start()){ - // $("#evaluation_start_time").focus() - //} - //else if(!regex_evaluation_end()){ - // $("#evaluation_end_time").focus() - //} else if(!regex_course_id()){ $("#course_id").focus(); } else{ - homework_description_editor.sync(); $("#"+id).submit(); } diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 8661626c8..dd8c6d636 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -96,6 +96,8 @@ a.homepagePostTypeAssignment {background:url(../images/homepage_icon.png) -93px a.homepagePostTypeNotice {background:url(../images/homepage_icon.png) -87px -280px no-repeat; padding-left:23px;} a.homepagePostTypeForum {background:url(../images/homepage_icon.png) -10px -310px no-repeat; padding-left:23px;} a.homepagePostTypeQuiz {background:url(../images/homepage_icon.png) -90px -124px no-repeat; padding-left:23px;} +a.homepagePostTypeMessage {background:url(images/homepage_icon.png) -3px -518px no-repeat; padding-left:23px;} +a.homepagePostTypeResource {background:url(images/homepage_icon.png) -86px -517px no-repeat; padding-left:23px;} a.homepagePostTypeQuestion {background:url(../images/homepage_icon.png) -10px -273px no-repeat; padding-left:23px;} a.homepagePostTypeMine {background:url(../images/homepage_icon.png) -187px -277px no-repeat; padding-left:23px;} a.homepagePostTypeAll {background:url(../images/homepage_icon.png) -189px -308px no-repeat; padding-left:23px;} diff --git a/public/stylesheets/images/homepage_icon.png b/public/stylesheets/images/homepage_icon.png index 28a7eb44a..4bd18bf8f 100644 Binary files a/public/stylesheets/images/homepage_icon.png and b/public/stylesheets/images/homepage_icon.png differ diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 2806a1dbe..fb6da363a 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -881,3 +881,19 @@ a:hover.Reply_pic{border:1px solid #64bdd9;} .wiki {width: 510px;} .wiki img {max-width:100%;} +#content_ .tabs_enterprise ul li a.selected:hover {background-color: #E2F4FF;} +/*end*/ +/*end*/ +/***** Diff *****/ +.diff_out { background: #fcc; } +.diff_out span { background: #faa; } +.diff_in { background: #cfc; } +.diff_in span { background: #afa; } + +.text-diff { + padding: 1em; + background-color:#f6f6f6; + color:#505050; + border: 1px solid #e4e4e4; +} +