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
94a19cbd
Commit
94a19cbd
authored
Jul 28, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Latest Changes from CE applied
parent
ace34ad1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+2
-2
app/assets/javascripts/projects/project_new.js
app/assets/javascripts/projects/project_new.js
+8
-8
app/assets/javascripts/ref_select_dropdown.js
app/assets/javascripts/ref_select_dropdown.js
+2
-1
No files found.
app/assets/javascripts/dispatcher.js
View file @
94a19cbd
...
...
@@ -245,7 +245,7 @@ import AuditLogs from './audit_logs';
case
'
projects:tags:new
'
:
new
ZenMode
();
new
gl
.
GLForm
(
$
(
'
.tag-form
'
),
true
);
new
RefSelectDropdown
(
$
(
'
.js-branch-select
'
)
,
JSON
.
parse
(
document
.
getElementById
(
'
availableRefs
'
).
innerHTML
)
);
new
RefSelectDropdown
(
$
(
'
.js-branch-select
'
));
break
;
case
'
projects:snippets:new
'
:
case
'
projects:snippets:edit
'
:
...
...
@@ -311,7 +311,7 @@ import AuditLogs from './audit_logs';
setupProjectEdit
();
break
;
case
'
projects:pipelines:new
'
:
new
NewBranchForm
(
$
(
'
.js-new-pipeline-form
'
)
,
JSON
.
parse
(
document
.
getElementById
(
'
availableRefs
'
).
innerHTML
)
);
new
NewBranchForm
(
$
(
'
.js-new-pipeline-form
'
));
break
;
case
'
projects:pipelines:builds
'
:
case
'
projects:pipelines:failures
'
:
...
...
app/assets/javascripts/projects/project_new.js
View file @
94a19cbd
...
...
@@ -2,30 +2,30 @@ document.addEventListener('DOMContentLoaded', () => {
const
importBtnTooltip
=
'
Please enter a valid project name.
'
;
const
$importBtnWrapper
=
$
(
'
.import_gitlab_project
'
);
$
(
'
.how_to_import_link
'
).
bind
(
'
click
'
,
(
e
)
=>
{
$
(
'
.how_to_import_link
'
).
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
$
(
'
.how_to_import_link
'
).
next
(
'
.modal
'
).
show
();
});
$
(
'
.modal-header .close
'
).
bind
(
'
click
'
,
()
=>
{
$
(
'
.modal-header .close
'
).
on
(
'
click
'
,
()
=>
{
$
(
'
.modal
'
).
hide
();
});
$
(
'
.btn_import_gitlab_project
'
).
bind
(
'
click
'
,
()
=>
{
$
(
'
.btn_import_gitlab_project
'
).
on
(
'
click
'
,
()
=>
{
const
importHref
=
$
(
'
a.btn_import_gitlab_project
'
).
attr
(
'
href
'
);
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
href
'
,
`
${
importHref
}
?namespace_id=
${
$
(
'
#project_namespace_id
'
).
val
()}
&path=
${
$
(
'
#project_path
'
).
val
()}
`
);
});
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
,
$
(
'
#project_path
'
).
val
().
trim
().
length
===
0
);
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
,
!
$
(
'
#project_path
'
).
val
().
trim
().
length
);
$importBtnWrapper
.
attr
(
'
title
'
,
importBtnTooltip
);
$
(
'
#new_project
'
).
submit
(
()
=>
{
$
(
'
#new_project
'
).
on
(
'
submit
'
,
()
=>
{
const
$path
=
$
(
'
#project_path
'
);
$path
.
val
(
$path
.
val
().
trim
());
});
$
(
'
#project_path
'
).
keyup
(
()
=>
{
if
(
$
(
'
#project_path
'
).
val
().
trim
().
length
!==
0
)
{
$
(
'
#project_path
'
).
on
(
'
keyup
'
,
()
=>
{
if
(
$
(
'
#project_path
'
).
val
().
trim
().
length
)
{
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
,
false
);
$importBtnWrapper
.
attr
(
'
title
'
,
''
);
$importBtnWrapper
.
removeClass
(
'
has-tooltip
'
);
...
...
@@ -36,7 +36,7 @@ document.addEventListener('DOMContentLoaded', () => {
});
$
(
'
#project_import_url
'
).
disable
();
$
(
'
.import_git
'
).
click
(
()
=>
{
$
(
'
.import_git
'
).
on
(
'
click
'
,
()
=>
{
const
$projectImportUrl
=
$
(
'
#project_import_url
'
);
$projectImportUrl
.
attr
(
'
disabled
'
,
!
$projectImportUrl
.
attr
(
'
disabled
'
));
});
...
...
app/assets/javascripts/ref_select_dropdown.js
View file @
94a19cbd
class
RefSelectDropdown
{
constructor
(
$dropdownButton
,
availableRefs
)
{
const
availableRefsValue
=
availableRefs
||
JSON
.
parse
(
document
.
getElementById
(
'
availableRefs
'
).
innerHTML
);
$dropdownButton
.
glDropdown
({
data
:
availableRefs
,
data
:
availableRefs
Value
,
filterable
:
true
,
filterByText
:
true
,
remote
:
false
,
...
...
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