Code

Removed image references
[gosa.git] / gosa-plugins / goto / addons / goto / deploy-list.tpl
1 <input type='image' src='images/empty.png' name='no_action_posted' value='do_nothing' alt='' style='width:2px;height:2px;'>
3 <table summary="" style="width:100%;height:100%; vertical-align:top; text-align:left;" cellpadding=2>
4   <tr>
5     <td style="vertical-align:top; width:100%;">
6       <div class="contentboxh">
7         <p class="contentboxh">&nbsp;{$HEADLINE}&nbsp;{$SIZELIMIT}</p>
8       </div>
9       
10       <div class="contentboxb">
11        <div style='background:white;padding:3px;'>
12         <table><tr>
13           <td>{$ROOT}&nbsp;</td><td>{$BACK}&nbsp;</td><td>{$HOME}&nbsp;</td><td>{$RELOAD}&nbsp;</td><td>{$SEPARATOR}&nbsp;</td><td>{t}Base{/t} {$BASE}&nbsp;</td><td>{$SEPARATOR}&nbsp;</td><td><img src='images/rocket.png' alt='' class='center'></td><td> {$ACTIONS}</td>
14         </tr></table>
15        </div>
16       </div>
17       
18       <div style='height:4px;'>
19       </div>
20       {$LIST}
21     </td>
22   </tr>
23 </table>
25 <input type="hidden" name="ignore">
28 <!--
29 JS to reload the progress bars.
31 -->
32 {literal}
33 <script type="text/javascript">
35 /* Get request object handler for this type of browser 
36  */
37 if (typeof XMLHttpRequest != 'undefined')
38 {
39     xmlHttpObject = new XMLHttpRequest();
40 }
41 if (!xmlHttpObject)
42 {
43     try
44     {
45         xmlHttpObject = new ActiveXObject("Msxml2.XMLHTTP");
46     }
47     catch(e)
48     {
49         try
50         {
51             xmlHttpObject = new ActiveXObject("Microsoft.XMLHTTP");
52         }
53         catch(e)
54         {
55             xmlHttpObject = null;
56         }
57     }
58 }
60 var fai_status = new Array();
62 function loadContent()
63 {
64         var c = 0;
66         /* Create array of available progress images once 
67          */
68         if(!fai_status.length){
69                 var progressBars= Form.getElements("mainform");
70                 progressBars.each(function(progressBar) {
71                         if(progressBar.id.match(/^progress_/)){
72                                 var mac = id.replace(/^progress_/,'');
73                                 mac = mac.replace(/_/g,':');
74                                 fai_status[c] = new Object();
75                                 fai_status[c]['MAC']  = mac;
76                                 fai_status[c]['PROGRESS'] = -1;
77                                 c ++;
78                         }
79                 }
80         }
82         /* Create string of macs used as parameter for getFAIstatus.php
83                 to retrieve all progress values.
84      */
85         var macs = "";
86         for (var i = 0; i < fai_status.length; i++) {
87                 macs += fai_status[i]['MAC'] + ","
88         }
90         /* Send request 
91      */
92     xmlHttpObject.open('get','getFAIstatus.php?mac=' + macs);
93     xmlHttpObject.onreadystatechange = handleContent;
94     xmlHttpObject.send(null);
95     return false;
96 }
99 function handleContent()
101     if (xmlHttpObject.readyState == 4)
102     {
103                 /* Get text and split by newline 
104          */
105         var text = xmlHttpObject.responseText;
106                 var data = text.split("\n");
108                 /* Walk through progress images and check if the 
109                    progress status has changed 
110                  */
111                 for (var e = 0; e < fai_status.length; e++) {
112                 
113                         /* Walk through returned values and parse out 
114                            mac and progress value */
115                         var found       = false;
117                         /* Create object id out of mac address 12:34:56:12:34:56 => progress_12_34_56_12_34_56 */
118                         var id          = fai_status[e]["MAC"].replace(/:/g,"_"); 
119                         id = "progress_" + id;
120                         var progressBar = document.getElementById(id);
122                         /* Continue if there is no image object iwth this id */
123                         if(!progressBar){
124                                 continue;
125                         }
127                         for (var i = 0; i < data.length; i++) {
128                                 var mac         = data[i].replace(/\|.*$/,"");
129                                 var progress= data[i].replace(/^.*\|/,"");
131                                 /* Match mac returned by the support daemon and 
132                                         the one out of our list */
133                                 if(fai_status[e]["MAC"] == mac){
134                                         found = true;   
136                                         /* Check if progress has changed 
137                                          */     
138                                         if(fai_status[e]["PROGRESS"] != progress){
139                                                 var woffset= Math.floor(0.85 * (100-progress));
141                                                 progressBar.setStyle({
142                                                    -moz-box-shadow: "0 0 2px rgba(255, 255, 255, 0.4) inset, 0 4px 6px rgba(255, 255, 255, 0.4) inset, 0 10px 0 -2px rgba(255, 255, 255, 0.2) inset, -" + woffset + "px 0 0 -2px rgba(255, 255, 255, 0.2) inset, -" + (woffset+1) + "px 0 0 -2px rgba(0, 0, 0, 0.6) inset, 0pt 11px 8px rgba(0, 0, 0, 0.3) inset, 0pt 1px 0px rgba(0, 0, 0, 0.2)",
143                                                    -webkit-box-shadow: "0 0 2px rgba(255, 255, 255, 0.4) inset, 0 4px 6px rgba(255, 255, 255, 0.4) inset, 0 10px 0 -2px rgba(255, 255, 255, 0.2) inset, -" + woffset + "px 0 0 -2px rgba(255, 255, 255, 0.2) inset, -" + (woffset+1) + "px 0 0 -2px rgba(0, 0, 0, 0.6) inset, 0pt 11px 8px rgba(0, 0, 0, 0.3) inset, 0pt 1px 0px rgba(0, 0, 0, 0.2)",
144                                                    box-shadow: "0 0 2px rgba(255, 255, 255, 0.4) inset, 0 4px 6px rgba(255, 255, 255, 0.4) inset, 0 10px 0 -2px rgba(255, 255, 255, 0.2) inset, -" + woffset + "px 0 0 -2px rgba(255, 255, 255, 0.2) inset, -" + (woffset+1) + "px 0 0 -2px rgba(0, 0, 0, 0.6) inset, 0pt 11px 8px rgba(0, 0, 0, 0.3) inset, 0pt 1px 0px rgba(0, 0, 0, 0.2)"
145                                                 });
146                                                 fai_status[e]["PROGRESS"] = progress;
148                                         }
149                                         break;
150                                 }
151                         }
152                         //document.getElementById("text1").value += "\n ";
154                         /* There was no status send for the current mac. 
155                            This means it was removed from the queue.
156                          */
157                         if(!found){
158                                 document.mainform.submit();                             
159                         }
160                 }
161                 timer=setTimeout('loadContent()',3000);
162     }
165 timer=setTimeout('loadContent()',3000);
166 </script>
167 {/literal}