Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
rhbz953734 - clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Huang committed May 17, 2013
1 parent 65283ab commit 5934247
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 84 deletions.

This file was deleted.

This file was deleted.

Expand Up @@ -377,22 +377,6 @@ public void onEditorClicked()
}
}

@Override
public void onReviewCLicked()
{
if (selectedDocument != null)
{
HistoryToken token = HistoryToken.fromTokenString(history.getToken());
if (!token.getView().equals(MainView.Review))
{
token.setView(MainView.Review);
token.clearEditorFilterAndSearch();
token.setTextFlowId(null);
history.newItem(token.toTokenString());
}
}
}

@Override
public void onDocumentListClicked()
{
Expand Down
Expand Up @@ -2,5 +2,5 @@

public enum MainView
{
Documents, Editor, Search, Review;
Documents, Editor, Search
}
Expand Up @@ -28,7 +28,6 @@
import net.customware.gwt.presenter.client.widget.WidgetPresenter;

import org.zanata.common.ContentState;
import org.zanata.webtrans.client.events.CheckStateHasChangedEvent;
import org.zanata.webtrans.client.events.FilterViewEvent;
import org.zanata.webtrans.client.events.FilterViewEventHandler;
import org.zanata.webtrans.client.events.LoadingEvent;
Expand All @@ -38,26 +37,18 @@
import org.zanata.webtrans.client.events.RefreshPageEventHandler;
import org.zanata.webtrans.client.events.RequestPageValidationEvent;
import org.zanata.webtrans.client.events.RequestPageValidationHandler;
import org.zanata.webtrans.client.events.ReviewModeChangeEvent;
import org.zanata.webtrans.client.events.ReviewModeChangeEventHandler;
import org.zanata.webtrans.client.events.RunValidationEvent;
import org.zanata.webtrans.client.events.TableRowSelectedEvent;
import org.zanata.webtrans.client.events.TableRowSelectedEventHandler;
import org.zanata.webtrans.client.events.TransUnitSaveEvent;
import org.zanata.webtrans.client.events.TransUnitSelectionEvent;
import org.zanata.webtrans.client.events.TransUnitSelectionHandler;
import org.zanata.webtrans.client.events.UserConfigChangeEvent;
import org.zanata.webtrans.client.events.UserConfigChangeHandler;
import org.zanata.webtrans.client.resources.WebTransMessages;
import org.zanata.webtrans.client.service.GetTransUnitActionContextHolder;
import org.zanata.webtrans.client.service.NavigationService;
import org.zanata.webtrans.client.service.TransUnitSaveService;
import org.zanata.webtrans.client.service.TranslatorInteractionService;
import org.zanata.webtrans.client.service.UserOptionsService;
import org.zanata.webtrans.client.ui.FilterViewConfirmationDisplay;
import org.zanata.webtrans.client.ui.GoToRowLink;
import org.zanata.webtrans.client.ui.InlineLink;
import org.zanata.webtrans.client.view.ReviewContentsDisplay;
import org.zanata.webtrans.client.view.SourceContentsDisplay;
import org.zanata.webtrans.client.view.TargetContentsDisplay;
import org.zanata.webtrans.client.view.TransUnitsTableDisplay;
Expand All @@ -71,9 +62,7 @@
import com.google.common.base.Objects;
import com.google.common.base.Strings;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import com.google.inject.Provider;

import static org.zanata.webtrans.client.events.NotificationEvent.Severity.*;

Expand Down
Expand Up @@ -29,8 +29,6 @@
import org.zanata.webtrans.client.events.PageCountChangeEvent;
import org.zanata.webtrans.client.events.PageCountChangeEventHandler;
import org.zanata.webtrans.client.events.RefreshPageEvent;
import org.zanata.webtrans.client.events.ReviewModeChangeEvent;
import org.zanata.webtrans.client.events.ReviewModeChangeEventHandler;
import org.zanata.webtrans.client.view.TranslationEditorDisplay;

import com.google.gwt.event.logical.shared.ValueChangeEvent;
Expand Down
Expand Up @@ -29,7 +29,6 @@
import org.zanata.webtrans.client.events.KeyShortcutEvent;
import org.zanata.webtrans.client.events.KeyShortcutEventHandler;
import org.zanata.webtrans.client.events.NavTransUnitEvent;
import org.zanata.webtrans.client.events.ReviewModeChangeEvent;
import org.zanata.webtrans.client.events.WorkspaceContextUpdateEvent;
import org.zanata.webtrans.client.events.WorkspaceContextUpdateEventHandler;
import org.zanata.webtrans.client.keys.KeyShortcut;
Expand Down
Expand Up @@ -37,8 +37,6 @@ interface Listener
void onKeyShortcutsClicked();

void onEditorClicked();

void onReviewCLicked();
}

void enableTab(MainView view, boolean enable);
Expand Down
Expand Up @@ -94,7 +94,7 @@ interface Styles extends CssResource
Styles style;

@UiField
Label editorTab, searchAndReplaceTab, documentListTab, reviewTab;
Label editorTab, searchAndReplaceTab, documentListTab;

private Listener listener;

Expand Down Expand Up @@ -123,8 +123,7 @@ public AppView(WebTransMessages messages, DocumentListDisplay documentListView,
searchAndReplaceTab.setTitle(messages.projectWideSearchAndReplace());
documentListTab.setTitle(messages.documentListTitle());
editorTab.setTitle(messages.editor());
reviewTab.setTitle("Review"); //TODO localise



content.add(documentListView.asWidget());
content.add(translationView.asWidget());
Expand Down Expand Up @@ -165,11 +164,6 @@ public void showInMainView(MainView view)
content.selectTab(EDITOR_VIEW);
selectedDocumentSpan.setVisible(true);
setSelectedTab(editorTab);
break;
case Review:
content.selectTab(EDITOR_VIEW);
selectedDocumentSpan.setVisible(true);
setSelectedTab(reviewTab);
}
}

Expand All @@ -178,8 +172,7 @@ private void setSelectedTab(Widget tab)
editorTab.removeStyleName(style.selectedTab());
searchAndReplaceTab.removeStyleName(style.selectedTab());
documentListTab.removeStyleName(style.selectedTab());
reviewTab.removeStyleName(style.selectedTab());


tab.addStyleName(style.selectedTab());
}

Expand Down Expand Up @@ -296,12 +289,6 @@ public void onSearchAndReplaceTabTabClick(ClickEvent event)
listener.onSearchAndReplaceClicked();
}

@UiHandler("reviewTab")
public void onReviewTablClick(ClickEvent event)
{
listener.onReviewCLicked();
}

private void enableTab(Widget tab, boolean enable)
{
if (enable)
Expand Down
Expand Up @@ -104,7 +104,6 @@
<g:InlineLabel styleName="icon-list {style.topMenuButton}" ui:field="documentListTab"/>
<g:InlineLabel styleName="icon-edit {style.topMenuButton}" ui:field="editorTab"/>
<g:InlineLabel styleName="icon-search {style.topMenuButton}" ui:field="searchAndReplaceTab"/>
<g:InlineLabel styleName="icon-eye {style.topMenuButton}" ui:field="reviewTab"/>
<g:InlineLabel ui:field="keyShortcuts" styleName="icon-keyboard {style.topMenuButton}"/>
</g:HTMLPanel>
</g:cell>
Expand Down

0 comments on commit 5934247

Please sign in to comment.