diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-07 00:42:02 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-08 01:15:04 +0300 |
commit | db7921f2d8349da8183dc716fdf62b6ab5bc697a (patch) | |
tree | 99fdf576f0a8d62e4eeaadf2af75599817c17450 /app/assets/javascripts/importer_status.js.coffee | |
parent | bc57ff0ef023db3d07f1adfa6a309fb4a24ed203 (diff) |
Add "Import all projects" button to GitHub and GitLab import pages.
Closes #1963.
Diffstat (limited to 'app/assets/javascripts/importer_status.js.coffee')
-rw-r--r-- | app/assets/javascripts/importer_status.js.coffee | 6 |
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 (=> |