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
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
event_hub.js
app/assets/javascripts/sidebar/event_hub.js
+6
-1
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