empty download notification

This commit is contained in:
Hamza Zia 2012-06-09 13:34:53 +08:00
parent d965ac48e3
commit d7f5eb8a8a

View File

@ -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');