diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-10-06 13:57:53 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-10-06 13:57:53 +0000 |
commit | 493d6c06d949b4bd664c2f1f176ae0b152f7a9dd (patch) | |
tree | 7a018287874c50bd4ec0a44d66d0aaeb2d8f9a61 | |
parent | a2109e06010f0fbd807c946418bf4972d0eed304 (diff) | |
parent | fa856179cebbd5d78150f4bb3b12b6323e5d8384 (diff) | |
download | tuskar-ui-493d6c06d949b4bd664c2f1f176ae0b152f7a9dd.tar.gz |
Merge "Only run the js for progress/plan edit on the right pages"
-rw-r--r-- | tuskar_ui/infrastructure/static/infrastructure/js/tuskar.deployment_progress.js | 2 | ||||
-rw-r--r-- | tuskar_ui/infrastructure/static/infrastructure/js/tuskar.edit_plan.js | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/tuskar_ui/infrastructure/static/infrastructure/js/tuskar.deployment_progress.js b/tuskar_ui/infrastructure/static/infrastructure/js/tuskar.deployment_progress.js index 2c308c14..2b21442e 100644 --- a/tuskar_ui/infrastructure/static/infrastructure/js/tuskar.deployment_progress.js +++ b/tuskar_ui/infrastructure/static/infrastructure/js/tuskar.deployment_progress.js @@ -4,7 +4,7 @@ tuskar.deployment_progress = (function () { var module = {}; module.init = function () { - if (!$('div.deployment-box div.progress')) { return; } + if (!$('div.deployment-box div.progress').length) { return; } module.interval = setInterval(module.check_progress, 30000); module.events_template = Hogan.compile($('#events-template').html() || ''); module.roles_template = Hogan.compile($('#roles-template').html() || ''); diff --git a/tuskar_ui/infrastructure/static/infrastructure/js/tuskar.edit_plan.js b/tuskar_ui/infrastructure/static/infrastructure/js/tuskar.edit_plan.js index 69fddda8..89f9f568 100644 --- a/tuskar_ui/infrastructure/static/infrastructure/js/tuskar.edit_plan.js +++ b/tuskar_ui/infrastructure/static/infrastructure/js/tuskar.edit_plan.js @@ -6,10 +6,8 @@ tuskar.edit_plan = (function () { module.debounce_timer = null; module.init = function () { + if (!$('form.deployment-roles-form').length) { return; } // Attach event listeners and hide the submit button. - if (!$('form.deployment-roles-form')) { - return; - } $('form.deployment-roles-form input.number-picker' ).change(module.on_change); $('form.deployment-roles-form [type=submit]').hide(); |