diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 9fe29746e..a0735bf8a 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -390,7 +390,14 @@ class HomeworkCommonController < ApplicationController @homework_detail_manual.evaluation_end = params[:evaluation_end] end - @homework_detail_manual.evaluation_num = params[:evaluation_num] + evaluation_num = @homework_detail_manual.evaluation_num + if params[:evaluation_limit].to_i == 1 + @homework_detail_manual.evaluation_num = params[:evaluation_num] + @homework_detail_manual.absence_penalty = evaluation_num == -1 ? 5 : @homework_detail_manual.absence_penalty + else + @homework_detail_manual.evaluation_num = -1 + @homework_detail_manual.absence_penalty = 0 + end @homework_detail_manual.save @user_activity_id = params[:user_activity_id].to_i @hw_status = params[:hw_status].to_i diff --git a/app/views/homework_common/_set_evalutation_att.html.erb b/app/views/homework_common/_set_evalutation_att.html.erb index eff138305..61d1b983c 100644 --- a/app/views/homework_common/_set_evalutation_att.html.erb +++ b/app/views/homework_common/_set_evalutation_att.html.erb @@ -1,53 +1,84 @@ -
+
<%= form_for('new_form',:url => {:controller => 'homework_common',:action => 'set_evaluation_attr',:homework => @homework.id,:user_activity_id=>user_activity_id,:hw_status=>hw_status},:method => "post",:remote => true) do |f|%> - 匿评设置 -
- -
- 开启匿评 -
- - <%#= calendar_for('evaluation_start_time')%> -
+
+

匿评设置

+
-

-
-
- 关闭匿评 -
- - <%#= calendar_for('evaluation_end_time')%> -
+
+
+
    +
  • + +
    + + <%#= calendar_for('evaluation_start_time')%> +
    +
    +

    +
  • +
  • + +
    + + <%#= calendar_for('evaluation_end_time')%> +
    +
    +

    +
  • +
  • + + + + +
    +

    +
  • +
  • + + + +
  • +
+
    + + + + +
-

-
-
- -
- 匿评人数 - -
-

