summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-08 02:39:29 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-08 02:39:29 +0000
commit377d461f2655711e82d2031e57f12f8f975ac293 (patch)
tree1b7ee3ddeae2ce367430220e6c05fd3e41fc7cec /app/assets
parent49d6721329bd9fccf656bb750ee8f6c712852cf6 (diff)
parentdb7921f2d8349da8183dc716fdf62b6ab5bc697a (diff)
downloadgitlab-ce-377d461f2655711e82d2031e57f12f8f975ac293.tar.gz
Merge branch 'import-all-projects' into 'master'
Add "Import all projects" button to GitHub and GitLab import pages. Closes #1963. See merge request !1482
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/importer_status.js.coffee6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/importer_status.js.coffee b/app/assets/javascripts/importer_status.js.coffee
index 268efd7c832..e0e7771ab20 100644
--- a/app/assets/javascripts/importer_status.js.coffee
+++ b/app/assets/javascripts/importer_status.js.coffee
@@ -4,7 +4,7 @@ class @ImporterStatus
this.setAutoUpdate()
initStatusPage: ->
- $(".btn-add-to-import").click (event) =>
+ $(".js-add-to-import").click (event) =>
new_namespace = null
tr = $(event.currentTarget).closest("tr")
id = tr.attr("id").replace("repo_", "")
@@ -12,6 +12,10 @@ class @ImporterStatus
new_namespace = tr.find(".import-target input").prop("value")
tr.find(".import-target").empty().append(new_namespace + "/" + tr.find(".import-target").data("project_name"))
$.post @import_url, {repo_id: id, new_namespace: new_namespace}, dataType: 'script'
+
+ $(".js-import-all").click (event) =>
+ $(".js-add-to-import").each ->
+ $(this).click()
setAutoUpdate: ->
setInterval (=>