Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fbab37f1
Commit
fbab37f1
authored
Jun 21, 2017
by
Bryce Johnson
Committed by
Phil Hughes
Jun 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bulk edit scroll fix
parent
b2e1d32e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
5 deletions
+29
-5
app/assets/javascripts/issuable_bulk_update_sidebar.js
app/assets/javascripts/issuable_bulk_update_sidebar.js
+2
-0
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+7
-4
app/views/shared/issuable/_bulk_update_sidebar.html.haml
app/views/shared/issuable/_bulk_update_sidebar.html.haml
+1
-1
spec/features/issues/bulk_assignment_labels_spec.rb
spec/features/issues/bulk_assignment_labels_spec.rb
+19
-0
No files found.
app/assets/javascripts/issuable_bulk_update_sidebar.js
View file @
fbab37f1
...
@@ -22,6 +22,7 @@ export default class IssuableBulkUpdateSidebar {
...
@@ -22,6 +22,7 @@ export default class IssuableBulkUpdateSidebar {
initDomElements
()
{
initDomElements
()
{
this
.
$page
=
$
(
'
.page-with-sidebar
'
);
this
.
$page
=
$
(
'
.page-with-sidebar
'
);
this
.
$sidebar
=
$
(
'
.right-sidebar
'
);
this
.
$sidebar
=
$
(
'
.right-sidebar
'
);
this
.
$sidebarInnerContainer
=
this
.
$sidebar
.
find
(
'
.issuable-sidebar
'
);
this
.
$bulkEditCancelBtn
=
$
(
'
.js-bulk-update-menu-hide
'
);
this
.
$bulkEditCancelBtn
=
$
(
'
.js-bulk-update-menu-hide
'
);
this
.
$bulkEditSubmitBtn
=
$
(
'
.update-selected-issues
'
);
this
.
$bulkEditSubmitBtn
=
$
(
'
.update-selected-issues
'
);
this
.
$bulkUpdateEnableBtn
=
$
(
'
.js-bulk-update-toggle
'
);
this
.
$bulkUpdateEnableBtn
=
$
(
'
.js-bulk-update-toggle
'
);
...
@@ -113,6 +114,7 @@ export default class IssuableBulkUpdateSidebar {
...
@@ -113,6 +114,7 @@ export default class IssuableBulkUpdateSidebar {
toggleSidebarDisplay
(
show
)
{
toggleSidebarDisplay
(
show
)
{
this
.
$page
.
toggleClass
(
SIDEBAR_EXPANDED_CLASS
,
show
);
this
.
$page
.
toggleClass
(
SIDEBAR_EXPANDED_CLASS
,
show
);
this
.
$page
.
toggleClass
(
SIDEBAR_COLLAPSED_CLASS
,
!
show
);
this
.
$page
.
toggleClass
(
SIDEBAR_COLLAPSED_CLASS
,
!
show
);
this
.
$sidebarInnerContainer
.
toggleClass
(
HIDDEN_CLASS
,
!
show
);
this
.
$sidebar
.
toggleClass
(
SIDEBAR_EXPANDED_CLASS
,
show
);
this
.
$sidebar
.
toggleClass
(
SIDEBAR_EXPANDED_CLASS
,
show
);
this
.
$sidebar
.
toggleClass
(
SIDEBAR_COLLAPSED_CLASS
,
!
show
);
this
.
$sidebar
.
toggleClass
(
SIDEBAR_COLLAPSED_CLASS
,
!
show
);
}
}
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
fbab37f1
...
@@ -97,17 +97,19 @@
...
@@ -97,17 +97,19 @@
.issues-bulk-update.right-sidebar
{
.issues-bulk-update.right-sidebar
{
@include
maintain-sidebar-dimensions
;
@include
maintain-sidebar-dimensions
;
transition
:
right
$sidebar-transition-duration
;
width
:
0
;
right
:
-
$gutter-width
;
padding
:
0
;
transition
:
width
$sidebar-transition-duration
;
&
.right-sidebar-expanded
{
&
.right-sidebar-expanded
{
@include
maintain-sidebar-dimensions
;
@include
maintain-sidebar-dimensions
;
right
:
0
;
width
:
$gutter-width
;
}
}
&
.right-sidebar-collapsed
{
&
.right-sidebar-collapsed
{
@include
maintain-sidebar-dimensions
;
@include
maintain-sidebar-dimensions
;
right
:
-
$gutter-width
;
width
:
0
;
padding
:
0
;
.block
{
.block
{
padding
:
16px
0
;
padding
:
16px
0
;
...
@@ -118,5 +120,6 @@
...
@@ -118,5 +120,6 @@
.issuable-sidebar
{
.issuable-sidebar
{
padding
:
0
3px
;
padding
:
0
3px
;
width
:
calc
(
100%
+
35px
);
}
}
}
}
app/views/shared/issuable/_bulk_update_sidebar.html.haml
View file @
fbab37f1
-
type
=
local_assigns
.
fetch
(
:type
)
-
type
=
local_assigns
.
fetch
(
:type
)
%aside
.issues-bulk-update.js-right-sidebar.right-sidebar.affix-top
{
data:
{
"offset-top"
=>
"50"
,
"spy"
=>
"affix"
},
"aria-live"
=>
"polite"
}
%aside
.issues-bulk-update.js-right-sidebar.right-sidebar.affix-top
{
data:
{
"offset-top"
=>
"50"
,
"spy"
=>
"affix"
},
"aria-live"
=>
"polite"
}
.issuable-sidebar
.issuable-sidebar
.hidden
=
form_tag
[
:bulk_update
,
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
type
],
method: :post
,
class:
"bulk-update"
do
=
form_tag
[
:bulk_update
,
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
type
],
method: :post
,
class:
"bulk-update"
do
.block
.block
.filter-item.inline.update-issues-btn.pull-left
.filter-item.inline.update-issues-btn.pull-left
...
...
spec/features/issues/bulk_assignment_labels_spec.rb
View file @
fbab37f1
...
@@ -16,6 +16,21 @@ feature 'Issues > Labels bulk assignment', feature: true do
...
@@ -16,6 +16,21 @@ feature 'Issues > Labels bulk assignment', feature: true do
gitlab_sign_in
user
gitlab_sign_in
user
end
end
context
'sidebar'
do
before
do
enable_bulk_update
end
it
'is present when bulk edit is enabled'
do
expect
(
page
).
to
have_css
(
'.issuable-sidebar'
)
end
it
'is not present when bulk edit is disabled'
do
disable_bulk_update
expect
(
page
).
not_to
have_css
(
'.issuable-sidebar'
)
end
end
context
'can bulk assign'
do
context
'can bulk assign'
do
before
do
before
do
enable_bulk_update
enable_bulk_update
...
@@ -398,4 +413,8 @@ feature 'Issues > Labels bulk assignment', feature: true do
...
@@ -398,4 +413,8 @@ feature 'Issues > Labels bulk assignment', feature: true do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
click_button
'Edit Issues'
click_button
'Edit Issues'
end
end
def
disable_bulk_update
click_button
'Cancel'
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment