Commit f3af54ef authored by Romain Loth's avatar Romain Loth

add a branding link + minor settings

parent 1f6a6397
......@@ -76,12 +76,9 @@
<div class="navbar-collapse collapse" id="navbar-main">
<ul class="nav navbar-nav navbar-left">
<li class="navbar-middle">
<img style="width:20px" src="static/explorerlibs/img2/home.png">
</li>
<li style="margin-left:10px;">
<a href="#" class="navbar-middle navbar-brand">
<!-- will be replaced by TW.conf.branding -->
<!-- name will be replaced by TW.conf.branding, link by TW.conf.brandingLink -->
<a href="#" class="navbar-middle navbar-brand twbrand-link">
<span id="twbrand">TinaWebJS</span>
</a>
</li>
......
......@@ -131,8 +131,14 @@ function getHeatmapColors(nClasses) {
}
function writeBrand (brandString) {
function writeBrand (brandString, brandLink) {
document.getElementById('twbrand').innerHTML = brandString
let anchors = document.getElementsByClassName('twbrand-link')
for (var k in anchors) {
if (anchors[k] && anchors[k].href) {
anchors[k].href = brandLink
}
}
}
function writeLabel (aMapLabel) {
......@@ -948,7 +954,7 @@ function updateSearchLabels(id,name,type){
function createWaitIcon(idname, width) {
let icon = document.createElement('img')
icon.src = TW.conf.libspath + '/img2/loader.gif'
icon.src = 'static/explorerlibs/img2/loader.gif'
icon.style.position = 'absolute'
icon.style.left = '0'
......
......@@ -55,8 +55,8 @@ TW.instance.init()
TW.instance.initGUIListeners();
TW.instance.initSearchListeners();
// show the custom name of the app
writeBrand(TW.conf.branding)
// show the custom name + home link of the app
writeBrand(TW.conf.branding, TW.conf.brandingLink)
// choosing the input
// -------------------
......
......@@ -6,7 +6,8 @@ TW.conf = (function(TW){
let TWConf = {}
TWConf.branding = 'Community Explorer 2' // <--- the name displayed in upper left
TWConf.branding = 'Community Explorer 2' // <--- name displayed in upper left
TWConf.brandingLink = 'https://communityexplorer.org' // <--- link to "home"
// ==========================
......@@ -202,7 +203,7 @@ TW.conf = (function(TW){
// if fa2Available, the auto-run config:
TWConf.fa2Enabled= true; // fa2 auto-run at start and after graph modified ?
TWConf.fa2Milliseconds=2000; // duration of auto-run
TWConf.fa2Milliseconds=10000; // duration of auto-run
TWConf.minNodesForAutoFA2 = 5 // graph size threshold to auto-run
......
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