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
9159cd54
Commit
9159cd54
authored
Jul 04, 2019
by
Winnie Hellmann
Committed by
Phil Hughes
Jul 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move new list dropdown logic to new list dropdown
parent
9a4c07c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
28 deletions
+35
-28
app/assets/javascripts/boards/index.js
app/assets/javascripts/boards/index.js
+1
-1
ee/app/assets/javascripts/boards/components/boards_selector.vue
.../assets/javascripts/boards/components/boards_selector.vue
+0
-27
ee/app/assets/javascripts/boards/components/new_list_dropdown.js
...assets/javascripts/boards/components/new_list_dropdown.js
+34
-0
No files found.
app/assets/javascripts/boards/index.js
View file @
9159cd54
...
...
@@ -18,7 +18,7 @@ import modalMixin from './mixins/modal_mixins';
import
'
./filters/due_date_filters
'
;
import
Board
from
'
ee/boards/components/board
'
;
import
BoardSidebar
from
'
ee/boards/components/board_sidebar
'
;
import
initNewListDropdown
from
'
.
/components/new_list_dropdown
'
;
import
initNewListDropdown
from
'
ee_else_ce/boards
/components/new_list_dropdown
'
;
import
BoardAddIssuesModal
from
'
ee/boards/components/modal/index
'
;
import
'
~/vue_shared/vue_resource_interceptor
'
;
import
{
...
...
ee/app/assets/javascripts/boards/components/boards_selector.vue
View file @
9159cd54
<
script
>
import
$
from
'
jquery
'
;
import
{
throttle
}
from
'
underscore
'
;
import
{
GlLoadingIcon
,
...
...
@@ -13,8 +12,6 @@ import {
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
boardsStore
from
'
~/boards/stores/boards_store
'
;
import
BoardForm
from
'
./board_form.vue
'
;
import
AssigneeList
from
'
./assignees_list_slector
'
;
import
MilestoneList
from
'
./milestone_list_selector
'
;
import
httpStatusCodes
from
'
~/lib/utils/http_status
'
;
const
MIN_BOARDS_TO_VIEW_RECENT
=
10
;
...
...
@@ -95,8 +92,6 @@ export default {
return
{
loading
:
true
,
hasScrollFade
:
false
,
hasAssigneesListMounted
:
false
,
hasMilestoneListMounted
:
false
,
scrollFadeInitialized
:
false
,
boards
:
[],
recentBoards
:
[],
...
...
@@ -162,8 +157,6 @@ export default {
},
created
()
{
boardsStore
.
setCurrentBoard
(
this
.
currentBoard
);
$
(
'
#js-add-list
'
).
on
(
'
hide.bs.dropdown
'
,
this
.
handleDropdownHide
);
$
(
'
.js-new-board-list-tabs
'
).
on
(
'
click
'
,
this
.
handleDropdownTabClick
);
},
methods
:
{
showPage
(
page
)
{
...
...
@@ -225,26 +218,6 @@ export default {
this
.
hasScrollFade
=
this
.
isScrolledUp
();
},
handleDropdownHide
(
e
)
{
const
$currTarget
=
$
(
e
.
currentTarget
);
if
(
$currTarget
.
data
(
'
preventClose
'
))
{
e
.
preventDefault
();
}
$currTarget
.
removeData
(
'
preventClose
'
);
},
handleDropdownTabClick
(
e
)
{
const
$addListEl
=
$
(
'
#js-add-list
'
);
$addListEl
.
data
(
'
preventClose
'
,
true
);
if
(
e
.
target
.
dataset
.
action
===
'
tab-assignees
'
&&
!
this
.
hasAssigneesListMounted
)
{
this
.
assigneeList
=
AssigneeList
();
this
.
hasAssigneesListMounted
=
true
;
}
if
(
e
.
target
.
dataset
.
action
===
'
tab-milestones
'
&&
!
this
.
hasMilestoneListMounted
)
{
this
.
milstoneList
=
MilestoneList
();
this
.
hasMilestoneListMounted
=
true
;
}
},
},
};
</
script
>
...
...
ee/app/assets/javascripts/boards/components/new_list_dropdown.js
0 → 100644
View file @
9159cd54
import
$
from
'
jquery
'
;
import
initNewListDropdown
from
'
~/boards/components/new_list_dropdown
'
;
import
AssigneeList
from
'
./assignees_list_slector
'
;
import
MilestoneList
from
'
./milestone_list_selector
'
;
const
handleDropdownHide
=
e
=>
{
const
$currTarget
=
$
(
e
.
currentTarget
);
if
(
$currTarget
.
data
(
'
preventClose
'
))
{
e
.
preventDefault
();
}
$currTarget
.
removeData
(
'
preventClose
'
);
};
let
assigneeList
;
let
milstoneList
;
const
handleDropdownTabClick
=
e
=>
{
const
$addListEl
=
$
(
'
#js-add-list
'
);
$addListEl
.
data
(
'
preventClose
'
,
true
);
if
(
e
.
target
.
dataset
.
action
===
'
tab-assignees
'
&&
!
assigneeList
)
{
assigneeList
=
AssigneeList
();
}
if
(
e
.
target
.
dataset
.
action
===
'
tab-milestones
'
&&
!
milstoneList
)
{
milstoneList
=
MilestoneList
();
}
};
export
default
()
=>
{
initNewListDropdown
();
$
(
'
#js-add-list
'
).
on
(
'
hide.bs.dropdown
'
,
handleDropdownHide
);
$
(
'
.js-new-board-list-tabs
'
).
on
(
'
click
'
,
handleDropdownTabClick
);
};
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