summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorSimon Rettberg2018-05-07 17:33:22 +0200
committerSimon Rettberg2018-05-07 17:33:22 +0200
commitbd25b366ed3e1cf491afb4e6d795683afbfe716a (patch)
treee4b5fc28693edf6d99d1a5a133bf25260454e62a /script
parent[permissionmanager] Improve comment (diff)
downloadslx-admin-bd25b366ed3e1cf491afb4e6d795683afbfe716a.tar.gz
slx-admin-bd25b366ed3e1cf491afb4e6d795683afbfe716a.tar.xz
slx-admin-bd25b366ed3e1cf491afb4e6d795683afbfe716a.zip
taskmanager.js: Support setting min height of log <pre>
Diffstat (limited to 'script')
-rw-r--r--script/taskmanager.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/script/taskmanager.js b/script/taskmanager.js
index 5eae6cb3..ae1d2f09 100644
--- a/script/taskmanager.js
+++ b/script/taskmanager.js
@@ -16,7 +16,13 @@ function tmInit()
item.append('<div class="data-tm-progress"><div class="progress"><div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div></div></div>');
}
if (item.is('[data-tm-log]')) {
- item.append('<pre class="data-tm-log" style="display:none" />');
+ var lh = item.data('tm-log-height');
+ if (!lh) {
+ lh = '';
+ } else {
+ lh = 'min-height:' + lh;
+ }
+ item.append('<pre class="data-tm-log collapse" style="' + lh + '" />');
}
item.prepend('<span class="data-tm-icon" />');
});
@@ -123,8 +129,7 @@ function tmResult(data, status)
if (log) {
var lKey = obj.attr('data-tm-log');
if (task.data && task.data[lKey]) {
- log.text(task.data[lKey]);
- log.attr('style', (task.data[lKey] !== '' ? '' : 'display:none'));
+ log.text(task.data[lKey]).show();
}
}
var cb = obj.attr('data-tm-callback');