From 1a7e1db3fb6caba0396ff098986d34f608f84adb Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 2 Nov 2015 14:20:14 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93=E9=BC=A0?= =?UTF-8?q?=E6=A0=87=E5=9C=A8=E7=A7=BB=E5=8A=A8=E6=97=B6=EF=BC=8C=E7=81=B0?= =?UTF-8?q?=E8=89=B2=E6=9D=A1=E8=B7=9F=E7=9D=80=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/user_resource.html.erb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/views/users/user_resource.html.erb b/app/views/users/user_resource.html.erb index f6bb3c8cb..5c6339e59 100644 --- a/app/views/users/user_resource.html.erb +++ b/app/views/users/user_resource.html.erb @@ -145,6 +145,7 @@ var id; //资源id var sendType; //发送到课程 1 发送到项目 2 var lastSendType; //保存上次发送的发送类型 + var last_op $("#resources_list").mousedown(function(e) { //如果是右键的话 if (3 == e.which) { @@ -179,6 +180,28 @@ last_line = line; } }); + + //鼠标经过时,背景颜色设为灰色 + $("#resources_list").mouseover(function(e){ + pageX = e.clientX; + pageY = e.clientY; + var ele = document.elementFromPoint(pageX,pageY); + line = $(ele).parent(); + if(last_op != null){ + last_op.children().css("background-color", 'white'); + restore(); + last_op == null; + } + //如果当前的tag是li,那么还要li的父级元素 + if(line.get(0).tagName === 'LI'){ + line = line.parent(); + } + //将当前的元素的所有子元素的背景色改为蓝色 + line.children().css("background-color", '#e1e1e1'); + //将当前元素赋给 上一个对象 保存起来。 + last_op = line; + }); + //元素包含关系计算 var contains = function(root, el) { if (root.compareDocumentPosition) From 4abb532fd48640a304e98caf82037832ab0a4eaf Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 2 Nov 2015 14:51:56 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E6=96=B0=E6=B3=A8=E5=86=8C=E7=9A=84?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=BB=98=E8=AE=A4=E8=BA=AB=E4=BB=BD=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=20=E7=BC=96=E8=BE=91=E8=B5=84=E6=96=99=E6=97=B6?= =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E6=98=AF=E5=BF=85=E5=A1=AB=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 7bc674ea6..c2a94a478 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -17,7 +17,7 @@ - <%=l(:lable_project_rep_create) %> - <%=l(:button_cancel)%> + <%=l(:lable_project_rep_create) %> + <%=l(:button_cancel)%> <% end %> From e0d5c948fa23816dc37f152c3b23be8988b1819c Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 19:27:23 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=BA=93=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/settings/_new_repositories.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index a802faef1..4653916a7 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -12,7 +12,7 @@
项目管理员您好!近日平台完成了版本库升级,以后每个项目将唯一的对应一个版本库。请您按照以下步骤完成项目版本库的更新:

1. 点击下面的"创建版本库按钮",为本项目创建一个新的版本库;

-

2. 从本项目的历史版本库中选择一个您将使用的版本库,将其完整的克隆(clone)到本地,然后推送(push)到新建的版本库(注意不能仅推送代码,否则之前各开发者的提交记录将丢失)。

+

2. 从本项目的历史版本库中选择一个您将使用的版本库,将其完整的克隆(clone)到本地(需要提供您之前设置的版本库口令),然后推送(push)到新建的版本库(注意不能仅推送代码,否则之前各开发者的提交记录将丢失)。

3. 本项目的历史版本库将在您新建版本库的一周内自动隐藏,如果您以后需要这些版本库,请与网站联系,我们将为您提供这些版本库的所有数据。

<% end %> From edf9b4a6b533839b3145b97338f02e43955de86f Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 20:01:19 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/settings/_new_repositories.html.erb | 2 +- public/javascripts/project.js | 5 +++++ public/stylesheets/public.css | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index 4653916a7..5196fd8e8 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -72,7 +72,7 @@ <%= repository.identifier %> <%=h repository.scm_name %> <%if repository.scm_name=="Git"%> - <%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>60) %> diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 5ba7c7145..9344434eb 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -517,6 +517,11 @@ function jsCopy(){ e.select(); document.execCommand("Copy"); } +function jsCopy2(){ + var e=document.getElementById("copy_rep_content2"); + e.select(); + document.execCommand("Copy"); +} function zip(){ alert("该功能正在紧张的开发中,我们会争取在最短时间内上线,如若对您工作造成不便敬请谅解!") diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 0c4479907..49b2906aa 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -117,6 +117,7 @@ h4{ font-size:14px; color:#3b3b3b;} .mb10{ margin-bottom:10px !important;} .mb20{ margin-bottom:20px;} .pl15{ padding-left:15px;} +.pl5{ padding-left:5px;} .pt5{ padding-top:5px;} .pt10{ padding-top:10px;} .pb5{ padding-bottom: 5px;} From 4cd41e0a67de72ff59e1fa874e4db1de306f3f32 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 2 Nov 2015 20:41:01 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/projects_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 48766813c..51d1846d8 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -125,7 +125,7 @@ module ProjectsHelper # 获取新项目的版本库地址 def rep_gitlab_url(project) gitlab_address = Redmine::Configuration['gitlab_address'] - url = gitlab_address.to_s+"/"+project.owner.to_s+"/"+project.identifier+"."+"git" + url = gitlab_address.to_s+"/"+project.owner.to_s+"/"+ rep_gitlab(project).first.identifier+"."+"git" end # # 获取Forge历史版本库