[kune-commits] r1436 - donate/src/cc/kune/sandbox/donate/client

Esteban Carreras Genis ecarrerasg at ourproject.org
Fri Jul 1 03:01:29 CEST 2011


Author: ecarrerasg
Date: 2011-07-01 03:01:29 +0200 (Fri, 01 Jul 2011)
New Revision: 1436

Added:
   donate/src/cc/kune/sandbox/donate/client/ButtonsPanel.java
   donate/src/cc/kune/sandbox/donate/client/ButtonsPanel.ui.xml
   donate/src/cc/kune/sandbox/donate/client/DonateButton.java
   donate/src/cc/kune/sandbox/donate/client/DonateButton.ui.xml
Modified:
   donate/src/cc/kune/sandbox/donate/client/Donate.java
   donate/src/cc/kune/sandbox/donate/client/DonateConstants.java
   donate/src/cc/kune/sandbox/donate/client/DonateConstants.properties
   donate/src/cc/kune/sandbox/donate/client/DonateMessages.java
   donate/src/cc/kune/sandbox/donate/client/DonateMessages_en.properties
   donate/src/cc/kune/sandbox/donate/client/DonateMessages_es.properties
   donate/src/cc/kune/sandbox/donate/client/DonatePanel.java
   donate/src/cc/kune/sandbox/donate/client/DonatePanel.ui.xml
Log:
Changes: reduce code, i18n configuration complete and new Widgets

Added: donate/src/cc/kune/sandbox/donate/client/ButtonsPanel.java
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/ButtonsPanel.java	                        (rev 0)
+++ donate/src/cc/kune/sandbox/donate/client/ButtonsPanel.java	2011-07-01 01:01:29 UTC (rev 1436)
@@ -0,0 +1,278 @@
+package cc.kune.sandbox.donate.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.BlurEvent;
+import com.google.gwt.event.dom.client.BlurHandler;
+import com.google.gwt.event.dom.client.FocusEvent;
+import com.google.gwt.event.dom.client.FocusHandler;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FormPanel;
+import com.google.gwt.user.client.ui.HTMLPanel;
+import com.google.gwt.user.client.ui.Hidden;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+
+public class ButtonsPanel extends Composite {
+	DonateMessages donateMessages = (DonateMessages) GWT.create(DonateMessages.class);
+	DonateConstants donateConstants = (DonateConstants) GWT.create(DonateConstants.class);
+	
+	String sMode;
+	@UiField
+	HTMLPanel panelContentButtons;
+	@UiField
+	DonateButton btnDontation1;
+	@UiField
+	DonateButton btnDontation2;
+	@UiField
+	DonateButton btnDontation3;
+	@UiField
+	DonateButton btnDontation4;
+	@UiField
+	HTMLPanel panelOtherValue;
+	@UiField
+	FormPanel panelForm;
+	@UiField
+	TextBox tbOtherValue;
+	@UiField
+	Hidden hParamForm1;
+	@UiField
+	Hidden hParamForm2;
+	@UiField
+	Hidden hParamForm3;
+	@UiField
+	Hidden hParamForm4;
+	@UiField
+	Hidden hParamForm5;
+	@UiField
+	Hidden hParamForm6;
+	@UiField
+	Hidden hParamForm7;
+	@UiField
+	Hidden hParamForm8;
+	@UiField
+	Hidden hParamForm9;
+	@UiField
+	Hidden hParamForm10;
+	@UiField
+	Hidden hParamForm11;
+	@UiField
+	Label lblOtherValue;
+	
+	private static ButtonsPanelUiBinder uiBinder = GWT
+	.create(ButtonsPanelUiBinder.class);
+
+	interface ButtonsPanelUiBinder extends UiBinder<Widget, ButtonsPanel> {
+	}
+
+	public ButtonsPanel() {
+		initWidget(uiBinder.createAndBindUi(this));
+		
+		panelForm.setMethod(FormPanel.METHOD_GET); //HTTP send method
+		this.setFormUrl(donateConstants.paypal_url());
+		this.setTexBoxName(donateConstants.paypal_param_a3());
+		this.setTexBoxText(donateMessages.otherValue());
+		this.setTexBoxTitle(donateMessages.otherValueTitle());
+	
+		tbOtherValue.addFocusHandler(new FocusHandler() {
+			public void onFocus(FocusEvent event) {
+				if(tbOtherValue.getText().equals(donateMessages.otherValue()))
+				{
+					tbOtherValue.setText("");
+				}
+			}
+		});	
+		
+		tbOtherValue.addBlurHandler(new BlurHandler() {
+			public void onBlur(BlurEvent event) {
+				String sActualValue = tbOtherValue.getText();
+				int iActualValue = 0;
+				if(!sActualValue.equals(""))
+				{	
+					iActualValue = Integer.parseInt(sActualValue);
+				}
+				//validation
+				if(sActualValue == "" || iActualValue == 0)
+				{
+					tbOtherValue.setText(donateMessages.otherValue());
+				}
+			}
+		});
+		
+	}
+	
+	public void setLabelText(String text)
+	{
+		this.lblOtherValue.setText(text);
+	}
+	
+	public void setTexBoxText(String text)
+	{
+		this.tbOtherValue.setText(text);
+	}
+	
+	public void setTexBoxName(String name)
+	{
+		this.tbOtherValue.setName(name);
+	}
+	
+	public void setTexBoxTitle(String tit)
+	{
+		this.tbOtherValue.setTitle(tit);
+	}
+	
+	public void setFormUrl(String url)
+	{
+		this.panelForm.setAction(url);
+	}
+	
+	public void setBtnPanelVision (String mode)
+	{   //Visualization mode
+		this.sMode = mode;
+		switch(Integer.parseInt(this.sMode))
+		{
+			case 1://Single donation
+				this.panelOtherValue.setVisible(false);
+			break;
+			default://Regular donation
+				this.btnDontation4.setVisible(false);
+			break;
+		}
+	}
+	
+	public void setFormParams(String sType)
+	{
+		hParamForm1.setName(donateConstants.param1());
+		hParamForm1.setValue(donateConstants.valueParam1());
+		hParamForm2.setName(donateConstants.param2());
+		hParamForm2.setValue(donateConstants.valueParam2());
+		hParamForm3.setName(donateConstants.param3());
+		hParamForm3.setValue(donateConstants.valueParam3());
+		hParamForm4.setName(donateConstants.param4());
+		hParamForm4.setValue(sType); //currency_value
+		hParamForm5.setName(donateConstants.param5());
+		hParamForm5.setValue(donateConstants.valueParam5());
+		hParamForm6.setName(donateConstants.param6());
+		hParamForm6.setValue(donateConstants.valueParam6());
+		hParamForm7.setName(donateConstants.param7());
+		hParamForm7.setValue(donateConstants.valueParam7());
+		hParamForm8.setName(donateConstants.param8());
+		hParamForm8.setValue(donateConstants.valueParam8());
+		hParamForm9.setName(donateConstants.param9());
+		hParamForm9.setValue(donateConstants.valueParam9());
+		hParamForm10.setName(donateConstants.param10());
+		hParamForm10.setValue(donateConstants.valueParam10());
+		hParamForm11.setName(donateConstants.param11());
+		hParamForm11.setValue(donateConstants.valueParam11());
+	}
+
+	/* 
+	 * Function to config de buttons (text and link)
+	 */
+	public void configButtons(String sCurrency, String sType)
+	{
+		String aryTextButtons [] = new String [4]; 
+		String arrayTextButtons [] = new String [4]; 
+		String arrayLinksButtons [] = new String [4]; 
+		int i = 0;
+		int num_donations = 0;
+		int iType = Integer.parseInt(sType);
+		switch(iType)
+		{
+			case 1://single
+				num_donations = Integer.parseInt(donateConstants.num_single_donations());
+				aryTextButtons = new String[num_donations];
+				aryTextButtons = donateConstants.single_donations().split(donateConstants.split());
+			break;
+			case 2://regular
+				num_donations = Integer.parseInt(donateConstants.num_regular_donations());
+				aryTextButtons = new String[num_donations];
+				aryTextButtons = donateConstants.regular_donations().split(donateConstants.split());
+			break;
+		}
+
+		arrayTextButtons = new String[num_donations];
+		arrayLinksButtons = new String[num_donations];
+		
+		for(i = 0; i < num_donations; i++)
+		{
+			arrayTextButtons[i] = getTextButton(aryTextButtons[i],sCurrency,iType);
+			arrayLinksButtons[i] = getLinkButton(aryTextButtons[i],sCurrency,iType);
+		}
+		
+		btnDontation1.setText(arrayTextButtons[0]);
+		btnDontation2.setText(arrayTextButtons[1]);
+		btnDontation3.setText(arrayTextButtons[2]);
+		btnDontation1.setReference(arrayLinksButtons[0]);
+		btnDontation2.setReference(arrayLinksButtons[1]);
+		btnDontation3.setReference(arrayLinksButtons[2]);
+		if(iType == 1)
+		{
+			btnDontation4.setText(arrayTextButtons[3]);
+			btnDontation4.setReference(arrayLinksButtons[3]);
+		}
+	}
+	
+	private String getTextButton(String sValue, String sCurrency, int iType)
+	{
+		String sText = sValue;
+		switch(iType)
+		{
+			case 1://single
+				if(sCurrency.equals(donateConstants.euro()))
+				{
+					sText += " " + donateConstants.euroDonation();
+				}else
+				{
+					sText += " " + donateConstants.dollarDonation();
+				}
+			break;
+			case 2://regular
+				if(sCurrency.equals(donateConstants.euro()))
+				{
+					sText += " " + donateMessages.euroRegularDonation();
+				}else
+				{
+					sText += " " +donateMessages.dollarRegularDonation();
+				}
+			break;
+		}
+		return sText;
+	}
+	
+	private String getLinkButton(String sValue, String sCurrency, int iType)
+	{
+		String sEqual = "=";
+		String sAnd = "&";
+		String sLink = "";
+		sLink += donateConstants.paypal_url();
+		sLink +=donateConstants.param1()+sEqual;
+		sLink +=donateConstants.valueParam1()+sAnd;
+		sLink +=donateConstants.param2()+sEqual;
+		sLink +=donateConstants.valueParam2()+sAnd;
+		sLink +=donateConstants.param3()+sEqual;
+		sLink +=donateConstants.valueParam3()+sAnd;
+		sLink +=donateConstants.param4()+sEqual;
+		sLink +=donateConstants.valueParam4()+sAnd;
+		sLink +=donateConstants.param5()+sEqual;
+		sLink +=donateConstants.valueParam5()+sAnd;
+		sLink +=donateConstants.param6()+sEqual;
+		sLink +=donateConstants.valueParam6()+sAnd;
+		sLink +=donateConstants.param7()+sEqual;
+		sLink +=donateConstants.valueParam7()+sAnd;
+		sLink +=donateConstants.param8()+sEqual;
+		sLink +=donateConstants.valueParam8()+sAnd;
+		sLink +=donateConstants.param9()+sEqual;
+		sLink +=donateConstants.valueParam9()+sAnd;
+		sLink +=donateConstants.param10()+sEqual;
+		sLink +=donateConstants.valueParam10()+sAnd;
+		sLink +=donateConstants.param11()+sEqual;
+		sLink +=donateConstants.valueParam11()+sAnd;
+		sLink +=donateConstants.paypal_param_a3()+sEqual;
+		sLink +=sValue;
+
+		return sLink;
+	}
+}

Added: donate/src/cc/kune/sandbox/donate/client/ButtonsPanel.ui.xml
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/ButtonsPanel.ui.xml	                        (rev 0)
+++ donate/src/cc/kune/sandbox/donate/client/ButtonsPanel.ui.xml	2011-07-01 01:01:29 UTC (rev 1436)
@@ -0,0 +1,69 @@
+<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
+<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
+	xmlns:g="urn:import:com.google.gwt.user.client.ui">
+	<ui:style>
+		.pnlOptions {
+			border-bottom: 1px solid #E7E7E7;
+			background-color: #FFFFFF;
+		    clear: left;
+		    float: left;
+		    list-style: none outside none;
+		    margin: 10px 10px;
+		    margin-top: 15px;
+		    padding: 5px;	
+		    display: inline;
+		    with: 550px;
+		    height: 28px;
+		}
+		
+		.optionOther {
+			float: left;
+			width: 174px;
+			height: 28px;
+		}
+		
+		.otherValue {
+			width: 83px;
+			height: 16px;
+			text-align: center; 
+			margin-bottom: 5px;
+		    margin-left: 10px;
+		    margin-right: 10px;
+		    margin-top: 0;
+			float: left;
+		}
+		
+		.labelOther {
+			float: left;
+		}
+	</ui:style>
+	<g:HTMLPanel addStyleNames="{style.pnlOptions}" ui:field="panelContentButtons">
+		<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
+				xmlns:ku="urn:import:cc.kune.sandbox.donate.client"
+				xmlns:g="urn:import:com.google.gwt.user.client.ui">
+			<ku:DonateButton ui:field="btnDontation1" /> 
+			<ku:DonateButton ui:field="btnDontation2" /> 
+			<ku:DonateButton ui:field="btnDontation3" />
+			<ku:DonateButton ui:field="btnDontation4" />  
+		</ui:UiBinder>
+		<g:HTMLPanel addStyleNames="{style.optionOther}" ui:field="panelOtherValue">
+			<g:FormPanel ui:field="panelForm">
+				<g:FlowPanel>
+					<g:TextBox addStyleNames="{style.otherValue}" ui:field="tbOtherValue"></g:TextBox>
+					<g:Hidden ui:field="hParamForm1"></g:Hidden>
+					<g:Hidden ui:field="hParamForm2"></g:Hidden>
+					<g:Hidden ui:field="hParamForm3"></g:Hidden>
+					<g:Hidden ui:field="hParamForm4"></g:Hidden>
+					<g:Hidden ui:field="hParamForm5"></g:Hidden>
+					<g:Hidden ui:field="hParamForm6"></g:Hidden>
+					<g:Hidden ui:field="hParamForm7"></g:Hidden>
+					<g:Hidden ui:field="hParamForm8"></g:Hidden>
+					<g:Hidden ui:field="hParamForm9"></g:Hidden>
+					<g:Hidden ui:field="hParamForm10"></g:Hidden>
+					<g:Hidden ui:field="hParamForm11"></g:Hidden>
+					<g:Label addStyleNames="{style.labelOther}" ui:field="lblOtherValue" ></g:Label>
+				</g:FlowPanel>
+			</g:FormPanel>
+		</g:HTMLPanel>
+	</g:HTMLPanel>
+</ui:UiBinder> 
\ No newline at end of file

Modified: donate/src/cc/kune/sandbox/donate/client/Donate.java
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/Donate.java	2011-06-29 19:34:40 UTC (rev 1435)
+++ donate/src/cc/kune/sandbox/donate/client/Donate.java	2011-07-01 01:01:29 UTC (rev 1436)
@@ -13,6 +13,7 @@
 	
 	public void onModuleLoad() {
 		 final DonatePanel dPanel = new DonatePanel();
+		 //final DonateButton dPanel = new DonateButton();
 		 RootPanel.get().add(dPanel);
 	}
 }
\ No newline at end of file

Added: donate/src/cc/kune/sandbox/donate/client/DonateButton.java
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/DonateButton.java	                        (rev 0)
+++ donate/src/cc/kune/sandbox/donate/client/DonateButton.java	2011-07-01 01:01:29 UTC (rev 1436)
@@ -0,0 +1,37 @@
+package cc.kune.sandbox.donate.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class DonateButton extends Composite {
+
+	@UiField
+	FlowPanel panelButton;
+	@UiField
+	Anchor lnkButton;
+	
+	public void setReference(String lnk) {
+		this.lnkButton.setHref(lnk);
+	}
+	
+	public void setText(String text) {
+		this.lnkButton.setText(text);
+	}
+
+	private static DonateButtonUiBinder uiBinder = GWT
+			.create(DonateButtonUiBinder.class);
+
+	interface DonateButtonUiBinder extends UiBinder<Widget, DonateButton> {
+	}
+
+	public DonateButton() {
+		initWidget(uiBinder.createAndBindUi(this));
+
+	}
+
+}

Added: donate/src/cc/kune/sandbox/donate/client/DonateButton.ui.xml
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/DonateButton.ui.xml	                        (rev 0)
+++ donate/src/cc/kune/sandbox/donate/client/DonateButton.ui.xml	2011-07-01 01:01:29 UTC (rev 1436)
@@ -0,0 +1,41 @@
+<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
+<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
+	xmlns:g="urn:import:com.google.gwt.user.client.ui">
+	<ui:style>
+
+		.option {
+				background: url("btn-blue.png") no-repeat scroll right top transparent;
+				float: left;
+			    margin-right: 10px;
+			    width: 115px;
+			    height: 28px;
+		}
+		
+		.option a { 
+			background: url("btn-blue.png") no-repeat scroll left top transparent;
+		    color: #13335B;
+		    cursor: pointer;
+		    float: left;
+		    font: 900 14px/22px "Arial",Helvetica,sans-serif;
+		    text-decoration: none;
+		    padding: 1px 8px 5px 18px;
+		}
+		
+		.option a:hover {
+		   color: #951400; 
+		}
+		
+		.option a:active {
+		    color: #029A00;
+		}
+		
+		.lnkBotonBlue {
+			width: 85px;
+			height: 28px;
+		}
+		
+	</ui:style>
+	<g:FlowPanel addStyleNames="{style.option}" ui:field="panelButton">
+		<g:Anchor addStyleNames="{style.lnkBotonBlue}" ui:field="lnkButton"></g:Anchor>
+	</g:FlowPanel>
+</ui:UiBinder> 
\ No newline at end of file

Modified: donate/src/cc/kune/sandbox/donate/client/DonateConstants.java
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/DonateConstants.java	2011-06-29 19:34:40 UTC (rev 1435)
+++ donate/src/cc/kune/sandbox/donate/client/DonateConstants.java	2011-07-01 01:01:29 UTC (rev 1436)
@@ -6,6 +6,40 @@
 
 	String dollarDonation();
 	String euroDonation();
+	String dollar();
+	String euro();
+	String single_type();
+	String regular_type();
+	String split();
+	String num_regular_donations();
+	String num_single_donations();
+	String regular_donations();
+	String single_donations();
+	String paypal_url();
+	String paypal_param_a3();
+	String param1();
+	String valueParam1();
+	String param2();
+	String valueParam2();
+	String param3();
+	String valueParam3();
+	String param4();
+	String valueParam4();
+	String param5();
+	String valueParam5();
+	String param6();
+	String valueParam6();
+	String param7();
+	String valueParam7();
+	String param8();
+	String valueParam8();
+	String param9();
+	String valueParam9();
+	String param10();
+	String valueParam10();
+	String param11();
+	String valueParam11();
 	
+	String projectDonateLnkBank();
 }
 

Modified: donate/src/cc/kune/sandbox/donate/client/DonateConstants.properties
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/DonateConstants.properties	2011-06-29 19:34:40 UTC (rev 1435)
+++ donate/src/cc/kune/sandbox/donate/client/DonateConstants.properties	2011-07-01 01:01:29 UTC (rev 1436)
@@ -1,2 +1,39 @@
+euro = EUR
+dollar = USD
 dollarDonation =  $
-euroDonation = \u20AC
\ No newline at end of file
+euroDonation = \u20AC
+
+single_type = 1
+regular_type = 2
+split = \u003B
+num_regular_donations = 3
+num_single_donations = 4
+regular_donations = 10\u003B15\u003B20
+single_donations = 25\u003B75\u003B150\u003B300
+
+paypal_url = https\u003A\u002F\u002Fwww.paypal.com\u002Fcgi-bin\u002Fwebscr\u003F
+paypal_param_a3 = a3
+param1 = business
+valueParam1 = donate\u0040ourproject\u002Eorg				
+param2 = cmd
+valueParam2 =\u005Fxclick\u002Dsubscriptions
+param3 = item_name 
+valueParam3 = Donate to comunes\u002Eorg
+param4 = currency\u005Fcode
+valueParam4 = 
+param5 = no\u005Fshipping
+valueParam5 = 1
+param6 = t3
+valueParam6 = M
+param7 = p3
+valueParam7 = 1
+param8 = src
+valueParam8 = 1
+param9 = image\u005Furl
+valueParam9 = http\u003A\u002F\u002Fcomunes.org\u002Fcm\u002Fimages\u002Flogo-pp\u002Epng
+param10 = sra 
+valueParam10 = 1
+param11 = lc
+valueParam11 = us
+
+projectDonateLnkBank = http\u003A\u002F\u002Fcomunes.org\u002Fbank-info\u002F

Modified: donate/src/cc/kune/sandbox/donate/client/DonateMessages.java
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/DonateMessages.java	2011-06-29 19:34:40 UTC (rev 1435)
+++ donate/src/cc/kune/sandbox/donate/client/DonateMessages.java	2011-07-01 01:01:29 UTC (rev 1436)
@@ -4,22 +4,31 @@
 
 public interface DonateMessages extends Messages {
 
-	String lnk1EUR();
-	String lnk2EUR();
-	String lnk3EUR();
-	
-	String lnk1Dollar();
-	String lnk2Dollar();
-	String lnk3Dollar();
-	
+	String projectTitle();
+	String projectDonateIntroTxt();
+	String projectRegularDonationText();
+	String projectSingleDonationText();
+
 	String euroRegularDonation();
 	String dollarRegularDonation();
 	
-	String donateIntroTxt();
+	String otherValue();
+	String otherValueTitle();
 	
+	String projectDonateOtherText1();
+	String projectDonateLnkText1();
+	String projectDonateLnk1();
+	String projectDonateOtherText1_1();
+	String projectDonateLnkText1_1();
+	String projectDonateLnk1_1();
 	
-	String defaultValue();
-	String defaultTitle();
+	String projectDonateOtherText2();
 	
+	String projectDonateBank();
+	String projectDonateBankLnkText();
+	String projectDonateBankText1();
+	String projectDonateBankText2();
+	
+	String projectDonateFinalText();
 }
 

Modified: donate/src/cc/kune/sandbox/donate/client/DonateMessages_en.properties
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/DonateMessages_en.properties	2011-06-29 19:34:40 UTC (rev 1435)
+++ donate/src/cc/kune/sandbox/donate/client/DonateMessages_en.properties	2011-07-01 01:01:29 UTC (rev 1436)
@@ -1,15 +1,28 @@
-lnk1EUR = 10 \u20AC/month
-lnk2EUR = 15 \u20AC/month
-lnk3EUR = 20 \u20AC/month
 
-lnk1Dollar = 10 $/month
-lnk2Dollar = 15 $/month
-lnk3Dollar = 20 $/month
+projectTitle = Donate to Comunes 
+projectDonateIntroTxt = Comunes is a non-profit organization dedicated to encourage the commons, those goods collectively owned by everybody, and also serves as an umbrella for other related initiatives. We rely on the generous support of people like you and other collectives to help us continue the work we do.
+projectRegularDonationText = Regular donation per month (the most necessary for us)
+projectSingleDonationText = Single donation
 
-defaultValue = Other value
-defaultTitle = Type other value and press Enter
-dollarDonation = $
 euroRegularDonation = \u20AC/month
 dollarRegularDonation =  $/month
 
