work on web interface
[enigma2.git] / lib / python / Plugins / Extensions / WebInterface / web / index.html.xml
1 <e2:screen name="TestScreen">&lt;html>
2 <head>
3         <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
4         <title>Enigma 2 realtime OSD example </title>
5         <script src="/webdata/tools.js" type="text/javascript" />
6 </head>
7 <style type="text/css">
8 body { background-color:#445566; color:#FFCC99; }
9 a:link { color:#FF9966; }
10 a:visited { color:#FF9900; }
11 a:active { color:#FFFFFF; }
12 #CurrentTime { 
13         position: absolute; top:30px; right:30px;
14         color: white; 
15         font-family:Arial,sans-serif;
16         font-size:2em;
17         font-weight:normal;
18 }
19
20 #CurrentService { 
21         color: white;
22         font-family:Arial,sans-serif;
23         font-size:4em;
24         font-weight:normal;
25 }
26
27 #Event_Now_Name { 
28         color: #998888;
29         font-family:Arial,sans-serif;
30         font-size:3em;
31         font-weight:bold;
32 }
33
34 #Event_Now_Begin { 
35         color: #999999;
36         font-family:Arial,sans-serif;
37         font-size:2em;
38         font-weight:bold;
39 }
40
41 #Event_Now_Remaining { 
42         position: absolute; right: 30px;
43         color: #999999;
44         font-family:Arial,sans-serif;
45         font-size:2em;
46         font-weight:bold;
47 }
48
49 #Event_Now_Description { 
50         color: #99aaaa;
51         font-family:Arial,sans-serif;
52         font-size:1em;
53         font-weight:bold;
54 }
55
56 #Event_Now_Extended_Description { 
57         color: #99bbbb;
58         font-family:Arial,sans-serif;
59         font-size:1em;
60         font-weight:bold;
61 }
62
63
64         /* allow room for 3 columns */
65 ol
66 {
67         width: 45em;
68 }
69
70         /* float and allow room for the widest item */
71 ol li
72 {
73         float: left;
74         width: 15em;
75 }
76
77 /* stop the float */
78 br
79 {
80         clear: left;
81 }
82
83         /* separate the list from subsequent markup */
84 div.wrapper
85 {
86         margin-bottom: 1em;
87 }
88
89 </style>
90 <body>
91
92 <div id="CurrentTime"> </div>
93 <div id="CurrentService"> </div>
94 <div>
95 <span id="Event_Now_Begin"> </span> <span id="Event_Now_Name"> </span>
96 <span id="Event_Now_Remaining"> </span>
97 </div>
98 <div id="Event_Now_Description"> </div>
99 <div id="Event_Now_Extended_Description"> </div>
100
101 <div id="ChannelList">
102 <ol>
103 <e2:element source="ServiceList">
104
105 <e2:convert type="web:ListFiller">
106 &lt;li onclick="zap(this)" id="<e2:item name="Reference" />"><e2:item name="Name"/>&lt;/li>
107 </e2:convert>
108
109         <e2:convert type="web:TextToHTML" />
110 </e2:element>
111 </ol>
112 </div>
113
114 <script type="text/javascript" language="javascript">
115 function set(what, value)
116 {
117         document.getElementById(what).innerHTML = value;
118 }
119
120 function updatePage()
121 {
122
123
124 function zap(li)
125 {
126         var request = getHTTPObject();
127         var url = "/web/zap?ZapTo=" + escape(li.id);
128         request.open("GET", url, true);
129         request.onreadystatechange = updatePage;
130         request.send(null);
131 }
132
133 </script>
134 </body>
135
136 <!-- realtime updates follow -->
137 <e2:element source="CurrentTime" streaming="yes">
138   <e2:convert type="ClockToText">WithSeconds</e2:convert>
139         <e2:convert type="web:JavascriptUpdate" />
140 </e2:element>
141 <e2:element source="CurrentService" streaming="yes">
142         <e2:convert type="ServiceName">Name</e2:convert>
143         <e2:convert type="web:JavascriptUpdate" />
144 </e2:element>
145 <e2:element source="Event_Now" id="Event_Now_Name" streaming="yes">
146         <e2:convert type="EventName">Name</e2:convert>
147         <e2:convert type="web:JavascriptUpdate" />
148 </e2:element>
149 <e2:element source="Event_Now" id="Event_Now_Description" streaming="yes">
150         <e2:convert type="EventName">Description</e2:convert>
151         <e2:convert type="web:JavascriptUpdate" />
152 </e2:element>
153 <e2:element source="Event_Now" id="Event_Now_Extended_Description" streaming="yes">
154         <e2:convert type="EventName">ExtendedDescription</e2:convert>
155         <e2:convert type="web:JavascriptUpdate" />
156 </e2:element>
157 <e2:element source="Event_Now" id="Event_Now_Remaining" streaming="yes">
158         <e2:convert type="EventTime">Remaining</e2:convert>
159         <e2:convert type="RemainingToText">InMinutes</e2:convert>
160         <e2:convert type="web:JavascriptUpdate" />
161 </e2:element>
162 <e2:element source="Event_Now" id="Event_Now_Begin" streaming="yes">
163         <e2:convert type="EventTime">StartTime</e2:convert>
164         <e2:convert type="ClockToText">Default</e2:convert>
165         <e2:convert type="web:JavascriptUpdate" />
166 </e2:element>
167 </e2:screen>