diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb index 89ded10b3..8381a479b 100644 --- a/app/views/student_work/_evaluation_title.html.erb +++ b/app/views/student_work/_evaluation_title.html.erb @@ -1,5 +1,5 @@
序号 | <% if @homework.homework_type != 3 %> diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb index 1a3220df6..d3b8c3443 100644 --- a/app/views/student_work/_evaluation_un_title.html.erb +++ b/app/views/student_work/_evaluation_un_title.html.erb @@ -1,16 +1,16 @@ - |
---|
序号 | <% if @homework.homework_type != 3 %> - | 作品名称 | -+ | + -+ | <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>作品名称 | -+ | 关联项目 | <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 0 %> diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index 688e31451..052230612 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -12,7 +12,7 @@ <%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%> -+ | <%= student_work.user.show_name%> | " onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;"> diff --git a/public/javascripts/resizeable_table.js b/public/javascripts/resizeable_table.js index 6221b501c..d7e48bb2e 100644 --- a/public/javascripts/resizeable_table.js +++ b/public/javascripts/resizeable_table.js @@ -2,6 +2,12 @@ * Created by ttang on 2016/5/24. */ $(document).ready(function(){ + window.onload = function(){ + $("th").each(function(){ + $(this).css("width",$(this).width()-1); + }); + } + resizeable_table = function(colS,colE,p1,p2){ var headerTds = document.getElementById("homework_table").rows[0].cells; var mousedown = false; @@ -34,20 +40,13 @@ if (mousedown == true){ var width = (tdWidth + (evt.screenX - screenXStart)) - p1 + "px";//计算后的新的宽度 var width2 = (tdWidth2 - (evt.screenX - screenXStart)) - p2 + "px"; - console.log(width, width2, totalWidth); - if (parseInt(width)<0 || parseInt(width2)<58 || tdWidth > totalWidth || tdWidth2 > totalWidth){ + if (parseInt(width)<0 || parseInt(width2)<0 || tdWidth > totalWidth || tdWidth2 > totalWidth){ tartgetTd = null; resizeable = false; mousedown = false; }else{ targetTd.style.width = width; targetTd.nextElementSibling.style.width = width2; - document.onmouseup = function(event){ - tartgetTd = null; - resizeable = false; - mousedown = false; - document.body.style.cursor='default'; - } } }else{ var trObj = tblObj.rows[0]; @@ -57,11 +56,12 @@ srcObj.style.cursor='col-resize';//修改光标样式 }else{ resizeable = false; + mousedown = false; srcObj.style.cursor='default'; } } } - document.onmouseup = function(event){ + document.body.onmouseup = function(event){ tartgetTd = null; resizeable = false; mousedown = false; |
---|