Commit | Line | Data |
---|---|---|
9b41ca2c FB |
1 | {**************************************************************************} |
2 | {* *} | |
2ab75571 | 3 | {* Copyright (C) 2003-2010 Polytechnique.org *} |
9b41ca2c FB |
4 | {* http://opensource.polytechnique.org/ *} |
5 | {* *} | |
6 | {* This program is free software; you can redistribute it and/or modify *} | |
7 | {* it under the terms of the GNU General Public License as published by *} | |
8 | {* the Free Software Foundation; either version 2 of the License, or *} | |
9 | {* (at your option) any later version. *} | |
10 | {* *} | |
11 | {* This program is distributed in the hope that it will be useful, *} | |
12 | {* but WITHOUT ANY WARRANTY; without even the implied warranty of *} | |
13 | {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} | |
14 | {* GNU General Public License for more details. *} | |
15 | {* *} | |
16 | {* You should have received a copy of the GNU General Public License *} | |
17 | {* along with this program; if not, write to the Free Software *} | |
18 | {* Foundation, Inc., *} | |
19 | {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} | |
20 | {* *} | |
21 | {**************************************************************************} | |
22 | ||
1290d410 | 23 | {if !t($wiz_run_ajax)} |
9b41ca2c FB |
24 | <script type="text/javascript">//<![CDATA[ |
25 | {if ($stateless || $id gt $current) && $wiz_ajax} | |
26 | {literal} | |
27 | function changePage(obj, id) | |
28 | { | |
29 | var myUrl = obj.href; | |
30 | $.ajax({ url: myUrl + "/ajax", | |
31 | global: false, | |
32 | dataTye: 'html', | |
33 | error: function(request, error) { | |
34 | document.location = myUrl; | |
35 | }, | |
36 | success: function(data) { | |
66297a8c | 37 | if ({/literal}{if !$wiz_animated}true || {/if}{literal}is_IE) { |
9b41ca2c FB |
38 | $(".wiz_tab").removeClass("active"); |
39 | $("#wiz_tab_" + id).addClass("active"); | |
40 | $(".wiz_content").html(data); | |
41 | if (typeof wizPage_onLoad == 'function') { | |
42 | wizPage_onLoad(id); | |
43 | } | |
44 | auto_links(); | |
45 | } else { | |
46 | $(".wiz_content").fadeOut('normal', | |
47 | function() { | |
48 | $(".wiz_tab").removeClass("active"); | |
49 | $("#wiz_tab_" + id).addClass("active"); | |
50 | $(".wiz_content").html(data).fadeIn('normal'); | |
51 | if (typeof wizPage_onLoad == 'function') { | |
52 | wizPage_onLoad(id); | |
53 | } | |
54 | auto_links(); | |
55 | }); | |
56 | } | |
57 | } | |
58 | }); | |
59 | return false; | |
60 | } | |
61 | {/literal} | |
62 | {else} | |
63 | {literal} | |
64 | function changePage(obj) | |
65 | { | |
66 | return true; | |
67 | } | |
68 | {/literal} | |
69 | {/if} | |
70 | //]]></script> | |
71 | ||
72 | <div class="wizard" style="clear: both"> | |
73 | <div class="wiz_header"> | |
74 | {foreach from=$pages item=title key=id} | |
75 | {if $stateless || $id gt $current} | |
76 | {assign var=tag value="a"} | |
77 | {else} | |
78 | {assign var=tag value="div"} | |
79 | {/if} | |
80 | <{$tag} class="wiz_tab {if $id eq $current}active{/if} {if !$stateless && $current gt $id}grayed{/if}" | |
81 | style="display: block; float: left; width: {$tab_width}%; vertical-align: middle" | |
82 | id="wiz_tab_{$lookup[$id]}" | |
83 | {if $tag eq "a"} | |
84 | href="{$wiz_baseurl}/{$lookup[$id]}" | |
85 | onclick="return changePage(this, '{$lookup[$id]}')" | |
86 | {/if} | |
87 | > | |
88 | <span style="vertical-align: middle">{$title}</span> | |
89 | </{$tag}> | |
90 | {/foreach} | |
91 | <div style="clear: both"></div> | |
92 | </div> | |
93 | <div class="wiz_content" style="clear: both"> | |
66297a8c FB |
94 | {/if} |
95 | <div style="width: 100%; height: 100%; margin: 0; padding: 0"> | |
9b41ca2c FB |
96 | {include core=triggers.tpl} |
97 | {include file=$wiz_page} | |
66297a8c | 98 | </div> |
1290d410 | 99 | {if !t($wiz_run_ajax)} |
9b41ca2c FB |
100 | </div> |
101 | </div> | |
102 | ||
103 | <script type="text/javascript"> | |
104 | {literal} | |
105 | if (typeof wizPage_onLoad == 'function') { | |
106 | wizPage_onLoad({/literal}'{$lookup[$current]}'{literal}); | |
107 | } | |
108 | {/literal} | |
109 | </script> | |
66297a8c | 110 | {/if} |
9b41ca2c | 111 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |