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
Léo-Paul Géneau
gitlab-ce
Commits
97793a16
Commit
97793a16
authored
Feb 21, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Harmonize CE and EE JS code
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
e818bc67
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
58 additions
and
44 deletions
+58
-44
app/assets/javascripts/api.js
app/assets/javascripts/api.js
+1
-1
app/assets/javascripts/commit/pipelines/pipelines_table.vue
app/assets/javascripts/commit/pipelines/pipelines_table.vue
+0
-1
app/assets/javascripts/cycle_analytics/components/stage_review_component.vue
...pts/cycle_analytics/components/stage_review_component.vue
+1
-1
app/assets/javascripts/diff_notes/diff_notes_bundle.js
app/assets/javascripts/diff_notes/diff_notes_bundle.js
+1
-1
app/assets/javascripts/filtered_search/filtered_search_dropdown.js
...s/javascripts/filtered_search/filtered_search_dropdown.js
+3
-0
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+15
-3
app/assets/javascripts/groups/components/item_stats_value.vue
...assets/javascripts/groups/components/item_stats_value.vue
+5
-5
app/assets/javascripts/labels_select.js
app/assets/javascripts/labels_select.js
+3
-3
app/assets/javascripts/pages/projects/project.js
app/assets/javascripts/pages/projects/project.js
+1
-1
app/assets/javascripts/pipelines/components/graph/stage_column_component.vue
...pts/pipelines/components/graph/stage_column_component.vue
+0
-1
app/assets/javascripts/pipelines/components/pipelines_table_row.vue
.../javascripts/pipelines/components/pipelines_table_row.vue
+2
-1
app/assets/javascripts/pipelines/components/stage.vue
app/assets/javascripts/pipelines/components/stage.vue
+1
-3
app/assets/javascripts/project_find_file.js
app/assets/javascripts/project_find_file.js
+2
-2
app/assets/javascripts/render_gfm.js
app/assets/javascripts/render_gfm.js
+1
-0
app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
...avascripts/sidebar/components/lock/lock_issue_sidebar.vue
+2
-3
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue
...rge_request_widget/components/states/mr_widget_rebase.vue
+2
-1
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js
...javascripts/vue_merge_request_widget/mr_widget_options.js
+2
-6
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
...cripts/vue_merge_request_widget/stores/mr_widget_store.js
+0
-2
app/assets/javascripts/vue_shared/components/header_ci_component.vue
...javascripts/vue_shared/components/header_ci_component.vue
+8
-7
app/assets/javascripts/vue_shared/components/loading_button.vue
...sets/javascripts/vue_shared/components/loading_button.vue
+0
-1
app/assets/javascripts/vue_shared/components/markdown/header.vue
...ets/javascripts/vue_shared/components/markdown/header.vue
+2
-1
app/assets/javascripts/vue_shared/components/table_pagination.vue
...ts/javascripts/vue_shared/components/table_pagination.vue
+6
-0
No files found.
app/assets/javascripts/api.js
View file @
97793a16
...
@@ -32,7 +32,7 @@ const Api = {
...
@@ -32,7 +32,7 @@ const Api = {
},
},
// Return groups list. Filtered by query
// Return groups list. Filtered by query
groups
(
query
,
options
,
callback
)
{
groups
(
query
,
options
,
callback
=
$
.
noop
)
{
const
url
=
Api
.
buildUrl
(
Api
.
groupsPath
);
const
url
=
Api
.
buildUrl
(
Api
.
groupsPath
);
return
axios
.
get
(
url
,
{
return
axios
.
get
(
url
,
{
params
:
Object
.
assign
({
params
:
Object
.
assign
({
...
...
app/assets/javascripts/commit/pipelines/pipelines_table.vue
View file @
97793a16
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
mixins
:
[
mixins
:
[
pipelinesMixin
,
pipelinesMixin
,
],
],
props
:
{
props
:
{
endpoint
:
{
endpoint
:
{
type
:
String
,
type
:
String
,
...
...
app/assets/javascripts/cycle_analytics/components/stage_review_component.vue
View file @
97793a16
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
>
>
<div
class=
"item-details"
>
<div
class=
"item-details"
>
<!-- FIXME: Pass an alt attribute here for accessibility -->
<!-- FIXME: Pass an alt attribute here for accessibility -->
<user-avatar-image
:img-src=
"mergeRequest.author.avatarUrl"
/>
<user-avatar-image
:img-src=
"mergeRequest.author.avatarUrl"
/>
<h5
class=
"item-title merge-merquest-title"
>
<h5
class=
"item-title merge-merquest-title"
>
<a
:href=
"mergeRequest.url"
>
<a
:href=
"mergeRequest.url"
>
{{
mergeRequest
.
title
}}
{{
mergeRequest
.
title
}}
...
...
app/assets/javascripts/diff_notes/diff_notes_bundle.js
View file @
97793a16
...
@@ -71,7 +71,7 @@ export default () => {
...
@@ -71,7 +71,7 @@ export default () => {
el
:
'
#resolve-count-app
'
,
el
:
'
#resolve-count-app
'
,
components
:
{
components
:
{
'
resolve-count
'
:
ResolveCount
'
resolve-count
'
:
ResolveCount
}
}
,
});
});
$
(
window
).
trigger
(
'
resize.nav
'
);
$
(
window
).
trigger
(
'
resize.nav
'
);
...
...
app/assets/javascripts/filtered_search/filtered_search_dropdown.js
View file @
97793a16
...
@@ -111,6 +111,9 @@ export default class FilteredSearchDropdown {
...
@@ -111,6 +111,9 @@ export default class FilteredSearchDropdown {
if
(
hook
)
{
if
(
hook
)
{
const
data
=
hook
.
list
.
data
||
[];
const
data
=
hook
.
list
.
data
||
[];
if
(
!
data
)
return
;
const
results
=
data
.
map
((
o
)
=>
{
const
results
=
data
.
map
((
o
)
=>
{
const
updated
=
o
;
const
updated
=
o
;
updated
.
droplab_hidden
=
false
;
updated
.
droplab_hidden
=
false
;
...
...
app/assets/javascripts/gl_dropdown.js
View file @
97793a16
...
@@ -607,7 +607,20 @@ GitLabDropdown = (function() {
...
@@ -607,7 +607,20 @@ GitLabDropdown = (function() {
};
};
GitLabDropdown
.
prototype
.
renderItem
=
function
(
data
,
group
,
index
)
{
GitLabDropdown
.
prototype
.
renderItem
=
function
(
data
,
group
,
index
)
{
var
field
,
fieldName
,
html
,
selected
,
text
,
url
,
value
;
var
field
,
fieldName
,
html
,
selected
,
text
,
url
,
value
,
rowHidden
;
if
(
!
this
.
options
.
renderRow
)
{
value
=
this
.
options
.
id
?
this
.
options
.
id
(
data
)
:
data
.
id
;
if
(
value
)
{
value
=
value
.
toString
().
replace
(
/'/g
,
'
\\\'
'
);
}
}
// Hide element
if
(
this
.
options
.
hideRow
&&
this
.
options
.
hideRow
(
value
))
{
rowHidden
=
true
;
}
if
(
group
==
null
)
{
if
(
group
==
null
)
{
group
=
false
;
group
=
false
;
}
}
...
@@ -616,6 +629,7 @@ GitLabDropdown = (function() {
...
@@ -616,6 +629,7 @@ GitLabDropdown = (function() {
index
=
false
;
index
=
false
;
}
}
html
=
document
.
createElement
(
'
li
'
);
html
=
document
.
createElement
(
'
li
'
);
if
(
data
===
'
divider
'
||
data
===
'
separator
'
)
{
if
(
data
===
'
divider
'
||
data
===
'
separator
'
)
{
html
.
className
=
data
;
html
.
className
=
data
;
return
html
;
return
html
;
...
@@ -631,11 +645,9 @@ GitLabDropdown = (function() {
...
@@ -631,11 +645,9 @@ GitLabDropdown = (function() {
html
=
this
.
options
.
renderRow
.
call
(
this
.
options
,
data
,
this
);
html
=
this
.
options
.
renderRow
.
call
(
this
.
options
,
data
,
this
);
}
else
{
}
else
{
if
(
!
selected
)
{
if
(
!
selected
)
{
value
=
this
.
options
.
id
?
this
.
options
.
id
(
data
)
:
data
.
id
;
fieldName
=
this
.
options
.
fieldName
;
fieldName
=
this
.
options
.
fieldName
;
if
(
value
)
{
if
(
value
)
{
value
=
value
.
toString
().
replace
(
/'/g
,
'
\\\'
'
);
field
=
this
.
dropdown
.
parent
().
find
(
`input[name='
${
fieldName
}
'][value='
${
value
}
']`
);
field
=
this
.
dropdown
.
parent
().
find
(
`input[name='
${
fieldName
}
'][value='
${
value
}
']`
);
if
(
field
.
length
)
{
if
(
field
.
length
)
{
selected
=
true
;
selected
=
true
;
...
...
app/assets/javascripts/groups/components/item_stats_value.vue
View file @
97793a16
...
@@ -30,11 +30,11 @@
...
@@ -30,11 +30,11 @@
default
:
'
bottom
'
,
default
:
'
bottom
'
,
},
},
/**
/**
* value could either be number or string
* value could either be number or string
* as `memberCount` is always passed as string
* as `memberCount` is always passed as string
* while `subgroupCount` & `projectCount`
* while `subgroupCount` & `projectCount`
* are always number
* are always number
*/
*/
value
:
{
value
:
{
type
:
[
Number
,
String
],
type
:
[
Number
,
String
],
required
:
false
,
required
:
false
,
...
...
app/assets/javascripts/labels_select.js
View file @
97793a16
...
@@ -316,9 +316,9 @@ export default class LabelsSelect {
...
@@ -316,9 +316,9 @@ export default class LabelsSelect {
},
},
multiSelect
:
$dropdown
.
hasClass
(
'
js-multiselect
'
),
multiSelect
:
$dropdown
.
hasClass
(
'
js-multiselect
'
),
vue
:
$dropdown
.
hasClass
(
'
js-issue-board-sidebar
'
),
vue
:
$dropdown
.
hasClass
(
'
js-issue-board-sidebar
'
),
clicked
:
function
(
options
)
{
clicked
:
function
(
clickEvent
)
{
const
{
$el
,
e
,
isMarking
}
=
options
;
const
{
$el
,
e
,
isMarking
}
=
clickEvent
;
const
label
=
options
.
selectedObj
;
const
label
=
clickEvent
.
selectedObj
;
var
isIssueIndex
,
isMRIndex
,
page
,
boardsModel
;
var
isIssueIndex
,
isMRIndex
,
page
,
boardsModel
;
var
fadeOutLoader
=
()
=>
{
var
fadeOutLoader
=
()
=>
{
...
...
app/assets/javascripts/pages/projects/project.js
View file @
97793a16
...
@@ -50,7 +50,7 @@ export default class Project {
...
@@ -50,7 +50,7 @@ export default class Project {
Project
.
projectSelectDropdown
();
Project
.
projectSelectDropdown
();
}
}
static
projectSelectDropdown
()
{
static
projectSelectDropdown
()
{
projectSelect
();
projectSelect
();
$
(
'
.project-item-select
'
).
on
(
'
click
'
,
e
=>
Project
.
changeProject
(
$
(
e
.
currentTarget
).
val
()));
$
(
'
.project-item-select
'
).
on
(
'
click
'
,
e
=>
Project
.
changeProject
(
$
(
e
.
currentTarget
).
val
()));
}
}
...
...
app/assets/javascripts/pipelines/components/graph/stage_column_component.vue
View file @
97793a16
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
jobComponent
,
jobComponent
,
dropdownJobComponent
,
dropdownJobComponent
,
},
},
props
:
{
props
:
{
title
:
{
title
:
{
type
:
String
,
type
:
String
,
...
...
app/assets/javascripts/pipelines/components/pipelines_table_row.vue
View file @
97793a16
...
@@ -223,7 +223,8 @@
...
@@ -223,7 +223,8 @@
<div
class=
"table-section section-10 commit-link"
>
<div
class=
"table-section section-10 commit-link"
>
<div
<div
class=
"table-mobile-header"
class=
"table-mobile-header"
role=
"rowheader"
>
role=
"rowheader"
>
Status
Status
</div>
</div>
<div
class=
"table-mobile-content"
>
<div
class=
"table-mobile-content"
>
...
...
app/assets/javascripts/pipelines/components/stage.vue
View file @
97793a16
...
@@ -50,9 +50,7 @@
...
@@ -50,9 +50,7 @@
computed
:
{
computed
:
{
dropdownClass
()
{
dropdownClass
()
{
return
this
.
dropdownContent
.
length
>
0
?
return
this
.
dropdownContent
.
length
>
0
?
'
js-builds-dropdown-container
'
:
'
js-builds-dropdown-loading
'
;
'
js-builds-dropdown-container
'
:
'
js-builds-dropdown-loading
'
;
},
},
triggerButtonClass
()
{
triggerButtonClass
()
{
...
...
app/assets/javascripts/project_find_file.js
View file @
97793a16
...
@@ -73,7 +73,7 @@ export default class ProjectFindFile {
...
@@ -73,7 +73,7 @@ export default class ProjectFindFile {
// find file
// find file
}
}
// files pathes load
// files pathes load
load
(
url
)
{
load
(
url
)
{
axios
.
get
(
url
)
axios
.
get
(
url
)
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
...
@@ -85,7 +85,7 @@ export default class ProjectFindFile {
...
@@ -85,7 +85,7 @@ export default class ProjectFindFile {
.
catch
(()
=>
flash
(
__
(
'
An error occurred while loading filenames
'
)));
.
catch
(()
=>
flash
(
__
(
'
An error occurred while loading filenames
'
)));
}
}
// render result
// render result
renderList
(
filePaths
,
searchText
)
{
renderList
(
filePaths
,
searchText
)
{
var
blobItemUrl
,
filePath
,
html
,
i
,
j
,
len
,
matches
,
results
;
var
blobItemUrl
,
filePath
,
html
,
i
,
j
,
len
,
matches
,
results
;
this
.
element
.
find
(
"
.tree-table > tbody
"
).
empty
();
this
.
element
.
find
(
"
.tree-table > tbody
"
).
empty
();
...
...
app/assets/javascripts/render_gfm.js
View file @
97793a16
import
renderMath
from
'
./render_math
'
;
import
renderMath
from
'
./render_math
'
;
import
renderMermaid
from
'
./render_mermaid
'
;
import
renderMermaid
from
'
./render_mermaid
'
;
import
syntaxHighlight
from
'
./syntax_highlight
'
;
import
syntaxHighlight
from
'
./syntax_highlight
'
;
// Render Gitlab flavoured Markdown
// Render Gitlab flavoured Markdown
//
//
// Delegates to syntax highlight and render math & mermaid diagrams.
// Delegates to syntax highlight and render math & mermaid diagrams.
...
...
app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
View file @
97793a16
<
script
>
<
script
>
import
Flash
from
'
../../..
/flash
'
;
import
Flash
from
'
~
/flash
'
;
import
editForm
from
'
./edit_form.vue
'
;
import
editForm
from
'
./edit_form.vue
'
;
import
issuableMixin
from
'
../../../vue_shared/mixins/issuable
'
;
import
issuableMixin
from
'
../../../vue_shared/mixins/issuable
'
;
import
Icon
from
'
../../../vue_shared/components/icon.vue
'
;
import
Icon
from
'
../../../vue_shared/components/icon.vue
'
;
...
@@ -53,8 +53,7 @@
...
@@ -53,8 +53,7 @@
discussion_locked
:
locked
,
discussion_locked
:
locked
,
})
})
.
then
(()
=>
location
.
reload
())
.
then
(()
=>
location
.
reload
())
.
catch
(()
=>
Flash
(
this
.
__
(
`Something went wrong trying to
.
catch
(()
=>
Flash
(
this
.
__
(
`Something went wrong trying to change the locked state of this
${
this
.
issuableDisplayName
}
`
)));
change the locked state of this
${
this
.
issuableDisplayName
}
`
)));
},
},
},
},
};
};
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue
View file @
97793a16
...
@@ -107,7 +107,8 @@
...
@@ -107,7 +107,8 @@
<
template
v-if=
"!mr.rebaseInProgress && mr.canPushToSourceBranch && !isMakingRequest"
>
<
template
v-if=
"!mr.rebaseInProgress && mr.canPushToSourceBranch && !isMakingRequest"
>
<div
<div
class=
"accept-merge-holder clearfix
class=
"accept-merge-holder clearfix
js-toggle-container accept-action media space-children"
>
js-toggle-container accept-action media space-children"
>
<button
<button
type=
"button"
type=
"button"
class=
"btn btn-sm btn-reopen btn-success"
class=
"btn btn-sm btn-reopen btn-success"
...
...
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js
View file @
97793a16
...
@@ -96,9 +96,7 @@ export default {
...
@@ -96,9 +96,7 @@ export default {
cb
.
call
(
null
,
data
);
cb
.
call
(
null
,
data
);
}
}
})
})
.
catch
(()
=>
{
.
catch
(()
=>
new
Flash
(
'
Something went wrong. Please try again.
'
));
new
Flash
(
'
Something went wrong. Please try again.
'
);
// eslint-disable-line
});
},
},
initPolling
()
{
initPolling
()
{
this
.
pollingInterval
=
new
SmartInterval
({
this
.
pollingInterval
=
new
SmartInterval
({
...
@@ -146,9 +144,7 @@ export default {
...
@@ -146,9 +144,7 @@ export default {
Project
.
initRefSwitcher
();
Project
.
initRefSwitcher
();
}
}
})
})
.
catch
(()
=>
{
.
catch
(()
=>
new
Flash
(
'
Something went wrong. Please try again.
'
));
new
Flash
(
'
Something went wrong. Please try again.
'
);
// eslint-disable-line
});
},
},
handleNotification
(
data
)
{
handleNotification
(
data
)
{
if
(
data
.
ci_status
===
this
.
mr
.
ciStatus
)
return
;
if
(
data
.
ci_status
===
this
.
mr
.
ciStatus
)
return
;
...
...
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
View file @
97793a16
...
@@ -4,7 +4,6 @@ import { stateKey } from './state_maps';
...
@@ -4,7 +4,6 @@ import { stateKey } from './state_maps';
import
{
formatDate
}
from
'
../../lib/utils/datetime_utility
'
;
import
{
formatDate
}
from
'
../../lib/utils/datetime_utility
'
;
export
default
class
MergeRequestStore
{
export
default
class
MergeRequestStore
{
constructor
(
data
)
{
constructor
(
data
)
{
this
.
sha
=
data
.
diff_head_sha
;
this
.
sha
=
data
.
diff_head_sha
;
this
.
gitlabLogo
=
data
.
gitlabLogo
;
this
.
gitlabLogo
=
data
.
gitlabLogo
;
...
@@ -169,5 +168,4 @@ export default class MergeRequestStore {
...
@@ -169,5 +168,4 @@ export default class MergeRequestStore {
return
timeagoInstance
.
format
(
date
);
return
timeagoInstance
.
format
(
date
);
}
}
}
}
app/assets/javascripts/vue_shared/components/header_ci_component.vue
View file @
97793a16
...
@@ -6,12 +6,12 @@
...
@@ -6,12 +6,12 @@
import
userAvatarImage
from
'
./user_avatar/user_avatar_image.vue
'
;
import
userAvatarImage
from
'
./user_avatar/user_avatar_image.vue
'
;
/**
/**
* Renders header component for job and pipeline page based on UI mockups
* Renders header component for job and pipeline page based on UI mockups
*
*
* Used in:
* Used in:
* - job show page
* - job show page
* - pipeline show page
* - pipeline show page
*/
*/
export
default
{
export
default
{
components
:
{
components
:
{
ciIconBadge
,
ciIconBadge
,
...
@@ -118,7 +118,8 @@
...
@@ -118,7 +118,8 @@
<section
<section
class=
"header-action-buttons"
class=
"header-action-buttons"
v-if=
"actions.length"
>
v-if=
"actions.length"
>
<
template
<
template
v-for=
"(action, i) in actions"
v-for=
"(action, i) in actions"
>
>
...
...
app/assets/javascripts/vue_shared/components/loading_button.vue
View file @
97793a16
<
script
>
<
script
>
/* eslint-disable vue/require-default-prop */
/* eslint-disable vue/require-default-prop */
/* This is a re-usable vue component for rendering a button
/* This is a re-usable vue component for rendering a button
that will probably be sending off ajax requests and need
that will probably be sending off ajax requests and need
to show the loading status by setting the `loading` option.
to show the loading status by setting the `loading` option.
...
...
app/assets/javascripts/vue_shared/components/markdown/header.vue
View file @
97793a16
...
@@ -65,7 +65,8 @@
...
@@ -65,7 +65,8 @@
</li>
</li>
<li
<li
class=
"md-header-tab"
class=
"md-header-tab"
:class=
"
{ active: previewMarkdown }">
:class=
"
{ active: previewMarkdown }"
>
<a
<a
class=
"js-preview-link"
class=
"js-preview-link"
href=
"#md-preview-holder"
href=
"#md-preview-holder"
...
...
app/assets/javascripts/vue_shared/components/table_pagination.vue
View file @
97793a16
...
@@ -13,6 +13,12 @@
...
@@ -13,6 +13,12 @@
props
:
{
props
:
{
/**
/**
This function will take the information given by the pagination component
This function will take the information given by the pagination component
Here is an example `change` method:
change(pagenum) {
gl.utils.visitUrl(`?page=${pagenum}`);
},
*/
*/
change
:
{
change
:
{
type
:
Function
,
type
:
Function
,
...
...
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