Commit 23d2a43c authored by Leo Iannacone's avatar Leo Iannacone

providing window with a rationale title

parent 245f5563
......@@ -63,11 +63,14 @@ function Page_Distrubion(socket)
set: function(label) {
if (label) {
$('#title').html(label)
page_generic.set_window_title(label)
return
}
var label = ''
var window_title = null
if (Utils.check_view_file(view)) {
var complete_name = view.package.orig_name + '.' + view.file.name
window_title = complete_name
if (! view.file.path)
view.file.path = config.paths.debomatic + '/' + view.distribution.name + '/pool/' + view.package.orig_name + '/' + complete_name
label = complete_name + ' \
......@@ -80,9 +83,13 @@ function Page_Distrubion(socket)
else if (Utils.check_view_distribution(view))
label = view.distribution.name
$('#title').html(label)
if (window_title)
label = window_title
page_generic.set_window_title(label)
},
clean: function() {
$('#title').html('')
page_generic.set_window_title()
}
}
......
......@@ -106,6 +106,14 @@ function Page_Generic(socket)
}
}
this.set_window_title = function (label) {
var window_title_separator = ' \u00ab '
if (label)
window.document.title = label + window_title_separator + config.title
else
window.document.title = config.title
}
// update distributions
socket.on(_e.broadcast.distributions, function(socket_distributions) {
debug_socket("received", _e.broadcast.distributions, socket_distributions)
......
......@@ -22,6 +22,8 @@ function Preferences() {
// init prefence page
this.initPage = function() {
page_generic.set_window_title("Preferences")
// set view according with config.preferences
for (key in config.preferences) {
var element = $("#preferences #" + key)
......
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