72,6 → 72,7 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar; |
import com.google.gwt.core.client.GWT; |
import com.google.gwt.i18n.client.DateTimeFormat; |
import com.google.gwt.user.client.ui.Image; |
import com.google.gwt.user.client.ui.Widget; |
|
public class PersonneForm extends FormPanel implements Rafraichissable { |
649,12 → 650,12 |
fsAutresInfos.add(lcAutreInformations1); |
|
// Logo |
LayoutContainer lcAutreInformations2 = new LayoutContainer(); |
hmIdentite.put("lcAutreInformations2", lcAutreInformations2); |
LayoutContainer lcLogoUrl = new LayoutContainer(); |
hmIdentite.put("lcLogoUrl", lcLogoUrl); |
|
LabelField lfUrlLogo = new LabelField(); |
lfUrlLogo.setText("<b>Logo:</b>"); |
lcAutreInformations2.add(lfUrlLogo); |
lcLogoUrl.add(lfUrlLogo); |
|
LayoutContainer lcUrlLogo = new LayoutContainer(new ColumnLayout()); |
hmIdentite.put("lcUrlLogo", lcUrlLogo); |
679,7 → 680,7 |
|
if ((strUrl == null)||(strUrl.trim().equals("http://"))||(strUrl.trim().equals(""))) { |
MessageBox.alert("Erreur de saisie", "Vous devez saisir un URL", null); |
} else if(hmIdentite.get("url-" + strUrl) != null) { |
} else if(hmIdentite.get("lc-" + strUrl) != null) { |
MessageBox.alert("Erreur de saisie", "L'url est déjà présente dans la liste.", null); |
} else { |
tfUrlLogo.setValue("http://"); |
698,8 → 699,12 |
}); |
|
lcUrlLogo.add(ibAjouterUrlLogo, new ColumnData(0.15)); |
lcAutreInformations2.add(lcUrlLogo); |
lcLogoUrl.add(lcUrlLogo); |
|
fsAutresInfos.add(lcLogoUrl); |
|
LayoutContainer lcAutreInformations2 = new LayoutContainer(new ColumnLayout()); |
hmIdentite.put("lcAutreInformations2", lcAutreInformations2); |
fsAutresInfos.add(lcAutreInformations2); |
|
TextArea taLogo = new TextArea(); |
1123,7 → 1128,7 |
Iterator<String> itLogo = lLogo.iterator(); |
String strValeurLogo = ""; |
while (itLogo.hasNext()) { |
strValeurLogo += itLogo.next(); |
strValeurLogo = itLogo.next(); |
if (!strValeurLogo.trim().equals("")) { |
ajouterUrlLogo(strValeurLogo); |
} |
1464,17 → 1469,17 |
LayoutContainer lcUrlContainer = (LayoutContainer) hmIdentite.get("lcAutreInformations2"); |
|
LayoutContainer lcUrl = new LayoutContainer(); |
lcUrl.setLayout(new ColumnLayout()); |
lcUrl.setLayout(new RowLayout()); |
hmIdentite.put("lc-" + strUrl, lcUrl); |
|
Image logo = new Image(strUrl); |
logo.setHeight("150px"); |
logo.setTitle(strUrl); |
lcUrl.add(logo); |
|
Text tUrl = new Text(strUrl); |
hmIdentite.put("url-"+strUrl, tUrl); |
|
lcUrl.add(tUrl, new ColumnData(0.8)); |
|
Button ibSupprimerUrl = new Button(); |
ibSupprimerUrl.setIcon(Images.ICONES.supprimer()); |
ibSupprimerUrl.setText("Supprimer"); |
ibSupprimerUrl.setId(strUrl); |
ibSupprimerUrl.addSelectionListener(new SelectionListener<ButtonEvent>() { |
|
1489,15 → 1494,17 |
|
HiddenField<String> hfUrlLogo = (HiddenField<String>) hmIdentite.get("hfUrlLogo"); |
String strValeurUrl = hfUrlLogo.getValue(); |
strValeurUrl = strUrl.replace(strUrl, ""); |
strValeurUrl = strValeurUrl.replace(strUrl, ""); |
|
hfUrlLogo.setValue(strValeurUrl); |
} |
}); |
|
lcUrl.add(ibSupprimerUrl, new ColumnData(0.15)); |
lcUrl.add(ibSupprimerUrl); |
lcUrlContainer.add(lcUrl); |
|
|
|
HiddenField<String> hfUrlLogo = (HiddenField<String>) hmIdentite.get("hfUrlLogo"); |
String strValeurUrl = hfUrlLogo.getValue(); |
if (strValeurUrl == null) { |