Code

Removed image references
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sun, 14 Mar 2010 15:54:43 +0000 (15:54 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sun, 14 Mar 2010 15:54:43 +0000 (15:54 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16505 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/addons/goto/deploy-list.tpl
gosa-plugins/goto/addons/goto/gotomasses.tpl

index c12f6bb80b685615decc752f54f18a0acd3787f6..5d6460f4135e08acd8741a426b33bf25f16ea61b 100644 (file)
@@ -66,18 +66,17 @@ function loadContent()
        /* Create array of available progress images once 
         */
        if(!fai_status.length){
-               for (var i = 0; i < document.images.length; i++) {
-                       var img = document.images[i];
-                       var id  = img.id;
-                       if(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 ++;
-                       }
-               }
+                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
@@ -115,16 +114,13 @@ function handleContent()
                           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
-             */
+                       /* 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 img = document.getElementById(id);  
+                       var progressBar = document.getElementById(id);
 
-                       /* Continue if there is no image object iwth this id 
-                    */
-                       if(!img){
+                       /* Continue if there is no image object iwth this id */
+                       if(!progressBar){
                                continue;
                        }
 
@@ -140,8 +136,15 @@ function handleContent()
                                        /* Check if progress has changed 
                                         */     
                                        if(fai_status[e]["PROGRESS"] != progress){
-                                               img.src = "progress.php?x=80&y=13&p=" + progress; 
-                                               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;
                                }
index b4476a444f9f2fd53c16f823b2de5f1d7dc0ca1a..df3c9a3649472738e59eee88c77b8590b2df8d28 100644 (file)
@@ -43,10 +43,9 @@ function loadContent()
        /* Create array of available progress images once 
         */
        if(!fai_status.length){
-               for (var i = 0; i < document.images.length; i++) {
-                       var img = document.images[i];
-                       var id  = img.id;
-                       if(id.match(/^progress_/)){
+                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();
@@ -97,11 +96,11 @@ function handleContent()
              */
                        var id          = fai_status[e]["MAC"].replace(/:/g,"_"); 
                        id = "progress_" + id;
-                       var img = document.getElementById(id);  
+                       var progressBar = document.getElementById(id);  
 
                        /* Continue if there is no image object iwth this id 
                     */
-                       if(!img){
+                       if(!progressBar){
                                continue;
                        }
 
@@ -117,7 +116,13 @@ function handleContent()
                                        /* Check if progress has changed 
                                         */     
                                        if(fai_status[e]["PROGRESS"] != progress){
-                                               img.src = "progress.php?x=80&y=13&p=" + 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;