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
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
17 deletions
+20
-17
app/assets/javascripts/init_labels.js
app/assets/javascripts/init_labels.js
+18
-0
app/assets/javascripts/pages/projects/labels/index/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