Propagate root prefix into JaaScript environment
[infodrom.org/service.infodrom.org] / Styles / service.style
1 #include <basic.style>
2 #include <tools.style>
3
4 # <page [title=] [func=] [pagetitle=]>
5 #       Define the actual page
6 #
7 #       title=          headline for the page, default: "Infodrom Service"
8 #       func=           Function of the page, left bar
9 #       pagetitle=      title for the page, default <func>: <title>
10
11 <define-tag page endtag=required>
12 <preserve title func pagetitle>
13 <set-var %attributes>
14
15 <if <not <get-var title>>
16     <set-var title="Infodrom Service">>
17
18 <if <default-func>
19   <if <not <get-var func>>
20     <set-var func=<default-func>>
21   >
22 >
23
24 <if <not <get-var pagetitle>>
25   <if <not <get-var func>>
26     <set-var pagetitle=<get-var title>>
27     <set-var pagetitle="<get-var func>: <get-var title>">
28   >
29 >
30
31 <html>
32 <head>
33 <title><get-var pagetitle></title>
34 <meta name="author" content="joey@infodrom.org (Martin Schulze)">
35 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
36 <link href="<root_prefix>jquery.simplecolorpicker.css" rel="stylesheet" type="text/css">
37 <link href="<root_prefix>infodrom.css" rel="stylesheet" type="text/css">
38 <script type="text/javascript" src="<root_prefix>jquery-2.1.0.min.js"></script>
39 <script type="text/javascript" src="<root_prefix>jquery.udraggable.js"></script>
40 <script type="text/javascript" src="<root_prefix>jquery.event.ue.js"></script>
41 <script type="text/javascript" src="<root_prefix>jquery.autocomplete.min.js"></script>
42 <script type="text/javascript" src="<root_prefix>jquery.simplecolorpicker.js"></script>
43 <script type="text/javascript" src="<root_prefix>infodrom.js"></script>
44 </head>
45 <body>
46
47 <table class=font width=100% border=0 cellpadding=0 cellspacing=0>
48 <tr>
49 <td align=left valign=top width=10% bgcolor=#<submenu-bgcolor>><font size=-1 color="#<submenu-textcolor>">
50
51 <table class=font width=100% border=0 cellpadding=1 cellspacing=0 bgcolor=#<white>>
52 <tr><td align=left valign=top>
53 <img src=<root_prefix>pix/infocon-90.png alt=""><p>
54 </td></tr></table><p>
55
56 #include "submenu.inc"
57
58 <p>
59 </font></td>
60
61 <td valign=top><img src=<root_prefix>pix/imgdot-1x1-transp.gif width=3 height=0 alt=""></td>
62
63 <td valign=top align=left width=90% id="content">
64
65 <table class=font width=100% border=0 cellpadding=1 cellspacing=0 bgcolor=#<bar-bgcolor>>
66 <tr>
67 <td align=left><font color=#<bar-textcolor>>
68 &nbsp;<strong><get-var func></strong>
69 </font></td>
70 <td align=right>
71 <a href="<root_prefix>index.html"><font color="#<bar-textcolor>"><strong>Infodrom Service</strong></font></a></a>&nbsp;
72 </td>
73 </tr>
74 </table>
75
76 <h3><get-var title></h3>
77
78 %body
79
80 </td>
81 </tr>
82 </table>
83
84 <page-footer>
85 </body>
86 </html>
87
88 <restore title function pagetitle>
89 </define-tag>
90
91 <define-tag calendar_init>
92 <script type="text/javascript" src="<root_prefix>calendar.js"></script>
93 <script type="text/javascript">
94 caldays = new Array('S','M','D','M','D','F','S');
95 mn = new Array('Jan','Feb','Mär','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez');
96 var opts ={past: true, startat: 1, close: true, delim: '.', imgpath: '<root_prefix>pix/'};
97 calendar(opts);
98 </script>
99 <style type="text/css">
100 img.calendar {
101   margin-bottom: %0px;
102 }
103 </style>
104 </define-tag>
105
106 <define-tag calendar>
107 <img class="calendar" src="<root_prefix>pix/calendar.gif" onclick="event.cancelBubble=true;popcalendar('%0');">
108 </define-tag>
109
110 <define-tag future>
111 <?php
112 $dir = getcwd();
113 while (strlen($dir) > 1) {
114   if (file_exists($dir.'/config.php')) {
115     require_once($dir.'/config.php');
116     break;
117   }
118   $dir = dirname($dir);
119 }
120
121 require_once('<root_prefix>/future.php');
122 ?>
123 <script type="text/javascript">
124 var SERVICE_ROOT = '<root_prefix>';
125 </script>
126 </define-tag>