BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d85f72b1
Commit
d85f72b1
authored
Jan 12, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor into init_labels
parent
8a49e97b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
17 deletions
+20
-17
init_labels.js
app/assets/javascripts/init_labels.js
+18
-0
index.js
app/assets/javascripts/pages/projects/labels/index/index.js
+2
-17
No files found.
app/assets/javascripts/init_labels.js
0 → 100644
View file @
d85f72b1
import
LabelManager
from
'./label_manager'
;
import
GroupLabelSubscription
from
'./group_label_subscription'
;
import
ProjectLabelSubscription
from
'./project_label_subscription'
;
export
default
()
=>
{
if
(
$
(
'.prioritized-labels'
).
length
)
{
new
LabelManager
();
// eslint-disable-line no-new
}
$
(
'.label-subscription'
).
each
((
i
,
el
)
=>
{
const
$el
=
$
(
el
);
if
(
$el
.
find
(
'.dropdown-group-label'
).
length
)
{
new
GroupLabelSubscription
(
$el
);
// eslint-disable-line no-new
}
else
{
new
ProjectLabelSubscription
(
$el
);
// eslint-disable-line no-new
}
});
};
app/assets/javascripts/pages/projects/labels/index/index.js
View file @
d85f72b1
import
LabelManager
from
'~/label_manager'
;
import
GroupLabelSubscription
from
'~/group_label_subscription'
;
import
ProjectLabelSubscription
from
'~/project_label_subscription'
;
import
initLabels
from
'~/init_labels'
;
export
default
()
=>
{
if
(
$
(
'.prioritized-labels'
).
length
)
{
new
LabelManager
();
// eslint-disable-line no-new
}
$
(
'.label-subscription'
).
each
((
i
,
el
)
=>
{
const
$el
=
$
(
el
);
if
(
$el
.
find
(
'.dropdown-group-label'
).
length
)
{
new
GroupLabelSubscription
(
$el
);
// eslint-disable-line no-new
}
else
{
new
ProjectLabelSubscription
(
$el
);
// eslint-disable-line no-new
}
});
};
export
default
initLabels
;
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