web/data/cubicweb.iprogress.js
changeset 5658 7b9553a9db65
parent 4700 b981c7d3e3c0
--- a/web/data/cubicweb.iprogress.js	Thu Jun 03 10:17:44 2010 +0200
+++ b/web/data/cubicweb.iprogress.js	Thu Jun 03 14:51:42 2010 +0200
@@ -6,7 +6,7 @@
     this.color_budget = "blue";
     this.color_todo = "#cccccc"; //  grey
     this.height = 16;
-    this.middle = this.height/2;
+    this.middle = this.height / 2;
     this.radius = 4;
 }
 
@@ -15,14 +15,14 @@
     ctx.lineWidth = 1;
     ctx.strokeStyle = color;
     if (fill) {
-	ctx.fillStyle = color;
-	ctx.fillRect(0,0,pos,this.middle*2);
+        ctx.fillStyle = color;
+        ctx.fillRect(0, 0, pos, this.middle * 2);
     } else {
-	ctx.lineWidth = 2;
-	ctx.strokeStyle = "black";
-	ctx.moveTo(pos,0);
-	ctx.lineTo(pos,this.middle*2);
-	ctx.stroke();
+        ctx.lineWidth = 2;
+        ctx.strokeStyle = "black";
+        ctx.moveTo(pos, 0);
+        ctx.lineTo(pos, this.middle * 2);
+        ctx.stroke();
     }
 };
 
@@ -30,36 +30,34 @@
     ctx.beginPath();
     ctx.lineWidth = 2;
     ctx.strokeStyle = color;
-    ctx.moveTo(0,this.middle);
-    ctx.lineTo(pos,this.middle);
-    ctx.arc(pos,this.middle,this.radius,0,Math.PI*2,true);
+    ctx.moveTo(0, this.middle);
+    ctx.lineTo(pos, this.middle);
+    ctx.arc(pos, this.middle, this.radius, 0, Math.PI * 2, true);
     ctx.stroke();
 };
 
-
 ProgressBar.prototype.draw_circ = function(ctx) {
-    this.draw_one_circ(ctx,this.budget,this.color_budget);
-    this.draw_one_circ(ctx,this.todo,this.color_todo);
-    this.draw_one_circ(ctx,this.done,this.color_done);
+    this.draw_one_circ(ctx, this.budget, this.color_budget);
+    this.draw_one_circ(ctx, this.todo, this.color_todo);
+    this.draw_one_circ(ctx, this.done, this.color_done);
 };
 
-
 ProgressBar.prototype.draw_rect = function(ctx) {
-    this.draw_one_rect(ctx,this.todo,this.color_todo,true);
-    this.draw_one_rect(ctx,this.done,this.color_done,true);
-    this.draw_one_rect(ctx,this.budget,this.color_budget,false);
+    this.draw_one_rect(ctx, this.todo, this.color_todo, true);
+    this.draw_one_rect(ctx, this.done, this.color_done, true);
+    this.draw_one_rect(ctx, this.budget, this.color_budget, false);
 };
 
-
 function draw_progressbar(cid, done, todo, budget, color) {
     var canvas = document.getElementById(cid);
     if (canvas.getContext) {
         var ctx = canvas.getContext("2d");
-	var bar = new ProgressBar();
-	bar.budget = budget;
-	bar.todo = todo;
-	bar.done = done;
+        var bar = new ProgressBar();
+        bar.budget = budget;
+        bar.todo = todo;
+        bar.done = done;
         bar.color_done = color;
-	bar.draw_rect(ctx);
+        bar.draw_rect(ctx);
     }
 }
+