From 0ab3c43fcde59900db3d6b4e8de07bb558ee99b5 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 1 Sep 2017 14:48:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=AD=A3=E5=9C=A8=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=BC=A0=E6=A0=87=E7=82=B9=E5=87=BB=E6=95=88?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/subjects/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/subjects/show.html.erb b/app/views/subjects/show.html.erb index 8b96050c1..672ba35c2 100644 --- a/app/views/subjects/show.html.erb +++ b/app/views/subjects/show.html.erb @@ -33,7 +33,7 @@ <% stage.stage_shixuns.each_with_index do |stage_shixun, index| %> <% shixun = stage_shixun.shixun %>
;" onclick="<%= allow_shixun_exec(shixun) ? "" : "shixun_link('#{shixun.identifier}')" %>"> + style="<%= allow_shixun_exec(shixun) ? "" : "cursor: pointer" %>;" onclick="<%= allow_shixun_exec(shixun) ? "" : (shixun.status < 2 && !User.current.manager_of_shixun?(shixun) ? "" : "shixun_link('#{shixun.identifier}')") %>">
  • <%= s_index + 1 %>-<%= index + 1 %>  <%= shixun.name %> @@ -68,7 +68,7 @@ <% end %> <% end %> <% if shixun.status < 2 && !User.current.manager_of_shixun?(shixun) %> - + <% else %> <%= link_to "查看详情", shixun_path(shixun), :class => "task-btn task-btn-green ml10", :style=>"display: none", :target => "_blank" %> <% end %> From 63fab4310353c18c9f185e27e4a10d8fefd2d8bf Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Fri, 1 Sep 2017 14:59:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?issue=E5=88=97=E8=A1=A8=E7=9A=84=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/challenges_helper.rb | 8 +-- app/views/challenges/_content_list.html.erb | 14 +++--- app/views/challenges/index.html.erb | 2 +- app/views/games/_code_actions.html.erb | 6 +++ app/views/games/_game_show.html.erb | 4 +- app/views/games/_pass_game_show.html.erb | 4 +- app/views/games/_repository.html.erb | 2 +- app/views/my/account.html.erb | 2 +- app/views/users/_myjoin_shixun_list.html.erb | 2 +- public/javascripts/edu/application.js | 4 +- public/javascripts/edu/base_edu.js | 4 ++ public/javascripts/edu/edu_tpi.js | 53 ++++++++++++-------- public/stylesheets/css/taskstyle.css | 1 + 13 files changed, 65 insertions(+), 41 deletions(-) diff --git a/app/helpers/challenges_helper.rb b/app/helpers/challenges_helper.rb index 330c4a991..a0d8dd13f 100644 --- a/app/helpers/challenges_helper.rb +++ b/app/helpers/challenges_helper.rb @@ -16,13 +16,13 @@ module ChallengesHelper game = Game.where(:challenge_id => challenge_id, :user_id => User.current.id).first case game.try(:status) when 0 - "待完成  ".html_safe + "待完成  ".html_safe when 1 - "".html_safe + "".html_safe when 2 - "已完成  ".html_safe + "已完成  ".html_safe when 3,nil - "未解锁  ".html_safe + "未解锁  ".html_safe end end end diff --git a/app/views/challenges/_content_list.html.erb b/app/views/challenges/_content_list.html.erb index da8510b46..31e5582f0 100644 --- a/app/views/challenges/_content_list.html.erb +++ b/app/views/challenges/_content_list.html.erb @@ -16,11 +16,11 @@

    <% if challenge.st == 0 %> - + <% elsif challenge.st == 1 %> - + <% elsif challenge.st == 2 %> - + <% end%> @@ -39,15 +39,15 @@ <% if User.current.manager_of_shixun?(@shixun) %>

    <% if @shixun.status == 0 %> - + <% unless challenge.position < 2 %> - + <% end %> <% if @shixun.challenges.count != challenge.position %> - + <% end %> <% end %> - +

    diff --git a/app/views/challenges/index.html.erb b/app/views/challenges/index.html.erb index 7872a781f..56affc61d 100644 --- a/app/views/challenges/index.html.erb +++ b/app/views/challenges/index.html.erb @@ -12,7 +12,7 @@ <% end %>
    -

    简介

    +

    简介

    diff --git a/app/views/games/_code_actions.html.erb b/app/views/games/_code_actions.html.erb index 8a259de90..28112a6e1 100644 --- a/app/views/games/_code_actions.html.erb +++ b/app/views/games/_code_actions.html.erb @@ -145,6 +145,7 @@ /* ----------------- 评测 -------------------- */ function training_task_submmit(){ + // 加载页面 nEvalContent = $("#evaluating_contents").hide(); nEvalInfo = $("#evaluating_info").hide(); @@ -278,14 +279,19 @@ nInfoAjaxLoading.hide(); ajaxTimeoutTest.abort(); clearInterval(intId); + }} }); }, 2000); + } }); } + $("#all_task_show").css("display","none"); } + }); + } \ No newline at end of file diff --git a/app/views/games/_game_show.html.erb b/app/views/games/_game_show.html.erb index a795d662c..0daa13b4b 100644 --- a/app/views/games/_game_show.html.erb +++ b/app/views/games/_game_show.html.erb @@ -68,10 +68,10 @@ <%= render :partial => "games/shixun_comment_block" %>
  • 发送
  • - " onclick="game_praise('<%= @game_challenge.id %>', '<%= @game_challenge.class %>')" id="game_praise_tread" class="pt5 color-grey mr20"> + " onclick="game_praise('<%= @game_challenge.id %>', '<%= @game_challenge.class %>')" id="game_praise_tread" class="pt5 color-grey mr20"> " alt="赞" ><%= @praise_count %> - " onclick="game_tread('<%= @game_challenge.id %>')" id="game_tread" class="color-grey" style="padding-top:7px;"> + " onclick="game_tread('<%= @game_challenge.id %>')" id="game_tread" class="color-grey" style="padding-top:7px;"> " ><%= @tread_count %>
  • diff --git a/app/views/games/_pass_game_show.html.erb b/app/views/games/_pass_game_show.html.erb index 717ecb2cc..ef9d9a815 100644 --- a/app/views/games/_pass_game_show.html.erb +++ b/app/views/games/_pass_game_show.html.erb @@ -19,5 +19,7 @@ url: "<%= refresh_game_list_myshixun_game_path(game, :myshixun_id => myshixun) %>", dataType: "script" }); - }; + + //$("#all_task_show").css("display","none"); + } \ No newline at end of file diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb index 5533a0e78..5a77fe9ca 100644 --- a/app/views/games/_repository.html.erb +++ b/app/views/games/_repository.html.erb @@ -12,7 +12,7 @@

  • <% if @path == @game.challenge.path.try(:strip) %> - + <% end %>
    diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 2aa77eb47..b2f3e0146 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -261,7 +261,7 @@
    - +
      diff --git a/app/views/users/_myjoin_shixun_list.html.erb b/app/views/users/_myjoin_shixun_list.html.erb index f18800d49..4c8b340ff 100644 --- a/app/views/users/_myjoin_shixun_list.html.erb +++ b/app/views/users/_myjoin_shixun_list.html.erb @@ -22,7 +22,7 @@ <% end %> - <%= format_time(shixun.updated_at) %> 开启 + <%= format_time(shixun.updated_at) %> 更新

    查看详情 diff --git a/public/javascripts/edu/application.js b/public/javascripts/edu/application.js index 98776a516..ca1ca577b 100644 --- a/public/javascripts/edu/application.js +++ b/public/javascripts/edu/application.js @@ -120,7 +120,7 @@ $(function(){ $desc.show().css({ left:$(this).offset().left +30, opacity:0.7, - top:$(this).offset().top-$desc.height()/4 + top:$(this).offset().top-$desc.height()/8 }); }); $("[data-tip-left]").live("mouseenter",function(){ @@ -129,7 +129,7 @@ $(function(){ $desc.show().css({ left:$(this).offset().left-$desc.width()-10, opacity:0.7, - top:$(this).offset().top-$desc.height()/4 + top:$(this).offset().top-$desc.height()/8 }); }); diff --git a/public/javascripts/edu/base_edu.js b/public/javascripts/edu/base_edu.js index 266da3302..7fa0aca57 100644 --- a/public/javascripts/edu/base_edu.js +++ b/public/javascripts/edu/base_edu.js @@ -557,6 +557,10 @@ function submit_new_student_work(type){ notice_box("成员人数不符合要求"); } } +// if(lebel_file_uploding!==0){ +// result = false; +// notice_box("有文件正在上传请洒红后提交"); +// } if(result){ student_work_description_editor.sync(); $("#student_work_form").submit(); diff --git a/public/javascripts/edu/edu_tpi.js b/public/javascripts/edu/edu_tpi.js index 8310d9244..b9c25aae9 100644 --- a/public/javascripts/edu/edu_tpi.js +++ b/public/javascripts/edu/edu_tpi.js @@ -11,21 +11,25 @@ $(function(){ var flag = false; var wrapWidth; var wrapHeight; - lab.bind('mousedown',function(){ + lab.live('mousedown',function(){ + dragging = true; leftOffset = $(".labelN").offset().left; wrapWidth = $(".labelN").width(); + return false; } ); - cen.bind('mousedown',function(){ + cen.live('mousedown',function(){ + flag = true; topOffset = $(".centerH").offset().top; wrapHeight = $(".centerH").height(); + return false; } ); - doc.bind('mousemove',function(e){ + doc.live('mousemove',function(e){ $(".-brother").show();// 代码行的遮罩显示 if(dragging) { @@ -33,21 +37,21 @@ $(function(){ if(clickX > leftOffset+300&&clickX topOffset +100) { cen.css('top', clickY - 7 - topOffset + 'px'); - cen.prev().height( clickY-topOffset + 'px'); + $("#games_repository_contents").height( clickY-topOffset + 'px'); nextW1 = clickY-topOffset; - cen.next().height( wrapHeight - nextW1 + 'px'); + $("#games_valuation_contents").height( wrapHeight - nextW1 + 'px'); var h = $("#games_repository_contents").height() - $("#top_repository").height() - 50; var m = $("#games_repository_contents").height() - 50; $(".game_webssh").css("min-height", m); @@ -55,17 +59,21 @@ $(function(){ var rows = parseInt(m / 18); $("#file_entry_content").find(".CodeMirror-scroll").css("min-height", h); $("#file_entry_content").find(".CodeMirror-scroll").css("max-height", h); + } else { cen.css('top', '0px'); + } } }); - doc.mouseup(function(e) { + doc.live("mouseup",function(e) { + flag = false; dragging = false; e.cancelBubble = true; $(".-brother").hide(); // 代码行的遮罩隐藏 + }); // end; //解決IE瀏覽器大小改變時webssh佈局變亂。 @@ -85,14 +93,17 @@ $(function(){ // 点击全部任务向右侧展开 $("#all_task_show").on("click", function(e){ c = 0; - $("#all_task_tab").removeClass('leftnav-active'); - $("#all_task_show").css("background","rgba(0,0,0,0)"); - $("#all_task_index").css("left", 0).stop().animate({ - left: "-505px" - }, 400, function(){ - $("#all_task_show").hide(); - fadein = 0; - }); + // if($("#all_task_index").css("left") == 0 +"px"){ + $("#all_task_tab").removeClass('leftnav-active'); + $("#all_task_show").css("background","rgba(0,0,0,0)"); + $("#all_task_index").css("left", 0).stop().animate({ + left: "-505px" + }, 400, function(){ + $("#all_task_show").hide(); + fadein = 0; + }); + // } + }); // end @@ -279,12 +290,12 @@ function game_praise(obj_id, obj_type){ praiseStatus = true; //已赞 praise_count.html(data.praise_tread_count); $("#game_praise_tread").children("i").addClass("color-light-green"); - $("#game_praise_tread").attr("title", "取消点赞") + $("#game_praise_tread").attr("data-tip-down", "取消点赞") }else{ praiseStatus = false; //取消赞 praise_count.html(data.praise_tread_count); $("#game_praise_tread").children("i").removeClass("color-light-green"); - $("#game_praise_tread").attr("title", "点赞") + $("#game_praise_tread").attr("data-tip-down", "点赞") } } }); @@ -305,12 +316,12 @@ function game_tread(obj_id){ treadStatus = true; // 取消踩 tread_count.html(data.praise_tread_count); $("#game_tread").children("i").addClass("color-orange"); - $("#game_tread").attr("title", "取消踩") + $("#game_tread").attr("data-tip-down", "取消踩") }else{ treadStatus = false; // 已踩 tread_count.html(data.praise_tread_count); $("#game_tread").children("i").removeClass("color-orange"); - $("#game_tread").attr("title", "踩"); + $("#game_tread").attr("data-tip-down", "踩"); } } }); diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css index 9fd8d0999..309996bc2 100644 --- a/public/stylesheets/css/taskstyle.css +++ b/public/stylesheets/css/taskstyle.css @@ -92,6 +92,7 @@ a.task-header-name{ max-width:200px;} .panel-form-label{ display:inline-block; width:10%; min-width:90px; text-align:right; line-height:40px; } +.panel-form-label1{ display:inline-block; width:20%; min-width:90px; text-align:right; line-height:40px; } .panel-form input,.panel-form textarea{ border:1px solid #e2e2e2;color:#666;line-height: 1.9;} .panel-box-sizing{-moz-box-sizing: border-box; /*Firefox3.5+*/-webkit-box-sizing: border-box; /*Safari3.2+*/-o-box-sizing: border-box; /*Opera9.6*/-ms-box-sizing: border-box; /*IE8*/box-sizing: border-box; } input.panel-form-width-690{ padding:5px;width:90%; height:40px; min-width:700px;} From fa6faad26d19cb3f1e7cc33c65fc9d93ad7d250c Mon Sep 17 00:00:00 2001 From: miss <994230062@qq.com> Date: Fri, 1 Sep 2017 15:06:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/school/upload_logo.html.erb | 116 ++++++++++++++++++++++++++ public/javascripts/edu/base_edu.js | 3 +- 2 files changed, 118 insertions(+), 1 deletion(-) diff --git a/app/views/school/upload_logo.html.erb b/app/views/school/upload_logo.html.erb index 735571ed6..e3bdfd595 100644 --- a/app/views/school/upload_logo.html.erb +++ b/app/views/school/upload_logo.html.erb @@ -74,3 +74,119 @@ function showPreview(source) { } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/javascripts/edu/base_edu.js b/public/javascripts/edu/base_edu.js index 7fa0aca57..12ec72bf0 100644 --- a/public/javascripts/edu/base_edu.js +++ b/public/javascripts/edu/base_edu.js @@ -536,6 +536,7 @@ function search_group_member_submit(){ } function submit_new_student_work(type){ + console.log($("#_file").attr("name")); var result = true; if(student_work_description_editor.isEmpty()){ result = false; @@ -563,7 +564,7 @@ function submit_new_student_work(type){ // } if(result){ student_work_description_editor.sync(); - $("#student_work_form").submit(); + //$("#student_work_form").submit(); } }