diff --git a/ndscheduler/static/index.html b/ndscheduler/static/index.html index dfb97a65..8add5556 100644 --- a/ndscheduler/static/index.html +++ b/ndscheduler/static/index.html @@ -82,7 +82,12 @@ - + + + + + +
diff --git a/ndscheduler/static/js/views/executions/table-view.js b/ndscheduler/static/js/views/executions/table-view.js index fe63cdab..af304bb3 100644 --- a/ndscheduler/static/js/views/executions/table-view.js +++ b/ndscheduler/static/js/views/executions/table-view.js @@ -57,6 +57,12 @@ define(['utils', { "orderable": false, "className": "table-result-column", "targets": 5 } ] }); + + $('#executions-table tbody').on('click', '[data-action=show-result]', function(e) { + e.preventDefault(); + $('#result-box').text(decodeURI($(this).data('content'))); + $('#execution-result-modal').modal(); + }); }, /** @@ -100,21 +106,12 @@ define(['utils', if (data.length) { this.table.fnClearTable(); this.table.fnAddData(data); - - var buttons = $('[data-action=show-result]'); - _.each(buttons, function(btn) { - $(btn).on('click', _.bind(function(e) { - e.preventDefault(); - $('#result-box').text(decodeURI($(btn).data('content'))); - $('#execution-result-modal').modal(); - }, this)); - - // If there's a query parameter result, we'll display the result. - if (!_.isUndefined(utils.getParameterByName('result'))) { - $('#result-box').text(executions[0].get('result')); - $('#execution-result-modal').modal(); - } - }); + + // If there's a query parameter result, we'll display the result. + if (!_.isUndefined(utils.getParameterByName('result'))) { + $('#result-box').text(executions[0].get('result')); + $('#execution-result-modal').modal(); + } } utils.stopSpinner(this.spinner);