diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-07-15 19:20:29 +0300 |
---|---|---|
committer | Connor Shea <connor.james.shea@gmail.com> | 2016-07-26 23:58:01 +0300 |
commit | 92cd19709b5abb3af8852c496ce65adc85e94043 (patch) | |
tree | bd0753f99164fb74dafc2d90c2b6c6d5b12299e8 /app/assets/javascripts/importer_status.js | |
parent | 0c799be6b6fc0166473c82039ebf662a0558ed8f (diff) |
Remove inline scripts from import pages.
Instead add data attributes to a JS hook element on every import status page.
Diffstat (limited to 'app/assets/javascripts/importer_status.js')
-rw-r--r-- | app/assets/javascripts/importer_status.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/assets/javascripts/importer_status.js b/app/assets/javascripts/importer_status.js index 55b6f132bab..0f840821f53 100644 --- a/app/assets/javascripts/importer_status.js +++ b/app/assets/javascripts/importer_status.js @@ -66,4 +66,12 @@ })(); + $(function() { + if ($('.js-importer-status').length) { + var jobsImportPath = $('.js-importer-status').data('jobs-import-path'); + var importPath = $('.js-importer-status').data('import-path'); + + new ImporterStatus(jobsImportPath, importPath); + } + }); }).call(this); |