Commit f2050216 authored by Jeremy Fischer's avatar Jeremy Fischer
Browse files

HASHTAG links!

make nodes/views linkable
TODO: graph state (auto?)
parent 9ab1e8f5
......@@ -3,13 +3,13 @@
<a href="#" class="brand-logo left">$app_name$ | $team_name$</a>
<ul id="nav-mobile" class="right">
<li $menu_dashboard_class$">
<a href="#" id="menu_dashboard_label" onclick="nav_dashboard()">$interface_tab_dashboard_title$</a>
<a d="menu_dashboard_label" onclick="nav_dashboard()">$interface_tab_dashboard_title$</a>
</li>
<li $menu_graph_class$>
<a href="#" onclick="nav_graph()">$interface_tab_graph_title$</a>
<a onclick="nav_graph()">$interface_tab_graph_title$</a>
</li>
<li $menu_leaderboard_class$>
<a href="#" onclick="nav_leaderboard()">$interface_tab_leaderboard_title$</a>
<a onclick="nav_leaderboard()">$interface_tab_leaderboard_title$</a>
</li>
</ul>
</div>
......
......@@ -272,6 +272,7 @@ if (declare_load("appclient") !== TRUE)
if (dashboard_template == "")
return setTimeout(nav_dashboard, 100);
current_view = "dashboard";
window.location.hash = '#dashboard';
var menuData = renderMenu();
if (menuData == undefined)
return setTimeout(nav_dashboard, 100);
......@@ -478,6 +479,9 @@ if (declare_load("appclient") !== TRUE)
}
}
calcScale(graph);
if(node = window.location.hash.split("/")[1]){
nodeDetail("node_"+node);
}
}
function calcScale(graph)
......@@ -490,6 +494,9 @@ if (declare_load("appclient") !== TRUE)
if (graph_template == "")
return setTimeout(nav_graph, 100);
current_view = "graph";
if(window.location.hash.substring(1,6) != "graph"){
window.location.hash = '#graph';
}
var menuData = renderMenu();
if (menuData == undefined)
return setTimeout(nav_graph, 100);
......@@ -515,6 +522,7 @@ if (declare_load("appclient") !== TRUE)
if (menuData == undefined)
return setTimeout(nav_leaderboard, 100);
leaderboardData = [];
window.location.hash = '#leaderboard';
for(member in teamData["members"]){
console.log("Leaderboard Calc "+member);
var entry = [];
......@@ -741,7 +749,7 @@ if (declare_load("appclient") !== TRUE)
var node = nodeTree[currentDetailNode];
var flow = document.getElementById("detailsFlow");
flow.innerHTML = "";
window.location.hash = '#graph/'+currentDetailNode;
document.getElementById("detailsTitle").innerText = getNodeLevelName(node["level"]);
......@@ -1137,7 +1145,7 @@ if (declare_load("appclient") !== TRUE)
label.innerText = node["name"]+" ...";
if(node["level"] == 2)
label.innerText = "... " + node["name"];
if(node["level"] > 0){
if(node["level"] > 0 && node["level"] < 4){
label.innerHTML = '<b style="font-size: 1.1em;">'+ node["prefix"] + '</b><br>' + label.innerHTML;
}
div.appendChild(label);
......@@ -1622,7 +1630,13 @@ if (declare_load("appclient") !== TRUE)
setInterval(updateNotificationBadge, 10000);
setTimeout(overview_init(),10);
setTimeout(details_init(),10);
setTimeout(nav_dashboard(),10);
if(window.location.hash.substring(1,6) == "graph"){
setTimeout(nav_graph(),10);
}else if(window.location.hash.substring(1,12) == "leaderboard"){
setTimeout(nav_leaderboard(),10);
}else{
setTimeout(nav_dashboard(),10);
}
setTimeout(loadGraph,5);
setInterval(getNews, 3000);
//setTimeout("log_message('Workspace Loading...')",10);
......
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