-donateIntroTxt = Comunes is a non-profit organization dedicated to encourage the commons, those goods collectively owned by everybody, and also serves as an umbrella for other related initiatives. We rely on the generous support of people like you and other collectives to help us continue the work we do.
\ No newline at end of file
+otherValue = other value
+otherValueTitle = Type other value and press Enter
+
+projectDonateOtherText1 = For other amounts use
+projectDonateLnkText1 = this link for Euros
+projectDonateLnk1 = https\u003A\u002F\u002Fwww.paypal.com\u002Fcgi-bin\u002Fwebscr\u003Fcmd=\u005Fdonations&business=donate\u0040ourproject.org&item_name= Donate to comunes.org&currency_code=EUR&image_url=http\u003A\u002F\u002Fcomunes.org\u002Fcm\u002Fimages\u002Flogo-pp.png
+projectDonateOtherText1_1 = or
+projectDonateLnkText1_1 = this link for USD.
+projectDonateLnk1_1 = https\u003A\u002F\u002Fwww.paypal.com\u002Fcgi-bin\u002Fwebscr\u003Fcmd=\u005Fdonations&business=donate\u0040ourproject.org&item_name= Donate to comunes.org&currency_code=USD&image_url=http\u003A\u002F\u002Fcomunes.org\u002Fcm\u002Fimages\u002Flogo-pp.png
+
+projectDonateOtherText2 = Please consider donating more if you can afford it.
+
+projectDonateBank = Give using your Bank
+projectDonateBankLnkText = See our Bank account info page
+projectDonateBankText1 = Unless you specify the contrary, we will add you to our donor list.
+projectDonateBankText2 = If you have doubts please contact us at donate at ourproject dot org.
+
+projectDonateFinalText = Thanks indeed\u0021 
+ 
\ No newline at end of file

Modified: donate/src/cc/kune/sandbox/donate/client/DonateMessages_es.properties
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/DonateMessages_es.properties	2011-06-29 19:34:40 UTC (rev 1435)
+++ donate/src/cc/kune/sandbox/donate/client/DonateMessages_es.properties	2011-07-01 01:01:29 UTC (rev 1436)
@@ -1,14 +1,28 @@
-lnk1EUR = 10 \u20AC/mes
-lnk2EUR = 15 \u20AC/mes
-lnk3EUR = 20 \u20AC/mes
 
-lnk1Dollar = 10 $/mes
-lnk2Dollar = 15 $/mes
-lnk3Dollar = 20 $/mes
+projectTitle = Donar a Comunes 
+projectDonateIntroTxt = Comunes es una organizaci\u00f3n sin \u00e1nimo de lucro dedicada a fomentar el bien com\u00fan, los bienes de propiedad colectiva de todo el mundo, y tambi\u00e9n sirve de ayuda para otras iniciativas relacionadas. Contamos con el apoyo generoso de gente como usted y otros colectivos para ayudarnos a continuar el trabajo que hacemos.
+projectRegularDonationText = Donaci\u00f3n regular por mes (lo m\u00e1s necesario para nosotros)
+projectSingleDonationText = Donativo
 
-defaultValue = Otro valor
-defaultTitle = Digite otro valor y presione enter
 euroRegularDonation = \u20AC/mes
 dollarRegularDonation =  $/mes
 
-donateIntroTxt = Comunes es una organización sin fines de lucro dedicada a fomentar el bien comun, los bienes de propiedad colectiva de todo el mundo, y tambien sirve de ayuda para otras iniciativas relacionadas. Contamos con el apoyo generoso de gente como usted y otros colectivos para ayudarnos a continuar el trabajo que hacemos.
+otherValue = otro valor
+otherValueTitle = Introduzca otro valor y pulse intro
+
+projectDonateOtherText1 = Para otras cantidades utilice
+projectDonateLnkText1 = este enlace para Euros
+projectDonateLnk1 = https\u003A\u002F\u002Fwww.paypal.com\u002Fcgi-bin\u002Fwebscr\u003Fcmd=\u005Fdonations&business=donate\u0040ourproject.org&item_name= Donate to comunes.org&currency_code=EUR&image_url=http\u003A\u002F\u002Fcomunes.org\u002Fcm\u002Fimages\u002Flogo-pp.png
+projectDonateOtherText1_1 = o
+projectDonateLnkText1_1 = este enlace para USD.
+projectDonateLnk1_1 = https\u003A\u002F\u002Fwww.paypal.com\u002Fcgi-bin\u002Fwebscr\u003Fcmd=\u005Fdonations&business=donate\u0040ourproject.org&item_name= Donate to comunes.org&currency_code=USD&image_url=http\u003A\u002F\u002Fcomunes.org\u002Fcm\u002Fimages\u002Flogo-pp.png
+
+projectDonateOtherText2 = Por favor considere donar, m\u00e1s si se lo puede permitir.
+
+projectDonateBank = Dona usando tu Banco
+projectDonateBankLnkText = Vea p\u00e1gina de informaci\u00f3n sobre cuentas bancarias
+projectDonateBankText1 = A menos que se especifique lo contrario, le a\u00F1adiremos a nuestra lista de donantes.
+projectDonateBankText2 = Si tiene alguna duda para donar, p\u00f3ngase en contacto con nosotros en ourproject.org.
+
+projectDonateFinalText = Gracias de verdad\u0021
+

Modified: donate/src/cc/kune/sandbox/donate/client/DonatePanel.java
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/DonatePanel.java	2011-06-29 19:34:40 UTC (rev 1435)
+++ donate/src/cc/kune/sandbox/donate/client/DonatePanel.java	2011-07-01 01:01:29 UTC (rev 1436)
@@ -1,183 +1,48 @@
 package cc.kune.sandbox.donate.client;
 
 import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.BlurEvent;
-import com.google.gwt.event.dom.client.BlurHandler;
-import com.google.gwt.event.dom.client.FocusEvent;
-import com.google.gwt.event.dom.client.FocusHandler;
 import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
 import com.google.gwt.user.client.ui.Anchor;
 import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.FlowPanel;
-import com.google.gwt.user.client.ui.FormPanel;
-import com.google.gwt.user.client.ui.HTMLPanel;
-import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.Widget;
 
 public class DonatePanel extends Composite {
 	//Cons
 	DonateMessages donateMessages = (DonateMessages) GWT.create(DonateMessages.class);
 	DonateConstants donateConstants = (DonateConstants) GWT.create(DonateConstants.class);
-
-	private final String NAME_TB = "a3";
-	private final int REGULAR_DONATION_EURO = 1;
-	private final int REGULAR_DONATION_DOLLAR = 2;
-	private final int SINGLE_DONATION_EURO = 3;
-	private final int SINGLE_DONATION_DOLLAR = 4;
 	
-	
-	
-	private final String LNK_EURO_REGULAR_DONATION_1 = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=donate%40ourproject.org&currency_code=EUR&no_shipping=1&t3=M&p3=1&src=1&sra=1&a3=10&lc=es&item_name= Donate to comunes.org&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_EURO_REGULAR_DONATION_2 = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=donate%40ourproject.org&currency_code=EUR&no_shipping=1&t3=M&p3=1&src=1&sra=1&a3=15&lc=es&item_name= Donate to comunes.org&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_EURO_REGULAR_DONATION_3 = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=donate%40ourproject.org&currency_code=EUR&no_shipping=1&t3=M&p3=1&src=1&sra=1&a3=20&lc=es&item_name= Donate to comunes.org&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_EURO_SINGLE_DONATION_1 = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name= Donate to comunes.org&currency_code=EUR&amount=25&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_EURO_SINGLE_DONATION_2 = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name= Donate to comunes.org&currency_code=EUR&amount=75&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_EURO_SINGLE_DONATION_3 = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name= Donate to comunes.org&currency_code=EUR&amount=150&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_EURO_SINGLE_DONATION_4 = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name= Donate to comunes.org&currency_code=EUR&amount=300&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_DOLLAR_REGULAR_DONATION_1 = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=donate%40ourproject.org&currency_code=USD&no_shipping=1&t3=M&p3=1&src=1&sra=1&a3=10&lc=es&item_name= Donate to comunes.org&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_DOLLAR_REGULAR_DONATION_2 = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=donate%40ourproject.org&currency_code=USD&no_shipping=1&t3=M&p3=1&src=1&sra=1&a3=15&lc=es&item_name= Donate to comunes.org&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_DOLLAR_REGULAR_DONATION_3 = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=donate%40ourproject.org&currency_code=USD&no_shipping=1&t3=M&p3=1&src=1&sra=1&a3=20&lc=es&item_name= Donate to comunes.org&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_DOLLAR_SINGLE_DONATION_1 = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name= Donate to comunes.org&currency_code=USD&amount=25&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_DOLLAR_SINGLE_DONATION_2 = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name= Donate to comunes.org&currency_code=USD&amount=75&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_DOLLAR_SINGLE_DONATION_3 = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name= Donate to comunes.org&currency_code=USD&amount=150&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_DOLLAR_SINGLE_DONATION_4 = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name= Donate to comunes.org&currency_code=USD&amount=300&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_REGULAR_OTHER_VALUE_EUROS = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=donate%40ourproject.org&currency_code=EUR&no_shipping=1&t3=M&p3=1&src=1&sra=1&lc=es&item_name= Donate to comunes.org&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_REGULAR_OTHER_VALUE_DOLLAR = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=donate%40ourproject.org&currency_code=USD&no_shipping=1&t3=M&p3=1&src=1&sra=1&lc=es&item_name= Donate to comunes.org&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_SINGLE_OTHER_VALUE_EUROS = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name= Donate to comunes.org&currency_code=EUR&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_SINGLE_OTHER_VALUE_DOLLAR = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&[email protected]&item_name= Donate to comunes.org&currency_code=USD&image_url=http://comunes.org/cm/images/logo-pp.png";
-	private final String LNK_BANK = "http://comunes.org/bank-info/";
-	
 	@UiField
-	HTMLPanel divEntries;
-	@UiField
-	HTMLPanel divRightedit;
-	@UiField
-	HTMLPanel divPost;
-	@UiField
-	HTMLPanel divPostTitle;
-	@UiField
 	Label lblPostTitle;
 	@UiField
-	HTMLPanel divIntro;
-	@UiField
 	Label lblPostIntro;
 	@UiField
-	HTMLPanel divTitleRegular;
-	@UiField
 	Label lblRegularTitle;
 	@UiField
-	HTMLPanel divRegularDonationsEuros;
+	ButtonsPanel panelRegularDonationEUR;
 	@UiField
-	HTMLPanel optRegularDonationEuros1;
+	ButtonsPanel panelRegularDonationUSD;
 	@UiField
-	Anchor lnkEuros1;
-	@UiField
-	HTMLPanel optRegularDonationEuros2;
-	@UiField
-	Anchor lnkEuros2; 
-	@UiField
-	HTMLPanel optRegularDonationEuros3;
-	@UiField
-	Anchor lnkEuros3;
-	@UiField
-	HTMLPanel optRegularDonationOtherEuros;
-	@UiField
-	FormPanel formPanelEuros;
-	@UiField
-	FlowPanel flowPanelEuros;
-	@UiField
-	TextBox txtbxOtherValueEuros;
-	@UiField
-	Label lblOtherValueEuros;
-	@UiField
-	HTMLPanel divRegularDonationsDollar;
-	@UiField
-	HTMLPanel optRegularDonationDollar1;
-	@UiField
-	Anchor lnkDollar1;
-	@UiField
-	HTMLPanel optRegularDonationDollar2;
-	@UiField
-	Anchor lnkDollar2; 
-	@UiField
-	HTMLPanel optRegularDonationDollar3;
-	@UiField
-	Anchor lnkDollar3;
-	@UiField
-	HTMLPanel optRegularDonationOtherDollar;
-	@UiField
-	FormPanel formPanelDollar;
-	@UiField
-	FlowPanel flowPanelDollar;
-	@UiField
-	TextBox txtbxOtherValueDollar;
-	@UiField
-	Label lblOtherValueDollar;
-	@UiField
-	HTMLPanel divTitleSingle;
-	@UiField
 	Label lblSingleTitle;
 	@UiField
-	HTMLPanel divSingleDonationEuros;
+	ButtonsPanel panelSingleDonationEUR;
 	@UiField
-	HTMLPanel optSingleDonationEuros1;
+	ButtonsPanel panelSingleDonationUSD;
 	@UiField
-	Anchor lnkSingleEuros1;
+	HTML htmlTextOther1;
 	@UiField
-	HTMLPanel optSingleDonationEuros2;
+	HTML htmlTextOther2;
 	@UiField
-	Anchor lnkSingleEuros2;
+	Label lblBankTitle;
 	@UiField
-	HTMLPanel optSingleDonationEuros3;
-	@UiField
-	Anchor lnkSingleEuros3;
-	@UiField
-	HTMLPanel optSingleDonationEuros4;
-	@UiField
-	Anchor lnkSingleEuros4;
-	@UiField
-	HTMLPanel divSingleDonationDollar;
-	@UiField
-	HTMLPanel optSingleDonationDollar1;
-	@UiField
-	Anchor lnkSingleDollar1;
-	@UiField
-	HTMLPanel optSingleDonationDollar2;
-	@UiField
-	Anchor lnkSingleDollar2;
-	@UiField
-	HTMLPanel optSingleDonationDollar3;
-	@UiField
-	Anchor lnkSingleDollar3;
-	@UiField
-	HTMLPanel optSingleDonationDollar4;
-	@UiField
-	Anchor lnkSingleDollar4;
-	@UiField
-	HTMLPanel divTextOther;
-	@UiField
-	Anchor lnkTextSingleOtherEuros;
-	@UiField
-	Anchor lnkTextSingleOtherDollar;
-	@UiField
-	HTMLPanel divTextOther2;
-	@UiField
-	HTMLPanel divTitleBank;
-	@UiField
-	Label lblTitleBank;
-	@UiField
-	HTMLPanel divTextOther3;
-	@UiField
 	Anchor lnkTextBank;
 	@UiField
-	HTMLPanel divTextOther4;
+	Label lblBankText1;
 	@UiField
-	HTMLPanel divTextOther5;
+	Label lblBankText2;
 	@UiField
-	HTMLPanel divTitleFinal;
-	@UiField
 	Label lblTitleFinal;
 	
 	private static DonatePanelUiBinder uiBinder = GWT.create(DonatePanelUiBinder.class);
@@ -187,158 +52,60 @@
 
 	public DonatePanel() {
 		
-		
 		initWidget(uiBinder.createAndBindUi(this));
 		
+		//Title
+		lblPostTitle.setText(donateMessages.projectTitle());
+		//Intro
+		lblPostIntro.setText(donateMessages.projectDonateIntroTxt());
 		
-		lblPostIntro.setText(donateMessages.donateIntroTxt());
+		//Regular Donations
+		lblRegularTitle.setText(donateMessages.projectRegularDonationText());
 		
+		//Regular donations in euros
+		panelRegularDonationEUR.setLabelText(donateMessages.euroRegularDonation());
+		panelRegularDonationEUR.setFormParams(donateConstants.euro());
+		panelRegularDonationEUR.configButtons(donateConstants.euro(), donateConstants.regular_type());
 		
+		//Regular donations in dollars
+		panelRegularDonationUSD.setLabelText(donateMessages.dollarRegularDonation());
+		panelRegularDonationUSD.setFormParams(donateConstants.dollar());
+		panelRegularDonationUSD.configButtons(donateConstants.dollar(), donateConstants.regular_type());
 		
+		//Single donations
+		lblSingleTitle.setText(donateMessages.projectSingleDonationText());
 		
-		//Config of Dollar Regular Donations
-		lnkEuros1.setHTML(getTextDonation(REGULAR_DONATION_EURO, 10));
-		lnkEuros1.setHref(LNK_EURO_REGULAR_DONATION_1);
+		//Single donations in euros
+		panelSingleDonationEUR.configButtons(donateConstants.euro(), donateConstants.single_type());
 		
-		lnkEuros2.setHTML(getTextDonation(REGULAR_DONATION_EURO, 15));
-		lnkEuros2.setHref(LNK_EURO_REGULAR_DONATION_2);
+		//Single donations in dollars
+		panelSingleDonationUSD.configButtons(donateConstants.dollar(), donateConstants.single_type());
 		
-		lnkEuros3.setHTML(getTextDonation(REGULAR_DONATION_EURO, 20));
-		lnkEuros3.setHref(LNK_EURO_REGULAR_DONATION_3);
+		//other text (variable widgets)
+		String lnk1 = "";
+		String lnk2 = "";
+		Anchor lnkOther = new Anchor();
+		lnkOther.setText(donateMessages.projectDonateLnkText1());
+		lnkOther.setHref(donateMessages.projectDonateLnk1());
+		lnk1 = lnkOther.toString();
+		lnkOther = new Anchor();
+		lnkOther.setText(donateMessages.projectDonateLnkText1_1());
+		lnkOther.setHref(donateMessages.projectDonateLnk1_1());
+		lnk2 = lnkOther.toString();
+		htmlTextOther1.setHTML(donateMessages.projectDonateOtherText1()+ " " +
+				lnk1+ " " + donateMessages.projectDonateOtherText1_1()+
+				" " + lnk2);
 		
-		formPanelEuros.setMethod(FormPanel.METHOD_GET);
-		formPanelEuros.setAction(LNK_REGULAR_OTHER_VALUE_EUROS);
+		htmlTextOther2.setHTML(donateMessages.projectDonateOtherText2());
 		
-		txtbxOtherValueEuros.setVisibleLength(10);
-		txtbxOtherValueEuros.setName(NAME_TB);
-		txtbxOtherValueEuros.setText(donateMessages.defaultValue());
-		txtbxOtherValueEuros.setTitle(donateMessages.defaultTitle());
-	
-		txtbxOtherValueEuros.addFocusHandler(new FocusHandler() {
-			public void onFocus(FocusEvent event) {
-				if(txtbxOtherValueEuros.getText().equals(donateMessages.defaultValue()))
-				{
-					txtbxOtherValueEuros.setText("");
-				}
-			}
-		});	
+		//Bank
+		lblBankTitle.setText(donateMessages.projectDonateBank());
+		lnkTextBank.setHref(donateConstants.projectDonateLnkBank());
+		lnkTextBank.setText(donateMessages.projectDonateBankLnkText());
+		lblBankText1.setText(donateMessages.projectDonateBankText1());
+		lblBankText2.setText(donateMessages.projectDonateBankText2());
 		
-		txtbxOtherValueEuros.addBlurHandler(new BlurHandler() {
-			
-			@Override
-			public void onBlur(BlurEvent event) {
-				String sActualValue = txtbxOtherValueEuros.getText();
-				int iActualValue = 0;
-				if(!sActualValue.equals(""))
-				{	
-					iActualValue = Integer.parseInt(sActualValue);
-				}
-				
-				//validate
-				if(sActualValue == "" || iActualValue == 0)
-				{
-					txtbxOtherValueEuros.setText(donateMessages.defaultValue());
-				}
-			}
-		});
-		
-		//Config of Dollar Regular Donations
-		lnkDollar1.setHTML(getTextDonation(REGULAR_DONATION_DOLLAR, 10));
-		lnkDollar1.setHref(LNK_DOLLAR_REGULAR_DONATION_1);
-		
-		lnkDollar2.setHTML(getTextDonation(REGULAR_DONATION_DOLLAR, 15));
-		lnkDollar2.setHref(LNK_DOLLAR_REGULAR_DONATION_2);
-		
-		lnkDollar3.setHTML(getTextDonation(REGULAR_DONATION_DOLLAR, 20));
-		lnkDollar3.setHref(LNK_DOLLAR_REGULAR_DONATION_3);
-		
-		formPanelDollar.setAction(LNK_REGULAR_OTHER_VALUE_DOLLAR);
-		formPanelDollar.setMethod(FormPanel.METHOD_GET);
-		
-		txtbxOtherValueDollar.setVisibleLength(10);
-		txtbxOtherValueDollar.setName(NAME_TB);
-		txtbxOtherValueDollar.setText(donateMessages.defaultValue());
-		txtbxOtherValueDollar.setTitle(donateMessages.defaultTitle());
-	
-		txtbxOtherValueDollar.addFocusHandler(new FocusHandler() {
-			public void onFocus(FocusEvent event) {
-				if(txtbxOtherValueDollar.getText().equals(donateMessages.defaultValue()))
-				{
-					txtbxOtherValueDollar.setText("");
-				}
-			}
-		});	
-		
-		txtbxOtherValueDollar.addBlurHandler(new BlurHandler() {
-			public void onBlur(BlurEvent event) {
-				String sActualValue = txtbxOtherValueDollar.getText();
-				int iActualValue = 0;
-				if(!sActualValue.equals(""))
-				{	
-					iActualValue = Integer.parseInt(sActualValue);
-				}
-				//validate
-				if(sActualValue == "" || iActualValue == 0)
-				{
-					txtbxOtherValueDollar.setText(donateMessages.defaultValue());
-				}
-			}
-		});
-		
-		//Config of Euros Single Donations
-		lnkSingleEuros1.setHTML(getTextDonation(SINGLE_DONATION_EURO, 25));
-		lnkSingleEuros1.setHref(LNK_EURO_SINGLE_DONATION_1);
-		
-		lnkSingleEuros2.setHTML(getTextDonation(SINGLE_DONATION_EURO, 75));
-		lnkSingleEuros2.setHref(LNK_EURO_SINGLE_DONATION_2);
-		
-		lnkSingleEuros3.setHTML(getTextDonation(SINGLE_DONATION_EURO, 150));
-		lnkSingleEuros3.setHref(LNK_EURO_SINGLE_DONATION_3);
-		
-		lnkSingleEuros4.setHTML(getTextDonation(SINGLE_DONATION_EURO, 300));
-		lnkSingleEuros4.setHref(LNK_EURO_SINGLE_DONATION_4);
-		
-		//Config of Dollar Single Donations
-		lnkSingleDollar1.setHTML(getTextDonation(SINGLE_DONATION_DOLLAR, 25));
-		lnkSingleDollar1.setHref(LNK_DOLLAR_SINGLE_DONATION_1);
-		
-		lnkSingleDollar2.setHTML(getTextDonation(SINGLE_DONATION_DOLLAR, 75));
-		lnkSingleDollar2.setHref(LNK_DOLLAR_SINGLE_DONATION_2);
-		
-		lnkSingleDollar3.setHTML(getTextDonation(SINGLE_DONATION_DOLLAR, 150));
-		lnkSingleDollar3.setHref(LNK_DOLLAR_SINGLE_DONATION_3);
-		
-		lnkSingleDollar4.setHTML(getTextDonation(SINGLE_DONATION_DOLLAR, 300));
-		lnkSingleDollar4.setHref(LNK_DOLLAR_SINGLE_DONATION_4);
-		
-		//other text
-		lnkTextSingleOtherEuros.setHref(LNK_SINGLE_OTHER_VALUE_EUROS);
-		lnkTextSingleOtherDollar.setHref(LNK_SINGLE_OTHER_VALUE_DOLLAR);
-		
-		lnkTextBank.setHref(LNK_BANK);
+		lblTitleFinal.setText(donateMessages.projectDonateFinalText());
 	}
-	
-	/* 
-	 * Function to get the text of link for donations by type
-	 */
-	private String getTextDonation (int iTypeDonation, int iValueDonation)
-	{
-		String sText = "" + iValueDonation;
-		switch (iTypeDonation)
-		{
-			case REGULAR_DONATION_EURO:
-				sText += " " +donateMessages.euroRegularDonation();
-			break;
-			case SINGLE_DONATION_EURO:
-				sText += " " +donateConstants.euroDonation();
-			break;
-			case REGULAR_DONATION_DOLLAR:
-				sText += " " +donateMessages.dollarRegularDonation();
-			break;
-			case SINGLE_DONATION_DOLLAR:
-				sText +=  " " +donateConstants.dollarDonation();
-			break;
-		}
-		return sText;
-	}
+
 }

