Commit f3af54ef authored by Romain Loth's avatar Romain Loth

add a branding link + minor settings

parent 1f6a6397
...@@ -76,12 +76,9 @@ ...@@ -76,12 +76,9 @@
<div class="navbar-collapse collapse" id="navbar-main"> <div class="navbar-collapse collapse" id="navbar-main">
<ul class="nav navbar-nav navbar-left"> <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;"> <li style="margin-left:10px;">
<a href="#" class="navbar-middle navbar-brand"> <!-- name will be replaced by TW.conf.branding, link by TW.conf.brandingLink -->
<!-- will be replaced by TW.conf.branding --> <a href="#" class="navbar-middle navbar-brand twbrand-link">
<span id="twbrand">TinaWebJS</span> <span id="twbrand">TinaWebJS</span>
</a> </a>
</li> </li>
......
...@@ -131,8 +131,14 @@ function getHeatmapColors(nClasses) { ...@@ -131,8 +131,14 @@ function getHeatmapColors(nClasses) {
} }
function writeBrand (brandString) { function writeBrand (brandString, brandLink) {
document.getElementById('twbrand').innerHTML = brandString 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) { function writeLabel (aMapLabel) {
...@@ -948,7 +954,7 @@ function updateSearchLabels(id,name,type){ ...@@ -948,7 +954,7 @@ function updateSearchLabels(id,name,type){
function createWaitIcon(idname, width) { function createWaitIcon(idname, width) {
let icon = document.createElement('img') 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.position = 'absolute'
icon.style.left = '0' icon.style.left = '0'
......
...@@ -55,8 +55,8 @@ TW.instance.init() ...@@ -55,8 +55,8 @@ TW.instance.init()
TW.instance.initGUIListeners(); TW.instance.initGUIListeners();
TW.instance.initSearchListeners(); TW.instance.initSearchListeners();
// show the custom name of the app // show the custom name + home link of the app
writeBrand(TW.conf.branding) writeBrand(TW.conf.branding, TW.conf.brandingLink)
// choosing the input // choosing the input
// ------------------- // -------------------
......
...@@ -6,7 +6,8 @@ TW.conf = (function(TW){ ...@@ -6,7 +6,8 @@ TW.conf = (function(TW){
let TWConf = {} 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){ ...@@ -202,7 +203,7 @@ TW.conf = (function(TW){
// if fa2Available, the auto-run config: // if fa2Available, the auto-run config:
TWConf.fa2Enabled= true; // fa2 auto-run at start and after graph modified ? 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 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