Permalink
Browse files

Merge branch 'rhbz803572' of github.com:zanata/zanata into rhbz803572

Conflicts:
	server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TargetContentsView.java
  • Loading branch information...
2 parents c2db0ac + fcf730f commit 5161f12d96e252fa0a725c2623e4afd0dbedc5af @seanf seanf committed Mar 27, 2012
Showing with 383 additions and 193 deletions.
  1. +8 −26 server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/InlineTargetCellEditor.java
  2. +4 −13 server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableEditorPresenter.java
  3. +3 −0 server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TableResources.java
  4. +12 −2 server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TargetContentsDisplay.java
  5. +163 −63 server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TargetContentsPresenter.java
  6. +23 −5 server/zanata-war/src/main/java/org/zanata/webtrans/client/editor/table/TargetContentsView.java
  7. +7 −2 server/zanata-war/src/main/java/org/zanata/webtrans/client/events/UserConfigChangeEvent.java
  8. +18 −21 server/zanata-war/src/main/java/org/zanata/webtrans/client/presenter/OptionsPanelPresenter.java
  9. +1 −1 ...r/zanata-war/src/main/java/org/zanata/webtrans/client/presenter/TransUnitNavigationPresenter.java
  10. +4 −2 server/zanata-war/src/main/java/org/zanata/webtrans/client/presenter/TranslationEditorPresenter.java
  11. +94 −0 server/zanata-war/src/main/java/org/zanata/webtrans/client/presenter/UserConfigHolder.java
  12. +1 −1 server/zanata-war/src/main/java/org/zanata/webtrans/client/resources/NavigationMessages.java
  13. +27 −34 server/zanata-war/src/main/java/org/zanata/webtrans/client/ui/Editor.java
  14. +1 −1 server/zanata-war/src/main/java/org/zanata/webtrans/client/ui/Editor.ui.xml
  15. +5 −1 server/zanata-war/src/main/java/org/zanata/webtrans/client/ui/ToggleEditor.java
  16. +11 −20 server/zanata-war/src/main/java/org/zanata/webtrans/client/view/TransUnitNavigationView.java
  17. BIN ...r/src/main/resources/org/zanata/webtrans/images/crystal_project/_16x16/actions/move_task_down.png
  18. +1 −1 server/zanata-war/src/test/java/org/zanata/webtrans/client/presenter/OptionsPanelPresenterTest.java
@@ -506,36 +506,18 @@ protected boolean onCancel()
}
- public void setShowOperationButtons(boolean showButtons)
- {
-// operationsPanel.setVisible(showButtons);
- }
-
public void updateKeyBehaviour(Map<String, Boolean> configMap)
{
- if (configMap.containsKey(EditorConfigConstants.BUTTON_FUZZY) && configMap.containsKey(EditorConfigConstants.BUTTON_UNTRANSLATED))
- {
- untranslatedMode = configMap.get(EditorConfigConstants.BUTTON_UNTRANSLATED);
- fuzzyMode = configMap.get(EditorConfigConstants.BUTTON_FUZZY);
- }
-
-// if (configMap.containsKey(EditorConfigConstants.BUTTON_ENTER))
+// if (configMap.containsKey(EditorConfigConstants.BUTTON_FUZZY) && configMap.containsKey(EditorConfigConstants.BUTTON_UNTRANSLATED))
// {
-// isEnterKeySavesEnabled = configMap.get(EditorConfigConstants.BUTTON_ENTER);
-// if (isEnterKeySavesEnabled)
-// {
-// saveButton.setTitle(saveButtonwithEnterShortcuts);
-// }
-// else
-// {
-// saveButton.setTitle(saveButtonShortcuts);
-// }
+// untranslatedMode = configMap.get(EditorConfigConstants.BUTTON_UNTRANSLATED);
+// fuzzyMode = configMap.get(EditorConfigConstants.BUTTON_FUZZY);
+// }
+//
+// if (configMap.containsKey(EditorConfigConstants.BUTTON_ESC))
+// {
+// isEscKeyCloseEditor = configMap.get(EditorConfigConstants.BUTTON_ESC);
// }
-
- if (configMap.containsKey(EditorConfigConstants.BUTTON_ESC))
- {
- isEscKeyCloseEditor = configMap.get(EditorConfigConstants.BUTTON_ESC);
- }
}
@@ -308,10 +308,10 @@ protected void onBind()
{
display.setTableModelHandler(tableModelHandler);
display.setPageSize(TableConstants.PAGE_SIZE);
- if (workspaceContext.isReadOnly())
- {
- display.getTargetCellEditor().setShowOperationButtons(false);
- }
+// if (workspaceContext.isReadOnly())
+// {
+// display.getTargetCellEditor().setShowOperationButtons(false);
+// }
registerHandler(filterViewConfirmationPanel.getSaveChangesAndFilterButton().addClickHandler(new ClickHandler()
{
@@ -567,15 +567,6 @@ public void onOpenEditor(OpenEditorEvent event)
}
}));
- registerHandler(eventBus.addHandler(ButtonDisplayChangeEvent.getType(), new ButtonDisplayChangeEventHandler()
- {
- @Override
- public void onButtonDisplayChange(ButtonDisplayChangeEvent event)
- {
- display.getTargetCellEditor().setShowOperationButtons(event.isShowButtons());
- }
- }));
-
registerHandler(eventBus.addHandler(WorkspaceContextUpdateEvent.getType(), new WorkspaceContextUpdateEventHandler()
{
@Override
@@ -36,6 +36,9 @@
@Source("org/zanata/webtrans/images/crystal_project/_16x16/actions/3floppy_unmount.png")
ImageResource cellEditorAccept();
+ @Source("org/zanata/webtrans/images/crystal_project/_16x16/actions/move_task_down.png")
+ ImageResource cellEditorMoveDown();
+
@Source("org/zanata/webtrans/images/crystal_project/_16x16/actions/button_cancel.png")
ImageResource cellEditorCancel();
@@ -19,18 +19,24 @@
import org.zanata.webtrans.client.ui.ToggleEditor;
+import com.google.gwt.event.dom.client.KeyDownEvent;
+
import net.customware.gwt.presenter.client.widget.WidgetDisplay;
public interface TargetContentsDisplay extends WidgetDisplay, Iterable<ToggleEditor>
{
void openEditorAndCloseOthers(int currentEditor);
+ void setSaveButtonTitle(String title);
+
+ void showButtons(boolean displayButtons);
+
interface Listener
{
void validate(ToggleEditor editor);
- void saveAsApproved(ToggleEditor editor);
+ void saveAsApproved(int editorIndex);
void copySource(ToggleEditor editor);
@@ -40,7 +46,11 @@
void onCancel(ToggleEditor editor);
- void saveAsFuzzy(ToggleEditor editor);
+ void saveAsFuzzy();
+
+ boolean isDisplayButtons();
+
+ void onTextAreaKeyDown(KeyDownEvent event, ToggleEditor editor);
}
void setTargets(ArrayList<String> targets);
Oops, something went wrong.

0 comments on commit 5161f12

Please sign in to comment.