From 781b8ae35e6635f3570b243bbd45d517c8c0fb8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Pi=C4=99tka?= Date: Fri, 19 May 2017 20:02:41 +0200 Subject: [PATCH 1/3] Fix result modal working only on first table page --- .../static/js/views/executions/table-view.js | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/ndscheduler/static/js/views/executions/table-view.js b/ndscheduler/static/js/views/executions/table-view.js index fe63cdab..2b72c637 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); From 71ff5a6d55db186de1f6b744c0ee72fc24a67c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Pi=C4=99tka?= Date: Fri, 19 May 2017 20:07:48 +0200 Subject: [PATCH 2/3] Fix formatting --- ndscheduler/static/js/views/executions/table-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndscheduler/static/js/views/executions/table-view.js b/ndscheduler/static/js/views/executions/table-view.js index 2b72c637..af304bb3 100644 --- a/ndscheduler/static/js/views/executions/table-view.js +++ b/ndscheduler/static/js/views/executions/table-view.js @@ -58,7 +58,7 @@ define(['utils', ] }); - $('#executions-table tbody').on('click', '[data-action=show-result]', function(e){ + $('#executions-table tbody').on('click', '[data-action=show-result]', function(e) { e.preventDefault(); $('#result-box').text(decodeURI($(this).data('content'))); $('#execution-result-modal').modal(); From e9565fac520b778e0db1e1a8ea259d2742f873ff Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 11 Apr 2018 14:11:19 +0200 Subject: [PATCH 3/3] Add more date filters --- ndscheduler/static/index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 @@ - + + + + + +