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
3d69d01e
Commit
3d69d01e
authored
8 years ago
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache results from jQuery selectors to retrieve namespace name
parent
8353cc61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
app/assets/javascripts/importer_status.js.coffee
app/assets/javascripts/importer_status.js.coffee
+7
-4
No files found.
app/assets/javascripts/importer_status.js.coffee
View file @
3d69d01e
...
...
@@ -7,13 +7,16 @@ class @ImporterStatus
$
(
'.js-add-to-import'
)
.
off
'click'
.
on
'click'
,
(
e
)
=>
new_namespace
=
null
$btn
=
$
(
e
.
currentTarget
)
$tr
=
$btn
.
closest
(
'tr'
)
$target_field
=
$tr
.
find
(
'.import-target'
)
$namespace_input
=
$target_field
.
find
(
'input'
)
id
=
$tr
.
attr
(
'id'
).
replace
(
'repo_'
,
''
)
if
$tr
.
find
(
'.import-target input'
).
length
>
0
new_namespace
=
$tr
.
find
(
'.import-target input'
).
prop
(
'value'
)
$tr
.
find
(
'.import-target'
).
empty
().
append
(
"
#{
new_namespace
}
/
#{
$tr
.
find
(
'.import-target'
).
data
(
'project_name'
)
}
"
)
new_namespace
=
null
if
$namespace_input
.
length
>
0
new_namespace
=
$namespace_input
.
prop
(
'value'
)
$target_field
.
empty
().
append
(
"
#{
new_namespace
}
/
#{
$target_field
.
data
(
'project_name'
)
}
"
)
$btn
.
disable
()
...
...
This diff is collapsed.
Click to expand it.
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