-
-
- -
- 禁用匿评 - - 禁用后将无法进行学生互评 -
-
- -
-
- 确定 -
-
- 取消 +
+ 注意:开启匿评时尚未提交作品的同学,将不参与匿评
+ 确定 + 取消 +
-
<% end%> -
\ No newline at end of file +
+ \ No newline at end of file diff --git a/app/views/homework_common/set_evaluation_attr.js.erb b/app/views/homework_common/set_evaluation_attr.js.erb index e084967c7..672520ad7 100644 --- a/app/views/homework_common/set_evaluation_attr.js.erb +++ b/app/views/homework_common/set_evaluation_attr.js.erb @@ -1,4 +1,4 @@ -clickCanel(); +hideModal(); <% if @hw_status == 5 %> $("#homework_post_brief").html("<%= escape_javascript(render :partial => 'student_work/homework_post_brief', :locals => {:homework => @homework, :is_teacher => @is_teacher}) %>"); <% else %> diff --git a/app/views/homework_common/start_evaluation_set.js.erb b/app/views/homework_common/start_evaluation_set.js.erb index 3ece646dc..d038a0a89 100644 --- a/app/views/homework_common/start_evaluation_set.js.erb +++ b/app/views/homework_common/start_evaluation_set.js.erb @@ -1,10 +1,12 @@ -$('#ajax-modal').html('<%= escape_javascript(render :partial => 'homework_common/set_evalutation_att',:locals => {:user_activity_id => @user_activity_id,:hw_status => @hw_status,:remote=>true}) %>'); +var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_evalutation_att',:locals => {:user_activity_id => @user_activity_id,:hw_status => @hw_status,:remote=>true}) %>"; +pop_box_new(htmlvalue, 620, 315); +//$('#ajax-modal').html('<%#= escape_javascript(render :partial => 'homework_common/set_evalutation_att',:locals => {:user_activity_id => @user_activity_id,:hw_status => @hw_status,:remote=>true}) %>'); var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: 0, showOn: 'button', buttonImageOnly: true, buttonImage: '/images/public_icon.png', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true}; -showModal('ajax-modal', '350px'); -$('#ajax-modal').siblings().remove(); -$('#ajax-modal').before("" + -""); -$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed").css("border","3px solid #269ac9"); +//showModal('ajax-modal', '350px'); +//$('#ajax-modal').siblings().remove(); +//$('#ajax-modal').before("" + +//""); +//$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed").css("border","3px solid #269ac9"); $(function() { $('#evaluation_start_time').datepicker(datepickerOptions); $('#evaluation_end_time').datepicker(datepickerOptions); }); \ No newline at end of file diff --git a/public/javascripts/application.js b/public/javascripts/application.js index ec8263d6f..47d6266b4 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -423,6 +423,9 @@ function showModal(id, width) { } function hideModal(el) { + if($("#popupWrap").length > 0){ + $("#popupWrap").hide(); + } var modal; if (el) { modal = $(el).parents('.ui-dialog-content'); @@ -1554,13 +1557,24 @@ function pop_up_box(value,tWidth,tTop,tLeft){ function pop_box_new(value, Width, Height){ w = ($(window).width() - Width)/2; h = ($(window).height() - Height)/2; - $("#ajax-modal").html(value); - showModal('ajax-modal', Width + 'px'); - $('#ajax-modal').siblings().remove(); - $('#ajax-modal').parent().css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed"}); - $('#ajax-modal').parent().removeClass("resourceUploadPopup popbox_polls popbox"); - $('#ajax-modal').css({"padding":"0","overflow":"hidden"}); - $('#ajax-modal').parent().attr("id","popupWrap"); + var container =$('
'); + container.attr('id','popupWrap'); + $(document.body).append(container); + $("#popupWrap").html(value); + $("#popupWrap").show(); + $('#popupWrap').css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed","z-index":"99999"}); + $('#popupWrap').find("a[class*='close']").click(function(){ + $("#popupWrap").hide(); + }); +// w = ($(window).width() - Width)/2; +// h = ($(window).height() - Height)/2; +// $("#ajax-modal").html(value); +// showModal('ajax-modal', Width + 'px'); +// $('#ajax-modal').siblings().remove(); +// $('#ajax-modal').parent().css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed"}); +// $('#ajax-modal').parent().removeClass("resourceUploadPopup popbox_polls popbox"); +// $('#ajax-modal').css({"padding":"0","overflow":"hidden"}); +// $('#ajax-modal').parent().attr("id","popupWrap"); //拖拽 function Drag(id) { @@ -1576,7 +1590,7 @@ function pop_box_new(value, Width, Height){ _this.getDistance(evt); document.onmousemove = function (evt) { _this.setPosition(evt); - } + }; _this.div.onmouseup = function () { _this.clearEvent(); } @@ -1586,7 +1600,7 @@ function pop_box_new(value, Width, Height){ var oEvent = evt || event; this.disX = oEvent.clientX - this.div.offsetLeft; this.disY = oEvent.clientY - this.div.offsetTop; - } + }; Drag.prototype.setPosition = function (evt) { var oEvent = evt || event; var l = oEvent.clientX - this.disX; @@ -1605,18 +1619,24 @@ function pop_box_new(value, Width, Height){ } this.div.style.left = l + "px"; this.div.style.top = t + "px"; - } + }; Drag.prototype.clearEvent = function () { this.div.onmouseup = null; document.onmousemove = null; - } + }; - $(".sy_popup_con").mousedown(function(event){ + new Drag("popupWrap"); + + $("#popupWrap input, #popupWrap textarea").mousedown(function(event){ event.stopPropagation(); new Drag("popupWrap"); }); } +function close_modal(){ + $("#popupWrap").hide(); +} + // 公共提示弹框样式 //function pop_box_tip_new(value, Width, Top, Left){ // $("#ajax-modal").html(value); diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 71e817e9f..13d93a3be 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -650,7 +650,7 @@ function submit_set_evaluation_attr(end_time){ $("#evaluation_num").focus(); } else{ - $('#popbox02 form').submit(); + $('#muban_popup_box form').submit(); } } diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css index b005945d5..c9ecc48fd 100644 --- a/public/stylesheets/css/common.css +++ b/public/stylesheets/css/common.css @@ -165,6 +165,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/ .mr60 {margin-right:60px;} .mr65 {margin-right:65px;} .mr70{margin-right: 70px;} +.mr80{margin-right: 80px;} .mr95 {margin-right:95px !important;} .mr100 {margin-right:100px !important;} .mr118 {margin-right:118px !important;} diff --git a/public/stylesheets/css/moduel.css b/public/stylesheets/css/moduel.css index 1e2250de8..9c6d0d333 100644 --- a/public/stylesheets/css/moduel.css +++ b/public/stylesheets/css/moduel.css @@ -3,7 +3,10 @@ .muban_popup_top{background:#3b94d6;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;} .muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; } a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;} -a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;} +a:hover.muban_icons_close{background: url(../images/sy/sy_icons_close.png) -40px 0px no-repeat;} +#muban_popup_box input,#muban_popup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;} +#muban_popup_box label.pop_box_label{width: 100px; text-align: right; display: inline-block;} +input.radio-width90{ width: 90px; } /*模板表格 20161013byLB*/ .muban_table{ width:100%; background:#fff; border:1px solid #e5e5e5; border-bottom: none; } .muban_table thead tr{ height:40px; line-height:40px;} @@ -57,3 +60,11 @@ a.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; b a:hover.sub_btn{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;} /*模板form 20161013byLB*/ textarea.muban_textarea{ width: 98.5%;border:1px solid #ddd; background:#fff; color:#666; padding:5px;} +/*模板图标20161020byLB*/ +.muban-icons-clock{ background: url("../images/project/icons_issue.png") 0 -224px no-repeat; display: inline-block; width: 19px; height: 13px;} +/*提示条20161020byLB*/ +.alert{ padding:10px;border: 1px solid transparent; text-align: center;} +.alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;} +.alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;} +.close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;} +.close:hover{opacity: 0.5;} \ No newline at end of file diff --git a/public/stylesheets/css/public.css b/public/stylesheets/css/public.css index 33db41ad9..d819df280 100644 --- a/public/stylesheets/css/public.css +++ b/public/stylesheets/css/public.css @@ -1518,3 +1518,8 @@ a.syllabusbox_a_blue{ .homepagePostContainer {width:718px; border:1px solid #dddddd; padding:15px; background-color:#ffffff;} .homepageMainContent {margin: 10px auto; width: 750px;} + +.pro_newsetting_con li{ line-height: 30px;} +.popup_tip_box { position: relative; padding: 5px 10px; white-space: nowrap; background-color: #FFFEF4; border:1px solid #F3DDB3;} +.popup_tip_box em { display: block; border-width: 9px; position: absolute; top: 5px; left: -18px; border-style: dashed solid dashed dashed; border-color: transparent #F3DDB3 transparent transparent; font-size: 0; line-height: 0;} +.popup_tip_box span { display: block; border-width: 9px;position: absolute; top: 5px; left: -17px; border-style: dashed solid dashed dashed;border-color: transparent #FFFEF4 transparent transparent; font-size: 0; line-height: 0; } \ No newline at end of file