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
177a6c47
Commit
177a6c47
authored
Jan 29, 2021
by
Enrique Alcantara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new search specific section selector
parent
11c0e896
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
app/assets/javascripts/pages/profiles/index.js
app/assets/javascripts/pages/profiles/index.js
+15
-13
app/assets/javascripts/search_settings/mount.js
app/assets/javascripts/search_settings/mount.js
+1
-1
No files found.
app/assets/javascripts/pages/profiles/index.js
View file @
177a6c47
...
...
@@ -3,19 +3,21 @@ import '~/profile/gl_crop';
import
Profile
from
'
~/profile/profile
'
;
import
initSearchSettings
from
'
~/search_settings
'
;
// eslint-disable-next-line func-names
$
(
document
).
on
(
'
input.ssh_key
'
,
'
#key_key
'
,
function
()
{
const
$title
=
$
(
'
#key_title
'
);
const
comment
=
$
(
this
)
.
val
()
.
match
(
/^
\S
+
\S
+
(
.+
)\n?
$/
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
// eslint-disable-next-line func-names
$
(
document
).
on
(
'
input.ssh_key
'
,
'
#key_key
'
,
function
()
{
const
$title
=
$
(
'
#key_title
'
);
const
comment
=
$
(
this
)
.
val
()
.
match
(
/^
\S
+
\S
+
(
.+
)\n?
$/
);
// Extract the SSH Key title from its comment
if
(
comment
&&
comment
.
length
>
1
)
{
$title
.
val
(
comment
[
1
]).
change
();
}
});
// Extract the SSH Key title from its comment
if
(
comment
&&
comment
.
length
>
1
)
{
$title
.
val
(
comment
[
1
]).
change
();
}
});
new
Profile
();
// eslint-disable-line no-new
new
Profile
();
// eslint-disable-line no-new
initSearchSettings
();
initSearchSettings
();
});
app/assets/javascripts/search_settings/mount.js
View file @
177a6c47
...
...
@@ -11,7 +11,7 @@ const mountSearch = ({ el }) =>
ref
:
'
searchSettings
'
,
props
:
{
searchRoot
:
document
.
querySelector
(
'
#content-body
'
),
sectionSelector
:
'
section.settings
'
,
sectionSelector
:
'
.js-search-settings-section,
section.settings
'
,
},
on
:
{
collapse
:
(
section
)
=>
closeSection
(
$
(
section
)),
...
...
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