[Movecommons-commits] r137 - in trunk/gwt/mc-form: src/org/movecommons src/org/movecommons/client war

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Mon Oct 3 02:01:28 CEST 2011


Author: vjrj_
Date: 2011-10-03 02:01:28 +0200 (Mon, 03 Oct 2011)
New Revision: 137

Added:
   trunk/gwt/mc-form/src/org/movecommons/client/Keyword.java
   trunk/gwt/mc-form/src/org/movecommons/client/Keyword.ui.xml
   trunk/gwt/mc-form/src/org/movecommons/client/KeywordsField.java
   trunk/gwt/mc-form/src/org/movecommons/client/KeywordsField.ui.xml
   trunk/gwt/mc-form/src/org/movecommons/client/add-green.png
   trunk/gwt/mc-form/src/org/movecommons/client/del-green.png
Modified:
   trunk/gwt/mc-form/src/org/movecommons/Mc_form.gwt.xml
   trunk/gwt/mc-form/src/org/movecommons/client/Images.java
   trunk/gwt/mc-form/src/org/movecommons/client/McFormMessages.java
   trunk/gwt/mc-form/src/org/movecommons/client/McFormMessages.properties
   trunk/gwt/mc-form/src/org/movecommons/client/McFormPanel.java
   trunk/gwt/mc-form/src/org/movecommons/client/McFormPresenter.java
   trunk/gwt/mc-form/war/Mc_form.css
Log:
keywords

Modified: trunk/gwt/mc-form/src/org/movecommons/Mc_form.gwt.xml
===================================================================
--- trunk/gwt/mc-form/src/org/movecommons/Mc_form.gwt.xml	2011-10-02 22:17:33 UTC (rev 136)
+++ trunk/gwt/mc-form/src/org/movecommons/Mc_form.gwt.xml	2011-10-03 00:01:28 UTC (rev 137)
@@ -21,5 +21,5 @@
 
   <!-- Specify the paths for translatable code -->
   <source path='client'/>
-
+  <!-- <public path='public'/> -->
 </module>

Modified: trunk/gwt/mc-form/src/org/movecommons/client/Images.java
===================================================================
--- trunk/gwt/mc-form/src/org/movecommons/client/Images.java	2011-10-02 22:17:33 UTC (rev 136)
+++ trunk/gwt/mc-form/src/org/movecommons/client/Images.java	2011-10-03 00:01:28 UTC (rev 137)
@@ -22,4 +22,10 @@
 
   ImageResource rp50();
 
+  @Source("add-green.png")
+  ImageResource addGreen();
+
+  @Source("del-green.png")
+  ImageResource delGreen();
+
 }

Added: trunk/gwt/mc-form/src/org/movecommons/client/Keyword.java
===================================================================
--- trunk/gwt/mc-form/src/org/movecommons/client/Keyword.java	                        (rev 0)
+++ trunk/gwt/mc-form/src/org/movecommons/client/Keyword.java	2011-10-03 00:01:28 UTC (rev 137)
@@ -0,0 +1,55 @@
+package org.movecommons.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.event.dom.client.MouseOutEvent;
+import com.google.gwt.event.dom.client.MouseOverEvent;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FocusPanel;
+import com.google.gwt.user.client.ui.HasText;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.InlineLabel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class Keyword extends Composite {
+
+  interface KeywordListener {
+    void onRemove();
+  }
+
+  interface KeywordUiBinder extends UiBinder<Widget, Keyword> {
+  }
+  private static KeywordUiBinder uiBinder = GWT.create(KeywordUiBinder.class);
+  @UiField
+  Image delBtn;
+  @UiField
+  FocusPanel focus;
+  @UiField
+  InlineLabel keyword;
+
+  public Keyword(final String key) {
+    initWidget(uiBinder.createAndBindUi(this));
+    this.keyword.setText(key);
+  }
+
+  public HasClickHandlers getDelBtn() {
+    return delBtn;
+  }
+
+  public HasText getText() {
+    return keyword;
+  }
+
+  @UiHandler("focus")
+  void onKeywordMouseOut(final MouseOutEvent event) {
+    delBtn.setVisible(false);
+  }
+
+  @UiHandler("focus")
+  void onKeywordMouseOver(final MouseOverEvent event) {
+    delBtn.setVisible(true);
+  }
+}

Added: trunk/gwt/mc-form/src/org/movecommons/client/Keyword.ui.xml
===================================================================
--- trunk/gwt/mc-form/src/org/movecommons/client/Keyword.ui.xml	                        (rev 0)
+++ trunk/gwt/mc-form/src/org/movecommons/client/Keyword.ui.xml	2011-10-03 00:01:28 UTC (rev 137)
@@ -0,0 +1,14 @@
+<!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:with field='img' type='org.movecommons.client.Images'/>
+
+  <ui:style>
+  </ui:style>
+      <g:FocusPanel ui:field="focus">
+        <g:FlowPanel width="100%" height="100%">
+        <g:InlineLabel ui:field="keyword" styleName="mc-keyword" />
+        <g:Image ui:field="delBtn" resource='{img.delGreen}' visible="false" styleName="mc-keyword-delbtn"/>
+      </g:FlowPanel>
+      </g:FocusPanel>
+</ui:UiBinder>
\ No newline at end of file

Added: trunk/gwt/mc-form/src/org/movecommons/client/KeywordsField.java
===================================================================
--- trunk/gwt/mc-form/src/org/movecommons/client/KeywordsField.java	                        (rev 0)
+++ trunk/gwt/mc-form/src/org/movecommons/client/KeywordsField.java	2011-10-03 00:01:28 UTC (rev 137)
@@ -0,0 +1,24 @@
+package org.movecommons.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Widget;
+
+public class KeywordsField extends Composite {
+
+  interface KeywordsFieldUiBinder extends UiBinder<Widget, KeywordsField> {
+  }
+
+  private static KeywordsFieldUiBinder uiBinder = GWT.create(KeywordsFieldUiBinder.class);
+
+  public KeywordsField() {
+    initWidget(uiBinder.createAndBindUi(this));
+  }
+
+  public KeywordsField(final String firstName) {
+    initWidget(uiBinder.createAndBindUi(this));
+
+  }
+
+}

Added: trunk/gwt/mc-form/src/org/movecommons/client/KeywordsField.ui.xml
===================================================================
--- trunk/gwt/mc-form/src/org/movecommons/client/KeywordsField.ui.xml	                        (rev 0)
+++ trunk/gwt/mc-form/src/org/movecommons/client/KeywordsField.ui.xml	2011-10-03 00:01:28 UTC (rev 137)
@@ -0,0 +1,10 @@
+<!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>
+  </ui:style>
+  <g:FlowPanel>
+    <g:FlowPanel/>
+    <g:TextBox/>
+  </g:FlowPanel>
+</ui:UiBinder>
\ No newline at end of file

Modified: trunk/gwt/mc-form/src/org/movecommons/client/McFormMessages.java
===================================================================
--- trunk/gwt/mc-form/src/org/movecommons/client/McFormMessages.java	2011-10-02 22:17:33 UTC (rev 136)
+++ trunk/gwt/mc-form/src/org/movecommons/client/McFormMessages.java	2011-10-03 00:01:28 UTC (rev 137)
@@ -7,10 +7,16 @@
 
   public static McFormMessages INSTANCE = GWT.create(McFormMessages.class);
 
-  String checkThoseYouThinkCorespondToYourInitiative();
+  String bodyHealthCommonsBloodOrgans();
 
+  String checkThoseYouThinkCorrespondToYourInitiative();
+
   String creativeCommonsInThisWebpageOtherLicenseInThisWebpage();
 
+  String digitalCommonsWikipediaFreeSoftware();
+
+  String documentation();
+
   String ifActiveShow();
 
   String keywords();
@@ -19,16 +25,22 @@
 
   String location();
 
+  String methodsProcedures();
+
   String nameOfTheInitiative();
 
-  String natureCommonsForestSeedsBodyHealthCommonsBloodOrgansTownCommunitySocietyCommonsStreetsScienceDigital();
+  String natureCommonsForestSeeds();
 
   String optional();
 
-  String organizationStructureProjectsAndResultsMethodsProceduresDocumentation();
+  String organizationStructure();
 
   String ourInitiativeReinforcesTheCommonsInTheFollowingAreaS();
 
+  String projectsAndResults();
+
+  String townCommunitySocietyCommonsStreetsScience();
+
   String weAcceptDonationsCheckThisWebpage();
 
   String weAreGrassroots();

Modified: trunk/gwt/mc-form/src/org/movecommons/client/McFormMessages.properties
===================================================================
--- trunk/gwt/mc-form/src/org/movecommons/client/McFormMessages.properties	2011-10-02 22:17:33 UTC (rev 136)
+++ trunk/gwt/mc-form/src/org/movecommons/client/McFormMessages.properties	2011-10-03 00:01:28 UTC (rev 137)
@@ -1,29 +1,33 @@
-nameOfTheInitiative = Name of the initiative:
-website = Website:
+bodyHealthCommonsBloodOrgans = Body/Health Commons (blood, organs)
+checkThoseYouThinkCorrespondToYourInitiative = Check those you think correspond to your initiative:
+creativeCommonsInThisWebpageOtherLicenseInThisWebpage = Creative Commons, in this webpage: Other license, in this webpage:
+digitalCommonsWikipediaFreeSoftware = Digital Commons (Wikipedia, free software)
+documentation = Documentation
+ifActiveShow = If active, show:
+keywords = Keywords: (+)
 languageS = Language(s): (+)
 location = Location:
-keywords = Keywords: (+)
-checkThoseYouThinkCorespondToYourInitiative = Check those you think corespond to your initiative:
+methodsProcedures = Methods / Procedures
+nameOfTheInitiative = Name of the initiative:
+natureCommonsForestSeeds = Nature Commons (forest, seeds)
+optional = Optional:
+organizationStructure = Organization structure
+ourInitiativeReinforcesTheCommonsInTheFollowingAreaS = Our initiative reinforces the Commons in the following area(s):
+projectsAndResults = Projects and results
+townCommunitySocietyCommonsStreetsScience = Town/Community/Society Commons (streets, science)
+weAcceptDonationsCheckThisWebpage = We accept donations, check this webpage:
+weAreGrassroots = We are Grassroots
 weAreNonProfit = We are Non-profit
-ifActiveShow = If active, show:
-optional = Optional:
 weAreRegisteredAsNonProfitCheckThisWebpage = We are registered as Non-profit, check this webpage:
+weAreReinforcingTheCommons = We are Reinforcing the Commons
+weAreReproducible = We are Reproducible
+website = Website:
+weHaveABoardWhoseMeetingsAreTransparent = We have a board whose meetings are transparent
 weHaveOpenAccountingCheckThisWebpage = We have Open-accounting, check this webpage:
-weAcceptDonationsCheckThisWebpage = We accept donations, check this webpage:
-weAreReproducible = We are Reproducible
-ifActiveShow = If active, show:
-optional = Optional:
+weHaveRepresentativesChosenDemocratically = We have representatives chosen democratically
 weHaveTermsOfUseOfOurContentsInThisWebpage = We have Terms of Use of our contents in this webpage:
-weUseThisLicenseForSharingOurContents = We use this license for sharing our contents:
-creativeCommonsInThisWebpageOtherLicenseInThisWebpage = Creative Commons, in this webpage: Other license, in this webpage:
 weShare = We share:
-organizationStructureProjectsAndResultsMethodsProceduresDocumentation = Organization structure Projects and results Methods / Procedures Documentation
-weAreGrassroots = We are Grassroots
 weTakeDecisionsMainlyThroughGeneralAssemblies = We take decisions mainly through general assemblies
+weTakeDecisionsThroughConsensusInsteadOfMajority = We take decisions through consensus, instead of majority
 weTakeDecisionsThroughMajorityVoting = We take decisions through majority voting
-weTakeDecisionsThroughConsensusInsteadOfMajority = We take decisions through consensus, instead of majority
-weHaveRepresentativesChosenDemocratically = We have representatives chosen democratically
-weHaveABoardWhoseMeetingsAreTransparent = We have a board whose meetings are transparent
-weAreReinforcingTheCommons = We are Reinforcing the Commons
-ourInitiativeReinforcesTheCommonsInTheFollowingAreaS = Our initiative reinforces the Commons in the following area(s):
-natureCommonsForestSeedsBodyHealthCommonsBloodOrgansTownCommunitySocietyCommonsStreetsScienceDigital = Nature Commons (forest, seeds) Body/Health Commons (blood, organs) Town/Community/Society Commons (streets, science) Digital Commons (Wikipedia, free software)
+weUseThisLicenseForSharingOurContents = We use this license for sharing our contents:
\ No newline at end of file

Modified: trunk/gwt/mc-form/src/org/movecommons/client/McFormPanel.java
===================================================================
--- trunk/gwt/mc-form/src/org/movecommons/client/McFormPanel.java	2011-10-02 22:17:33 UTC (rev 136)
+++ trunk/gwt/mc-form/src/org/movecommons/client/McFormPanel.java	2011-10-03 00:01:28 UTC (rev 137)
@@ -3,6 +3,8 @@
 import org.movecommons.client.McFormPresenter.McFormView;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.event.dom.client.HasClickHandlers;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
@@ -106,6 +108,15 @@
         languages.setSelectedIndex(i);
       }
     }
+    final Keyword key = new Keyword("kk");
+    final Keyword key2 = new Keyword("kk2");
+    final Keyword key3 = new Keyword("daasdakk3");
+    setUp(key);
+    setUp(key2);
+    setUp(key3);
+    mainPanel.add(key);
+    mainPanel.add(key2);
+    mainPanel.add(key3);
   }
 
   @Override
@@ -167,4 +178,13 @@
   public HasText getWebsiteLabel() {
     return websiteLabel;
   }
+
+  private void setUp(final Keyword key) {
+    key.getDelBtn().addClickHandler(new ClickHandler() {
+      @Override
+      public void onClick(final ClickEvent event) {
+        key.removeFromParent();
+      }
+    });
+  }
 }

Modified: trunk/gwt/mc-form/src/org/movecommons/client/McFormPresenter.java
===================================================================
--- trunk/gwt/mc-form/src/org/movecommons/client/McFormPresenter.java	2011-10-02 22:17:33 UTC (rev 136)
+++ trunk/gwt/mc-form/src/org/movecommons/client/McFormPresenter.java	2011-10-03 00:01:28 UTC (rev 137)
@@ -88,10 +88,11 @@
         view.getOptionalPanel().asWidget().setVisible(isGR);
       }
     });
-    // FIXME i18n
+
     view.getInitiativeNameLabel().setText(i18n.nameOfTheInitiative());
     view.getLocationLabel().setText(i18n.location());
     view.getLanguagesLabel().setText(i18n.languageS());
     view.getWebsiteLabel().setText(i18n.website());
+
   }
 }

Added: trunk/gwt/mc-form/src/org/movecommons/client/add-green.png
===================================================================
(Binary files differ)


Property changes on: trunk/gwt/mc-form/src/org/movecommons/client/add-green.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/gwt/mc-form/src/org/movecommons/client/del-green.png
===================================================================
(Binary files differ)


Property changes on: trunk/gwt/mc-form/src/org/movecommons/client/del-green.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/gwt/mc-form/war/Mc_form.css
===================================================================
--- trunk/gwt/mc-form/war/Mc_form.css	2011-10-02 22:17:33 UTC (rev 136)
+++ trunk/gwt/mc-form/war/Mc_form.css	2011-10-03 00:01:28 UTC (rev 137)
@@ -1,2 +1,23 @@
-/** Add css rules here for your application. */
+.mc-fl {
+  float: left;
+}
 
+.mc-fr {
+  float: right;
+}
+
+.mc-keyword {
+  color: #003EA8;
+  cursor: pointer;
+  float: left;
+  font-size: 9pt;
+  position: relative;
+  margin: 0 0 0 3px;
+  text-decoration: underline;
+}
+
+.mc-keyword-delbtn {
+  cursor: pointer;
+  float: left;
+  margin: -7px 0 0;
+}
\ No newline at end of file




More information about the Movecommons-commits mailing list