change code style to ffrgb/meshviewer fork
This commit is contained in:
parent
59ba0ba29e
commit
418b630e02
42 changed files with 3505 additions and 3154 deletions
41
lib/title.js
41
lib/title.js
|
|
@ -1,35 +1,38 @@
|
|||
define(function () {
|
||||
return function (config) {
|
||||
return function (config) {
|
||||
function setTitle(d) {
|
||||
var title = [config.siteName]
|
||||
var title = [config.siteName];
|
||||
|
||||
if (d !== undefined)
|
||||
title.push(d)
|
||||
if (d !== undefined) {
|
||||
title.push(d);
|
||||
}
|
||||
|
||||
document.title = title.join(": ")
|
||||
document.title = title.join(": ");
|
||||
}
|
||||
|
||||
this.resetView = function () {
|
||||
setTitle()
|
||||
}
|
||||
setTitle();
|
||||
};
|
||||
|
||||
this.gotoNode = function (d) {
|
||||
if (d)
|
||||
setTitle(d.nodeinfo.hostname)
|
||||
}
|
||||
if (d) {
|
||||
setTitle(d.nodeinfo.hostname);
|
||||
}
|
||||
};
|
||||
|
||||
this.gotoLink = function (d) {
|
||||
if (d)
|
||||
setTitle((d.source.node ? d.source.node.nodeinfo.hostname : d.source.id) + " – " + d.target.node.nodeinfo.hostname)
|
||||
}
|
||||
if (d) {
|
||||
setTitle((d.source.node ? d.source.node.nodeinfo.hostname : d.source.id) + " – " + d.target.node.nodeinfo.hostname);
|
||||
}
|
||||
};
|
||||
|
||||
this.gotoLocation = function() {
|
||||
this.gotoLocation = function () {
|
||||
//ignore
|
||||
}
|
||||
};
|
||||
|
||||
this.destroy = function () {
|
||||
}
|
||||
};
|
||||
|
||||
return this
|
||||
}
|
||||
})
|
||||
return this;
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue