diff options
author | Phil Hughes <me@iamphill.com> | 2016-04-14 11:32:02 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-04-14 11:32:02 +0300 |
commit | 3d438870f34cb1bd5667bc5db2f848c4f82d5d25 (patch) | |
tree | 7329ef511096ccc190f870798379f13e33f527d0 /app/assets/javascripts/importer_status.js.coffee | |
parent | a650af12261b850d9565cbfc473ea82db59f2e3d (diff) |
Updated based on feedback
Diffstat (limited to 'app/assets/javascripts/importer_status.js.coffee')
-rw-r--r-- | app/assets/javascripts/importer_status.js.coffee | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/assets/javascripts/importer_status.js.coffee b/app/assets/javascripts/importer_status.js.coffee index c51c4a1a182..95f9f86c0ad 100644 --- a/app/assets/javascripts/importer_status.js.coffee +++ b/app/assets/javascripts/importer_status.js.coffee @@ -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: -> |