[kune-commits] r1644 - trunk/src/main/java/cc/kune/gspace/client/i18n

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Wed Dec 21 10:41:23 CET 2011


Author: vjrj_
Date: 2011-12-21 10:41:22 +0100 (Wed, 21 Dec 2011)
New Revision: 1644

Modified:
   trunk/src/main/java/cc/kune/gspace/client/i18n/AbstractLanguageSelectorPanel.java
   trunk/src/main/java/cc/kune/gspace/client/i18n/I18nCellList.java
   trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslationDataProvider.java
   trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.java
   trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml
   trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java
Log:
Some usability fixes in translator

Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/AbstractLanguageSelectorPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/AbstractLanguageSelectorPanel.java	2011-12-21 09:02:04 UTC (rev 1643)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/AbstractLanguageSelectorPanel.java	2011-12-21 09:41:22 UTC (rev 1644)
@@ -112,6 +112,7 @@
 
   private void createLangCombo(final boolean withEnglish) {
     // Field.setMsgTarget("side");
+    // NOTE: The Combo box in modal popups fails!
     langCombo = new ComboBox<LanguageData>();
     langCombo.setName(LANG_FIELD);
     langCombo.setMinChars(1);

Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nCellList.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nCellList.java	2011-12-21 09:02:04 UTC (rev 1643)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nCellList.java	2011-12-21 09:41:22 UTC (rev 1644)
@@ -17,6 +17,7 @@
  */
 package cc.kune.gspace.client.i18n;
 
+import cc.kune.common.client.notify.NotifyUser;
 import cc.kune.common.client.utils.SimpleCallback;
 import cc.kune.core.client.i18n.I18nUITranslationService;
 import cc.kune.core.shared.dto.I18nLanguageSimpleDTO;
@@ -174,6 +175,7 @@
       @Override
       public void onCallback() {
         translatorForm.focusToTranslate();
+        NotifyUser.hideProgress();
       }
     });
 

Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslationDataProvider.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslationDataProvider.java	2011-12-21 09:02:04 UTC (rev 1643)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslationDataProvider.java	2011-12-21 09:41:22 UTC (rev 1644)
@@ -17,6 +17,7 @@
 
 import java.util.List;
 
+import cc.kune.common.client.notify.NotifyUser;
 import cc.kune.common.client.utils.SimpleCallback;
 import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
 import cc.kune.core.client.rpcservices.I18nServiceAsync;
@@ -70,6 +71,7 @@
   }
 
   public void setLanguage(final I18nLanguageSimpleDTO language, final boolean toTranslate) {
+    NotifyUser.showProgressLoading();
     dataProvider.getList().clear();
     dataProvider.refresh();
     i18n.getTranslatedLexicon(session.getUserHash(), language.getCode(), toTranslate,

Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.java	2011-12-21 09:02:04 UTC (rev 1643)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.java	2011-12-21 09:41:22 UTC (rev 1644)
@@ -37,7 +37,7 @@
 import com.google.gwt.user.client.ui.Widget;
 
 /**
- * A form used for editing contacts.
+ * A form used for editing translations.
  */
 public class I18nTranslatorForm extends Composite {
 
@@ -167,7 +167,6 @@
     toTranslate.setText("");
     translation.setText("");
     noteForTranslators.setVisible(false);
-
   }
 
   private void updateWithTimer() {

Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml	2011-12-21 09:02:04 UTC (rev 1643)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml	2011-12-21 09:41:22 UTC (rev 1644)
@@ -39,8 +39,8 @@
       padding: 5px;
     }
 
-    .textarea {
-      resize: both;
+    textarea.input {
+      resize: both !important;
     }
 
     .tip {
@@ -78,7 +78,7 @@
     </g:FlowPanel>
     <g:FlowPanel addStyleNames="{style.row}">
       <g:Label ui:field="toLanguageTitle" addStyleNames="{style.titles} {style.cell}"/>
-      <g:TextArea ui:field='translation' addStyleNames="{style.cell}{style.textarea}"
+      <g:TextArea ui:field='translation' addStyleNames="{style.cell} {style.input}"
         visibleLines="5"/>
       <g:FlowPanel styleName="k-button"
         addStyleNames="{style.cell} {style.copyicon} k-button k-btn k-5corners">

Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java	2011-12-21 09:02:04 UTC (rev 1643)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java	2011-12-21 09:41:22 UTC (rev 1644)
@@ -47,7 +47,8 @@
       final LanguageSelectorWithoutEnglishPanel lanSelectorPanel,
       final I18nToTranslateGridPanel toTranslateGrid, final I18nTranslatedGridPanel translatedGrid,
       final I18nTranslateRecomendPanel transRecommend, final CoreResources res) {
-    super(TRANSLATOR_PANEL_ID, "", true, false, images, TRANSLATOR_ERROR_ID, i18n.t("Close"), null,
+    // Warning: Modal = true == you cannot select languages with mouse
+    super(TRANSLATOR_PANEL_ID, "", false, false, images, TRANSLATOR_ERROR_ID, i18n.t("Close"), null,
         null, null, transGroup, i18n.getDirection());
     setIcon(res.language());
     this.lanSelectorPanel = lanSelectorPanel;




More information about the kune-commits mailing list