Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit e9192831 authored by Marc Duez's avatar Marc Duez
Browse files

list.js : rename some var and reindent code

- give an html box for the star icon (needed for watir test)
parent 8674e632
...@@ -124,59 +124,62 @@ List.prototype = { ...@@ -124,59 +124,62 @@ List.prototype = {
* @div_elem : element HTML a remplir * @div_elem : element HTML a remplir
* @cloneID : identifiant du clone a décrire * @cloneID : identifiant du clone a décrire
* */ * */
div_elem : function(div_elem, cloneID){ div_elem : function(div_elem, cloneID){
var self=this; var self=this;
div_elem.innerHTML=''; div_elem.innerHTML='';
div_elem.className="listElem"; div_elem.className="listElem";
div_elem.style.display="block"; div_elem.style.display="block";
var span0 = document.createElement('div'); var span_name = document.createElement('div');
span0.className = "nameBox"; span_name.className = "nameBox";
span0.ondblclick = function(){ self.editName(cloneID, this); } span_name.ondblclick = function(){ self.editName(cloneID, this); }
span0.onclick = function(){ self.m.select(cloneID); } span_name.onclick = function(){ self.m.select(cloneID); }
span0.appendChild(document.createTextNode(this.m.getName(cloneID))); span_name.appendChild(document.createTextNode(this.m.getName(cloneID)));
span0.title = this.m.getName(cloneID); span_name.title = this.m.getName(cloneID);
span0.style.color=this.m.windows[cloneID].color; span_name.style.color=this.m.windows[cloneID].color;
var svg=document.createElementNS('http://www.w3.org/2000/svg', 'svg') var span_star = document.createElement('div');
svg.setAttribute('class','starBox'); span_star.className = "starBox";
svg.onclick=function(){ changeTag(cloneID); } span_star.onclick=function(){ changeTag(cloneID); }
var path=document.createElementNS('http://www.w3.org/2000/svg','path')
path.setAttribute('d', this.starPath); var svg=document.createElementNS('http://www.w3.org/2000/svg', 'svg')
path.setAttribute('id','color'+cloneID); var path=document.createElementNS('http://www.w3.org/2000/svg','path')
if (typeof this.m.windows[cloneID].tag != 'undefined') path.setAttribute("fill", tagColor[this.m.windows[cloneID].tag]); path.setAttribute('d', this.starPath);
else path.setAttribute("fill", color['@default']); path.setAttribute('id','color'+cloneID);
if (typeof this.m.windows[cloneID].tag != 'undefined') path.setAttribute("fill", tagColor[this.m.windows[cloneID].tag]);
svg.appendChild(path); else path.setAttribute("fill", color['@default']);
svg.appendChild(path);
var span2=document.createElement('span')
span2.className = "sizeBox"; span_star.appendChild(svg)
span2.onclick=function(){ self.m.select(cloneID); }
span2.style.color=this.m.windows[cloneID].color; var span_size=document.createElement('span')
span2.appendChild(document.createTextNode(this.m.getStrSize(cloneID))); span_size.className = "sizeBox";
span_size.onclick=function(){ self.m.select(cloneID); }
var span4=document.createElement('span') span_size.style.color=this.m.windows[cloneID].color;
span4.className = "infoBox"; span_size.appendChild(document.createTextNode(this.m.getStrSize(cloneID)));
span4.onclick=function(){ dataBox(self.m.getHtmlInfo(cloneID, "clone")); }
span4.appendChild(document.createTextNode("I")); var span_info=document.createElement('span')
span_info.className = "infoBox";
var span3=document.createElement('span') span_info.onclick=function(){ dataBox(self.m.getHtmlInfo(cloneID, "clone")); }
span3.className = "clusterBox"; span_info.appendChild(document.createTextNode("I"));
if (this.m.clones[cloneID].cluster.length >1 || this.m.clones[cloneID].name){
span3.onclick=function(){ showCluster( cloneID )} var span_cluster=document.createElement('span')
span3.appendChild(document.createTextNode("+")); span_cluster.className = "clusterBox";
}else{ if (this.m.clones[cloneID].cluster.length >1 || this.m.clones[cloneID].name){
span3.appendChild(document.createTextNode(' ')); span_cluster.onclick=function(){ showCluster( cloneID )}
} span_cluster.appendChild(document.createTextNode("+"));
}else{
div_elem.appendChild(span3); span_cluster.appendChild(document.createTextNode(' '));
div_elem.appendChild(span0); }
div_elem.appendChild(span4);
div_elem.appendChild(svg); div_elem.appendChild(span_cluster);
div_elem.appendChild(span2); div_elem.appendChild(span_name);
div_elem.appendChild(span_info);
}, div_elem.appendChild(span_star);
div_elem.appendChild(span_size);
},
/* genere le code HTML des infos d'un cluster /* genere le code HTML des infos d'un cluster
* @div_cluster : element HTML a remplir * @div_cluster : element HTML a remplir
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment