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
8353cc61
Commit
8353cc61
authored
Jul 01, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix import button when import fail due the namespace already been taken
parent
b2273559
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
app/assets/javascripts/importer_status.js.coffee
app/assets/javascripts/importer_status.js.coffee
+1
-1
app/views/import/base/create.js.haml
app/views/import/base/create.js.haml
+4
-1
No files found.
app/assets/javascripts/importer_status.js.coffee
View file @
8353cc61
...
@@ -13,7 +13,7 @@ class @ImporterStatus
...
@@ -13,7 +13,7 @@ class @ImporterStatus
id
=
$tr
.
attr
(
'id'
).
replace
(
'repo_'
,
''
)
id
=
$tr
.
attr
(
'id'
).
replace
(
'repo_'
,
''
)
if
$tr
.
find
(
'.import-target input'
).
length
>
0
if
$tr
.
find
(
'.import-target input'
).
length
>
0
new_namespace
=
$tr
.
find
(
'.import-target input'
).
prop
(
'value'
)
new_namespace
=
$tr
.
find
(
'.import-target input'
).
prop
(
'value'
)
$tr
.
find
(
'.import-target'
).
empty
().
append
(
"
#{
new_namespace
}
/
#{
$tr
.
find
(
'.import-target'
).
data
(
'project_name'
)
}
"
)
$tr
.
find
(
'.import-target'
).
empty
().
append
(
"
#{
new_namespace
}
/
#{
$tr
.
find
(
'.import-target'
).
data
(
'project_name'
)
}
"
)
$btn
$btn
.
disable
()
.
disable
()
...
...
app/views/import/base/create.js.haml
View file @
8353cc61
-
if
@already_been_taken
-
if
@already_been_taken
:plain
:plain
target_field = $("tr#repo_
#{
@repo_id
}
.import-target")
tr = $("tr#repo_
#{
@repo_id
}
")
target_field = tr.find(".import-target")
import_button = tr.find(".btn-import")
origin_target = target_field.text()
origin_target = target_field.text()
project_name = "
#{
@project_name
}
"
project_name = "
#{
@project_name
}
"
origin_namespace = "
#{
@target_namespace
}
"
origin_namespace = "
#{
@target_namespace
}
"
...
@@ -10,6 +12,7 @@
...
@@ -10,6 +12,7 @@
target_field.append("/" + project_name)
target_field.append("/" + project_name)
target_field.data("project_name", project_name)
target_field.data("project_name", project_name)
target_field.find('input').prop("value", origin_namespace)
target_field.find('input').prop("value", origin_namespace)
import_button.enable().removeClass('is-loading')
-
elsif
@access_denied
-
elsif
@access_denied
:plain
:plain
job = $("tr#repo_
#{
@repo_id
}
")
job = $("tr#repo_
#{
@repo_id
}
")
...
...
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