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
0e334037
Commit
0e334037
authored
Dec 22, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 30 files: 5 of 8
Mandatory not to break master. Automatically created with prettier.
parent
07f5bc94
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
73 additions
and
129 deletions
+73
-129
app/assets/javascripts/pipelines/components/pipelines_list/tokens/pipeline_trigger_author_token.vue
...s/pipelines_list/tokens/pipeline_trigger_author_token.vue
+1
-1
app/assets/javascripts/pipelines/pipeline_details_bundle.js
app/assets/javascripts/pipelines/pipeline_details_bundle.js
+1
-1
app/assets/javascripts/pipelines/stores/pipeline_store.js
app/assets/javascripts/pipelines/stores/pipeline_store.js
+4
-1
app/assets/javascripts/profile/gl_crop.js
app/assets/javascripts/profile/gl_crop.js
+4
-4
app/assets/javascripts/profile/profile.js
app/assets/javascripts/profile/profile.js
+1
-3
app/assets/javascripts/project_find_file.js
app/assets/javascripts/project_find_file.js
+3
-11
app/assets/javascripts/project_select.js
app/assets/javascripts/project_select.js
+4
-4
app/assets/javascripts/project_select_combo_button.js
app/assets/javascripts/project_select_combo_button.js
+3
-11
app/assets/javascripts/projects/commit_box/info/init_details_button.js
...vascripts/projects/commit_box/info/init_details_button.js
+1
-3
app/assets/javascripts/projects/experiment_new_project_creation/index.js
...scripts/projects/experiment_new_project_creation/index.js
+1
-1
app/assets/javascripts/projects/project_new.js
app/assets/javascripts/projects/project_new.js
+2
-7
app/assets/javascripts/projects/tree/components/commit_pipeline_status_component.vue
...ects/tree/components/commit_pipeline_status_component.vue
+1
-4
app/assets/javascripts/registry/explorer/components/details_page/delete_alert.vue
...egistry/explorer/components/details_page/delete_alert.vue
+1
-1
app/assets/javascripts/registry/explorer/components/details_page/partial_cleanup_alert.vue
...xplorer/components/details_page/partial_cleanup_alert.vue
+2
-2
app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue
...gistry/explorer/components/details_page/tags_list_row.vue
+1
-3
app/assets/javascripts/registry/explorer/components/list_page/group_empty_state.vue
...istry/explorer/components/list_page/group_empty_state.vue
+1
-1
app/assets/javascripts/registry/explorer/components/list_page/project_empty_state.vue
...try/explorer/components/list_page/project_empty_state.vue
+4
-4
app/assets/javascripts/registry/explorer/pages/list.vue
app/assets/javascripts/registry/explorer/pages/list.vue
+1
-1
app/assets/javascripts/registry/settings/components/expiration_input.vue
...scripts/registry/settings/components/expiration_input.vue
+2
-2
app/assets/javascripts/registry/settings/components/expiration_toggle.vue
...cripts/registry/settings/components/expiration_toggle.vue
+1
-1
app/assets/javascripts/registry/settings/components/settings_form.vue
...avascripts/registry/settings/components/settings_form.vue
+4
-4
app/assets/javascripts/reports/components/report_link.vue
app/assets/javascripts/reports/components/report_link.vue
+2
-8
app/assets/javascripts/repository/components/table/parent_row.vue
...ts/javascripts/repository/components/table/parent_row.vue
+1
-3
app/assets/javascripts/right_sidebar.js
app/assets/javascripts/right_sidebar.js
+18
-24
app/assets/javascripts/search_autocomplete.js
app/assets/javascripts/search_autocomplete.js
+2
-2
app/assets/javascripts/settings_panels.js
app/assets/javascripts/settings_panels.js
+1
-4
app/assets/javascripts/single_file_diff.js
app/assets/javascripts/single_file_diff.js
+2
-7
app/assets/javascripts/smart_interval.js
app/assets/javascripts/smart_interval.js
+1
-3
app/assets/javascripts/snippets/components/snippet_blob_view.vue
...ets/javascripts/snippets/components/snippet_blob_view.vue
+1
-3
app/assets/javascripts/star.js
app/assets/javascripts/star.js
+1
-4
spec/frontend/registry/explorer/components/list_page/__snapshots__/project_empty_state_spec.js.snap
.../list_page/__snapshots__/project_empty_state_spec.js.snap
+1
-1
No files found.
app/assets/javascripts/pipelines/components/pipelines_list/tokens/pipeline_trigger_author_token.vue
View file @
0e334037
...
...
@@ -80,7 +80,7 @@ export default {
v-on="$listeners"
@input="searchAuthors"
>
<template
#view
="
{
inputValue
}">
<template
#view
="
{
inputValue
}">
<gl-avatar
v-if=
"activeUser"
:size=
"16"
...
...
app/assets/javascripts/pipelines/pipeline_details_bundle.js
View file @
0e334037
...
...
@@ -125,7 +125,7 @@ const createTestDetails = () => {
});
};
export
default
async
function
()
{
export
default
async
function
()
{
createTestDetails
();
createDagApp
();
...
...
app/assets/javascripts/pipelines/stores/pipeline_store.js
View file @
0e334037
...
...
@@ -198,6 +198,9 @@ export default class PipelineStore {
}
removeExpandedPipelineToRequestData
(
id
)
{
this
.
state
.
expandedPipelines
.
splice
(
this
.
state
.
expandedPipelines
.
findIndex
(
el
=>
el
===
id
),
1
);
this
.
state
.
expandedPipelines
.
splice
(
this
.
state
.
expandedPipelines
.
findIndex
(
el
=>
el
===
id
),
1
,
);
}
}
app/assets/javascripts/profile/gl_crop.js
View file @
0e334037
...
...
@@ -61,7 +61,7 @@ import { loadCSSFile } from '../lib/utils/css_utils';
bindEvents
()
{
const
_this
=
this
;
this
.
fileInput
.
on
(
'
change
'
,
function
(
e
)
{
this
.
fileInput
.
on
(
'
change
'
,
function
(
e
)
{
_this
.
onFileInputChange
(
e
,
this
);
this
.
value
=
null
;
});
...
...
@@ -69,7 +69,7 @@ import { loadCSSFile } from '../lib/utils/css_utils';
this
.
modalCrop
.
on
(
'
shown.bs.modal
'
,
this
.
onModalShow
);
this
.
modalCrop
.
on
(
'
hidden.bs.modal
'
,
this
.
onModalHide
);
this
.
uploadImageBtn
.
on
(
'
click
'
,
this
.
onUploadImageBtnClick
);
this
.
cropActionsBtn
.
on
(
'
click
'
,
function
()
{
this
.
cropActionsBtn
.
on
(
'
click
'
,
function
()
{
const
btn
=
this
;
return
_this
.
onActionBtnClick
(
btn
);
});
...
...
@@ -184,8 +184,8 @@ import { loadCSSFile } from '../lib/utils/css_utils';
const
cropModal
=
document
.
querySelector
(
'
.modal-profile-crop
'
);
if
(
cropModal
)
loadCSSFile
(
cropModal
.
dataset
.
cropperCssPath
);
$
.
fn
.
glCrop
=
function
(
opts
)
{
return
this
.
each
(
function
()
{
$
.
fn
.
glCrop
=
function
(
opts
)
{
return
this
.
each
(
function
()
{
return
$
(
this
).
data
(
'
glcrop
'
,
new
GitLabCrop
(
this
,
opts
));
});
};
...
...
app/assets/javascripts/profile/profile.js
View file @
0e334037
...
...
@@ -33,9 +33,7 @@ export default class Profile {
uploadImageBtn
:
'
.js-upload-user-avatar
'
,
modalCropImg
:
'
.modal-profile-crop-image
'
,
};
this
.
avatarGlCrop
=
$
(
'
.js-user-avatar-input
'
)
.
glCrop
(
cropOpts
)
.
data
(
'
glcrop
'
);
this
.
avatarGlCrop
=
$
(
'
.js-user-avatar-input
'
).
glCrop
(
cropOpts
).
data
(
'
glcrop
'
);
}
bindEvents
()
{
...
...
app/assets/javascripts/project_find_file.js
View file @
0e334037
...
...
@@ -10,7 +10,7 @@ import { deprecatedCreateFlash as flash } from '~/flash';
import
{
__
}
from
'
~/locale
'
;
// highlight text(awefwbwgtc -> <b>a</b>wefw<b>b</b>wgt<b>c</b> )
const
highlighter
=
function
(
element
,
text
,
matches
)
{
const
highlighter
=
function
(
element
,
text
,
matches
)
{
let
j
=
0
;
let
len
=
0
;
let
lastIndex
=
0
;
...
...
@@ -65,11 +65,7 @@ export default class ProjectFindFile {
if
(
value
!==
oldValue
)
{
target
.
data
(
'
oldValue
'
,
value
);
this
.
findFile
();
return
this
.
element
.
find
(
'
tr.tree-item
'
)
.
eq
(
0
)
.
addClass
(
'
selected
'
)
.
focus
();
return
this
.
element
.
find
(
'
tr.tree-item
'
).
eq
(
0
).
addClass
(
'
selected
'
).
focus
();
}
});
}
...
...
@@ -90,11 +86,7 @@ export default class ProjectFindFile {
this
.
element
.
find
(
'
.loading
'
).
hide
();
this
.
filePaths
=
data
;
this
.
findFile
();
this
.
element
.
find
(
'
.files-slider tr.tree-item
'
)
.
eq
(
0
)
.
addClass
(
'
selected
'
)
.
focus
();
this
.
element
.
find
(
'
.files-slider tr.tree-item
'
).
eq
(
0
).
addClass
(
'
selected
'
).
focus
();
})
.
catch
(()
=>
flash
(
__
(
'
An error occurred while loading filenames
'
)));
}
...
...
app/assets/javascripts/project_select.js
View file @
0e334037
...
...
@@ -9,7 +9,7 @@ import { loadCSSFile } from './lib/utils/css_utils';
const
projectSelect
=
()
=>
{
loadCSSFile
(
gon
.
select2_css_path
)
.
then
(()
=>
{
$
(
'
.ajax-project-select
'
).
each
(
function
(
i
,
select
)
{
$
(
'
.ajax-project-select
'
).
each
(
function
(
i
,
select
)
{
let
placeholder
;
const
simpleFilter
=
$
(
select
).
data
(
'
simpleFilter
'
)
||
false
;
const
isInstantiated
=
$
(
select
).
data
(
'
select2
'
);
...
...
@@ -35,15 +35,15 @@ const projectSelect = () => {
minimumInputLength
:
0
,
query
:
query
=>
{
let
projectsCallback
;
const
finalCallback
=
function
(
projects
)
{
const
finalCallback
=
function
(
projects
)
{
const
data
=
{
results
:
projects
,
};
return
query
.
callback
(
data
);
};
if
(
this
.
includeGroups
)
{
projectsCallback
=
function
(
projects
)
{
const
groupsCallback
=
function
(
groups
)
{
projectsCallback
=
function
(
projects
)
{
const
groupsCallback
=
function
(
groups
)
{
const
data
=
groups
.
concat
(
projects
);
return
finalCallback
(
data
);
};
...
...
app/assets/javascripts/project_select_combo_button.js
View file @
0e334037
...
...
@@ -50,9 +50,7 @@ export default class ProjectSelectComboButton {
// eslint-disable-next-line promise/no-nesting
loadCSSFile
(
gon
.
select2_css_path
)
.
then
(()
=>
{
$
(
event
.
currentTarget
)
.
siblings
(
'
.project-item-select
'
)
.
select2
(
'
open
'
);
$
(
event
.
currentTarget
).
siblings
(
'
.project-item-select
'
).
select2
(
'
open
'
);
})
.
catch
(()
=>
{});
})
...
...
@@ -104,14 +102,8 @@ export default class ProjectSelectComboButton {
const
defaultTextPrefix
=
this
.
resourceLabel
;
// the trailing slice call depluralizes each of these strings (e.g. new-issues -> new-issue)
const
localStorageItemType
=
`new-
${
this
.
resourceType
.
split
(
'
_
'
)
.
join
(
'
-
'
)
.
slice
(
0
,
-
1
)}
`
;
const
presetTextSuffix
=
this
.
resourceType
.
split
(
'
_
'
)
.
join
(
'
'
)
.
slice
(
0
,
-
1
);
const
localStorageItemType
=
`new-
${
this
.
resourceType
.
split
(
'
_
'
).
join
(
'
-
'
).
slice
(
0
,
-
1
)}
`
;
const
presetTextSuffix
=
this
.
resourceType
.
split
(
'
_
'
).
join
(
'
'
).
slice
(
0
,
-
1
);
return
{
localStorageItemType
,
// new-issue / new-merge-request
...
...
app/assets/javascripts/projects/commit_box/info/init_details_button.js
View file @
0e334037
...
...
@@ -3,9 +3,7 @@ import $ from 'jquery';
export
const
initDetailsButton
=
()
=>
{
$
(
'
body
'
).
on
(
'
click
'
,
'
.js-details-expand
'
,
function
expand
(
e
)
{
e
.
preventDefault
();
$
(
this
)
.
next
(
'
.js-details-content
'
)
.
removeClass
(
'
hide
'
);
$
(
this
).
next
(
'
.js-details-content
'
).
removeClass
(
'
hide
'
);
$
(
this
).
hide
();
});
};
app/assets/javascripts/projects/experiment_new_project_creation/index.js
View file @
0e334037
import
Vue
from
'
vue
'
;
import
NewProjectCreationApp
from
'
./components/app.vue
'
;
export
default
function
(
el
,
props
)
{
export
default
function
(
el
,
props
)
{
return
new
Vue
({
el
,
components
:
{
...
...
app/assets/javascripts/projects/project_new.js
View file @
0e334037
...
...
@@ -91,9 +91,7 @@ const bindEvents = () => {
$
(
'
.how_to_import_link
'
).
on
(
'
click
'
,
e
=>
{
e
.
preventDefault
();
$
(
e
.
currentTarget
)
.
next
(
'
.modal
'
)
.
show
();
$
(
e
.
currentTarget
).
next
(
'
.modal
'
).
show
();
});
$
(
'
.modal-header .close
'
).
on
(
'
click
'
,
()
=>
{
...
...
@@ -151,10 +149,7 @@ const bindEvents = () => {
const
selectedTemplate
=
DEFAULT_PROJECT_TEMPLATES
[
value
];
$selectedTemplateText
.
text
(
selectedTemplate
.
text
);
$
(
selectedTemplate
.
icon
)
.
clone
()
.
addClass
(
'
d-block
'
)
.
appendTo
(
$selectedIcon
);
$
(
selectedTemplate
.
icon
).
clone
().
addClass
(
'
d-block
'
).
appendTo
(
$selectedIcon
);
const
$activeTabProjectName
=
$
(
'
.tab-pane.active #project_name
'
);
const
$activeTabProjectPath
=
$
(
'
.tab-pane.active #project_path
'
);
...
...
app/assets/javascripts/projects/tree/components/commit_pipeline_status_component.vue
View file @
0e334037
...
...
@@ -83,10 +83,7 @@ export default {
});
},
fetchPipelineCommitData
()
{
this
.
service
.
fetchData
()
.
then
(
this
.
successCallback
)
.
catch
(
this
.
errorCallback
);
this
.
service
.
fetchData
().
then
(
this
.
successCallback
).
catch
(
this
.
errorCallback
);
},
},
};
...
...
app/assets/javascripts/registry/explorer/components/details_page/delete_alert.vue
View file @
0e334037
...
...
@@ -60,7 +60,7 @@ export default {
@
dismiss=
"$emit('change', null)"
>
<gl-sprintf
:message=
"deleteAlertConfig.message"
>
<template
#docLink
="
{
content
}">
<template
#docLink
="
{
content
}">
<gl-link
:href=
"garbageCollectionHelpPagePath"
target=
"_blank"
>
{{
content
}}
</gl-link>
...
...
app/assets/javascripts/registry/explorer/components/details_page/partial_cleanup_alert.vue
View file @
0e334037
...
...
@@ -23,12 +23,12 @@ export default {
<
template
>
<gl-alert
variant=
"warning"
:title=
"$options.i18n.DELETE_ALERT_TITLE"
@
dismiss=
"$emit('dismiss')"
>
<gl-sprintf
:message=
"$options.i18n.DELETE_ALERT_LINK_TEXT"
>
<template
#adminLink
="
{
content
}">
<template
#adminLink
="
{
content
}">
<gl-link
data-testid=
"run-link"
:href=
"runCleanupPoliciesHelpPagePath"
target=
"_blank"
>
{{
content
}}
</gl-link>
</
template
>
<
template
#docLink=
"{
content
}"
>
<
template
#docLink=
"{
content
}"
>
<gl-link
data-testid=
"help-link"
:href=
"cleanupPoliciesHelpPagePath"
target=
"_blank"
>
{{
content
}}
</gl-link>
...
...
app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue
View file @
0e334037
...
...
@@ -138,9 +138,7 @@ export default {
<
template
#left-secondary
>
<span
data-testid=
"size"
>
{{
formattedSize
}}
<template
v-if=
"formattedSize && layers"
>
·
</
template
>
<template
v-if=
"formattedSize && layers"
>
·
</
template
>
{{ layers }}
</span>
</template>
...
...
app/assets/javascripts/registry/explorer/components/list_page/group_empty_state.vue
View file @
0e334037
...
...
@@ -25,7 +25,7 @@ export default {
)
"
>
<template
#docLink
="
{
content
}">
<template
#docLink
="
{
content
}">
<gl-link
:href=
"config.helpPagePath"
target=
"_blank"
>
{{
content
}}
</gl-link>
</
template
>
</gl-sprintf>
...
...
app/assets/javascripts/registry/explorer/components/list_page/project_empty_state.vue
View file @
0e334037
...
...
@@ -45,7 +45,7 @@ export default {
<template
#description
>
<p>
<gl-sprintf
:message=
"$options.i18n.introText"
>
<template
#docLink
="
{
content
}">
<template
#docLink
="
{
content
}">
<gl-link
:href=
"config.helpPagePath"
target=
"_blank"
>
{{
content
}}
</gl-link>
</
template
>
</gl-sprintf>
...
...
@@ -53,10 +53,10 @@ export default {
<h5>
{{ $options.i18n.quickStart }}
</h5>
<p>
<gl-sprintf
:message=
"$options.i18n.notLoggedInMessage"
>
<
template
#twofaDocLink=
"{
content
}"
>
<
template
#twofaDocLink=
"{
content
}"
>
<gl-link
:href=
"config.twoFactorAuthHelpLink"
target=
"_blank"
>
{{
content
}}
</gl-link>
</
template
>
<
template
#personalAccessTokensDocLink=
"{
content
}"
>
<
template
#personalAccessTokensDocLink=
"{
content
}"
>
<gl-link
:href=
"config.personalAccessTokensHelpLink"
target=
"_blank"
>
{{
content
}}
</gl-link>
...
...
@@ -81,7 +81,7 @@ export default {
<p
class=
"gl-mb-4"
>
{{ $options.i18n.addImageText }}
</p>
<gl-form-input-group
class=
"gl-mb-4
"
>
<gl-form-input-group
class=
"gl-mb-4"
>
<gl-form-input
:value=
"dockerBuildCommand"
readonly
...
...
app/assets/javascripts/registry/explorer/pages/list.vue
View file @
0e334037
...
...
@@ -230,7 +230,7 @@ export default {
<
template
#description
>
<p>
<gl-sprintf
:message=
"$options.i18n.CONNECTION_ERROR_MESSAGE"
>
<template
#docLink
="
{
content
}">
<template
#docLink
="
{
content
}">
<gl-link
:href=
"`$
{config.helpPagePath}#docker-connection-error`" target="_blank">
{{
content
}}
</gl-link>
...
...
app/assets/javascripts/registry/settings/components/expiration_input.vue
View file @
0e334037
...
...
@@ -83,7 +83,7 @@ export default {
<template
#label
>
<span
data-testid=
"label"
>
<gl-sprintf
:message=
"label"
>
<template
#italic
="
{
content
}">
<template
#italic
="
{
content
}">
<i>
{{
content
}}
</i>
</
template
>
</gl-sprintf>
...
...
@@ -100,7 +100,7 @@ export default {
<
template
#description
>
<span
data-testid=
"description"
class=
"gl-text-gray-400"
>
<gl-sprintf
:message=
"description"
>
<template
#link
="
{
content
}">
<template
#link
="
{
content
}">
<gl-link
:href=
"tagsRegexHelpPagePath"
target=
"_blank"
>
{{
content
}}
</gl-link>
</
template
>
</gl-sprintf>
...
...
app/assets/javascripts/registry/settings/components/expiration_toggle.vue
View file @
0e334037
...
...
@@ -42,7 +42,7 @@ export default {
<gl-toggle
id=
"expiration-policy-toggle"
v-model=
"enabled"
:disabled=
"disabled"
/>
<span
class=
"gl-ml-5 gl-line-height-24"
data-testid=
"description"
>
<gl-sprintf
:message=
"toggleText"
>
<template
#strong
="
{
content
}">
<template
#strong
="
{
content
}">
<strong>
{{
content
}}
</strong>
</
template
>
</gl-sprintf>
...
...
app/assets/javascripts/registry/settings/components/settings_form.vue
View file @
0e334037
...
...
@@ -214,10 +214,10 @@ export default {
<div>
<p>
<gl-sprintf
:message=
"$options.i18n.KEEP_INFO_TEXT"
>
<template
#strong
="
{
content
}">
<template
#strong
="
{
content
}">
<strong>
{{
content
}}
</strong>
</
template
>
<
template
#secondStrong=
"{
content
}"
>
<
template
#secondStrong=
"{
content
}"
>
<strong>
{{
content
}}
</strong>
</
template
>
</gl-sprintf>
...
...
@@ -253,10 +253,10 @@ export default {
<div>
<p>
<gl-sprintf
:message=
"$options.i18n.REMOVE_INFO_TEXT"
>
<template
#strong
="
{
content
}">
<template
#strong
="
{
content
}">
<strong>
{{
content
}}
</strong>
</
template
>
<
template
#secondStrong=
"{
content
}"
>
<
template
#secondStrong=
"{
content
}"
>
<strong>
{{
content
}}
</strong>
</
template
>
</gl-sprintf>
...
...
app/assets/javascripts/reports/components/report_link.vue
View file @
0e334037
...
...
@@ -21,16 +21,10 @@ export default {
rel=
"noopener noreferrer nofollow"
class=
"break-link"
>
{{
issue
.
path
}}
<template
v-if=
"issue.line"
>
:
{{
issue
.
line
}}
</
template
>
{{
issue
.
path
}}
<template
v-if=
"issue.line"
>
:
{{
issue
.
line
}}
</
template
>
</a>
<
template
v-else
>
{{
issue
.
path
}}
<template
v-if=
"issue.line"
>
:
{{
issue
.
line
}}
</
template
>
{{
issue
.
path
}}
<template
v-if=
"issue.line"
>
:
{{
issue
.
line
}}
</
template
>
</template>
</div>
</template>
app/assets/javascripts/repository/components/table/parent_row.vue
View file @
0e334037
...
...
@@ -48,9 +48,7 @@ export default {
inline
class=
"d-inline-block align-text-bottom"
/>
<router-link
v-else
:to=
"parentRoute"
:aria-label=
"__('Go to parent')"
>
..
</router-link>
<router-link
v-else
:to=
"parentRoute"
:aria-label=
"__('Go to parent')"
>
..
</router-link>
</td>
</tr>
</
template
>
app/assets/javascripts/right_sidebar.js
View file @
0e334037
...
...
@@ -15,13 +15,13 @@ function Sidebar() {
this
.
addEventListeners
();
}
Sidebar
.
initialize
=
function
()
{
Sidebar
.
initialize
=
function
()
{
if
(
!
this
.
instance
)
{
this
.
instance
=
new
Sidebar
();
}
};
Sidebar
.
prototype
.
removeListeners
=
function
()
{
Sidebar
.
prototype
.
removeListeners
=
function
()
{
this
.
sidebar
.
off
(
'
click
'
,
'
.sidebar-collapsed-icon
'
);
// eslint-disable-next-line @gitlab/no-global-event-off
this
.
sidebar
.
off
(
'
hidden.gl.dropdown
'
);
...
...
@@ -32,7 +32,7 @@ Sidebar.prototype.removeListeners = function() {
$
(
document
).
off
(
'
click
'
,
'
.js-sidebar-toggle
'
);
};
Sidebar
.
prototype
.
addEventListeners
=
function
()
{
Sidebar
.
prototype
.
addEventListeners
=
function
()
{
const
$document
=
$
(
document
);
this
.
sidebar
.
on
(
'
click
'
,
'
.sidebar-collapsed-icon
'
,
this
,
this
.
sidebarCollapseClicked
);
...
...
@@ -44,7 +44,7 @@ Sidebar.prototype.addEventListeners = function() {
.
on
(
'
click
'
,
'
.js-issuable-todo
'
,
this
.
toggleTodo
);
};
Sidebar
.
prototype
.
sidebarToggleClicked
=
function
(
e
,
triggered
)
{
Sidebar
.
prototype
.
sidebarToggleClicked
=
function
(
e
,
triggered
)
{
const
$this
=
$
(
this
);
const
$collapseIcon
=
$
(
'
.js-sidebar-collapse
'
);
const
$expandIcon
=
$
(
'
.js-sidebar-expand
'
);
...
...
@@ -60,9 +60,7 @@ Sidebar.prototype.sidebarToggleClicked = function(e, triggered) {
$
(
'
aside.right-sidebar
'
)
.
removeClass
(
'
right-sidebar-expanded
'
)
.
addClass
(
'
right-sidebar-collapsed
'
);
$
(
'
.layout-page
'
)
.
removeClass
(
'
right-sidebar-expanded
'
)
.
addClass
(
'
right-sidebar-collapsed
'
);
$
(
'
.layout-page
'
).
removeClass
(
'
right-sidebar-expanded
'
).
addClass
(
'
right-sidebar-collapsed
'
);
}
else
{
$toggleContainer
.
data
(
'
is-expanded
'
,
true
);
$expandIcon
.
addClass
(
'
hidden
'
);
...
...
@@ -70,9 +68,7 @@ Sidebar.prototype.sidebarToggleClicked = function(e, triggered) {
$
(
'
aside.right-sidebar
'
)
.
removeClass
(
'
right-sidebar-collapsed
'
)
.
addClass
(
'
right-sidebar-expanded
'
);
$
(
'
.layout-page
'
)
.
removeClass
(
'
right-sidebar-collapsed
'
)
.
addClass
(
'
right-sidebar-expanded
'
);
$
(
'
.layout-page
'
).
removeClass
(
'
right-sidebar-collapsed
'
).
addClass
(
'
right-sidebar-expanded
'
);
}
$this
.
attr
(
'
data-original-title
'
,
tooltipLabel
);
...
...
@@ -82,16 +78,14 @@ Sidebar.prototype.sidebarToggleClicked = function(e, triggered) {
}
};
Sidebar
.
prototype
.
toggleTodo
=
function
(
e
)
{
Sidebar
.
prototype
.
toggleTodo
=
function
(
e
)
{
const
$this
=
$
(
e
.
currentTarget
);
const
ajaxType
=
$this
.
data
(
'
deletePath
'
)
?
'
delete
'
:
'
post
'
;
const
url
=
String
(
$this
.
data
(
'
deletePath
'
)
||
$this
.
data
(
'
createPath
'
));
hide
(
$this
);
$
(
'
.js-issuable-todo
'
)
.
disable
()
.
addClass
(
'
is-loading
'
);
$
(
'
.js-issuable-todo
'
).
disable
().
addClass
(
'
is-loading
'
);
axios
[
ajaxType
](
url
,
{
issuable_id
:
$this
.
data
(
'
issuableId
'
),
...
...
@@ -110,7 +104,7 @@ Sidebar.prototype.toggleTodo = function(e) {
);
};
Sidebar
.
prototype
.
todoUpdateDone
=
function
(
data
)
{
Sidebar
.
prototype
.
todoUpdateDone
=
function
(
data
)
{
const
deletePath
=
data
.
delete_path
?
data
.
delete_path
:
null
;
const
attrPrefix
=
deletePath
?
'
mark
'
:
'
todo
'
;
const
$todoBtns
=
$
(
'
.js-issuable-todo
'
);
...
...
@@ -140,7 +134,7 @@ Sidebar.prototype.todoUpdateDone = function(data) {
});
};
Sidebar
.
prototype
.
sidebarCollapseClicked
=
function
(
e
)
{
Sidebar
.
prototype
.
sidebarCollapseClicked
=
function
(
e
)
{
if
(
$
(
e
.
currentTarget
).
hasClass
(
'
dont-change-state
'
))
{
return
;
}
...
...
@@ -150,7 +144,7 @@ Sidebar.prototype.sidebarCollapseClicked = function(e) {
return
sidebar
.
openDropdown
(
$block
);
};
Sidebar
.
prototype
.
openDropdown
=
function
(
blockOrName
)
{
Sidebar
.
prototype
.
openDropdown
=
function
(
blockOrName
)
{
const
$block
=
typeof
blockOrName
===
'
string
'
?
this
.
getBlock
(
blockOrName
)
:
blockOrName
;
if
(
!
this
.
isOpen
())
{
this
.
setCollapseAfterUpdate
(
$block
);
...
...
@@ -164,19 +158,19 @@ Sidebar.prototype.openDropdown = function(blockOrName) {
});
};
Sidebar
.
prototype
.
setCollapseAfterUpdate
=
function
(
$block
)
{
Sidebar
.
prototype
.
setCollapseAfterUpdate
=
function
(
$block
)
{
$block
.
addClass
(
'
collapse-after-update
'
);
return
$
(
'
.layout-page
'
).
addClass
(
'
with-overlay
'
);
};
Sidebar
.
prototype
.
onSidebarDropdownHidden
=
function
(
e
)
{
Sidebar
.
prototype
.
onSidebarDropdownHidden
=
function
(
e
)
{
const
sidebar
=
e
.
data
;
e
.
preventDefault
();
const
$block
=
$
(
e
.
target
).
closest
(
'
.block
'
);
return
sidebar
.
sidebarDropdownHidden
(
$block
);
};
Sidebar
.
prototype
.
sidebarDropdownHidden
=
function
(
$block
)
{
Sidebar
.
prototype
.
sidebarDropdownHidden
=
function
(
$block
)
{
if
(
$block
.
hasClass
(
'
collapse-after-update
'
))
{
$block
.
removeClass
(
'
collapse-after-update
'
);
$
(
'
.layout-page
'
).
removeClass
(
'
with-overlay
'
);
...
...
@@ -184,11 +178,11 @@ Sidebar.prototype.sidebarDropdownHidden = function($block) {
}
};
Sidebar
.
prototype
.
triggerOpenSidebar
=
function
()
{
Sidebar
.
prototype
.
triggerOpenSidebar
=
function
()
{
return
this
.
sidebar
.
find
(
'
.js-sidebar-toggle
'
).
trigger
(
'
click
'
);
};
Sidebar
.
prototype
.
toggleSidebar
=
function
(
action
)
{
Sidebar
.
prototype
.
toggleSidebar
=
function
(
action
)
{
if
(
action
==
null
)
{
action
=
'
toggle
'
;
}
...
...
@@ -207,11 +201,11 @@ Sidebar.prototype.toggleSidebar = function(action) {
}
};
Sidebar
.
prototype
.
isOpen
=
function
()
{
Sidebar
.
prototype
.
isOpen
=
function
()
{
return
this
.
sidebar
.
is
(
'
.right-sidebar-expanded
'
);
};
Sidebar
.
prototype
.
getBlock
=
function
(
name
)
{
Sidebar
.
prototype
.
getBlock
=
function
(
name
)
{
return
this
.
sidebar
.
find
(
`.block.
${
name
}
`
);
};
...
...
app/assets/javascripts/search_autocomplete.js
View file @
0e334037
...
...
@@ -76,8 +76,8 @@ export class SearchAutocomplete {
this
.
wrap
=
wrap
||
$
(
'
.search
'
);
this
.
optsEl
=
optsEl
||
this
.
wrap
.
find
(
'
.search-autocomplete-opts
'
);
this
.
autocompletePath
=
autocompletePath
||
this
.
optsEl
.
data
(
'
autocompletePath
'
);
this
.
projectId
=
projectId
||
(
this
.
optsEl
.
data
(
'
autocompleteProjectId
'
)
||
''
)
;
this
.
projectRef
=
projectRef
||
(
this
.
optsEl
.
data
(
'
autocompleteProjectRef
'
)
||
''
)
;
this
.
projectId
=
projectId
||
this
.
optsEl
.
data
(
'
autocompleteProjectId
'
)
||
''
;
this
.
projectRef
=
projectRef
||
this
.
optsEl
.
data
(
'
autocompleteProjectRef
'
)
||
''
;
this
.
dropdown
=
this
.
wrap
.
find
(
'
.dropdown
'
);
this
.
dropdownToggle
=
this
.
wrap
.
find
(
'
.js-dropdown-search-toggle
'
);
this
.
dropdownMenu
=
this
.
dropdown
.
find
(
'
.dropdown-menu
'
);
...
...
app/assets/javascripts/settings_panels.js
View file @
0e334037
...
...
@@ -4,10 +4,7 @@ import { __ } from './locale';
function
expandSection
(
$section
)
{
$section
.
find
(
'
.js-settings-toggle:not(.js-settings-toggle-trigger-only)
'
).
text
(
__
(
'
Collapse
'
));
// eslint-disable-next-line @gitlab/no-global-event-off
$section
.
find
(
'
.settings-content
'
)
.
off
(
'
scroll.expandSection
'
)
.
scrollTop
(
0
);
$section
.
find
(
'
.settings-content
'
).
off
(
'
scroll.expandSection
'
).
scrollTop
(
0
);
$section
.
addClass
(
'
expanded
'
);
if
(
!
$section
.
hasClass
(
'
no-animate
'
))
{
$section
...
...
app/assets/javascripts/single_file_diff.js
View file @
0e334037
...
...
@@ -29,17 +29,12 @@ export default class SingleFileDiff {
this
.
isOpen
=
!
this
.
diffForPath
;
if
(
this
.
diffForPath
)
{
this
.
collapsedContent
=
this
.
content
;
this
.
loadingContent
=
$
(
WRAPPER
)
.
addClass
(
'
loading
'
)
.
html
(
LOADING_HTML
)
.
hide
();
this
.
loadingContent
=
$
(
WRAPPER
).
addClass
(
'
loading
'
).
html
(
LOADING_HTML
).
hide
();
this
.
content
=
null
;
this
.
collapsedContent
.
after
(
this
.
loadingContent
);
this
.
$chevronRightIcon
.
removeClass
(
'
gl-display-none
'
);
}
else
{
this
.
collapsedContent
=
$
(
WRAPPER
)
.
html
(
COLLAPSED_HTML
)
.
hide
();
this
.
collapsedContent
=
$
(
WRAPPER
).
html
(
COLLAPSED_HTML
).
hide
();
this
.
content
.
after
(
this
.
collapsedContent
);
this
.
$chevronDownIcon
.
removeClass
(
'
gl-display-none
'
);
}
...
...
app/assets/javascripts/smart_interval.js
View file @
0e334037
...
...
@@ -96,9 +96,7 @@ export default class SmartInterval {
window
.
removeEventListener
(
'
focus
'
,
this
.
onWindowVisibilityChange
);
this
.
cancel
();
// eslint-disable-next-line @gitlab/no-global-event-off
$
(
document
)
.
off
(
'
visibilitychange
'
)
.
off
(
'
beforeunload
'
);
$
(
document
).
off
(
'
visibilitychange
'
).
off
(
'
beforeunload
'
);
}
/* private */
...
...
app/assets/javascripts/snippets/components/snippet_blob_view.vue
View file @
0e334037
...
...
@@ -53,9 +53,7 @@ export default {
},
provide
()
{
return
{
blobHash
:
Math
.
random
()
.
toString
()
.
split
(
'
.
'
)[
1
],
blobHash
:
Math
.
random
().
toString
().
split
(
'
.
'
)[
1
],
};
},
data
()
{
...
...
app/assets/javascripts/star.js
View file @
0e334037
...
...
@@ -16,10 +16,7 @@ export default class Star {
.
post
(
$this
.
data
(
'
endpoint
'
))
.
then
(({
data
})
=>
{
const
isStarred
=
$starSpan
.
hasClass
(
'
starred
'
);
$this
.
parent
()
.
find
(
'
.count
'
)
.
text
(
data
.
star_count
);
$this
.
parent
().
find
(
'
.count
'
).
text
(
data
.
star_count
);
if
(
isStarred
)
{
$starSpan
.
removeClass
(
'
starred
'
).
text
(
s__
(
'
StarProject|Star
'
));
...
...
spec/frontend/registry/explorer/components/list_page/__snapshots__/project_empty_state_spec.js.snap
View file @
0e334037
...
...
@@ -56,7 +56,7 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = `
</p>
<gl-form-input-group-stub
class="gl-mb-4
"
class="gl-mb-4"
predefinedoptions="[object Object]"
value=""
>
...
...
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