Commit 9721e16e authored by Leo Iannacone's avatar Leo Iannacone

added an error view

parent 45cf3f04
...@@ -51,7 +51,11 @@ function Page_Distrubion(socket) ...@@ -51,7 +51,11 @@ function Page_Distrubion(socket)
} }
var title = { var title = {
set: function() { set: function(label) {
if (label) {
$('#title').html(label)
return
}
var label = '' var label = ''
if (Utils.check_view_file(view)) { if (Utils.check_view_file(view)) {
var complete_name = view.package.orig_name + '.' + view.file.name var complete_name = view.package.orig_name + '.' + view.file.name
...@@ -167,7 +171,7 @@ function Page_Distrubion(socket) ...@@ -167,7 +171,7 @@ function Page_Distrubion(socket)
}) })
$('#sources').show() $('#sources').show()
} }
$('#files').show() files.show()
}, },
clean: function() { clean: function() {
$('#logs ul').html(''); $('#logs ul').html('');
...@@ -176,7 +180,7 @@ function Page_Distrubion(socket) ...@@ -176,7 +180,7 @@ function Page_Distrubion(socket)
$('#debs').hide(); $('#debs').hide();
$('#sources ul').html('') $('#sources ul').html('')
$('#sources').hide() $('#sources').hide()
$('#files').hide() files.hide()
}, },
get: function () { get: function () {
if (Utils.check_view_package(view)) { if (Utils.check_view_package(view)) {
...@@ -187,6 +191,7 @@ function Page_Distrubion(socket) ...@@ -187,6 +191,7 @@ function Page_Distrubion(socket)
} }
}, },
select: function() { select: function() {
files.show()
files.unselect() files.unselect()
if (Utils.check_view_file(view)) { if (Utils.check_view_file(view)) {
$("#logs li[id='file-" + view.file.orig_name + "']").addClass('active') $("#logs li[id='file-" + view.file.orig_name + "']").addClass('active')
...@@ -194,7 +199,13 @@ function Page_Distrubion(socket) ...@@ -194,7 +199,13 @@ function Page_Distrubion(socket)
}, },
unselect: function() { unselect: function() {
$('#logs li').removeClass('active'); $('#logs li').removeClass('active');
} },
hide: function() {
$('#files').hide()
},
show: function() {
$('#files').show()
},
} }
var file = { var file = {
...@@ -320,12 +331,19 @@ function Page_Distrubion(socket) ...@@ -320,12 +331,19 @@ function Page_Distrubion(socket)
var error = { var error = {
set: function(socket_error) { set: function(socket_error) {
$("#error span").html(socket_error) $("#error span").html(socket_error)
$("#error").fadeIn(100) error.view()
}, },
clean: function() { clean: function() {
$("#error").hide() $("#error").hide()
$("#error span").html('') $("#error span").html('')
}, },
view: function() {
$("#error").fadeIn(100)
title.set("Something is wrong ...")
file.clean()
files.hide()
unselect()
},
} }
var select = function() { var select = 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