empty download notification
This commit is contained in:
parent
d965ac48e3
commit
d7f5eb8a8a
13
js/script.js
13
js/script.js
|
@ -434,8 +434,21 @@ function getWaitingSettings(gid, cb) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function empty_download_set(elem) {
|
||||||
|
var len = d_files.active.length;
|
||||||
|
len += d_files.waiting.length;
|
||||||
|
len += d_files.stopped.length;
|
||||||
|
if(len === 0) {
|
||||||
|
var html = '<div class="hero-unit"><h3>';
|
||||||
|
|
||||||
|
html += 'Currently no downloads in line to display, use the Add download button to start downloading files!';
|
||||||
|
html += '</h3></div>';
|
||||||
|
$(elem).html(html);
|
||||||
|
}
|
||||||
|
}
|
||||||
function updateActiveDownloads(data) {
|
function updateActiveDownloads(data) {
|
||||||
refreshDownloadTemplates('active', data);
|
refreshDownloadTemplates('active', data);
|
||||||
|
empty_download_set('#active_downloads');
|
||||||
$('.download_active_item .download_settings').unbind('click').click(function() {
|
$('.download_active_item .download_settings').unbind('click').click(function() {
|
||||||
var gid = $(this).parents('.download_active_item').attr('data-gid');
|
var gid = $(this).parents('.download_active_item').attr('data-gid');
|
||||||
var settings_name = $(this).parents('.download_active_item').attr('data-settingsName');
|
var settings_name = $(this).parents('.download_active_item').attr('data-settingsName');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user