Commit a20c2d81 authored by Leo Iannacone's avatar Leo Iannacone

warn user if no package in distribution

parent 30bb1af2
...@@ -90,13 +90,18 @@ function Page_Distrubion(socket) ...@@ -90,13 +90,18 @@ function Page_Distrubion(socket)
var tmp = Utils.clone(socket_data) var tmp = Utils.clone(socket_data)
tmp.file = null tmp.file = null
view.packages = {} view.packages = {}
socket_data.distribution.packages.forEach(function(p){ if (socket_data.distribution.packages && socket_data.distribution.packages.length > 0) {
tmp.package = p socket_data.distribution.packages.forEach(function(p){
// get datestamp if package is clicked tmp.package = p
$('#packages ul').append('<li id="package-' + p.orig_name + '"><a href="' + Utils.from_view_to_hash(tmp) + '/datestamp">'+ p.name + ' <span>'+p.version+'</span></a></li>') // get datestamp if package is clicked
view.packages[p.orig_name] = Utils.clone(p) $('#packages ul').append('<li id="package-' + p.orig_name + '"><a href="' + Utils.from_view_to_hash(tmp) + '/datestamp">'+ p.name + ' <span>'+p.version+'</span></a></li>')
}) view.packages[p.orig_name] = Utils.clone(p)
packages.select() })
packages.select()
}
else {
$('#packages ul').append('<li class="text-muted">No packages yet</li>')
}
}, },
clean: function () { clean: function () {
......
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