border: 1px solid #9d9d94;
}
-abutton.formulaire { class: formulaire; font-size: 9; height: 48px; width: 80px; background-color: transparent; }
+abutton.formulaire { font-size: 9; height: 48px; width: 80px; background-color: transparent; }
-button.formulaire { class: formulaire; border: 0px; font-size: 9; background-color: transparent; }
+button.formulaire { border: 0px; font-size: 9; background-color: transparent; }
td.joberr { background-color: red; font-color: white;}
+
+
+.pSlice, .pSliceFull, .pSliceError, .pSliceAppend, .pSlicePurged, .pSliceRecycle, pSliceArchive, pSliceUsed, pSliceRead_Only, pSliceDisabled {
+ width: 2px;
+ height: 9px;
+ margin-right: 1px;
+ margin-bottom: 1px;
+ border: solid 1px #CCCCCC;
+ background-color: #E6E6E6;
+}
+
+.pSliceFull, pSliceRead_Only,pSliceArchive, pSliceUsed, pSliceDisabled {
+ border: solid 1px #BD0C10;
+ background-color: #FF3029;
+}
+
+.pSliceError {
+ border: solid 1px #000000;
+ background-color: #020202;
+}
+
+.pSliceAppend {
+ border: solid 1px #CD6500;
+ background-color: #FFCE00;
+}
+
+.pSlicePurged, .pSliceRecycle {
+ border: solid 1px #009900;
+ background-color: #00FF00;
+}
window.setInterval("bweb_refresh()",refresh_time);
}
+//
+// percent_display("row2", [ { nb: 1, name: "Full" },
+// { nb: 2, name: "Error" },
+// { nb: 5, name: "Append" },
+// { nb: 2, name: "Purged" },
+// {} # last element must be {}
+// ]);
+
+function percent_get_img(type)
+{
+ var img=document.createElement('img');
+ if (type) {
+ img.className="pSlice" + type ;
+ } else {
+ img.className="pSlice";
+ }
+ img.src="/bweb/pix.png";
+ img.alt="";
+ return img;
+}
+
+function percent_display(parent, hash_values)
+{
+ var nb_elt=20;
+ var tips= "";
+
+ if (typeof parent != "object") {
+ parent = document.getElementById(parent);
+ }
+
+ if (!parent) {
+ alert("E : display_percent(): Can't find parent " + parent);
+ return;
+ }
+
+ hash_values.pop(); // drop last element {}
+
+ var nb_displayed = 0;
+ var nb_max = 0;
+
+ for(var i=0;i<hash_values.length;i++) {
+ nb_max += hash_values[i]['nb'];
+ }
+
+ for(var i=0;i<hash_values.length;i++) {
+ var elt = hash_values[i];
+ var cur_nb = (elt['nb'] * nb_elt)/nb_max;
+ var cur_name = elt['name'];
+ cur_name.replace(/-/,"_");
+
+ tips = tips + " " + elt['nb'] + " " + cur_name;
+
+ while ((nb_displayed < nb_elt) && (cur_nb >=1)) {
+ nb_displayed++;
+ cur_nb--;
+
+ var img= percent_get_img(cur_name);
+ parent.appendChild(img);
+ }
+ }
+
+ while (nb_displayed < nb_elt) {
+ nb_displayed++;
+ var img= percent_get_img();
+ parent.appendChild(img);
+ }
+
+ parent.title = tips;
+
+}