Commit 29b6eddd authored by Leo Iannacone's avatar Leo Iannacone

renamed data.package.archives in sources

parent 795ca2d4
...@@ -8,7 +8,7 @@ function __get_files_list_from_package(data, callback) { ...@@ -8,7 +8,7 @@ function __get_files_list_from_package(data, callback) {
utils.get_files_list(package_path, false, function(files) { utils.get_files_list(package_path, false, function(files) {
data.package.files = [] data.package.files = []
data.package.debs = [] data.package.debs = []
data.package.archives = [] data.package.sources = []
files.forEach(function (f) { files.forEach(function (f) {
file = {} file = {}
file.path = path.join(package_path, f).replace(config.debomatic.path, config.routes.debomatic) file.path = path.join(package_path, f).replace(config.debomatic.path, config.routes.debomatic)
...@@ -26,7 +26,7 @@ function __get_files_list_from_package(data, callback) { ...@@ -26,7 +26,7 @@ function __get_files_list_from_package(data, callback) {
file.name = file.extension file.name = file.extension
else if (f.indexOf('.tar') >= 0 && f.indexOf('.orig.') > 0) else if (f.indexOf('.tar') >= 0 && f.indexOf('.orig.') > 0)
file.name = 'orig.' + f.split('.orig.').pop() file.name = 'orig.' + f.split('.orig.').pop()
data.package.archives.push(file) data.package.sources.push(file)
} }
else { else {
file.name = file.extension file.name = file.extension
......
...@@ -34,7 +34,7 @@ var Page_Distrubion = { ...@@ -34,7 +34,7 @@ var Page_Distrubion = {
tmp.package = p tmp.package = p
$('#packages ul').append('<li id="package-' + p.orig_name + '"><a href="' + Utils.from_data_to_hash(tmp) + '">'+ p.name + ' <span>'+p.version+'</span></a></li>') $('#packages ul').append('<li id="package-' + p.orig_name + '"><a href="' + Utils.from_data_to_hash(tmp) + '">'+ p.name + ' <span>'+p.version+'</span></a></li>')
}) })
Page_Distrubion.select() Page_Distrubion.select(data)
}, },
clean: function () { clean: function () {
...@@ -87,11 +87,11 @@ var Page_Distrubion = { ...@@ -87,11 +87,11 @@ var Page_Distrubion = {
$('#debs').show() $('#debs').show()
} }
if (data.package.archives && data.package.archives.length > 0) { if (data.package.sources && data.package.sources.length > 0) {
data.package.archives.forEach(function(f){ data.package.sources.forEach(function(f){
$('#archives ul').append('<li><a title="'+ f.orig_name +'" href="' + f.path + '">' + f.name +'</a></li>') $('#sources ul').append('<li><a title="'+ f.orig_name +'" href="' + f.path + '">' + f.name +'</a></li>')
}) })
$('#archives').show() $('#sources').show()
} }
$('#files').show() $('#files').show()
}, },
...@@ -100,8 +100,8 @@ var Page_Distrubion = { ...@@ -100,8 +100,8 @@ var Page_Distrubion = {
$('#logs').hide() $('#logs').hide()
$('#debs ul').html(''); $('#debs ul').html('');
$('#debs').hide(); $('#debs').hide();
$('#archives ul').html('') $('#sources ul').html('')
$('#archives').hide() $('#sources').hide()
$('#files').hide() $('#files').hide()
}, },
get: function (data) { get: function (data) {
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
<nav id="logs"> <nav id="logs">
<ul class="nav nav-pills nav-stacked"></ul> <ul class="nav nav-pills nav-stacked"></ul>
</nav> </nav>
<nav id="archives"> <nav id="sources">
<h4>Archives</h4> <h4>Sources</h4>
<ul></ul> <ul></ul>
</nav> </nav>
<nav id="debs"> <nav id="debs">
......
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