Modified: donate/src/cc/kune/sandbox/donate/client/DonatePanel.ui.xml
===================================================================
--- donate/src/cc/kune/sandbox/donate/client/DonatePanel.ui.xml	2011-06-29 19:34:40 UTC (rev 1435)
+++ donate/src/cc/kune/sandbox/donate/client/DonatePanel.ui.xml	2011-07-01 01:01:29 UTC (rev 1436)
@@ -2,25 +2,7 @@
 <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
 	xmlns:g="urn:import:com.google.gwt.user.client.ui">
 	<ui:style>
-		a {
-		    color: #FE7047;
-		    font-weight: bold;
-		    outline: medium none;
-		    text-decoration: none;
-		}
 		
-		a:hover {
-		    background: inherit;
-		    color: #029A00;
-		    outline: 0 none;
-		    text-decoration: none;
-		}
-		
-		a:visited {
-		    outline: 0 none;
-		    text-decoration: none;
-		}
-		
 		.entries {
 			float: left;
     		line-height: 1.7em;
@@ -60,268 +42,85 @@
 		    padding-top: 1em;
 		    border-bottom: medium none;
 		    letter-spacing: normal;
-		    margin-bottom: -0.5em;
+		    margin-bottom: 0 em;
 		    color: #555555;
 		    font-size: 17px;
 		    font-weight: bold;
 		    text-transform: none
 		}	
 		
