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

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Mar 15, 2013
1 parent b033cc1 commit cbe50e5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Expand Up @@ -35,6 +35,7 @@ protected GetTransUnitActionContext initContext(DocumentId documentId, String fi
.changeFilterNeedReview(configHolder.getState().isFilterByNeedReview())
.changeFilterTranslated(configHolder.getState().isFilterByTranslated())
.changeFilterUntranslated(configHolder.getState().isFilterByUntranslated())
.changeFilterHasError(configHolder.getState().isFilterByHasError())
.changeTargetTransUnitId(targetTransUnitId);
// @formatter:on

Expand Down
Expand Up @@ -41,6 +41,7 @@
import org.zanata.webtrans.client.events.PageCountChangeEvent;
import org.zanata.webtrans.client.events.EditorPageSizeChangeEvent;
import org.zanata.webtrans.client.events.EditorPageSizeChangeEventHandler;
import org.zanata.webtrans.client.events.RequestPageValidationEvent;
import org.zanata.webtrans.client.events.TableRowSelectedEvent;
import org.zanata.webtrans.client.events.TransUnitSelectionEvent;
import org.zanata.webtrans.client.events.TransUnitUpdatedEvent;
Expand Down Expand Up @@ -150,6 +151,12 @@ public void onSuccess(GetTransUnitListResult result)
}
eventBus.fireEvent(new PageChangeEvent(result.getTargetPage()));
highlightSearch();
if(result.isFilterByHasError())
{
//result is filtered by has error flag, run validation on all TransUnit and display error message
eventBus.fireEvent(new RequestPageValidationEvent());

}
eventBus.fireEvent(LoadingEvent.FINISH_EVENT);
}
});
Expand Down
Expand Up @@ -96,7 +96,7 @@ public void onProcessForAppPresenter()
{
HistoryToken token = new HistoryToken();
token.setDocumentPath("doc/a.po");
DocumentId documentId = new DocumentId(1, "");
DocumentId documentId = new DocumentId(new Long(1), "");
when(documentListPresenter.getDocumentId("doc/a.po")).thenReturn(documentId);

service.processForAppPresenter(documentId);
Expand Down Expand Up @@ -184,9 +184,9 @@ public void processHistoryTokenWithInitializedContext()
token.setDocumentPath("doc/path");
token.setProjectSearchReplacement("replacement");
when(historyChangeEvent.getValue()).thenReturn(token.toTokenString());
DocumentId documentId = new DocumentId(1, "");
DocumentId documentId = new DocumentId(new Long(1), "");
when(documentListPresenter.getDocumentId("doc/path")).thenReturn(documentId);
when(appPresenter.getSelectedDocIdOrNull()).thenReturn(new DocumentId(99, ""));
when(appPresenter.getSelectedDocIdOrNull()).thenReturn(new DocumentId(new Long(99), ""));
contextHolder.updateContext(new GetTransUnitActionContext(documentId));

// When:
Expand Down Expand Up @@ -219,9 +219,9 @@ public void processHistoryTokenForUninitializedContext()
token.setProjectSearchReplacement("replacement");
token.setTextFlowId("1");
when(historyChangeEvent.getValue()).thenReturn(token.toTokenString());
DocumentId documentId = new DocumentId(1, "");
DocumentId documentId = new DocumentId(new Long(1), "");
when(documentListPresenter.getDocumentId("doc/path")).thenReturn(documentId);
when(appPresenter.getSelectedDocIdOrNull()).thenReturn(new DocumentId(99, ""));
when(appPresenter.getSelectedDocIdOrNull()).thenReturn(new DocumentId(new Long(99), ""));
contextHolder.updateContext(null);

// When:
Expand Down Expand Up @@ -292,7 +292,7 @@ public void processBookmarkedTextFlowWithInvalidTextFlowId()
public void processBookmarkedTextFlow()
{
// Given: everything works
contextHolder.updateContext(new GetTransUnitActionContext(new DocumentId(9, "")));
contextHolder.updateContext(new GetTransUnitActionContext(new DocumentId(new Long(9), "")));
HistoryToken token = new HistoryToken();
token.setTextFlowId("111");
when(stateHolder.getPageCount()).thenReturn(10);
Expand Down

0 comments on commit cbe50e5

Please sign in to comment.