mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-18 03:33:26 +02:00
* moved some more pages to twig
* moved online, movies, google_analytics code, faq, experience_table, downloads to twig * added new global variabl to twig (status) * removed some unused page (custom.php) * automatically append trailing slash at config.item_images_url * moved downloads from clients.halfaway.net to tibia-clients.com * show some more info on monster loot (currently only on TFS 0.3 and those that use item.id in monster files instead of item name) * some more unimportant fixes
This commit is contained in:
41
system/templates/faq.html.twig
Normal file
41
system/templates/faq.html.twig
Normal file
@@ -0,0 +1,41 @@
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||
<tr bgcolor="{{ config.vdarkborder }}">
|
||||
<td class="white">
|
||||
<b>FAQ</b>
|
||||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onclick="toggleAll(); return false;">Toggle all</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% set i = 0 %}
|
||||
{% for faq in faqs %}
|
||||
{% set i = i + 1 %}
|
||||
<tr bgcolor="{{ getStyle(i) }}">
|
||||
<td colspan="2" style="cursor: pointer;" onclick="toggleVisibility('faq_{{ i }}'); return false;">
|
||||
<b>{{ faq.question }}</b>
|
||||
<div id="faq_{{ i }}" style="display: none;">{{ faq.answer }}</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
var expanded = false;
|
||||
|
||||
function toggleVisibility(id)
|
||||
{
|
||||
var tmp = document.getElementById(id);
|
||||
if(tmp)
|
||||
tmp.style.display = tmp.style.display == 'none' ? '' : 'none';
|
||||
}
|
||||
|
||||
function toggleAll()
|
||||
{
|
||||
for(i = 1; i < {{ i + 1 }}; i++)
|
||||
{
|
||||
document.getElementById('faq_' + i).style.display = expanded ? 'none' : '';
|
||||
}
|
||||
|
||||
expanded = !expanded;
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user