-		.pnlOptions {
-			border-bottom: 1px solid #E7E7E7;
-			background-color: #FFFFFF;
-		    clear: left;
-		    float: left;
-		    list-style: none outside none;
-		    margin: 10px 10px;
-		    margin-top: 15px;
-		    padding: 5px;	
-		    display: inline;
-		    with: 550px;
-		    height: 28px;
-		}
-		
-		.option {
-			background: url("btn-blue.png") no-repeat scroll right top transparent;
-			float: left;
-		    margin-right: 10px;
-		    width: 115px;
-		    height: 28px;
-		}
-		
-		.optionSingle {
-			background: url("btn-blue.png") no-repeat scroll right top transparent;
-			float: left;
-		    margin-right: 10px;
-		    width: 75px;
-		    height: 28px;
-		}
-		
-		.option a { 
-			background: url("btn-blue.png") no-repeat scroll left top transparent;
-		    color: #13335B;
-		    cursor: pointer;
-		    float: left;
-		    font: 900 14px/22px "Arial",Helvetica,sans-serif;
-		    text-decoration: none;
-		    padding: 1px 8px 5px 18px;
-		}
-		
-		.option a:hover {
-		   color: #951400; 
-		}
-		
-		.option a:active {
-		    color: #029A00;
-		}
-		
-		.optionSingle a { 
-			background: url("btn-blue.png") no-repeat scroll left top transparent;
-		    color: #13335B;
-		    cursor: pointer;
-		    float: left;
-		    font: 900 14px/22px "Arial",Helvetica,sans-serif;
-		    text-decoration: none;
-		    padding: 1px 8px 5px 18px;
-		}
-		
-		.optionSingle a:hover {
-		   color: #951400; 
-		}
-		
-		.optionSingle a:active {
-		    color: #029A00;
-		}
-		
-		.lnkBotonBlue {
-			width: 85px;
-			height: 28px;
-		}
-		
-		.lnkBotonBlueSingle {
-			width: 45px;
-			height: 28px;
-		}
-		
-		.optionOther {
-			float: left;
-			width: 174px;
-			height: 28px;
-		}
-		
-		.otherValue {
-			width: 83px;
-			height: 16px;
-			text-align: center;
-			margin: 5px 10px;
-			float: left;
-		}
-		
-		.labelOther {
-			float: left;
-		}
-		
 		.divTextDonate {
 			clear: both;
-			float: none;	
+			float: none;
+			margin-top: 10px;
+			margin-bottom: 10px;	
 		}
 		
