35 lines
1.0 KiB
Cheetah
35 lines
1.0 KiB
Cheetah
<%doc>
|
|
Load gancio-events-detect.js and call ActivePastEventsIfNotNexts() when page is load
|
|
|
|
Template engine: Mako
|
|
|
|
Usage:
|
|
|
|
{{% gancio-events-detect ge_id=<ge_id> [tab_next=<tab_next>] [tab_past=<tab_past>] [msg_id=<msg_id>] %}}
|
|
|
|
where <id_ge> is the ID of past gancio-events HTML tag, tab_next and tab_past are the number of tabs for next and past events, and <msg_id> is the ID of a element to show
|
|
</%doc>
|
|
|
|
% if tab_next is UNDEFINED:
|
|
<% tn = '0' %>
|
|
% else:
|
|
<% tn = tab_next %>
|
|
% endif
|
|
% if tab_past is UNDEFINED:
|
|
<% tp = '1' %>
|
|
% else:
|
|
<% tp = tab_past %>
|
|
% endif
|
|
% if msg_id is UNDEFINED:
|
|
<% mid = 'none' %>
|
|
% else:
|
|
<% mid = msg_id %>
|
|
% endif
|
|
|
|
|
|
<% site.template_hooks['body_end'].append('<script src="/assets/js/gancio-events-detect.js"></script>') %>
|
|
|
|
<% params = '\"' + ge_id + '\", \"' + tn + '\", \"' + tp + '\", \"' + mid + '\"' %>
|
|
|
|
<% site.template_hooks['body_end'].append('<script> $(document).ready(function(){ ActivePastEventsIfNotNexts(' + params + '); });</script>') %>
|