mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-17 03:03:26 +02:00
First public release of MyAAC
This commit is contained in:
36
templates/tibiacom/ticker.js
Normal file
36
templates/tibiacom/ticker.js
Normal file
@@ -0,0 +1,36 @@
|
||||
// status of the news ticker entries (0 = closed / 1 = open)
|
||||
state = new Array("0", "0", "0", "0", "0");
|
||||
|
||||
function TickerAction(id) {
|
||||
var line = id.substr(12, 1);
|
||||
if(state[line] == "0") {
|
||||
state[line] = "1";
|
||||
OpenNews(id);
|
||||
}
|
||||
else {
|
||||
state[line] = "0";
|
||||
CloseNews(id);
|
||||
}
|
||||
}
|
||||
|
||||
function OpenNews(id)
|
||||
{
|
||||
var div = document.getElementById(id)
|
||||
var idShort = id.concat("-ShortText");
|
||||
var idMore = id.concat("-FullText");
|
||||
var idButton = id.concat("-Button");
|
||||
document.getElementById(idShort).style.display = "none";
|
||||
document.getElementById(idMore).style.display = "block";
|
||||
document.getElementById(idButton).style.backgroundImage = "url('" + IMAGES + "/general/minus.gif')";
|
||||
}
|
||||
|
||||
function CloseNews(id)
|
||||
{
|
||||
var div = document.getElementById(id)
|
||||
var idShort = id.concat("-ShortText");
|
||||
var idMore = id.concat("-FullText");
|
||||
var idButton = id.concat("-Button");
|
||||
document.getElementById(idShort).style.display = "block";
|
||||
document.getElementById(idMore).style.display = "none";
|
||||
document.getElementById(idButton).style.backgroundImage = "url('" + IMAGES + "/general/plus.gif')";
|
||||
}
|
Reference in New Issue
Block a user