Line 4... |
Line 4... |
4 |
import org.tela_botanica.client.interfaces.ListePaginable;
|
4 |
import org.tela_botanica.client.interfaces.ListePaginable;
|
5 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
5 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
6 |
import org.tela_botanica.client.interfaces.VueListable;
|
6 |
import org.tela_botanica.client.interfaces.VueListable;
|
7 |
import org.tela_botanica.client.vues.BarrePaginationVue;
|
7 |
import org.tela_botanica.client.vues.BarrePaginationVue;
|
Line -... |
Line 8... |
- |
|
8 |
|
8 |
|
9 |
import com.google.gwt.core.client.GWT;
|
- |
|
10 |
import com.google.gwt.user.client.Element;
|
9 |
import com.google.gwt.user.client.Element;
|
11 |
import com.google.gwt.user.client.Window;
|
10 |
import com.google.gwt.user.client.ui.HTML;
|
12 |
import com.google.gwt.user.client.ui.HTML;
|
11 |
import com.gwtext.client.core.EventCallback;
|
13 |
import com.gwtext.client.core.EventCallback;
|
12 |
import com.gwtext.client.core.EventObject;
|
14 |
import com.gwtext.client.core.EventObject;
|
13 |
import com.gwtext.client.core.Ext;
|
15 |
import com.gwtext.client.core.Ext;
|
Line 97... |
Line 99... |
97 |
// on ajoute des listeners au composant tout entier
|
99 |
// on ajoute des listeners au composant tout entier
|
98 |
this.addListener(new ContainerListenerAdapter() {
|
100 |
this.addListener(new ContainerListenerAdapter() {
|
Line 99... |
Line 101... |
99 |
|
101 |
|
100 |
// pour gagner du temps on n'instancie la vue en elle même que lors
|
102 |
// pour gagner du temps on n'instancie la vue en elle même que lors
|
101 |
// du premier affichage (lazy rendering)
|
- |
|
102 |
|
103 |
// du premier affichage (lazy rendering)
|
Line 103... |
Line 104... |
103 |
public void onShow(Component component) {
|
104 |
public void onShow(Component component) {
|
104 |
|
105 |
|
105 |
if (!estInstancie) {
|
106 |
if (!estInstancie) {
|
Line 247... |
Line 248... |
247 |
// pour chacune des photos
|
248 |
// pour chacune des photos
|
248 |
final XTemplate template = new XTemplate(
|
249 |
final XTemplate template = new XTemplate(
|
249 |
new String[] {
|
250 |
new String[] {
|
250 |
"<tpl for='.'>",
|
251 |
"<tpl for='.'>",
|
251 |
"<div class='thumb-wrap' id='{num_image}'>",
|
252 |
"<div class='thumb-wrap' id='{num_image}'>",
|
252 |
"<div class='thumb dview-list'><img src='{url_image_M}' width='{taille_x_s} px' height='{taille_y_s} px' title='{nom_original}'></div>",
|
253 |
"<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>",
|
253 |
"<span></span></div>", "</tpl>",
|
254 |
"<span class='info_image'>{nom_obs_associees_formatees}</span></div>", "</tpl>",
|
254 |
"<div class='x-clear'></div>" });
|
255 |
"<div class='x-clear'></div>" });
|
255 |
// pour des raisons de performances on compile le template en une
|
256 |
// pour des raisons de performances on compile le template en une
|
256 |
// fonction
|
257 |
// fonction
|
257 |
template.compile();
|
258 |
template.compile();
|
Line 276... |
Line 277... |
276 |
|
277 |
|
Line 277... |
Line 278... |
277 |
}
|
278 |
}
|
278 |
|
279 |
|
- |
|
280 |
data.setProperty("taille_x_s", XYresize[0]);
|
- |
|
281 |
data.setProperty("taille_y_s", XYresize[1]);
|
- |
|
282 |
|
- |
|
283 |
String nomObs = data.getProperty("obs_associees");
|
- |
|
284 |
String[] obsTab = nomObs.split(";;");
|
- |
|
285 |
String htmltransmis = "";
|
- |
|
286 |
String htmllie = "";
|
- |
|
287 |
|
- |
|
288 |
if(obsTab.length >= 1) {
|
- |
|
289 |
String[] elementsObs = obsTab[0].split("#");
|
- |
|
290 |
|
- |
|
291 |
if(elementsObs.length >= 3) {
|
- |
|
292 |
nomObs = elementsObs[1];
|
- |
|
293 |
//if(elementsObs[2] == "1") {
|
- |
|
294 |
htmltransmis = "<img class='picto_haut_gauche' src='tela.png' />";
|
- |
|
295 |
htmllie = "<img class='picto_haut_droite' src='chain.png' />";
|
- |
|
296 |
//}
|
- |
|
297 |
}
|
- |
|
298 |
}
|
- |
|
299 |
|
- |
|
300 |
data.setProperty("indication_transmission", htmltransmis);
|
- |
|
301 |
data.setProperty("indication_liaison", htmllie);
|
279 |
data.setProperty("taille_x_s", XYresize[0]);
|
302 |
data.setProperty("nom_obs_associees_formatees", nomObs);
|
280 |
data.setProperty("taille_y_s", XYresize[1]);
|
303 |
|
281 |
}
|
304 |
}
|
Line 282... |
Line 305... |
282 |
};
|
305 |
};
|
Line 298... |
Line 321... |
298 |
FieldDef defUrlImageS = new StringFieldDef("url_image_S");
|
321 |
FieldDef defUrlImageS = new StringFieldDef("url_image_S");
|
299 |
FieldDef defUrlImageM = new StringFieldDef("url_image_M");
|
322 |
FieldDef defUrlImageM = new StringFieldDef("url_image_M");
|
300 |
FieldDef defUrlImage = new StringFieldDef("url_image");
|
323 |
FieldDef defUrlImage = new StringFieldDef("url_image");
|
301 |
FieldDef defTailleX = new IntegerFieldDef("taille_x");
|
324 |
FieldDef defTailleX = new IntegerFieldDef("taille_x");
|
302 |
FieldDef defTailleY = new IntegerFieldDef("taille_y");
|
325 |
FieldDef defTailleY = new IntegerFieldDef("taille_y");
|
- |
|
326 |
FieldDef defObsAssociees = new StringFieldDef("obs_associees");
|
303 |
FieldDef[] defTab = { defNumImage, defNomImage, defDatImage, defLieImage,
|
327 |
FieldDef[] defTab = { defNumImage, defNomImage, defDatImage, defLieImage,
|
304 |
defAppImage, defUrlImageS, defUrlImageM, defUrlImage,defTailleX,defTailleY};
|
328 |
defAppImage, defUrlImageS, defUrlImageM, defUrlImage,defTailleX,defTailleY, defObsAssociees};
|
305 |
RecordDef rd = new RecordDef(defTab);
|
329 |
RecordDef rd = new RecordDef(defTab);
|
306 |
st = new Store(rd);
|
330 |
st = new Store(rd);
|
307 |
dView.setStore(st);
|
331 |
dView.setStore(st);
|
Line 308... |
Line 332... |
308 |
|
332 |
|