summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-07 18:42:53 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-07 18:42:53 -0800
commit6729e4cfc23b2792666511345cf6856b51c66d91 (patch)
treebe55d09661d48dd757b828294c1693eab37cb253 /app
parent3cd036e315576b8cd56f16965be6c4293b641a20 (diff)
parent377d461f2655711e82d2031e57f12f8f975ac293 (diff)
downloadgitlab-ce-6729e4cfc23b2792666511345cf6856b51c66d91.tar.gz
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/importer_status.js.coffee6
-rw-r--r--app/views/import/github/status.html.haml8
-rw-r--r--app/views/import/gitlab/status.html.haml12
3 files changed, 17 insertions, 9 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 (=>
diff --git a/app/views/import/github/status.html.haml b/app/views/import/github/status.html.haml
index 1676c3c26ae..84d9903fe15 100644
--- a/app/views/import/github/status.html.haml
+++ b/app/views/import/github/status.html.haml
@@ -3,9 +3,11 @@
Import repositories from GitHub.com
%p.light
- Select projects you want to import.
-
+ Select projects you want to import.
%hr
+%p
+ = button_tag 'Import all projects', class: "btn btn-success js-import-all"
+
%table.table.import-jobs
%thead
%tr
@@ -32,7 +34,7 @@
%td.import-target
= repo.full_name
%td.import-actions.job-status
- = button_tag "Add", class: "btn btn-add-to-import"
+ = button_tag "Import", class: "btn js-add-to-import"
:coffeescript
$ ->
diff --git a/app/views/import/gitlab/status.html.haml b/app/views/import/gitlab/status.html.haml
index 9aedacef04b..d1e48dfad20 100644
--- a/app/views/import/gitlab/status.html.haml
+++ b/app/views/import/gitlab/status.html.haml
@@ -3,9 +3,11 @@
Import repositories from GitLab.com
%p.light
- Select projects you want to import.
-
+ Select projects you want to import.
%hr
+%p
+ = button_tag 'Import all projects', class: "btn btn-success js-import-all"
+
%table.table.import-jobs
%thead
%tr
@@ -32,8 +34,8 @@
%td.import-target
= repo["path_with_namespace"]
%td.import-actions.job-status
- = button_tag "Add", class: "btn btn-add-to-import"
+ = button_tag "Import", class: "btn js-add-to-import"
:coffeescript
- $ ->
- new ImporterStatus("#{jobs_import_gitlab_path}", "#{import_gitlab_url}")
+ $ ->
+ new ImporterStatus("#{jobs_import_gitlab_path}", "#{import_gitlab_path}")