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
Jérome Perrin
gitlab-ce
Commits
4bdbccfc
Commit
4bdbccfc
authored
Apr 07, 2017
by
Mike Greiling
Committed by
Alfredo Sumaran
Apr 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Vue from main bundle and disable production warnings
parent
3ded903d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
24 deletions
+17
-24
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+4
-0
app/assets/javascripts/commit/pipelines/pipelines_bundle.js
app/assets/javascripts/commit/pipelines/pipelines_bundle.js
+5
-7
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+1
-4
app/assets/javascripts/milestone_select.js
app/assets/javascripts/milestone_select.js
+2
-4
app/assets/javascripts/subscription.js
app/assets/javascripts/subscription.js
+1
-4
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+3
-5
spec/javascripts/merge_request_tabs_spec.js
spec/javascripts/merge_request_tabs_spec.js
+1
-0
No files found.
app/assets/javascripts/boards/boards_bundle.js
View file @
4bdbccfc
...
...
@@ -38,6 +38,10 @@ $(() => {
Store
.
create
();
// hack to allow sidebar scripts like milestone_select manipulate the BoardsStore
gl
.
issueBoards
.
boardStoreIssueSet
=
(...
args
)
=>
Vue
.
set
(
Store
.
detail
.
issue
,
...
args
);
gl
.
issueBoards
.
boardStoreIssueDelete
=
(...
args
)
=>
Vue
.
delete
(
Store
.
detail
.
issue
,
...
args
);
gl
.
IssueBoardsApp
=
new
Vue
({
el
:
$boardApp
,
components
:
{
...
...
app/assets/javascripts/commit/pipelines/pipelines_bundle.js
View file @
4bdbccfc
...
...
@@ -12,20 +12,18 @@ Vue.use(VueResource);
* Renders Pipelines table in pipelines tab in the commits show view.
*/
// export for use in merge_request_tabs.js (TODO: remove this hack)
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
CommitPipelinesTable
=
CommitPipelinesTable
;
$
(()
=>
{
window
.
gl
=
window
.
gl
||
{};
gl
.
commits
=
gl
.
commits
||
{};
gl
.
commits
.
pipelines
=
gl
.
commits
.
pipelines
||
{};
if
(
gl
.
commits
.
PipelinesTableBundle
)
{
document
.
querySelector
(
'
#commit-pipeline-table-view
'
).
removeChild
(
this
.
pipelinesTableBundle
.
$el
);
gl
.
commits
.
PipelinesTableBundle
.
$destroy
(
true
);
}
const
pipelineTableViewEl
=
document
.
querySelector
(
'
#commit-pipeline-table-view
'
);
if
(
pipelineTableViewEl
&&
pipelineTableViewEl
.
dataset
.
disableInitialization
===
undefined
)
{
gl
.
commits
.
pipelines
.
PipelinesTableBundle
=
new
CommitPipelinesTable
().
$mount
();
document
.
querySelector
(
'
#commit-pipeline-table-view
'
)
.
appendChild
(
gl
.
commits
.
pipelines
.
PipelinesTableBundle
.
$el
);
pipelineTableViewEl
.
appendChild
(
gl
.
commits
.
pipelines
.
PipelinesTableBundle
.
$el
);
}
});
app/assets/javascripts/merge_request_tabs.js
View file @
4bdbccfc
...
...
@@ -3,9 +3,6 @@
/* global Flash */
import
Cookies
from
'
js-cookie
'
;
import
CommitPipelinesTable
from
'
./commit/pipelines/pipelines_table
'
;
import
'
./breakpoints
'
;
import
'
./flash
'
;
...
...
@@ -234,7 +231,7 @@ import './flash';
}
mountPipelinesView
()
{
this
.
commitPipelinesTable
=
new
CommitPipelinesTable
().
$mount
();
this
.
commitPipelinesTable
=
new
gl
.
CommitPipelinesTable
().
$mount
();
// $mount(el) replaces the el with the new rendered component. We need it in order to mount
// it everytime this tab is clicked - https://vuejs.org/v2/api/#vm-mount
document
.
querySelector
(
'
#commit-pipeline-table-view
'
)
...
...
app/assets/javascripts/milestone_select.js
View file @
4bdbccfc
...
...
@@ -2,8 +2,6 @@
/* global Issuable */
/* global ListMilestone */
import
Vue
from
'
vue
'
;
(
function
()
{
this
.
MilestoneSelect
=
(
function
()
{
function
MilestoneSelect
(
currentProject
,
els
)
{
...
...
@@ -151,12 +149,12 @@ import Vue from 'vue';
return
$dropdown
.
closest
(
'
form
'
).
submit
();
}
else
if
(
$dropdown
.
hasClass
(
'
js-issue-board-sidebar
'
))
{
if
(
selected
.
id
!==
-
1
)
{
Vue
.
set
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
'
milestone
'
,
new
ListMilestone
({
gl
.
issueBoards
.
boardStoreIssueSet
(
'
milestone
'
,
new
ListMilestone
({
id
:
selected
.
id
,
title
:
selected
.
name
}));
}
else
{
Vue
.
delete
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
'
milestone
'
);
gl
.
issueBoards
.
boardStoreIssueDelete
(
'
milestone
'
);
}
$dropdown
.
trigger
(
'
loading.gl.dropdown
'
);
...
...
app/assets/javascripts/subscription.js
View file @
4bdbccfc
import
Vue
from
'
vue
'
;
(()
=>
{
class
Subscription
{
constructor
(
containerElm
)
{
...
...
@@ -29,8 +27,7 @@ import Vue from 'vue';
// hack to allow this to work with the issue boards Vue object
if
(
document
.
querySelector
(
'
html
'
).
classList
.
contains
(
'
issue-boards-page
'
))
{
Vue
.
set
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
gl
.
issueBoards
.
boardStoreIssueSet
(
'
subscribed
'
,
!
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
.
subscribed
,
);
...
...
app/assets/javascripts/users_select.js
View file @
4bdbccfc
...
...
@@ -2,8 +2,6 @@
/* global Issuable */
/* global ListUser */
import
Vue
from
'
vue
'
;
(
function
()
{
var
bind
=
function
(
fn
,
me
)
{
return
function
()
{
return
fn
.
apply
(
me
,
arguments
);
};
},
slice
=
[].
slice
;
...
...
@@ -74,7 +72,7 @@ import Vue from 'vue';
e
.
preventDefault
();
if
(
$dropdown
.
hasClass
(
'
js-issue-board-sidebar
'
))
{
Vue
.
set
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
'
assignee
'
,
new
ListUser
({
gl
.
issueBoards
.
boardStoreIssueSet
(
'
assignee
'
,
new
ListUser
({
id
:
_this
.
currentUser
.
id
,
username
:
_this
.
currentUser
.
username
,
name
:
_this
.
currentUser
.
name
,
...
...
@@ -225,14 +223,14 @@ import Vue from 'vue';
return
$dropdown
.
closest
(
'
form
'
).
submit
();
}
else
if
(
$dropdown
.
hasClass
(
'
js-issue-board-sidebar
'
))
{
if
(
user
.
id
)
{
Vue
.
set
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
'
assignee
'
,
new
ListUser
({
gl
.
issueBoards
.
boardStoreIssueSet
(
'
assignee
'
,
new
ListUser
({
id
:
user
.
id
,
username
:
user
.
username
,
name
:
user
.
name
,
avatar_url
:
user
.
avatar_url
}));
}
else
{
Vue
.
delete
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
'
assignee
'
);
gl
.
issueBoards
.
boardStoreIssueDelete
(
'
assignee
'
);
}
updateIssueBoardsIssue
();
...
...
spec/javascripts/merge_request_tabs_spec.js
View file @
4bdbccfc
/* eslint-disable no-var, comma-dangle, object-shorthand */
require
(
'
~/merge_request_tabs
'
);
require
(
'
~/commit/pipelines/pipelines_bundle.js
'
);
require
(
'
~/breakpoints
'
);
require
(
'
~/lib/utils/common_utils
'
);
require
(
'
~/diff
'
);
...
...
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