6,7 → 6,9 |
import org.tela_botanica.client.interfaces.VueListable; |
import org.tela_botanica.client.vues.BarrePaginationVue; |
|
import com.google.gwt.core.client.GWT; |
import com.google.gwt.user.client.Element; |
import com.google.gwt.user.client.Window; |
import com.google.gwt.user.client.ui.HTML; |
import com.gwtext.client.core.EventCallback; |
import com.gwtext.client.core.EventObject; |
99,7 → 101,6 |
|
// pour gagner du temps on n'instancie la vue en elle même que lors |
// du premier affichage (lazy rendering) |
|
public void onShow(Component component) { |
|
if (!estInstancie) { |
249,8 → 250,8 |
new String[] { |
"<tpl for='.'>", |
"<div class='thumb-wrap' id='{num_image}'>", |
"<div class='thumb dview-list'><img src='{url_image_M}' width='{taille_x_s} px' height='{taille_y_s} px' title='{nom_original}'></div>", |
"<span></span></div>", "</tpl>", |
"<div class='thumb dview-list'>{indication_transmission}{indication_liaison}<img class='miniature_galerie' src='{url_image_M}' width='{taille_x_s} px' height='{taille_y_s} px' title='{nom_original}' /></div>", |
"<span class='info_image'>{nom_obs_associees_formatees}</span></div>", "</tpl>", |
"<div class='x-clear'></div>" }); |
// pour des raisons de performances on compile le template en une |
// fonction |
278,6 → 279,28 |
|
data.setProperty("taille_x_s", XYresize[0]); |
data.setProperty("taille_y_s", XYresize[1]); |
|
String nomObs = data.getProperty("obs_associees"); |
String[] obsTab = nomObs.split(";;"); |
String htmltransmis = ""; |
String htmllie = ""; |
|
if(obsTab.length >= 1) { |
String[] elementsObs = obsTab[0].split("#"); |
|
if(elementsObs.length >= 3) { |
nomObs = elementsObs[1]; |
//if(elementsObs[2] == "1") { |
htmltransmis = "<img class='picto_haut_gauche' src='tela.png' />"; |
htmllie = "<img class='picto_haut_droite' src='chain.png' />"; |
//} |
} |
} |
|
data.setProperty("indication_transmission", htmltransmis); |
data.setProperty("indication_liaison", htmllie); |
data.setProperty("nom_obs_associees_formatees", nomObs); |
|
} |
}; |
dView.setTpl(template); |
300,8 → 323,9 |
FieldDef defUrlImage = new StringFieldDef("url_image"); |
FieldDef defTailleX = new IntegerFieldDef("taille_x"); |
FieldDef defTailleY = new IntegerFieldDef("taille_y"); |
FieldDef defObsAssociees = new StringFieldDef("obs_associees"); |
FieldDef[] defTab = { defNumImage, defNomImage, defDatImage, defLieImage, |
defAppImage, defUrlImageS, defUrlImageM, defUrlImage,defTailleX,defTailleY}; |
defAppImage, defUrlImageS, defUrlImageM, defUrlImage,defTailleX,defTailleY, defObsAssociees}; |
RecordDef rd = new RecordDef(defTab); |
st = new Store(rd); |
dView.setStore(st); |