-		.textDonateNewLine {
+		.textBank{
 			clear: both;
 			float: none;
-			margin-top: 10px;
-			margin-bottom: 10px;
+			margin-top: 15px;
+			margin-bottom: 15px;
 		}
 				
 	</ui:style>
 	
-	<g:HTMLPanel addStyleNames="{style.entries}" ui:field="divEntries">
-		<g:HTMLPanel addStyleNames="{style.rightedit}" ui:field="divRightedit">
+	<g:HTMLPanel addStyleNames="{style.entries}">
+		<g:FlowPanel addStyleNames="{style.rightedit}">
+		</g:FlowPanel>
+		<g:HTMLPanel addStyleNames="{style.post}">
+			<g:FlowPanel>
+				 <g:Label addStyleNames="{style.titlePost}" ui:field="lblPostTitle"></g:Label>
+			</g:FlowPanel>
+			
+			<g:FlowPanel>
+				<g:Label addStyleNames="{style.introPost}" ui:field="lblPostIntro"></g:Label>
+			</g:FlowPanel>
+			
+			<g:FlowPanel>
+				<g:Label addStyleNames="{style.titleRegular}" ui:field="lblRegularTitle"></g:Label>
+			</g:FlowPanel>
+			
+			<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
+ 				xmlns:ku="urn:import:cc.kune.sandbox.donate.client"
+ 				xmlns:g="urn:import:com.google.gwt.user.client.ui">
+			
+				<ku:ButtonsPanel btnPanelVision="0" ui:field="panelRegularDonationEUR"/> 
+				<ku:ButtonsPanel btnPanelVision="0" ui:field="panelRegularDonationUSD"/> 
+			</ui:UiBinder>
+			
+			<g:FlowPanel>
+				<g:Label addStyleNames="{style.titleRegular}" ui:field="lblSingleTitle"></g:Label>
+			</g:FlowPanel>
+			
+			<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
+ 				xmlns:ku="urn:import:cc.kune.sandbox.donate.client"
+ 				xmlns:g="urn:import:com.google.gwt.user.client.ui">
+ 				
+				<ku:ButtonsPanel btnPanelVision="1" ui:field="panelSingleDonationEUR"/> 
+				<ku:ButtonsPanel btnPanelVision="1" ui:field="panelSingleDonationUSD"/> 
+			</ui:UiBinder>
+			
+			<g:FlowPanel addStyleNames="{style.divTextDonate}">
+				<g:HTML ui:field="htmlTextOther1"></g:HTML>
+			</g:FlowPanel>
+			
+			<g:FlowPanel addStyleNames="{style.divTextDonate}">
+				<g:HTML ui:field="htmlTextOther2"></g:HTML>
+			</g:FlowPanel>
+			
+			<g:FlowPanel addStyleNames="{style.divTextDonate}">
+				<g:Label addStyleNames="{style.titleRegular}" ui:field="lblBankTitle"></g:Label>
+				<g:FlowPanel addStyleNames="{style.textBank}">
+					<g:Anchor ui:field="lnkTextBank"></g:Anchor>
+				</g:FlowPanel>
+				<g:Label addStyleNames="{style.textBank}" ui:field="lblBankText1"></g:Label>
+				<g:Label addStyleNames="{style.textBank}" ui:field="lblBankText2"></g:Label>
+			</g:FlowPanel>
+			
+			<g:FlowPanel>
+				<g:Label addStyleNames="{style.titleRegular}" ui:field="lblTitleFinal"></g:Label>
+			</g:FlowPanel>
 		</g:HTMLPanel>
-		<g:HTMLPanel addStyleNames="{style.post}" ui:field="divPost">
-			<g:HTMLPanel ui:field="divPostTitle">
-				 <g:Label addStyleNames="{style.titlePost}" ui:field="lblPostTitle">
-				 	Donate to comunes
-				 </g:Label>
-			</g:HTMLPanel>
-			<g:HTMLPanel ui:field="divIntro">
-				<g:Label addStyleNames="{style.introPost}" ui:field="lblPostIntro">
-					
-				</g:Label>
-			</g:HTMLPanel>
-			<g:HTMLPanel ui:field="divTitleRegular">
-				<g:Label addStyleNames="{style.titleRegular}" ui:field="lblRegularTitle">
-					Regular donation per month (the most necessary for us)
-				</g:Label>
-			</g:HTMLPanel>
-			<g:HTMLPanel addStyleNames="{style.pnlOptions}" ui:field="divRegularDonationsEuros">
-				<g:HTMLPanel addStyleNames="{style.option}" ui:field="optRegularDonationEuros1">
-					<g:Anchor addStyleNames="{style.lnkBotonBlue}" ui:field="lnkEuros1"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.option}" ui:field="optRegularDonationEuros2">
-					<g:Anchor addStyleNames="{style.lnkBotonBlue}" ui:field="lnkEuros2"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.option}" ui:field="optRegularDonationEuros3">
-					<g:Anchor addStyleNames="{style.lnkBotonBlue}" ui:field="lnkEuros3"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.optionOther}" ui:field="optRegularDonationOtherEuros">
-					<g:FormPanel ui:field="formPanelEuros">
-						<g:FlowPanel ui:field="flowPanelEuros">
-							<g:TextBox addStyleNames="{style.otherValue}" ui:field="txtbxOtherValueEuros">
-							</g:TextBox>
-							<g:Hidden name="business" value="donate at ourproject.org"></g:Hidden>
-							<g:Hidden name="cmd" value="_xclick-subscriptions"></g:Hidden>
-							<g:Hidden name="item_name" value=" Donate to comunes.org"></g:Hidden>
-							<g:Hidden name="currency_code" value="EUR"></g:Hidden>
-							<g:Hidden name="no_shipping" value="1"></g:Hidden>
-							<g:Hidden name="t3" value="M"></g:Hidden>
-							<g:Hidden name="p3" value="1"></g:Hidden>
-							<g:Hidden name="src" value="1"></g:Hidden>
-							<g:Hidden name="image_url" value="http://comunes.org/cm/images/logo-pp.png"></g:Hidden>
-							<g:Hidden name="sra" value="1"></g:Hidden>
-							<g:Hidden name="lc" value="us"></g:Hidden>
-							<g:Label addStyleNames="{style.labelOther}" ui:field="lblOtherValueEuros">
-								€/month
-							</g:Label>
-						</g:FlowPanel>
-					
-					</g:FormPanel>
-				</g:HTMLPanel>
-			</g:HTMLPanel>
-			<g:HTMLPanel addStyleNames="{style.pnlOptions}" ui:field="divRegularDonationsDollar">
-				<g:HTMLPanel addStyleNames="{style.option}" ui:field="optRegularDonationDollar1">
-					<g:Anchor addStyleNames="{style.lnkBotonBlue}" ui:field="lnkDollar1"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.option}" ui:field="optRegularDonationDollar2">
-					<g:Anchor addStyleNames="{style.lnkBotonBlue}" ui:field="lnkDollar2"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.option}" ui:field="optRegularDonationDollar3">
-					<g:Anchor addStyleNames="{style.lnkBotonBlue}" ui:field="lnkDollar3"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.optionOther}" ui:field="optRegularDonationOtherDollar">
-					<g:FormPanel ui:field="formPanelDollar">
-						<g:FlowPanel ui:field="flowPanelDollar">
-							<g:TextBox addStyleNames="{style.otherValue}" ui:field="txtbxOtherValueDollar">
-							</g:TextBox>
-							<g:Hidden name="business" value="donate at ourproject.org"></g:Hidden>
-							<g:Hidden name="cmd" value="_xclick-subscriptions"></g:Hidden>
-							<g:Hidden name="item_name" value=" Donate to comunes.org"></g:Hidden>
-							<g:Hidden name="currency_code" value="USD"></g:Hidden>
-							<g:Hidden name="no_shipping" value="1"></g:Hidden>
-							<g:Hidden name="t3" value="M"></g:Hidden>
-							<g:Hidden name="p3" value="1"></g:Hidden>
-							<g:Hidden name="src" value="1"></g:Hidden>
-							<g:Hidden name="image_url" value="http://comunes.org/cm/images/logo-pp.png"></g:Hidden>
-							<g:Hidden name="sra" value="1"></g:Hidden>
-							<g:Hidden name="lc" value="us"></g:Hidden>
-							<g:Label addStyleNames="{style.labelOther}" ui:field="lblOtherValueDollar">
-								$/month
-							</g:Label>
-						</g:FlowPanel>
-					</g:FormPanel>
-				</g:HTMLPanel>
-			</g:HTMLPanel>
-			<g:HTMLPanel ui:field="divTitleSingle">
-				<g:Label addStyleNames="{style.titleRegular}" ui:field="lblSingleTitle">
-					Single donation
-				</g:Label>
-			</g:HTMLPanel>
-			<g:HTMLPanel addStyleNames="{style.pnlOptions}" ui:field="divSingleDonationEuros">
-				<g:HTMLPanel addStyleNames="{style.optionSingle}" ui:field="optSingleDonationEuros1">
-					<g:Anchor addStyleNames="{style.lnkBotonBlueSingle}" ui:field="lnkSingleEuros1"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.optionSingle}" ui:field="optSingleDonationEuros2">
-					<g:Anchor addStyleNames="{style.lnkBotonBlueSingle}" ui:field="lnkSingleEuros2"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.optionSingle}" ui:field="optSingleDonationEuros3">
-					<g:Anchor addStyleNames="{style.lnkBotonBlueSingle}" ui:field="lnkSingleEuros3"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.optionSingle}" ui:field="optSingleDonationEuros4">
-					<g:Anchor addStyleNames="{style.lnkBotonBlueSingle}" ui:field="lnkSingleEuros4"></g:Anchor>
-				</g:HTMLPanel>
-			</g:HTMLPanel>
-			<g:HTMLPanel addStyleNames="{style.pnlOptions}" ui:field="divSingleDonationDollar">
-				<g:HTMLPanel addStyleNames="{style.optionSingle}" ui:field="optSingleDonationDollar1">
-					<g:Anchor addStyleNames="{style.lnkBotonBlueSingle}" ui:field="lnkSingleDollar1"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.optionSingle}" ui:field="optSingleDonationDollar2">
-					<g:Anchor addStyleNames="{style.lnkBotonBlueSingle}" ui:field="lnkSingleDollar2"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.optionSingle}" ui:field="optSingleDonationDollar3">
-					<g:Anchor addStyleNames="{style.lnkBotonBlueSingle}" ui:field="lnkSingleDollar3"></g:Anchor>
-				</g:HTMLPanel>
-				<g:HTMLPanel addStyleNames="{style.optionSingle}" ui:field="optSingleDonationDollar4">
-					<g:Anchor addStyleNames="{style.lnkBotonBlueSingle}" ui:field="lnkSingleDollar4"></g:Anchor>
-				</g:HTMLPanel>
-			</g:HTMLPanel>
-			<g:HTMLPanel addStyleNames="{style.divTextDonate}" ui:field="divTextOther">
-				For other amounts use
-				<g:Anchor ui:field="lnkTextSingleOtherEuros">this link for Euros</g:Anchor>
-				or
-				<g:Anchor ui:field="lnkTextSingleOtherDollar">this one for USD.</g:Anchor>
-			</g:HTMLPanel>
-			<g:HTMLPanel addStyleNames="{style.textDonateNewLine}" ui:field="divTextOther2">
-				Please consider donating more if you can afford it.
-			</g:HTMLPanel>
-			<g:HTMLPanel ui:field="divTitleBank">
-				<g:Label addStyleNames="{style.titleRegular}" ui:field="lblTitleBank">
-					Give using your Bank
-				</g:Label>
-			</g:HTMLPanel>
-			<g:HTMLPanel addStyleNames="{style.textDonateNewLine}" ui:field="divTextOther3">
-				<g:Anchor ui:field="lnkTextBank">See our Bank account info page</g:Anchor>
-			</g:HTMLPanel>
-			<g:HTMLPanel addStyleNames="{style.textDonateNewLine}" ui:field="divTextOther4">
-				Unless you specify the contrary, we will add you to our donor list.
-			</g:HTMLPanel>
-			<g:HTMLPanel addStyleNames="{style.textDonateNewLine}" ui:field="divTextOther5">
-				If you have doubts please contact us at donate at ourproject dot org. 
-			</g:HTMLPanel>
-			<g:HTMLPanel ui:field="divTitleFinal">
-				<g:Label addStyleNames="{style.titleRegular}" ui:field="lblTitleFinal">
-					Thanks indeed!
-				</g:Label>
-			</g:HTMLPanel>
-		</g:HTMLPanel>
 	</g:HTMLPanel>
 </ui:UiBinder> 
\ No newline at end of file




More information about the kune-commits mailing list