From 7c484b4f4a2f29a38ba98eae96eafc60b2254157 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 5 Aug 2016 18:00:10 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/pull_requests/_show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/pull_requests/_show.html.erb b/app/views/pull_requests/_show.html.erb index c46ebddb9..be3970d3a 100644 --- a/app/views/pull_requests/_show.html.erb +++ b/app/views/pull_requests/_show.html.erb @@ -17,7 +17,7 @@

请将新改动提交至源分支或者切换到其它目标分支

<% else %> <% if @request.state == "merged" %> - Hjqreturn于两小时前合并
+ <%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "link-blue" %>于<%= time_tag(@request.created_at) %> 前合并

改动已合并至<%= @request.target_branch %>

<% else %> <% if is_project_manager?(User.current.id, @project.id) %> From cd30f94d72a2d4df6b7f34d4d656006d37ffebc8 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 5 Aug 2016 18:01:11 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E9=A2=98=E5=BA=93=E5=8F=91=E9=80=81?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=BC=B9=E6=A1=86=E4=BD=8D=E7=BD=AE=E5=8F=8A?= =?UTF-8?q?=E5=8F=AF=E6=8B=96=E6=8B=BDjs=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/choose_user_course.js.erb | 2 +- app/views/users/send_homework_to_course.js.erb | 2 +- app/views/users/show_homework_detail.js.erb | 2 +- public/javascripts/application.js | 6 ++---- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/views/users/choose_user_course.js.erb b/app/views/users/choose_user_course.js.erb index 512a66018..19a244396 100644 --- a/app/views/users/choose_user_course.js.erb +++ b/app/views/users/choose_user_course.js.erb @@ -8,7 +8,7 @@ <%# else %> <% if params[:is_observe].nil? %> var htmlvalue = "<%= escape_javascript(render :partial => 'users/send_homework_to_course', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>"; - pop_box_new(htmlvalue,460,50,50); + pop_box_new(htmlvalue,460,435); <% else %> $("#send_homework_to_course_form").html("<%= escape_javascript(render :partial => 'users/send_homework_to_course_form', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>"); <% end %> diff --git a/app/views/users/send_homework_to_course.js.erb b/app/views/users/send_homework_to_course.js.erb index 7db28b869..2541c5bc7 100644 --- a/app/views/users/send_homework_to_course.js.erb +++ b/app/views/users/send_homework_to_course.js.erb @@ -1,4 +1,4 @@ $("#subject_count_homework_<%=@homework.id %>").html(<%= @homework.quotes %>); hideModal(); var htmlvalue = "<%= escape_javascript(render :partial => 'homework_post_notice') %>"; -pop_box_new(htmlvalue,380,40,50); \ No newline at end of file +pop_box_new(htmlvalue,380,182); \ No newline at end of file diff --git a/app/views/users/show_homework_detail.js.erb b/app/views/users/show_homework_detail.js.erb index 8c0e3c54a..cbb0cf057 100644 --- a/app/views/users/show_homework_detail.js.erb +++ b/app/views/users/show_homework_detail.js.erb @@ -3,5 +3,5 @@ $("#choose_courses_notice").html(""); <% else %> var htmlvalue = "<%= escape_javascript(render :partial => 'users/homework_repository_detail') %>"; - pop_box_new(htmlvalue,820,50,50); + pop_box_new(htmlvalue,820,155); <% end %> \ No newline at end of file diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 20040f559..cfeb4b341 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1495,7 +1495,7 @@ 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; + h = ($(window).height() - Height)/2 - 100; $("#ajax-modal").html(value); showModal('ajax-modal', Width + 'px'); $('#ajax-modal').siblings().remove(); @@ -1552,9 +1552,7 @@ function pop_box_new(value, Width, Height){ document.onmousemove = null; } - window.onload = function () { - new Drag("popupWrap"); - } + new Drag("popupWrap"); } // 公共提示弹框样式 From a46aba1491a4071d8e686be34f4a15df8cd77b8f Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 5 Aug 2016 18:12:08 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/pull_requests/_show.html.erb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/pull_requests/_show.html.erb b/app/views/pull_requests/_show.html.erb index be3970d3a..3fe189c98 100644 --- a/app/views/pull_requests/_show.html.erb +++ b/app/views/pull_requests/_show.html.erb @@ -11,20 +11,26 @@
<%= @request.title %>

<%= @request.description %>

请求将 <%= @request.source_branch %> 合并至 <%= @request.target_branch %> -
+ <% if @commits_count == 0 && @changes_count == 0 %> +
<%= @request.source_branch %>没有新内容可以合并至<%= @request.target_branch %>

请将新改动提交至源分支或者切换到其它目标分支

+
<% else %> <% if @request.state == "merged" %> +
<%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "link-blue" %>于<%= time_tag(@request.created_at) %> 前合并

改动已合并至<%= @request.target_branch %>

+
<% else %> +
<% if is_project_manager?(User.current.id, @project.id) %> <%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn", :remote => true %> <% end %> +
<% end %> -
+
  • <%= link_to "提交#{@commits_count}".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => 1), :remote => true, :class => "active" %>
  • From 910fe0f48ca5d71b13f4333fa3ae73dfdb9b5601 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 5 Aug 2016 18:23:03 +0800 Subject: [PATCH 4/5] css --- app/views/pull_requests/_show.html.erb | 60 +++++++++++++------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/app/views/pull_requests/_show.html.erb b/app/views/pull_requests/_show.html.erb index 3fe189c98..68386625e 100644 --- a/app/views/pull_requests/_show.html.erb +++ b/app/views/pull_requests/_show.html.erb @@ -9,41 +9,41 @@
    <%= @request.title %>

    <%= @request.description %>

    -
    - 请求将 <%= @request.source_branch %> 合并至 <%= @request.target_branch %> +
    + 请求将 <%= @request.source_branch %> 合并至 <%= @request.target_branch %> -<% if @commits_count == 0 && @changes_count == 0 %> -
    - <%= @request.source_branch %>没有新内容可以合并至<%= @request.target_branch %>
    -

    请将新改动提交至源分支或者切换到其它目标分支

    -
    -<% else %> - <% if @request.state == "merged" %> -
    - <%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "link-blue" %>于<%= time_tag(@request.created_at) %> 前合并
    -

    改动已合并至<%= @request.target_branch %>

    -
    + <% if @commits_count == 0 && @changes_count == 0 %> +
    + <%= @request.source_branch %>没有新内容可以合并至<%= @request.target_branch %>
    +

    请将新改动提交至源分支或者切换到其它目标分支

    +
    <% else %> -
    + <% if @request.state == "merged" %> +
    + <%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "link-blue" %>于<%= time_tag(@request.created_at) %> 前合并
    +

    改动已合并至<%= @request.target_branch %>

    +
    + <% else %> <% if is_project_manager?(User.current.id, @project.id) %> - <%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn", :remote => true %> +
    + <%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn", :remote => true %> +
    <% end %> -
    - <% end %> + <% end %> -
    -
      -
    • <%= link_to "提交#{@commits_count}".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => 1), :remote => true, :class => "active" %>
    • -
    • <%= link_to "改动#{@changes_count}".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => 2), :remote => true %>
    • -
    -
    根据最近提交时间排列
    -
    - <%= render :partial => "pull_requests/pull_request_commits" %> -
    -
    - <%= render :partial => "pull_requests/pull_request_changes" %> -
    - <% end %> +
    +
      +
    • <%= link_to "提交#{@commits_count}".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => 1), :remote => true, :class => "active" %>
    • +
    • <%= link_to "改动#{@changes_count}".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => 2), :remote => true %>
    • +
    +
    根据最近提交时间排列
    +
    + <%= render :partial => "pull_requests/pull_request_commits" %> +
    +
    + <%= render :partial => "pull_requests/pull_request_changes" %> +
    + <% end %> From 0200590a702f572221e0d548c93d49a6b660780d Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 5 Aug 2016 18:42:14 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=BE=85=E5=A4=84=E7=90=86=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E6=97=A0=E6=9B=B4=E6=96=B0=E5=86=85=E5=AE=B9=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E9=A1=B5=E5=B0=BE=E6=98=BE=E7=A4=BA=E5=81=8F=E7=A7=BB?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/pull_requests/_show.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/pull_requests/_show.html.erb b/app/views/pull_requests/_show.html.erb index 68386625e..30c640ee8 100644 --- a/app/views/pull_requests/_show.html.erb +++ b/app/views/pull_requests/_show.html.erb @@ -17,6 +17,7 @@ <%= @request.source_branch %>没有新内容可以合并至<%= @request.target_branch %>

    请将新改动提交至源分支或者切换到其它目标分支

    + <% else %> <% if @request.state == "merged" %>