diff options
Diffstat (limited to 'script')
-rw-r--r-- | script/slx-fixes.js | 3 | ||||
-rw-r--r-- | script/taskmanager.js | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/script/slx-fixes.js b/script/slx-fixes.js index 992ca337..a06761e4 100644 --- a/script/slx-fixes.js +++ b/script/slx-fixes.js @@ -61,6 +61,7 @@ $(document).ready(function() { var $title, $body, $button, $modal = null, $cache = {}; slxModalConfirmHandler = function (e) { e.preventDefault(); + e.stopImmediatePropagation(); var $this = $(this); if ($modal === null) { $modal = $('<div class="modal fade" id="modal-autogen" tabindex="-1" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal">×</button>' @@ -74,7 +75,7 @@ $(document).ready(function() { $title.text($this.data('title') || $this.text()); $button.html($this.data('close') || $this.html()).attr('class', $this.attr('class')).removeClass('btn-xs btn-sm btn-lg').off('click').click(function() { // Click and reconnect click handler so pressing "back" on the next page works - $this.off('click').click().click(slxModalConfirmHandler); + $this.off('click', slxModalConfirmHandler).click().click(slxModalConfirmHandler); }); var $wat, str = $this.data('confirm'); if (str.substr(0, 9) === '#confirm-') { diff --git a/script/taskmanager.js b/script/taskmanager.js index ae1d2f09..dd00f864 100644 --- a/script/taskmanager.js +++ b/script/taskmanager.js @@ -127,9 +127,11 @@ function tmResult(data, status) } var log = obj.find('.data-tm-log'); if (log) { - var lKey = obj.attr('data-tm-log'); - if (task.data && task.data[lKey]) { - log.text(task.data[lKey]).show(); + if (!obj.data('tm-log-fail-only') || task.statusCode === "TASK_ERROR") { + var lKey = obj.data('tm-log'); + if (task.data && task.data[lKey]) { + log.text(task.data[lKey]).show(); + } } } var cb = obj.attr('data-tm-callback'); |