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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
b095c407
Commit
b095c407
authored
May 09, 2017
by
Mike Greiling
Committed by
Clement Ho
May 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent vue.esm.js from being bundled into the primary JS bundle
parent
503e8a9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
app/assets/javascripts/sidebar/event_hub.js
app/assets/javascripts/sidebar/event_hub.js
+6
-1
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+8
-6
No files found.
app/assets/javascripts/sidebar/event_hub.js
View file @
b095c407
import
Vue
from
'
vue
'
;
export
default
new
Vue
();
const
eventHub
=
new
Vue
();
// TODO: remove eventHub hack after code splitting refactor
window
.
emitSidebarEvent
=
(...
args
)
=>
eventHub
.
$emit
(...
args
);
export
default
eventHub
;
app/assets/javascripts/users_select.js
View file @
b095c407
/* eslint-disable func-names, space-before-function-paren, one-var, no-var, prefer-rest-params, wrap-iife, quotes, max-len, one-var-declaration-per-line, vars-on-top, prefer-arrow-callback, consistent-return, comma-dangle, object-shorthand, no-shadow, no-unused-vars, no-else-return, no-self-compare, prefer-template, no-unused-expressions, no-lonely-if, yoda, prefer-spread, no-void, camelcase, no-param-reassign */
/* global Issuable */
/* global emitSidebarEvent */
import
eventHub
from
'
./sidebar/event_hub
'
;
// TODO: remove eventHub hack after code splitting refactor
window
.
emitSidebarEvent
=
window
.
emitSidebarEvent
||
$
.
noop
;
(
function
()
{
var
bind
=
function
(
fn
,
me
)
{
return
function
()
{
return
fn
.
apply
(
me
,
arguments
);
};
},
...
...
@@ -110,7 +112,7 @@ import eventHub from './sidebar/event_hub';
.
find
(
`input[name='
${
$dropdown
.
data
(
'
field-name
'
)}
'][value=
${
firstSelectedId
}
]`
);
firstSelected
.
remove
();
e
ventHub
.
$emi
t
(
'
sidebar.removeAssignee
'
,
{
e
mitSidebarEven
t
(
'
sidebar.removeAssignee
'
,
{
id
:
firstSelectedId
,
});
}
...
...
@@ -330,7 +332,7 @@ import eventHub from './sidebar/event_hub';
defaultLabel
:
defaultLabel
,
hidden
:
function
(
e
)
{
if
(
$dropdown
.
hasClass
(
'
js-multiselect
'
))
{
e
ventHub
.
$emi
t
(
'
sidebar.saveAssignees
'
);
e
mitSidebarEven
t
(
'
sidebar.saveAssignees
'
);
}
if
(
!
$dropdown
.
data
(
'
always-show-selectbox
'
))
{
...
...
@@ -364,10 +366,10 @@ import eventHub from './sidebar/event_hub';
const
id
=
parseInt
(
element
.
value
,
10
);
element
.
remove
();
});
e
ventHub
.
$emi
t
(
'
sidebar.removeAllAssignees
'
);
e
mitSidebarEven
t
(
'
sidebar.removeAllAssignees
'
);
}
else
if
(
isActive
)
{
// user selected
e
ventHub
.
$emi
t
(
'
sidebar.addAssignee
'
,
user
);
e
mitSidebarEven
t
(
'
sidebar.addAssignee
'
,
user
);
// Remove unassigned selection (if it was previously selected)
const
unassignedSelected
=
$dropdown
.
closest
(
'
.selectbox
'
)
...
...
@@ -383,7 +385,7 @@ import eventHub from './sidebar/event_hub';
}
// User unselected
e
ventHub
.
$emi
t
(
'
sidebar.removeAssignee
'
,
user
);
e
mitSidebarEven
t
(
'
sidebar.removeAssignee
'
,
user
);
}
if
(
getSelected
().
find
(
u
=>
u
===
gon
.
current_user_id
))
{
...
...
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