Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
f64e3506
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f64e3506
编写于
1月 27, 2016
作者:
J
Jacob Schatz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add js to expand and contract side menu
上级
ee89e9c8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
39 addition
and
14 deletion
+39
-14
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+21
-0
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+9
-4
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+3
-3
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+6
-7
未找到文件。
app/assets/javascripts/application.js.coffee
浏览文件 @
f64e3506
...
@@ -212,4 +212,25 @@ $ ->
...
@@ -212,4 +212,25 @@ $ ->
$this
=
$
(
this
)
$this
=
$
(
this
)
$this
.
attr
'value'
,
$this
.
val
()
$this
.
attr
'value'
,
$this
.
val
()
$
(
'.right-sidebar'
).
on
'click'
,
'.gutter-toggle'
,
(
e
)
->
e
.
preventDefault
()
$this
=
$
(
this
)
$thisIcon
=
$this
.
find
'i'
if
$thisIcon
.
hasClass
(
'fa-angle-double-right'
)
$thisIcon
.
removeClass
(
'fa-angle-double-right'
)
.
addClass
(
'fa-angle-double-left'
)
$this
.
closest
(
'aside'
)
.
removeClass
(
'right-sidebar-expanded'
)
.
addClass
(
'right-sidebar-collapsed'
)
else
$thisIcon
.
removeClass
(
'fa-angle-double-left'
)
.
addClass
(
'fa-angle-double-right'
)
$this
.
closest
(
'aside'
)
.
removeClass
(
'right-sidebar-collapsed'
)
.
addClass
(
'right-sidebar-expanded'
)
console
.
log
(
'collapse'
)
new
Aside
()
new
Aside
()
app/assets/stylesheets/pages/issuable.scss
浏览文件 @
f64e3506
...
@@ -42,8 +42,6 @@
...
@@ -42,8 +42,6 @@
.issuable-details
{
.issuable-details
{
section
{
section
{
border-right
:
1px
solid
$border-white-light
;
.issuable-discussion
{
.issuable-discussion
{
margin-right
:
1px
;
margin-right
:
1px
;
}
}
...
@@ -92,7 +90,7 @@
...
@@ -92,7 +90,7 @@
}
}
.gutter-
collaps
e
{
.gutter-
toggl
e
{
margin-left
:
10px
;
margin-left
:
10px
;
border-left
:
1px
solid
#F0F0F0
;
border-left
:
1px
solid
#F0F0F0
;
padding-left
:
10px
;
padding-left
:
10px
;
...
@@ -162,9 +160,16 @@
...
@@ -162,9 +160,16 @@
transition-duration
:
.3s
;
transition-duration
:
.3s
;
background
:
$gray-light
;
background
:
$gray-light
;
overflow
:
scroll
;
overflow
:
scroll
;
width
:
$gutter_width
;
padding
:
10px
20px
;
padding
:
10px
20px
;
&
.right-sidebar-expanded
{
width
:
$gutter_width
;
}
&
.right-sidebar-collapsed
{
width
:
$sidebar_collapsed_width
;
}
.btn
{
.btn
{
background
:
$gray-normal
;
background
:
$gray-normal
;
border
:
1px
solid
$gray-darkest
;
border
:
1px
solid
$gray-darkest
;
...
...
app/helpers/application_helper.rb
浏览文件 @
f64e3506
...
@@ -303,7 +303,7 @@ module ApplicationHelper
...
@@ -303,7 +303,7 @@ module ApplicationHelper
end
end
end
end
def
next_issuable_for
(
project
)
def
next_issuable_for
(
project
,
id
)
if
project
.
nil?
if
project
.
nil?
nil
nil
elsif
current_controller?
(
:issues
)
elsif
current_controller?
(
:issues
)
...
@@ -313,13 +313,13 @@ module ApplicationHelper
...
@@ -313,13 +313,13 @@ module ApplicationHelper
end
end
end
end
def
prev_issuable_for
(
project
)
def
prev_issuable_for
(
project
,
id
)
if
project
.
nil?
if
project
.
nil?
nil
nil
elsif
current_controller?
(
:issues
)
elsif
current_controller?
(
:issues
)
project
.
issues
.
where
(
"id < ?"
,
id
).
last
project
.
issues
.
where
(
"id < ?"
,
id
).
last
elsif
current_controller?
(
:merge_requests
)
elsif
current_controller?
(
:merge_requests
)
project
.
merge_requests
.
where
(
"id
>
?"
,
id
).
last
project
.
merge_requests
.
where
(
"id
<
?"
,
id
).
last
end
end
end
end
...
...
app/views/shared/issuable/_sidebar.html.haml
浏览文件 @
f64e3506
%aside
.right-sidebar
%aside
.right-sidebar
.right-sidebar-expanded
.issuable-sidebar
.issuable-sidebar
.block
.block
%span
.issuable-count.pull-left
%span
.issuable-count.pull-left
=
issuable
.
iid
=
issuable
.
iid
of
of
=
issuable_count
(
:all
,
@project
)
=
issuable_count
(
:all
,
@project
)
%span
.gutter-collapse.pull-right
%span
.pull-right
=
icon
(
'angle-double-right'
)
%a
.gutter-toggle
{
href:
'#'
}
=
icon
(
'angle-double-right'
)
.issuable-nav.pull-right.btn-group
{
role:
'group'
,
"aria-label"
=>
'...'
}
.issuable-nav.pull-right.btn-group
{
role:
'group'
,
"aria-label"
=>
'...'
}
%a
.btn.btn-default
{
href:
'#'
}
=
link_to
'Prev'
,
namespace_project_issue_path
(
namespace_id:
@project
,
id:
prev_issuable_for
(
@project
,
issuable
.
id
)),
class:
'btn btn-default'
Prev
=
link_to
'Next'
,
namespace_project_issue_path
(
namespace_id:
@project
,
id:
next_issuable_for
(
@project
,
issuable
.
id
)),
class:
'btn btn-default'
%a
.btn.btn-default
{
href:
'#'
}
Next
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
issuable
],
remote:
true
,
html:
{
class:
'issuable-context-form inline-update js-issuable-update'
}
do
|
f
|
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
issuable
],
remote:
true
,
html:
{
class:
'issuable-context-form inline-update js-issuable-update'
}
do
|
f
|
.block.assignee
.block.assignee
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录