Commit 295ea8ba authored by Vinicius Ruoso's avatar Vinicius Ruoso

Created load_page function to change the current page URL.

Now, we have a new global variable called 'pagetype' to get from current
page the content of a element with id 'pagetype' to.

With this information, the load_page function knows what to do when invoked.
Signed-off-by: default avatarVinicius Ruoso <vkr07@c3sl.ufpr.br>
parent b40f5884
var selected;
var menu_scroll = new Array();
var pagetype;
function populate(){
var tbls = document.getElementsByTagName('table');
......@@ -9,6 +10,9 @@ function populate(){
// fill sdi bar date field
set_date('date');
// get pagetype
pagetype = document.getElementById('pagetype').innerHTML;
for (var tb=0; tb<tbls.length; tb++) {
row = tbls[tb].getElementsByTagName('tr');
cols = row[0].getElementsByTagName('td');
......@@ -50,6 +54,13 @@ function populate(){
}
}
function load_page(href){
if (pagetype=="sumary")
window.location.href = href;
else
window.location.href = '../' + href;
}
function set_date(elementID){
var Months = new Array('janeiro', 'fevereiro', 'março', 'abriu',
'maio', 'junho', 'julho', 'agosto', 'setembro',
......@@ -104,7 +115,6 @@ function table_expand(tbID){
}
function column(table, col, show){
var stl;
if (show){
......
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