summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eeb885d)
raw | patch | inline | side by side (parent: eeb885d)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sun, 14 Mar 2010 15:58:25 +0000 (15:58 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sun, 14 Mar 2010 15:58:25 +0000 (15:58 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16506 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/addons/goto/class_gotomasses.inc | patch | blob | history | |
gosa-plugins/goto/addons/goto/gotomasses.tpl | [deleted file] | patch | blob | history |
diff --git a/gosa-plugins/goto/addons/goto/class_gotomasses.inc b/gosa-plugins/goto/addons/goto/class_gotomasses.inc
index 9eb5c51b72d7c84f1af915212edc92fc16de1442..ff890d92ea938c2598e97f047d590462f2127f27 100644 (file)
/* Real percent */
} else {
if (preg_match('/install/', $headertag)){
- $status = "<img src='progress.php?x=80&y=13&p=".$progress."' alt=''
- id='progress_".preg_replace("/:/","_",$mac)."'>";
+ $status= progressbar($progress, 80, 13, true, false, "progress_".preg_replace("/:/","_",$mac));
} else {
$status = preg_replace('/ /', ' ', _("in progress"));
}
diff --git a/gosa-plugins/goto/addons/goto/gotomasses.tpl b/gosa-plugins/goto/addons/goto/gotomasses.tpl
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-{$div}
-
-<!--
-JS to reload the progress bars.
-
--->
-{literal}
-<script type="text/javascript">
-
-/* Get request object handler for this type of browser
- */
-if (typeof XMLHttpRequest != 'undefined')
-{
- xmlHttpObject = new XMLHttpRequest();
-}
-if (!xmlHttpObject)
-{
- try
- {
- xmlHttpObject = new ActiveXObject("Msxml2.XMLHTTP");
- }
- catch(e)
- {
- try
- {
- xmlHttpObject = new ActiveXObject("Microsoft.XMLHTTP");
- }
- catch(e)
- {
- xmlHttpObject = null;
- }
- }
-}
-
-var fai_status = new Array();
-
-function loadContent()
-{
- var c = 0;
-
- /* Create array of available progress images once
- */
- if(!fai_status.length){
- var progressBars= Form.getElements("mainform");
- progressBars.each(function(progressBar) {
- if(progressBar.id.match(/^progress_/)){
- var mac = id.replace(/^progress_/,'');
- mac = mac.replace(/_/g,':');
- fai_status[c] = new Object();
- fai_status[c]['MAC'] = mac;
- fai_status[c]['PROGRESS'] = -1;
- c ++;
- }
- }
- }
-
- /* Create string of macs used as parameter for getFAIstatus.php
- to retrieve all progress values.
- */
- var macs = "";
- for (var i = 0; i < fai_status.length; i++) {
- macs += fai_status[i]['MAC'] + ","
- }
-
- /* Send request
- */
- xmlHttpObject.open('get','getFAIstatus.php?mac=' + macs);
- xmlHttpObject.onreadystatechange = handleContent;
- xmlHttpObject.send(null);
- return false;
-}
-
-
-function handleContent()
-{
- if (xmlHttpObject.readyState == 4)
- {
- /* Get text and split by newline
- */
- var text = xmlHttpObject.responseText;
- var data = text.preg_split("/\n/");
-
- /* Walk through progress images and check if the
- progress status has changed
- */
- for (var e = 0; e < fai_status.length; e++) {
-
- /* Walk through returned values and parse out
- mac and progress value */
- var found = false;
-
- /* Create object id out of mac address
- 12:34:56:12:34:56 => progress_12_34_56_12_34_56
- */
- var id = fai_status[e]["MAC"].replace(/:/g,"_");
- id = "progress_" + id;
- var progressBar = document.getElementById(id);
-
- /* Continue if there is no image object iwth this id
- */
- if(!progressBar){
- continue;
- }
-
- for (var i = 0; i < data.length; i++) {
- var mac = data[i].replace(/\|.*$/,"");
- var progress= data[i].replace(/^.*\|/,"");
-
- /* Match mac returned by the support daemon and
- the one out of our list */
- if(fai_status[e]["MAC"] == mac){
- found = true;
-
- /* Check if progress has changed
- */
- if(fai_status[e]["PROGRESS"] != progress){
- var woffset= Math.floor(0.85 * (100-progress));
-
- progressBar.setStyle({
- -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)",
- -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)",
- 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)"
- });
- fai_status[e]["PROGRESS"] = progress;
- }
- break;
- }
- }
- //document.getElementById("text1").value += "\n ";
-
- /* There was no status send for the current mac.
- This means it was removed from the queue.
- */
- if(!found){
- document.mainform.submit();
- }
- }
- timer=setTimeout('loadContent()',3000);
- }
-}
-
-timer=setTimeout('loadContent()',3000);
-</script>
-{/literal}