GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 3d438870 authored by Phil Hughes's avatar Phil Hughes

Updated based on feedback

parent a650af12
......@@ -4,16 +4,16 @@ class @ImporterStatus
this.setAutoUpdate()
initStatusPage: ->
$(".js-add-to-import")
$('.js-add-to-import')
.off 'click'
.on 'click', (event) =>
new_namespace = null
$btn = $(event.currentTarget)
$tr = $btn.closest("tr")
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"))
$tr = $btn.closest('tr')
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')}")
$btn
.disable()
......@@ -21,15 +21,15 @@ class @ImporterStatus
$.post @import_url, {repo_id: id, new_namespace: new_namespace}, dataType: 'script'
$(".js-import-all")
$('.js-import-all')
.off 'click'
.on 'click', (event) =>
$btn = $(event.currentTarget)
.on 'click', (e) =>
$btn = $(e.currentTarget)
$btn
.disable()
.addClass 'is-loading'
$(".js-add-to-import").each ->
$('.js-add-to-import').each ->
$(this).click()
setAutoUpdate: ->
......
......@@ -26,4 +26,4 @@
- else
:plain
job = $("tr#repo_#{@repo_id}")
job.find(".import-actions").html("<i class='fa fa-exclamation-circle'></i> Error saving project: #{escape_javascript(@project.errors.full_messages.join(','))}</i>")
job.find(".import-actions").html("<i class='fa fa-exclamation-circle'></i> Error saving project: #{escape_javascript(@project.errors.full_messages.join(','))}")
......@@ -12,11 +12,11 @@
- if @incompatible_repos.any?
= button_tag class: "btn btn-import btn-success js-import-all" do
Import all compatible projects
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
- else
= button_tag class: "btn btn-success js-import-all" do
Import all projects
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
.table-responsive
%table.table.import-jobs
......@@ -55,7 +55,7 @@
%td.import-actions.job-status
= button_tag class: "btn btn-import js-add-to-import" do
Import
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
- @incompatible_repos.each do |repo|
%tr{id: "repo_#{repo["owner"]}___#{repo["slug"]}"}
%td
......
......@@ -15,7 +15,7 @@
%p
= button_tag class: 'btn btn-import btn-success js-import-all' do
Import all projects
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
.table-responsive
%table.table.import-jobs
......@@ -54,7 +54,7 @@
%td.import-actions.job-status
= button_tag class: "btn btn-import js-add-to-import" do
Import
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
:javascript
new ImporterStatus("#{jobs_import_fogbugz_path}", "#{import_fogbugz_path}");
......@@ -10,7 +10,7 @@
%p
= button_tag class: "btn btn-import btn-success js-import-all" do
Import all projects
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
.table-responsive
%table.table.import-jobs
......@@ -49,7 +49,7 @@
%td.import-actions.job-status
= button_tag class: "btn btn-import js-add-to-import" do
Import
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
:javascript
new ImporterStatus("#{jobs_import_github_path}", "#{import_github_path}");
......@@ -10,7 +10,7 @@
%p
= button_tag class: "btn btn-import btn-success js-import-all" do
Import all projects
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
.table-responsive
%table.table.import-jobs
......@@ -49,7 +49,7 @@
%td.import-actions.job-status
= button_tag class: "btn js-add-to-import" do
Import
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
:javascript
new ImporterStatus("#{jobs_import_gitlab_path}", "#{import_gitlab_path}");
......@@ -10,7 +10,7 @@
%p
= button_tag class: "btn btn-import btn-success js-import-all" do
Import all projects
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
.table-responsive
%table.table.import-jobs
......@@ -49,7 +49,7 @@
%td.import-actions.job-status
= button_tag class: "btn btn-import js-add-to-import" do
Import
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
:javascript
new ImporterStatus("#{jobs_import_gitorious_path}", "#{import_gitorious_path}");
......@@ -16,11 +16,11 @@
- if @incompatible_repos.any?
= button_tag class: "btn btn-import btn-success js-import-all" do
Import all compatible projects
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
- else
= button_tag class: "btn btn-import btn-success js-import-all" do
Import all projects
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
.table-responsive
%table.table.import-jobs
......@@ -59,7 +59,7 @@
%td.import-actions.job-status
= button_tag class: "btn btn-import js-add-to-import" do
Import
= icon('spinner spin', class: 'loading-icon')
= icon("spinner spin", class: "loading-icon")
- @incompatible_repos.each do |repo|
%tr{id: "repo_#{repo.id}"}
%td
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment