Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'rhbz773459'

Conflicts:
	server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorPresenter.java
	server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorTableDefinition.java
	server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorView.java
  • Loading branch information...
commit 89a0609c8c18e4737e21669be1ac0b7ad2e6656a 2 parents 6c9f901 + 72b9238
Alex Eng authored February 01, 2012

Showing 27 changed files with 932 additions and 242 deletions. Show diff stats Hide diff stats

  1. 2  server/zanata-war/eclipse/launch/webtrans-dummy.launch
  2. 2  server/zanata-war/eclipse/launch/webtrans-jboss.launch
  3. 61  server/zanata-war/src/main/java/org/zanata/dao/TextFlowDAO.java
  4. 153  server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorPresenter.java
  5. 51  server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorView.java
  6. 69  server/zanata-war/src/main/java/org/zanata/webtrans/client/events/FilterViewEvent.java
  7. 8  server/zanata-war/src/main/java/org/zanata/webtrans/client/events/FilterViewEventHandler.java
  8. 9  server/zanata-war/src/main/java/org/zanata/webtrans/client/events/TransUnitUpdatedEvent.java
  9. 2  server/zanata-war/src/main/java/org/zanata/webtrans/client/presenter/DocumentListPresenter.java
  10. 119  server/zanata-war/src/main/java/org/zanata/webtrans/client/presenter/SidePanelPresenter.java
  11. 22  server/zanata-war/src/main/java/org/zanata/webtrans/client/presenter/TransUnitNavigationPresenter.java
  12. 5  server/zanata-war/src/main/java/org/zanata/webtrans/client/resources/EditorConfigConstants.java
  13. 130  server/zanata-war/src/main/java/org/zanata/webtrans/client/ui/EditorOptionsPanel.java
  14. 31  server/zanata-war/src/main/java/org/zanata/webtrans/client/ui/EditorOptionsPanel.ui.xml
  15. 107  server/zanata-war/src/main/java/org/zanata/webtrans/client/ui/FilterViewConfirmationPanel.java
  16. 7  server/zanata-war/src/main/java/org/zanata/webtrans/client/view/TransUnitNavigationView.java
  17. 118  server/zanata-war/src/main/java/org/zanata/webtrans/server/rpc/GetTransUnitListHandler.java
  18. 4  server/zanata-war/src/main/java/org/zanata/webtrans/server/rpc/UpdateTransUnitHandler.java
  19. 50  server/zanata-war/src/main/java/org/zanata/webtrans/shared/model/TransUnit.java
  20. 31  server/zanata-war/src/main/java/org/zanata/webtrans/shared/rpc/GetTransUnitList.java
  21. 15  server/zanata-war/src/main/java/org/zanata/webtrans/shared/rpc/GetTransUnitListResult.java
  22. 2  server/zanata-war/src/main/java/org/zanata/webtrans/shared/rpc/HasTransUnitUpdatedData.java
  23. 9  server/zanata-war/src/main/java/org/zanata/webtrans/shared/rpc/TransUnitUpdated.java
  24. 37  server/zanata-war/src/main/java/org/zanata/webtrans/shared/util/TextFlowFilter.java
  25. 120  server/zanata-war/src/main/java/org/zanata/webtrans/shared/util/TextFlowFilterImpl.java
  26. 8  server/zanata-war/src/main/resources/org/zanata/webtrans/public/Application.css
  27. 2  server/zanata-war/src/test/java/org/zanata/webtrans/client/rpc/DummyGetTransUnitCommand.java
2  server/zanata-war/eclipse/launch/webtrans-dummy.launch
@@ -20,7 +20,7 @@
20 20
 <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
21 21
 <listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
22 22
 </listAttribute>
23  
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
  23
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
24 24
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
25 25
 <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-remoteUI &quot;${gwt_remote_ui_server_port}:${unique_id}&quot; -startupUrl webtrans/Application.html?project=sample-project&amp;iteration=1.0&amp;localeId=de -logLevel INFO -port 48881 -codeServerPort 9998 -war &quot;${project_loc:/zanata-war}/src/main/webapp&quot; org.zanata.webtrans.ApplicationDummy"/>
26 26
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="zanata-war"/>
2  server/zanata-war/eclipse/launch/webtrans-jboss.launch
@@ -21,7 +21,7 @@
21 21
 <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
22 22
 <listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
23 23
 </listAttribute>
24  
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gwt.eclipse.core.moduleClasspathProvider"/>
  24
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
25 25
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
26 26
 <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-remoteUI &quot;${gwt_remote_ui_server_port}:${unique_id}&quot; -startupUrl http://localhost:8080/zanata/webtrans/Application.html?project=sample-project&amp;iteration=1.0&amp;localeId=de -logLevel INFO -noserver -codeServerPort 9997 -war &quot;${deploy.zanata}&quot; org.zanata.webtrans.Application"/>
27 27
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="zanata-war"/>
61  server/zanata-war/src/main/java/org/zanata/dao/TextFlowDAO.java
@@ -20,6 +20,7 @@
20 20
  */
21 21
 package org.zanata.dao;
22 22
 
  23
+import java.text.SimpleDateFormat;
23 24
 import java.util.ArrayList;
24 25
 import java.util.Comparator;
25 26
 import java.util.List;
@@ -39,14 +40,24 @@
39 40
 import org.jboss.seam.ScopeType;
40 41
 import org.jboss.seam.annotations.AutoCreate;
41 42
 import org.jboss.seam.annotations.In;
  43
+import org.jboss.seam.annotations.Logger;
42 44
 import org.jboss.seam.annotations.Name;
43 45
 import org.jboss.seam.annotations.Scope;
  46
+import org.jboss.seam.log.Log;
44 47
 import org.zanata.common.ContentState;
45 48
 import org.zanata.common.LocaleId;
46 49
 import org.zanata.hibernate.search.DefaultNgramAnalyzer;
47 50
 import org.zanata.model.HDocument;
  51
+import org.zanata.model.HLocale;
48 52
 import org.zanata.model.HTextFlow;
  53
+import org.zanata.model.HTextFlowTarget;
  54
+import org.zanata.webtrans.server.rpc.CommentsUtil;
  55
+import org.zanata.webtrans.shared.model.DocumentId;
  56
+import org.zanata.webtrans.shared.model.TransUnit;
  57
+import org.zanata.webtrans.shared.model.TransUnitId;
  58
+import org.zanata.webtrans.shared.rpc.GetTransUnitListResult;
49 59
 import org.zanata.webtrans.shared.rpc.GetTranslationMemory.SearchType;
  60
+import org.zanata.webtrans.shared.util.TextFlowFilter;
50 61
 
51 62
 @Name("textFlowDAO")
52 63
 @AutoCreate
@@ -56,6 +67,11 @@
56 67
    @In
57 68
    private FullTextEntityManager entityManager;
58 69
 
  70
+   @In
  71
+   LocaleDAO localeDAO;
  72
+
  73
+   @Logger
  74
+   Log log;
59 75
 
60 76
    public TextFlowDAO()
61 77
    {
@@ -67,11 +83,6 @@ public TextFlowDAO(Session session)
67 83
       super(HTextFlow.class, session);
68 84
    }
69 85
 
70  
-   /**
71  
-    * @param document
72  
-    * @param id
73  
-    * @return
74  
-    */
75 86
    public HTextFlow getById(HDocument document, String id)
76 87
    {
77 88
       return (HTextFlow) getSession().createCriteria(HTextFlow.class).add(Restrictions.naturalId().set("resId", id).set("document", document)).setCacheable(true).setComment("TextFlowDAO.getById").uniqueResult();
@@ -173,48 +184,28 @@ public HTextFlow getObsoleteById(HDocument document, String id)
173 184
       // @formatter:on
174 185
    }
175 186
 
176  
-   @SuppressWarnings({ "unchecked" })
177  
-   public List<HTextFlow> getByDocument(Long documentId)
  187
+   public int getCountByDocument(Long documentId)
178 188
    {
179  
-      Query query = getSession().createQuery("from HTextFlow tf where tf.obsolete=0 and tf.document.id = :id order by tf.pos").setParameter("id", documentId);
180  
-      return query.list();
  189
+      Long totalCount = (Long) getSession().createQuery("select count(*) from HTextFlow tf where tf.obsolete=0 and tf.document.id = :id order by tf.pos").setParameter("id", documentId).uniqueResult();
  190
+      if (totalCount == null)
  191
+         return 0;
  192
+      return totalCount.intValue();
181 193
    }
182 194
 
183 195
    @SuppressWarnings("unchecked")
184  
-   public List<HTextFlow> getOffsetListByDocument(Long documentId, int offset, int count)
  196
+   public List<HTextFlow> getTransUnitList(Long documentId, int offset, int count)
185 197
    {
186 198
       Query query = getSession().createQuery("from HTextFlow tf where tf.obsolete=0 and tf.document.id = :id order by tf.pos").setParameter("id", documentId);
187 199
       return query.setFirstResult(offset).setMaxResults(count).list();
188 200
    }
189  
-   
190  
-   
  201
+
191 202
    @SuppressWarnings("unchecked")
192  
-   // TODO: use hibernate search
193  
-   public Set<Object[]> getIdsBySearch(Long documentId, int offset, int count, String search, LocaleId localeId)
  203
+   public List<HTextFlow> getTransUnitList(Long documentId)
194 204
    {
195  
-      Query textFlowQuery = getSession().createQuery("select tf.id, tf.pos from HTextFlow tf where tf.obsolete=0 and tf.document.id = :id and lower(tf.content) like :content order by tf.pos");
196  
-      textFlowQuery.setParameter("id", documentId);
197  
-      textFlowQuery.setParameter("content", "%" + search + "%");
198  
-      List<Object[]> ids1 = textFlowQuery.list();
199  
-      Query textFlowTargetQuery = getSession().createQuery("select tft.textFlow.id, tft.textFlow.pos from HTextFlowTarget tft where tft.textFlow.obsolete=0 and tft.textFlow.document.id = :id and lower(tft.content) like :content and tft.locale.localeId = :localeId order by tft.textFlow.pos");
200  
-      textFlowTargetQuery.setParameter("id", documentId);
201  
-      textFlowTargetQuery.setParameter("content", "%" + search + "%");
202  
-      textFlowTargetQuery.setParameter("localeId", localeId);
203  
-      List<Object[]> ids2 = textFlowTargetQuery.list();
204  
-      Set<Object[]> idSet = new TreeSet<Object[]>(new Comparator<Object[]>()
205  
-      {
206  
-         @Override
207  
-         public int compare(Object[] arg0, Object[] arg1)
208  
-         {
209  
-            return ((Integer) arg0[1]).compareTo((Integer) arg1[1]);
210  
-         }
211  
-      });
212  
-      idSet.addAll(ids1);
213  
-      idSet.addAll(ids2);
214  
-      return idSet;
  205
+      Query query = getSession().createQuery("from HTextFlow tf where tf.obsolete=0 and tf.document.id = :id order by tf.pos").setParameter("id", documentId);
  206
+      return query.list();
215 207
    }
216 208
 
217  
-
218 209
    // TODO: use hibernate search
219 210
    @SuppressWarnings("unchecked")
220 211
    public Set<Object[]> getNavigationBy(Long documentId, String search, int offset, LocaleId localeId, boolean reverse)
153  server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorPresenter.java
@@ -39,6 +39,8 @@
39 39
 import org.zanata.webtrans.client.events.CopySourceEventHandler;
40 40
 import org.zanata.webtrans.client.events.DocumentSelectionEvent;
41 41
 import org.zanata.webtrans.client.events.DocumentSelectionHandler;
  42
+import org.zanata.webtrans.client.events.FilterViewEvent;
  43
+import org.zanata.webtrans.client.events.FilterViewEventHandler;
42 44
 import org.zanata.webtrans.client.events.FindMessageEvent;
43 45
 import org.zanata.webtrans.client.events.FindMessageHandler;
44 46
 import org.zanata.webtrans.client.events.NavTransUnitEvent;
@@ -62,6 +64,7 @@
62 64
 import org.zanata.webtrans.client.events.UpdateValidationWarningsEventHandler;
63 65
 import org.zanata.webtrans.client.resources.TableEditorMessages;
64 66
 import org.zanata.webtrans.client.rpc.CachingDispatchAsync;
  67
+import org.zanata.webtrans.client.ui.FilterViewConfirmationPanel;
65 68
 import org.zanata.webtrans.shared.auth.AuthenticationError;
66 69
 import org.zanata.webtrans.shared.auth.AuthorizationError;
67 70
 import org.zanata.webtrans.shared.auth.Identity;
@@ -78,6 +81,8 @@
78 81
 import org.zanata.webtrans.shared.rpc.UpdateTransUnitResult;
79 82
 
80 83
 import com.allen_sauer.gwt.log.client.Log;
  84
+import com.google.gwt.event.dom.client.ClickEvent;
  85
+import com.google.gwt.event.dom.client.ClickHandler;
81 86
 import com.google.gwt.event.logical.shared.HasSelectionHandlers;
82 87
 import com.google.gwt.event.logical.shared.SelectionEvent;
83 88
 import com.google.gwt.event.logical.shared.SelectionHandler;
@@ -142,6 +147,8 @@
142 147
       int getSelectedRowNumber();
143 148
 
144 149
       void setTransUnitDetails(TransUnit selectedTransUnit);
  150
+
  151
+      boolean isProcessing();
145 152
    }
146 153
 
147 154
    private DocumentId documentId;
@@ -151,6 +158,7 @@
151 158
    private final CachingDispatchAsync dispatcher;
152 159
    private final Identity identity;
153 160
    private TransUnit selectedTransUnit;
  161
+   private TransUnitId targetTransUnitId;
154 162
    // private int lastRowNum;
155 163
    private List<Long> transIdNextNewFuzzyCache = new ArrayList<Long>();
156 164
    private List<Long> transIdPrevNewFuzzyCache = new ArrayList<Long>();
@@ -170,6 +178,10 @@
170 178
 
171 179
    private UndoableTransUnitUpdateAction inProcessing;
172 180
 
  181
+   private final FilterViewConfirmationPanel filterViewConfirmationPanel = new FilterViewConfirmationPanel();
  182
+
  183
+   private boolean filterTranslated, filterNeedReview, filterUntranslated;
  184
+
173 185
    private final UndoableTransUnitUpdateHandler undoableTransUnitUpdateHandler = new UndoableTransUnitUpdateHandler()
174 186
    {
175 187
       @Override
@@ -262,11 +274,97 @@ private void clearCacheList()
262 274
          transIdPrevFuzzyCache.clear();
263 275
    }
264 276
 
  277
+   /**
  278
+    * Clear all current transUnit list and re-query from server. Force to run
  279
+    * requestRows@TableModelHandler
  280
+    */
  281
+   private void initialiseTransUnitList()
  282
+   {
  283
+      display.getTableModel().clearCache();
  284
+      display.getTableModel().setRowCount(TableModel.UNKNOWN_ROW_COUNT);
  285
+      display.gotoPage(0, true);
  286
+   }
  287
+
265 288
    @Override
266 289
    protected void onBind()
267 290
    {
268 291
       display.setTableModelHandler(tableModelHandler);
269 292
       display.setPageSize(TableConstants.PAGE_SIZE);
  293
+      registerHandler(filterViewConfirmationPanel.getSaveChangesAndFilterButton().addClickHandler(new ClickHandler()
  294
+      {
  295
+         @Override
  296
+         public void onClick(ClickEvent event)
  297
+         {
  298
+            Log.info("Save changes and filter");
  299
+            filterViewConfirmationPanel.updateFilter(filterTranslated, filterNeedReview, filterUntranslated);
  300
+            filterViewConfirmationPanel.hide();
  301
+
  302
+            display.getTargetCellEditor().savePendingChange(true);
  303
+            if (selectedTransUnit != null)
  304
+            {
  305
+               targetTransUnitId = selectedTransUnit.getId();
  306
+            }
  307
+            initialiseTransUnitList();
  308
+         }
  309
+      }));
  310
+
  311
+      registerHandler(filterViewConfirmationPanel.getDiscardChangesAndFilterButton().addClickHandler(new ClickHandler()
  312
+      {
  313
+         @Override
  314
+         public void onClick(ClickEvent event)
  315
+         {
  316
+            Log.info("Discard changes and filter");
  317
+            filterViewConfirmationPanel.updateFilter(filterTranslated, filterNeedReview, filterUntranslated);
  318
+            filterViewConfirmationPanel.hide();
  319
+
  320
+            display.getTargetCellEditor().cancelEdit();
  321
+            if (selectedTransUnit != null)
  322
+            {
  323
+               targetTransUnitId = selectedTransUnit.getId();
  324
+            }
  325
+            initialiseTransUnitList();
  326
+         }
  327
+      }));
  328
+
  329
+      registerHandler(filterViewConfirmationPanel.getCancelFilterButton().addClickHandler(new ClickHandler()
  330
+      {
  331
+         @Override
  332
+         public void onClick(ClickEvent event)
  333
+         {
  334
+            Log.info("Cancel filter");
  335
+            eventBus.fireEvent(new FilterViewEvent(filterViewConfirmationPanel.isFilterTranslated(), filterViewConfirmationPanel.isFilterNeedReview(), filterViewConfirmationPanel.isFilterUntranslated(), true));
  336
+            filterViewConfirmationPanel.hide();
  337
+         }
  338
+      }));
  339
+
  340
+      registerHandler(eventBus.addHandler(FilterViewEvent.getType(), new FilterViewEventHandler()
  341
+      {
  342
+         @Override
  343
+         public void onFilterView(FilterViewEvent event)
  344
+         {
  345
+            if (!event.isCancelFilter())
  346
+            {
  347
+               filterTranslated = event.isFilterTranslated();
  348
+               filterNeedReview = event.isFilterNeedReview();
  349
+               filterUntranslated = event.isFilterUntranslated();
  350
+
  351
+               if (display.getTargetCellEditor().isOpened() && display.getTargetCellEditor().isEditing())
  352
+               {
  353
+                  filterViewConfirmationPanel.center();
  354
+               }
  355
+               else
  356
+               {
  357
+                  filterViewConfirmationPanel.updateFilter(filterTranslated, filterNeedReview, filterUntranslated);
  358
+                  if (selectedTransUnit != null)
  359
+                  {
  360
+                     targetTransUnitId = selectedTransUnit.getId();
  361
+                  }
  362
+                  initialiseTransUnitList();
  363
+               }
  364
+            }
  365
+         }
  366
+      }));
  367
+
270 368
       registerHandler(display.getSelectionHandlers().addSelectionHandler(new SelectionHandler<TransUnit>()
271 369
       {
272 370
          @Override
@@ -306,10 +404,11 @@ public void onFindMessage(FindMessageEvent event)
306 404
             display.startProcessing();
307 405
             findMessage = event.getMessage();
308 406
             display.setFindMessage(findMessage);
309  
-            display.getTableModel().clearCache();
310  
-            display.getTableModel().setRowCount(TableModel.UNKNOWN_ROW_COUNT);
311  
-            display.gotoPage(0, true);
312  
-            display.stopProcessing();
  407
+            if (selectedTransUnit != null)
  408
+            {
  409
+               targetTransUnitId = selectedTransUnit.getId();
  410
+            }
  411
+            initialiseTransUnitList();
313 412
          }
314 413
 
315 414
       }));
@@ -330,18 +429,18 @@ public void onTransUnitUpdated(TransUnitUpdatedEvent event)
330 429
                   eventBus.fireEvent(new RunValidationEvent(event.getTransUnit().getId(), event.getTransUnit().getSource(), event.getTransUnit().getTarget()));
331 430
                }
332 431
 
333  
-               Integer row = getRow(event.getTransUnit());
  432
+               Integer rowIndex = getRowIndex(event.getTransUnit());
334 433
                // - add TU index to model
335  
-               if (row != null)
  434
+               if (rowIndex != null)
336 435
                {
337  
-                  Log.info("onTransUnitUpdated - update row:" + row);
338  
-                  display.getTableModel().setRowValueOverride(row, event.getTransUnit());
  436
+                  Log.info("onTransUnitUpdated - update row:" + rowIndex);
  437
+                  display.getTableModel().setRowValueOverride(rowIndex, event.getTransUnit());
339 438
 
340 439
                   if (inProcessing != null)
341 440
                   {
342 441
                      if (inProcessing.getAction().getTransUnitId().equals(event.getTransUnit().getId()))
343 442
                      {
344  
-                        tableModelHandler.gotoRow(row, true);
  443
+                        tableModelHandler.gotoRow(rowIndex, true);
345 444
                         eventBus.fireEvent(new UndoRedoFinishEvent(inProcessing));
346 445
                         inProcessing = null;
347 446
                      }
@@ -357,14 +456,14 @@ public void onTransUnitUpdated(TransUnitUpdatedEvent event)
357 456
                      {
358 457
                         int pageNum = inProcessing.getCurrentPage();
359 458
                         int rowNum = inProcessing.getRowNum();
360  
-                        row = pageNum * display.getPageSize() + rowNum;
361  
-                        tableModelHandler.gotoRow(row, true);
  459
+                        rowIndex = pageNum * display.getPageSize() + rowNum;
  460
+                        tableModelHandler.gotoRow(rowIndex, true);
362 461
                         eventBus.fireEvent(new UndoRedoFinishEvent(inProcessing));
363 462
                         inProcessing = null;
364 463
                      }
365 464
                   }
366 465
                }
367  
-               if (selectedTransUnit != null && selectedTransUnit.getId().equals(event.getTransUnit().getId()))
  466
+               if (!display.isProcessing() && event.getUsername().equals(identity.getPerson().getId().toString()) && selectedTransUnit != null && selectedTransUnit.getId().equals(event.getTransUnit().getId()))
368 467
                {
369 468
                   tableModelHandler.gotoRow(curRowIndex, true);
370 469
                }
@@ -472,10 +571,10 @@ public void onTransMemoryCopy(TransMemoryCopyEvent event)
472 571
          @Override
473 572
          public void onCopySource(CopySourceEvent event)
474 573
          {
475  
-            Integer row = getRow(event.getTransUnit());
476  
-            if (row != null)
  574
+            Integer rowIndex = getRowIndex(event.getTransUnit());
  575
+            if (rowIndex != null)
477 576
             {
478  
-               tableModelHandler.gotoRow(row, true);
  577
+               tableModelHandler.gotoRow(rowIndex, true);
479 578
                display.getTargetCellEditor().setText(event.getTransUnit().getSource());
480 579
                display.getTargetCellEditor().autoSize();
481 580
             }
@@ -509,10 +608,10 @@ public void onUpdate(UpdateValidationWarningsEvent event)
509 608
 
510 609
    public boolean isFiltering()
511 610
    {
512  
-      return findMessage != null && !findMessage.isEmpty();
  611
+      return (findMessage != null && !findMessage.isEmpty()) || (filterViewConfirmationPanel.isFilterTranslated() || filterViewConfirmationPanel.isFilterNeedReview() || filterViewConfirmationPanel.isFilterUntranslated());
513 612
    }
514 613
 
515  
-   public Integer getRow(TransUnit tu)
  614
+   public Integer getRowIndex(TransUnit tu)
516 615
    {
517 616
       if (!isFiltering())
518 617
       {
@@ -553,7 +652,7 @@ public void requestRows(final Request request, final Callback<TransUnit> callbac
553 652
 
554 653
          display.startProcessing();
555 654
 
556  
-         dispatcher.execute(new GetTransUnitList(documentId, startRow, numRows, findMessage), new AsyncCallback<GetTransUnitListResult>()
  655
+         dispatcher.execute(new GetTransUnitList(documentId, startRow, numRows, findMessage, filterViewConfirmationPanel.isFilterTranslated(), filterViewConfirmationPanel.isFilterNeedReview(), filterViewConfirmationPanel.isFilterUntranslated(), targetTransUnitId), new AsyncCallback<GetTransUnitListResult>()
557 656
          {
558 657
 
559 658
             @Override
@@ -564,7 +663,17 @@ public void onSuccess(GetTransUnitListResult result)
564 663
                callback.onRowsReady(request, response);
565 664
                display.getTableModel().setRowCount(result.getTotalCount());
566 665
                display.stopProcessing();
567  
-               tableModelHandler.gotoRow(curRowIndex, false);
  666
+
  667
+               int gotoRow = curRowIndex;
  668
+
  669
+               if (result.getUnits().size() > 0)
  670
+               {
  671
+                  if (result.getGotoRow() != -1)
  672
+                  {
  673
+                     gotoRow = result.getGotoRow();
  674
+                  }
  675
+                  tableModelHandler.gotoRow(gotoRow, false);
  676
+               }
568 677
             }
569 678
 
570 679
             @Override
@@ -586,6 +695,7 @@ else if (caught instanceof AuthorizationError)
586 695
                display.stopProcessing();
587 696
             }
588 697
          });
  698
+         targetTransUnitId = null;
589 699
       }
590 700
 
591 701
       @Override
@@ -1053,10 +1163,7 @@ private void loadDocument(DocumentId selectDocId)
1053 1163
       {
1054 1164
          display.startProcessing();
1055 1165
          documentId = selectDocId;
1056  
-         display.getTableModel().clearCache();
1057  
-         display.getTableModel().setRowCount(TableModel.UNKNOWN_ROW_COUNT);
1058  
-         display.gotoPage(0, true);
1059  
-         display.stopProcessing();
  1166
+         initialiseTransUnitList();
1060 1167
       }
1061 1168
    }
1062 1169
 }
51  server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorView.java
@@ -32,7 +32,10 @@
32 32
 import org.zanata.webtrans.shared.auth.Identity;
33 33
 import org.zanata.webtrans.shared.auth.Permission;
34 34
 import org.zanata.webtrans.shared.model.TransUnit;
  35
+import org.zanata.webtrans.shared.model.TransUnitId;
35 36
 
  37
+import com.allen_sauer.gwt.log.client.Log;
  38
+import com.google.gwt.dom.client.Element;
36 39
 import com.google.gwt.event.logical.shared.HasSelectionHandlers;
37 40
 import com.google.gwt.event.logical.shared.SelectionEvent;
38 41
 import com.google.gwt.event.logical.shared.SelectionHandler;
@@ -154,6 +157,12 @@ public void stopProcessing()
154 157
       loadingPanel.hide();
155 158
    }
156 159
 
  160
+   @Override	
  161
+   public boolean isProcessing()
  162
+   {
  163
+      return loadingPanel.isShowing();
  164
+   }
  165
+
157 166
    @Override
158 167
    public HandlerRegistration addSelectionHandler(SelectionHandler<TransUnit> handler)
159 168
    {
@@ -211,7 +220,7 @@ public void gotoRow(int row, boolean andEdit)
211 220
       if (row < getDataTable().getRowCount())
212 221
       {
213 222
          getDataTable().selectRow(row, true);
214  
-         DOM.scrollIntoView(getDataTable().getWidget(row, TableEditorTableDefinition.TARGET_COL).getElement());
  223
+         scrollIntoView(getDataTable().getWidget(row, TableEditorTableDefinition.TARGET_COL).getElement());
215 224
          if (andEdit)
216 225
          {
217 226
             editCell(row, TableEditorTableDefinition.TARGET_COL);
@@ -258,4 +267,44 @@ public void setTransUnitDetails(TransUnit selectedTransUnit)
258 267
       this.tableDefinition.setTransUnitDetails(selectedTransUnit);
259 268
 
260 269
    }
  270
+
  271
+   /*
  272
+    * Overrides DOM.scrollIntoView() - focus on element's bottom right corner
  273
+    * This implementation focus on element's top left corner
  274
+    */
  275
+   public native void scrollIntoView(Element elem) /*-{
  276
+		var left = elem.offsetLeft, top = elem.offsetTop;
  277
+		var width = elem.offsetWidth, height = elem.offsetHeight;
  278
+
  279
+		if (elem.parentNode != elem.offsetParent) {
  280
+			left -= elem.parentNode.offsetLeft;
  281
+			top -= elem.parentNode.offsetTop;
  282
+		}
  283
+
  284
+		var cur = elem.parentNode;
  285
+		while (cur && (cur.nodeType == 1)) {
  286
+			if (left + width > cur.scrollLeft + cur.clientWidth) {
  287
+				cur.scrollLeft = (left + width) - cur.clientWidth;
  288
+			}
  289
+			if (left < cur.scrollLeft) {
  290
+				cur.scrollLeft = left;
  291
+			}
  292
+			if (top + height > cur.scrollTop + cur.clientHeight) {
  293
+				cur.scrollTop = (top + height) - cur.clientHeight;
  294
+			}
  295
+			if (top < cur.scrollTop) {
  296
+				cur.scrollTop = top;
  297
+			}
  298
+
  299
+			var offsetLeft = cur.offsetLeft, offsetTop = cur.offsetTop;
  300
+			if (cur.parentNode != cur.offsetParent) {
  301
+				offsetLeft -= cur.parentNode.offsetLeft;
  302
+				offsetTop -= cur.parentNode.offsetTop;
  303
+			}
  304
+
  305
+			left += offsetLeft - cur.scrollLeft;
  306
+			top += offsetTop - cur.scrollTop;
  307
+			cur = cur.parentNode;
  308
+		}
  309
+   }-*/;
261 310
 }
69  server/zanata-war/src/main/java/org/zanata/webtrans/client/events/FilterViewEvent.java
... ...
@@ -0,0 +1,69 @@
  1
+package org.zanata.webtrans.client.events;
  2
+
  3
+import com.google.gwt.event.shared.GwtEvent;
  4
+
  5
+public class FilterViewEvent extends GwtEvent<FilterViewEventHandler>
  6
+{
  7
+   /**
  8
+    * Handler type.
  9
+    */
  10
+   private static Type<FilterViewEventHandler> TYPE;
  11
+
  12
+   /**
  13
+    * Gets the type associated with this event.
  14
+    * 
  15
+    * @return returns the handler type
  16
+    */
  17
+   public static Type<FilterViewEventHandler> getType()
  18
+   {
  19
+      if (TYPE == null)
  20
+      {
  21
+         TYPE = new Type<FilterViewEventHandler>();
  22
+      }
  23
+      return TYPE;
  24
+   }
  25
+
  26
+   private boolean filterTranslated, filterNeedReview, filterUntranslated;
  27
+   private boolean cancelFilter;
  28
+
  29
+   public FilterViewEvent(boolean filterTranslated, boolean filterNeedReview, boolean filterUntranslated, boolean cancelFilter)
  30
+   {
  31
+      this.filterTranslated = filterTranslated;
  32
+      this.filterNeedReview = filterNeedReview;
  33
+      this.filterUntranslated = filterUntranslated;
  34
+      this.cancelFilter = cancelFilter;
  35
+   }
  36
+
  37
+   @Override
  38
+   protected void dispatch(FilterViewEventHandler handler)
  39
+   {
  40
+      handler.onFilterView(this);
  41
+   }
  42
+
  43
+   @Override
  44
+   public Type<FilterViewEventHandler> getAssociatedType()
  45
+   {
  46
+      return getType();
  47
+   }
  48
+
  49
+   public boolean isFilterTranslated()
  50
+   {
  51
+      return filterTranslated;
  52
+   }
  53
+
  54
+   public boolean isFilterNeedReview()
  55
+   {
  56
+      return filterNeedReview;
  57
+   }
  58
+
  59
+   public boolean isFilterUntranslated()
  60
+   {
  61
+      return filterUntranslated;
  62
+   }
  63
+
  64
+   public boolean isCancelFilter()
  65
+   {
  66
+      return cancelFilter;
  67
+   }
  68
+
  69
+}
8  server/zanata-war/src/main/java/org/zanata/webtrans/client/events/FilterViewEventHandler.java
... ...
@@ -0,0 +1,8 @@
  1
+package org.zanata.webtrans.client.events;
  2
+
  3
+import com.google.gwt.event.shared.EventHandler;
  4
+
  5
+public interface FilterViewEventHandler extends EventHandler
  6
+{
  7
+   void onFilterView(FilterViewEvent event);
  8
+}
9  server/zanata-war/src/main/java/org/zanata/webtrans/client/events/TransUnitUpdatedEvent.java
@@ -34,6 +34,7 @@
34 34
    private final ContentState previousStatus;
35 35
    private int wordCount;
36 36
    private TransUnit tu;
  37
+   private String username;
37 38
 
38 39
 
39 40
    /**
@@ -61,6 +62,7 @@ public TransUnitUpdatedEvent(HasTransUnitUpdatedData data)
61 62
       this.previousStatus = data.getPreviousStatus();
62 63
       this.wordCount = data.getWordCount();
63 64
       this.tu = data.getTransUnit();
  65
+      this.username = data.getUsername();
64 66
    }
65 67
 
66 68
    @Override
@@ -81,7 +83,6 @@ public DocumentId getDocumentId()
81 83
       return documentId;
82 84
    }
83 85
 
84  
-
85 86
    @Override
86 87
    public ContentState getPreviousStatus()
87 88
    {
@@ -100,4 +101,10 @@ public TransUnit getTransUnit()
100 101
       return this.tu;
101 102
    }
102 103
 
  104
+   @Override
  105
+   public String getUsername()
  106
+   {
  107
+      return username;
  108
+   }
  109
+
103 110
 }
2  server/zanata-war/src/main/java/org/zanata/webtrans/client/presenter/DocumentListPresenter.java
@@ -387,7 +387,7 @@ public void onSuccess(GetDocumentListResult result)
387 387
 
388 388
             // re-use these stats for the project stats
389 389
             eventBus.fireEvent(new ProjectStatsUpdatedEvent(projectStats));
390  
-            Log.info("Time to calculate project stats: " + String.valueOf(System.currentTimeMillis() - start));
  390
+            Log.info("Time to calculate project stats: " + String.valueOf(System.currentTimeMillis() - start) + "ms");
391 391
          }
392 392
       });
393 393
    }
119  server/zanata-war/src/main/java/org/zanata/webtrans/client/presenter/SidePanelPresenter.java
@@ -20,15 +20,28 @@
20 20
  */
21 21
 package org.zanata.webtrans.client.presenter;
22 22
 
  23
+import java.util.HashMap;
  24
+import java.util.Map;
  25
+
23 26
 import net.customware.gwt.dispatch.client.DispatchAsync;
24 27
 import net.customware.gwt.presenter.client.EventBus;
25 28
 import net.customware.gwt.presenter.client.widget.WidgetDisplay;
26 29
 import net.customware.gwt.presenter.client.widget.WidgetPresenter;
27 30
 
28 31
 import org.zanata.webtrans.client.editor.filter.TransFilterPresenter;
  32
+import org.zanata.webtrans.client.events.ButtonDisplayChangeEvent;
  33
+import org.zanata.webtrans.client.events.FilterViewEvent;
  34
+import org.zanata.webtrans.client.events.FilterViewEventHandler;
  35
+import org.zanata.webtrans.client.events.UserConfigChangeEvent;
  36
+import org.zanata.webtrans.client.resources.EditorConfigConstants;
29 37
 import org.zanata.webtrans.client.rpc.CachingDispatchAsync;
30 38
 import org.zanata.webtrans.client.ui.EditorOptionsPanel;
31 39
 
  40
+import com.allen_sauer.gwt.log.client.Log;
  41
+import com.google.gwt.event.dom.client.ChangeEvent;
  42
+import com.google.gwt.event.dom.client.ChangeHandler;
  43
+import com.google.gwt.event.logical.shared.ValueChangeEvent;
  44
+import com.google.gwt.event.logical.shared.ValueChangeHandler;
32 45
 import com.google.gwt.user.client.ui.Widget;
33 46
 import com.google.inject.Inject;
34 47
 
@@ -44,26 +57,124 @@
44 57
    private final DispatchAsync dispatcher;
45 58
    private final ValidationOptionsPresenter validationOptionsPresenter;
46 59
    private final EditorOptionsPanel editorOptionsPanel;
47  
-   
  60
+
48 61
    @Inject
49 62
    public SidePanelPresenter(final Display display, final EventBus eventBus, CachingDispatchAsync dispatcher, final ValidationOptionsPresenter validationDetailsPresenter, final TransFilterPresenter transFilterPresenter)
50 63
    {
51 64
       super(display, eventBus);
52  
-      this.editorOptionsPanel = new EditorOptionsPanel(eventBus);
  65
+      this.editorOptionsPanel = new EditorOptionsPanel();
53 66
       this.validationOptionsPresenter = validationDetailsPresenter;
54 67
       this.dispatcher = dispatcher;
  68
+
  69
+      configMap.put(EditorConfigConstants.BUTTON_ENTER, false);
  70
+      configMap.put(EditorConfigConstants.BUTTON_ESC, false);
  71
+      configMap.put(EditorConfigConstants.BUTTON_FUZZY, true);
  72
+      configMap.put(EditorConfigConstants.BUTTON_UNTRANSLATED, true);
55 73
    }
56 74
 
  75
+   private final ValueChangeHandler<Boolean> filterChangeHandler = new ValueChangeHandler<Boolean>()
  76
+   {
  77
+      @Override
  78
+      public void onValueChange(ValueChangeEvent<Boolean> event)
  79
+      {
  80
+         eventBus.fireEvent(new FilterViewEvent(editorOptionsPanel.getTranslatedChk().getValue(), editorOptionsPanel.getNeedReviewChk().getValue(), editorOptionsPanel.getUntranslatedChk().getValue(), false));
  81
+      }
  82
+   };
  83
+
  84
+   private Map<String, Boolean> configMap = new HashMap<String, Boolean>();
  85
+
57 86
    @Override
58 87
    protected void onBind()
59 88
    {
60 89
       validationOptionsPresenter.bind();
61 90
       display.setValidationOptionsView(validationOptionsPresenter.getDisplay().asWidget());
62  
-
63 91
       display.setEditorOptionsPanel(editorOptionsPanel);
64  
-   }
65 92
 
  93
+      registerHandler(editorOptionsPanel.getTranslatedChk().addValueChangeHandler(filterChangeHandler));
  94
+      registerHandler(editorOptionsPanel.getNeedReviewChk().addValueChangeHandler(filterChangeHandler));
  95
+      registerHandler(editorOptionsPanel.getUntranslatedChk().addValueChangeHandler(filterChangeHandler));
  96
+
  97
+      registerHandler(eventBus.addHandler(FilterViewEvent.getType(), new FilterViewEventHandler()
  98
+      {
  99
+         @Override
  100
+         public void onFilterView(FilterViewEvent event)
  101
+         {
  102
+            if (event.isCancelFilter())
  103
+            {
  104
+               editorOptionsPanel.getTranslatedChk().setValue(event.isFilterTranslated(), false);
  105
+               editorOptionsPanel.getNeedReviewChk().setValue(event.isFilterNeedReview(), false);
  106
+               editorOptionsPanel.getUntranslatedChk().setValue(event.isFilterUntranslated(), false);
  107
+            }
  108
+
  109
+            // if filter view, hide model navigation
  110
+            if (event.isFilterTranslated() || event.isFilterNeedReview() || event.isFilterUntranslated())
  111
+            {
  112
+               editorOptionsPanel.setNavOptionVisible(false);
  113
+            }
  114
+            else
  115
+            {
  116
+               editorOptionsPanel.setNavOptionVisible(true);
  117
+            }
  118
+         }
  119
+      }));
  120
+
  121
+      registerHandler(editorOptionsPanel.getEditorButtonsChk().addValueChangeHandler(new ValueChangeHandler<Boolean>()
  122
+      {
  123
+         @Override
  124
+         public void onValueChange(ValueChangeEvent<Boolean> event)
  125
+         {
  126
+            Log.info("Show editor buttons: " + event.getValue());
  127
+            eventBus.fireEvent(new ButtonDisplayChangeEvent(event.getValue()));
  128
+         }
  129
+      }));
66 130
 
  131
+      registerHandler(editorOptionsPanel.getEnterChk().addValueChangeHandler(new ValueChangeHandler<Boolean>()
  132
+      {
  133
+         @Override
  134
+         public void onValueChange(ValueChangeEvent<Boolean> event)
  135
+         {
  136
+            Log.info("Enable 'Enter' Key to save and move to next string: " + event.getValue());
  137
+            configMap.put(EditorConfigConstants.BUTTON_ENTER, event.getValue());
  138
+            eventBus.fireEvent(new UserConfigChangeEvent(configMap));
  139
+         }
  140
+      }));
  141
+
  142
+      registerHandler(editorOptionsPanel.getEscChk().addValueChangeHandler(new ValueChangeHandler<Boolean>()
  143
+      {
  144
+         @Override
  145
+         public void onValueChange(ValueChangeEvent<Boolean> event)
  146
+         {
  147
+            Log.info("Enable 'Esc' Key to close editor: " + event.getValue());
  148
+            configMap.put(EditorConfigConstants.BUTTON_ESC, event.getValue());
  149
+            eventBus.fireEvent(new UserConfigChangeEvent(configMap));
  150
+         }
  151
+      }));
  152
+
  153
+      registerHandler(editorOptionsPanel.getOptionsList().addChangeHandler(new ChangeHandler()
  154
+      {
  155
+         @Override
  156
+         public void onChange(ChangeEvent event)
  157
+         {
  158
+            String selectedOption = editorOptionsPanel.getOptionsList().getItemText(editorOptionsPanel.getOptionsList().getSelectedIndex());
  159
+            if (selectedOption.equals(EditorConfigConstants.OPTION_FUZZY_UNTRANSLATED))
  160
+            {
  161
+               configMap.put(EditorConfigConstants.BUTTON_UNTRANSLATED, true);
  162
+               configMap.put(EditorConfigConstants.BUTTON_FUZZY, true);
  163
+            }
  164
+            else if (selectedOption.equals(EditorConfigConstants.OPTION_FUZZY))
  165
+            {
  166
+               configMap.put(EditorConfigConstants.BUTTON_FUZZY, true);
  167
+               configMap.put(EditorConfigConstants.BUTTON_UNTRANSLATED, false);
  168
+            }
  169
+            else if (selectedOption.equals(EditorConfigConstants.OPTION_UNTRANSLATED))
  170
+            {
  171
+               configMap.put(EditorConfigConstants.BUTTON_FUZZY, false);
  172
+               configMap.put(EditorConfigConstants.BUTTON_UNTRANSLATED, true);
  173
+            }
  174
+            eventBus.fireEvent(new UserConfigChangeEvent(configMap));
  175
+         }
  176
+      }));
  177
+   }
67 178
 
68 179
    @Override
69 180
    protected void onUnbind()
22  server/zanata-war/src/main/java/org/zanata/webtrans/client/presenter/TransUnitNavigationPresenter.java
@@ -26,6 +26,8 @@
26 26
 import net.customware.gwt.presenter.client.widget.WidgetDisplay;
27 27
 import net.customware.gwt.presenter.client.widget.WidgetPresenter;
28 28
 
  29
+import org.zanata.webtrans.client.events.FilterViewEvent;
  30
+import org.zanata.webtrans.client.events.FilterViewEventHandler;
29 31
 import org.zanata.webtrans.client.events.NavTransUnitEvent;
30 32
 import org.zanata.webtrans.client.events.NavTransUnitEvent.NavigationType;
31 33
 import org.zanata.webtrans.client.events.NavTransUnitHandler;
@@ -35,7 +37,6 @@
35 37
 import com.google.gwt.event.dom.client.HasClickHandlers;
36 38
 import com.google.gwt.event.shared.GwtEvent;
37 39
 import com.google.gwt.event.shared.HandlerRegistration;
38  
-import com.google.gwt.user.client.ui.Widget;
39 40
 import com.google.inject.Inject;
40 41
 
41 42
 public class TransUnitNavigationPresenter extends WidgetPresenter<TransUnitNavigationPresenter.Display> implements HasNavTransUnitHandlers
@@ -56,6 +57,8 @@
56 57
       HasClickHandlers getNextStateButton();
57 58
 
58 59
       void setNavModeTooltip(Map<String, Boolean> configMap);
  60
+
  61
+      void setModelNavVisible(boolean visible);
59 62
    }
60 63
 
61 64
    @Inject
@@ -121,6 +124,23 @@ public void onClick(ClickEvent event)
121 124
          }
122 125
       });
123 126
 
  127
+      registerHandler(eventBus.addHandler(FilterViewEvent.getType(), new FilterViewEventHandler()
  128
+      {
  129
+         @Override
  130
+         public void onFilterView(FilterViewEvent event)
  131
+         {
  132
+            // if filter view, hide model navigation
  133
+            if (!event.isFilterTranslated() || !event.isFilterNeedReview() || !event.isFilterUntranslated())
  134
+            {
  135
+               display.setModelNavVisible(false);
  136
+            }
  137
+            else
  138
+            {
  139
+               display.setModelNavVisible(true);
  140
+            }
  141
+         }
  142
+      }));
  143
+
124 144
    }
125 145
 
126 146
    @Override
5  server/zanata-war/src/main/java/org/zanata/webtrans/client/resources/EditorConfigConstants.java
@@ -38,6 +38,11 @@
38 38
    public static final String LABEL_EDITOR_BUTTONS = "Editor Buttons";
