Commit cf37f37a authored by Leo Iannacone's avatar Leo Iannacone

new feature - get all debs in one click

parent 3cb8f70d
...@@ -31,4 +31,4 @@ page_generic.start(socket) ...@@ -31,4 +31,4 @@ page_generic.start(socket)
if (window.location.pathname == config.paths.distribution) { if (window.location.pathname == config.paths.distribution) {
new Page_Distrubion(socket).start() new Page_Distrubion(socket).start()
} }
\ No newline at end of file
// function to get all files in on click
// event comes from HTML
function download_all (div_id) {
frame_id = 'downloadAllFrame'
if ($("#" + frame_id).length > 0)
frame = $($("#" + frame_id)[0])
else {
frame = $('<iframe></iframe>')
frame.hide()
frame.attr('id', frame_id)
$('body').append(frame)
}
files = $(div_id).find('ul li a')
$.each(files, function(index, item) {
setTimeout(function() {
frame.attr('src', item.href)
}, index * 1000)
})
}
function Page_Distrubion(socket) function Page_Distrubion(socket)
{ {
...@@ -35,7 +55,8 @@ function Page_Distrubion(socket) ...@@ -35,7 +55,8 @@ function Page_Distrubion(socket)
status_data = {} status_data = {}
status_data.distribution --- the distribution name status_data.distribution --- the distribution name
status_data.package --- the package name as name_version status_data.package --- the package name as name_version
status_data.status --- one of config.status.*.* status_data.status --- one of config.status.[build|create|update]
status_data.success --- true | false
*/ */
......
...@@ -28,7 +28,11 @@ ...@@ -28,7 +28,11 @@
<ul></ul> <ul></ul>
</nav> </nav>
<nav id="debs"> <nav id="debs">
<h4>Debs</h4> <h4>Debs
<a class="btn btn-link" title="Get all debs in one click" onclick="download_all('#debs')">
<span class="glyphicon glyphicon-download-alt"></span>
</a>
</h4>
<ul></ul> <ul></ul>
</nav> </nav>
</div> </div>
...@@ -62,4 +66,4 @@ ...@@ -62,4 +66,4 @@
</section> </section>
</article> </article>
<% include footer.ejs %> <% include footer.ejs %>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment