(function($, document) { | |
$(document).ready(function() { | |
$('.downloads-directory').find('input').click(function(){ | |
if ($(".downloads-directory input:checkbox:checked").length <= 0){ | |
$('.downloads-directory').find('.btn').attr('disabled', 'disabled'); | |
$('.download-directory-note').remove(); | |
} | |
else { | |
$('.downloads-directory').find('.btn').removeAttr('disabled'); | |
var domain = "eclipse.php53.dev.docker"; | |
if ($('.download-directory-note').length <= 0 && location.host === domain) { | |
$('.downloads-directory').append('<div class="download-directory-note"><p class="small margin-top-10"></p></div>'); | |
} | |
} | |
}); | |
$('.downloads-directory').submit(function() { | |
var action = "archive"; | |
if (window.location.href.indexOf("archive.eclispe.org") > 0) { | |
action = "delete"; | |
} | |
var c = confirm("Are you sure you would like to "+ action +" the selected item(s)?"); | |
return c; | |
}); | |
}); | |
})(jQuery, document); |