39 39
    public static final String LABEL_EDITOR_OPTIONS = "Editor Options";
40 40
    
  41
+   public static final String LABEL_TRANSLATED = "Translated";
  42
+   public static final String LABEL_NEED_REVIEW = "Need Review";
  43
+   public static final String LABEL_UNTRANSLATED = "Untranslated";
  44
+   public static final String LABEL_FILTERS = "Message Filters:";
  45
+   
41 46
    public static final String OPTION_FUZZY_UNTRANSLATED = "Next Fuzzy/Untranslated";
42 47
    public static final String OPTION_FUZZY = "Next Fuzzy";
43 48
    public static final String OPTION_UNTRANSLATED = "Next Untranslated";
130  server/zanata-war/src/main/java/org/zanata/webtrans/client/ui/EditorOptionsPanel.java
@@ -20,21 +20,9 @@
20 20
  */
21 21
 package org.zanata.webtrans.client.ui;
22 22
 
23  
-import java.util.HashMap;
24  
-import java.util.Map;
25  
-
26  
-import net.customware.gwt.presenter.client.EventBus;
27  
-
28  
-import org.zanata.webtrans.client.events.ButtonDisplayChangeEvent;
29  
-import org.zanata.webtrans.client.events.UserConfigChangeEvent;
30 23
 import org.zanata.webtrans.client.resources.EditorConfigConstants;
31 24
 
32  
-import com.allen_sauer.gwt.log.client.Log;
33 25
 import com.google.gwt.core.client.GWT;
34  
-import com.google.gwt.event.dom.client.ChangeEvent;
35  
-import com.google.gwt.event.dom.client.ChangeHandler;
36  
-import com.google.gwt.event.logical.shared.ValueChangeEvent;
37  
-import com.google.gwt.event.logical.shared.ValueChangeHandler;
38 26
 import com.google.gwt.uibinder.client.UiBinder;
39 27
 import com.google.gwt.uibinder.client.UiField;
40 28
 import com.google.gwt.user.client.ui.CheckBox;
@@ -43,7 +31,6 @@
43 31
 import com.google.gwt.user.client.ui.ListBox;
44 32
 import com.google.gwt.user.client.ui.VerticalPanel;
45 33
 import com.google.gwt.user.client.ui.Widget;
46  
-import com.google.inject.Inject;
47 34
 
48 35
 /**
49 36
  *
@@ -62,17 +49,18 @@
62 49
    VerticalPanel contentPanel;
63 50
 
64 51
    @UiField
65  
-   Label header, navOptionHeader;
  52
+   Label header, navOptionHeader, filterHeader;
66 53
 
67 54
    @UiField
68 55
    CheckBox enterChk, escChk, editorButtonsChk;
  56
+   
  57
+   @UiField
  58
+   CheckBox translatedChk, needReviewChk, untranslatedChk;
69 59
 
70 60
    @UiField
71 61
    ListBox optionsList;
72 62
 
73  
-   private Map<String, Boolean> configMap = new HashMap<String, Boolean>();
74  
-
75  
-   public EditorOptionsPanel(final EventBus eventBus)
  63
+   public EditorOptionsPanel()
76 64
    {
77 65
       initWidget(uiBinder.createAndBindUi(this));
78 66
 
@@ -86,73 +74,16 @@ public EditorOptionsPanel(final EventBus eventBus)
86 74
       escChk.setValue(false);
87 75
       editorButtonsChk.setValue(true);
88 76
 
  77
+      translatedChk.setText(EditorConfigConstants.LABEL_TRANSLATED);
  78
+      needReviewChk.setText(EditorConfigConstants.LABEL_NEED_REVIEW);
  79
+      untranslatedChk.setText(EditorConfigConstants.LABEL_UNTRANSLATED);
  80
+      filterHeader.setText(EditorConfigConstants.LABEL_FILTERS);
  81
+
89 82
       optionsList.addItem(EditorConfigConstants.OPTION_FUZZY_UNTRANSLATED);
90 83
       optionsList.addItem(EditorConfigConstants.OPTION_FUZZY);
91 84
       optionsList.addItem(EditorConfigConstants.OPTION_UNTRANSLATED);
92 85
 
93 86
       optionsList.setSelectedIndex(0);
94  
-
95  
-      configMap.put(EditorConfigConstants.BUTTON_ENTER, false);
96  
-      configMap.put(EditorConfigConstants.BUTTON_ESC, false);
97  
-      configMap.put(EditorConfigConstants.BUTTON_FUZZY, true);
98  
-      configMap.put(EditorConfigConstants.BUTTON_UNTRANSLATED, true);
99  
-
100  
-      enterChk.addValueChangeHandler(new ValueChangeHandler<Boolean>()
101  
-      {
102  
-         @Override
103  
-         public void onValueChange(ValueChangeEvent<Boolean> event)
104  
-         {