Author: dongxu
Date: Thu Sep 12 04:37:35 2013
New Revision: 1522371
URL: http://svn.apache.org/r1522371
Log:
try to rearrange the places and history managment.
Removed:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/MainContentActivityMapper.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/IMAPMessageView.java
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/AppBaseActivity.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/FolderListActivity.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/LoginActivity.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageContentActivity.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListActivity.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListFooterActivity.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/ToolBarActivity.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/MessageContentActivityMapper.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/MessageListActivityMapper.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ToolBarActivityMapper.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/IMAPMessagePlace.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/MailFolderPlace.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FoldersTreeViewModel.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelPropertiesView.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java
Thu Sep 12 04:37:35 2013
@@ -99,7 +99,12 @@ import org.apache.hupa.shared.domain.Idl
import org.apache.hupa.shared.domain.User;
import org.apache.hupa.shared.events.LoginEvent;
+<<<<<<< HEAD
>>>>>>> move new theme ui from experiment to hupa evo
+=======
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
+>>>>>>> try to rearrange the places and history managment.
import com.google.gwt.dom.client.StyleInjector;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.Place;
@@ -409,7 +414,12 @@ public class HupaController {
}
public void hideTopLoading() {
- topBar.hideLoading();
+ Scheduler.get().scheduleDeferred(new ScheduledCommand() {
+ @Override
+ public void execute() {
+ topBar.hideLoading();
+ }
+ });
}
private final Timer hideNotice = new Timer() {
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/AppBaseActivity.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/AppBaseActivity.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/AppBaseActivity.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/AppBaseActivity.java
Thu Sep 12 04:37:35 2013
@@ -24,6 +24,9 @@ import java.util.List;
<<<<<<< HEAD
<<<<<<< HEAD
+<<<<<<< HEAD
+=======
+>>>>>>> try to rearrange the places and history managment.
import org.apache.hupa.client.HupaController;
import org.apache.hupa.client.rf.HupaRequestFactory;
@@ -37,6 +40,7 @@ public abstract class AppBaseActivity ex
@Inject protected EventBus eventBus;
@Inject protected HupaController hc;
+<<<<<<< HEAD
@Inject protected PlaceController pc;
@Inject protected HupaRequestFactory rf;
@@ -57,6 +61,8 @@ public abstract class AppBaseActivity ex
>>>>>>> fix issue 10
=======
@Inject protected EventBus eventBus;
+=======
+>>>>>>> try to rearrange the places and history managment.
@Inject protected PlaceController placeController;
@Inject protected HupaRequestFactory requestFactory;
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/FolderListActivity.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/FolderListActivity.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/FolderListActivity.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/FolderListActivity.java
Thu Sep 12 04:37:35 2013
@@ -107,6 +107,7 @@ public class FolderListActivity extends
=======
>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite,
>>>>>>> don't use contact instead of folders list
public interface Displayable extends WidgetDisplayable {
+ void refresh();
}
>>>>>>> make reload mail folder place work, fixed issue #7
}
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/LoginActivity.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/LoginActivity.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/LoginActivity.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/LoginActivity.java
Thu Sep 12 04:37:35 2013
@@ -486,7 +486,7 @@ public class LoginActivity extends Abstr
RootLayoutPanel.get().clear();
RootLayoutPanel.get().add(hupaLayout.get());
// placeController.goTo(new
MailFolderPlace(response.getSettings().getDraftsFolderName()));
- placeController.goTo(new
MailFolderPlace(response));
+ placeController.goTo(new
MailFolderPlace(response.getSettings().getDraftsFolderName()));
eventBus.fireEvent(new LoginEvent(response));
display.setLoading(false);
}
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageContentActivity.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageContentActivity.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageContentActivity.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageContentActivity.java
Thu Sep 12 04:37:35 2013
@@ -181,6 +181,7 @@ import org.apache.hupa.shared.domain.Get
import org.apache.hupa.shared.domain.GetMessageDetailsResult;
import org.apache.hupa.shared.domain.ImapFolder;
+import com.google.gwt.activity.shared.Activity;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.inject.Inject;
@@ -247,9 +248,8 @@ public class MessageContentActivity exte
void fillMessageContent(String messageContent);
}
- public MessageContentActivity with(MailFolderPlace place) {
- this.fullName = place.getFullName();
- this.uid = place.getUid();
+ public Activity with(String token) {
+ uid = token;
return this;
}
>>>>>>> make message content work as expected partly
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListActivity.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListActivity.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListActivity.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListActivity.java
Thu Sep 12 04:37:35 2013
@@ -28,6 +28,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Set;
+<<<<<<< HEAD
import org.apache.hupa.client.place.AbstractPlace;
import org.apache.hupa.client.place.FolderPlace;
import org.apache.hupa.client.place.MessagePlace;
@@ -259,12 +260,17 @@ import java.util.Collection;
import java.util.List;
import java.util.Set;
+=======
+import org.apache.hupa.client.HupaController;
+>>>>>>> try to rearrange the places and history managment.
import org.apache.hupa.client.place.DefaultPlace;
+import org.apache.hupa.client.place.IMAPMessagePlace;
import org.apache.hupa.client.place.MailFolderPlace;
import org.apache.hupa.client.rf.DeleteMessageByUidRequest;
import org.apache.hupa.client.rf.FetchMessagesRequest;
import org.apache.hupa.client.rf.GetMessageDetailsRequest;
import org.apache.hupa.client.rf.HupaRequestFactory;
+import org.apache.hupa.client.ui.HasRefresh;
import org.apache.hupa.client.ui.MessagesCellTable;
<<<<<<< HEAD
>>>>>>> let messages list activity make use of mvp
@@ -293,9 +299,10 @@ import com.google.gwt.core.client.Schedu
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.PlaceController;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
+import com.google.gwt.view.client.AsyncDataProvider;
import com.google.gwt.view.client.CellPreviewEvent;
import com.google.gwt.view.client.CellPreviewEvent.Handler;
-import com.google.gwt.view.client.RangeChangeEvent;
+import com.google.gwt.view.client.HasData;
import com.google.inject.Inject;
import com.google.web.bindery.requestfactory.shared.Receiver;
import com.google.web.bindery.requestfactory.shared.ServerFailure;
@@ -303,8 +310,6 @@ import com.google.web.bindery.requestfac
public class MessageListActivity extends AppBaseActivity {
@Inject private Displayable display;
- @Inject private HupaRequestFactory requestFactory;
- @Inject private PlaceController placeController;
@Inject private ToolBarActivity.Displayable toolBar;
@Inject private TopBarActivity.Displayable topBar;
private String folderName;
@@ -316,7 +321,7 @@ public class MessageListActivity extends
public void start(AcceptsOneWidget container, final EventBus eventBus) {
container.setWidget(display.asWidget());
bindTo(eventBus);
- display.getGrid().addCellPreviewHandler(new Handler<Message>() {
+
this.registerHandler(display.getGrid().addCellPreviewHandler(new
Handler<Message>() {
@Override
public void onCellPreview(final
CellPreviewEvent<Message> event) {
if (hasClickedButFirstCol(event)) {
@@ -337,8 +342,7 @@ public class MessageListActivity extends
ToolBarView.Parameters
p = new ToolBarView.Parameters(user, folderName, event.getValue(),
response.getMessageDetails());
toolBar.setParameters(p);
- MailFolderPlace place =
new MailFolderPlace(f.getFullName() + "/"
- +
event.getValue().getUid());
+ IMAPMessagePlace place
= new IMAPMessagePlace(String.valueOf(event.getValue().getUid()));
placeController.goTo(place);
}
@@ -356,63 +360,122 @@ public class MessageListActivity extends
}
}
- });
- display.getGrid().addRangeChangeHandler(new
RangeChangeEvent.Handler() {
- @Override
- public void onRangeChange(RangeChangeEvent event) {
- fetch(event.getNewRange().getStart());
- }
- });
- if (!pending) {
- pending = true;
- Scheduler.get().scheduleFinally(new ScheduledCommand() {
+ }));
+ dataProvider = new MessageListDataProvider();
+ dataProvider.addDataDisplay(display.getGrid());
+// dataProvider.refresh();
+
+// display.getGrid().addRangeChangeHandler(new
RangeChangeEvent.Handler() {
+// @Override
+// public void onRangeChange(RangeChangeEvent event) {
+// fetch(event.getNewRange().getStart());
+// }
+// });
+// if (!pending) {
+// pending = true;
+// Scheduler.get().scheduleFinally(new ScheduledCommand() {
+// @Override
+// public void execute() {
+// pending = false;
+// fetch(0);
+// }
+// });
+// }
+ }
+
+ public void refresh(){
+ dataProvider.refresh();
+ }
+
+ private MessageListDataProvider dataProvider;
+ public class MessageListDataProvider extends AsyncDataProvider<Message>
implements HasRefresh{
+
+ HasData<Message> display;
+
+ @Override
+ public void addDataDisplay(HasData<Message> display) {
+ super.addDataDisplay(display);
+ this.display = display;
+ }
+
+
+ @Override
+ public void refresh() {
+ this.onRangeChanged(display);
+ }
+
+ @Override
+ protected void onRangeChanged(HasData<Message> display) {
+ FetchMessagesRequest req =
requestFactory.messagesRequest();
+ FetchMessagesAction action =
req.create(FetchMessagesAction.class);
+ final ImapFolder f = req.create(ImapFolder.class);
+ f.setFullName(folderName);
+ action.setFolder(f);
+ action.setOffset(display.getVisibleRange().getLength());
+ action.setSearchString(searchValue);
+ action.setStart(display.getVisibleRange().getStart());
+ req.fetch(action).fire(new
Receiver<FetchMessagesResult>() {
@Override
- public void execute() {
- pending = false;
- fetch(0);
+ public void onSuccess(final FetchMessagesResult
response) {
+ if (response == null ||
response.getRealCount()== 0) {
+ updateRowCount(-1, true);
+ } else {
+ updateRowData(0,
response.getMessages());
+ }
+ hc.hideTopLoading();
+ }
+
+ @Override
+ public void onFailure(ServerFailure error) {
+ if (error.isFatal()) {
+ throw new
RuntimeException(error.getMessage());
+ }
+ hc.hideTopLoading();
}
});
+
}
+
}
private boolean hasClickedButFirstCol(CellPreviewEvent<Message> event) {
return "click".equals(event.getNativeEvent().getType()) && 0 !=
event.getColumn();
}
- public void fetch(final int start) {
- FetchMessagesRequest req = requestFactory.messagesRequest();
- FetchMessagesAction action =
req.create(FetchMessagesAction.class);
- final ImapFolder f = req.create(ImapFolder.class);
- f.setFullName(folderName);
- action.setFolder(f);
- action.setOffset(display.getGrid().getPageSize());
- action.setSearchString(searchValue);
- action.setStart(start);
- req.fetch(action).fire(new Receiver<FetchMessagesResult>() {
-
- @Override
- public void onSuccess(final FetchMessagesResult result)
{
- assert result != null;
-
display.getGrid().setRowCount(result.getRealCount());
- display.getGrid().setRowData(start,
result.getMessages());
- Scheduler.get().scheduleDeferred(new
ScheduledCommand() {
- @Override
- public void execute() {
- topBar.hideLoading();
- }
- });
- }
-
- @Override
- public void onFailure(ServerFailure error) {
- placeController.goTo(new DefaultPlace("@"));
- if (error.isFatal()) {
- // FIXME should goto login page
regarding the long time
- // session expired.
- throw new
RuntimeException(error.getMessage());
- }
- }
- });
- }
+// public void fetch(final int start) {
+// FetchMessagesRequest req = requestFactory.messagesRequest();
+// FetchMessagesAction action =
req.create(FetchMessagesAction.class);
+// final ImapFolder f = req.create(ImapFolder.class);
+// f.setFullName(folderName);
+// action.setFolder(f);
+// action.setOffset(display.getGrid().getPageSize());
+// action.setSearchString(searchValue);
+// action.setStart(start);
+// req.fetch(action).fire(new Receiver<FetchMessagesResult>() {
+//
+// @Override
+// public void onSuccess(final FetchMessagesResult result)
{
+// assert result != null;
+//
display.getGrid().setRowCount(result.getRealCount());
+// display.getGrid().setRowData(start,
result.getMessages());
+// Scheduler.get().scheduleDeferred(new
ScheduledCommand() {
+// @Override
+// public void execute() {
+// topBar.hideLoading();
+// }
+// });
+// }
+//
+// @Override
+// public void onFailure(ServerFailure error) {
+// placeController.goTo(new DefaultPlace("@"));
+// if (error.isFatal()) {
+// // FIXME should goto login page
regarding the long time
+// // session expired.
+// throw new
RuntimeException(error.getMessage());
+// }
+// }
+// });
+// }
private void bindTo(EventBus eventBus) {
eventBus.addHandler(LoadMessagesEvent.TYPE, new
LoadMessagesEventHandler() {
@@ -420,11 +483,11 @@ public class MessageListActivity extends
user = loadMessagesEvent.getUser();
folderName =
loadMessagesEvent.getFolder().getFullName();
searchValue =
loadMessagesEvent.getSearchValue();
- fetch(0);
+ hc.hideTopLoading();
}
});
- eventBus.addHandler(DeleteClickEvent.TYPE, new
DeleteClickEventHandler(){
+ eventBus.addHandler(DeleteClickEvent.TYPE, new
DeleteClickEventHandler() {
@Override
public void onDeleteClickEvent(DeleteClickEvent event) {
deleteSelectedMessages();
@@ -477,15 +540,14 @@ public class MessageListActivity extends
DeleteMessageByUidRequest req =
requestFactory.deleteMessageByUidRequest();
DeleteMessageByUidAction action =
req.create(DeleteMessageByUidAction.class);
ImapFolder f = req.create(ImapFolder.class);
- f.setFullName(currentPlace.getFullName());
+ f.setFullName(currentPlace.getToken());
action.setMessageUids(uids);
action.setFolder(f);
req.delete(action).fire(new Receiver<DeleteMessageResult>() {
@Override
public void onSuccess(DeleteMessageResult response) {
- fetch(0);
antiSelectMessages(display.getSelectedMessages());
- display.refresh();
+ refresh();
}
});
}
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListFooterActivity.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListFooterActivity.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListFooterActivity.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/MessageListFooterActivity.java
Thu Sep 12 04:37:35 2013
@@ -35,6 +35,7 @@ import com.google.gwt.user.client.ui.Lis
import org.apache.hupa.client.ui.WidgetDisplayable;
import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.user.cellview.client.SimplePager;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
>>>>>>> integrate all of the views to their corresponding activities and
>>>>>>> mappers
import com.google.inject.Inject;
@@ -66,6 +67,7 @@ public class MessageListFooterActivity e
@Inject private Displayable display;
<<<<<<< HEAD
+<<<<<<< HEAD
public interface Displayable extends IsWidget {
SimplePager getPager();
HasVisibility getLabelsPanel();
@@ -74,4 +76,9 @@ public class MessageListFooterActivity e
=======
public interface Displayable extends WidgetDisplayable {}
>>>>>>> integrate all of the views to their corresponding activities and
>>>>>>> mappers
+=======
+ public interface Displayable extends WidgetDisplayable {
+ SimplePager getPager();
+ }
+>>>>>>> try to rearrange the places and history managment.
}
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/ToolBarActivity.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/ToolBarActivity.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/ToolBarActivity.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/ToolBarActivity.java
Thu Sep 12 04:37:35 2013
@@ -185,6 +185,8 @@ import org.apache.hupa.shared.domain.Ima
import org.apache.hupa.shared.domain.Message;
import org.apache.hupa.shared.domain.SetFlagAction;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasClickHandlers;
@@ -199,16 +201,16 @@ public class ToolBarActivity extends App
@Inject private Displayable display;
@Inject private MessagesCellTable table;
- @Inject private MessageListActivity.Displayable messagesDisplay;
+ @Inject private MessageListActivity messagesDisplay;
+ @Inject private FolderListActivity.Displayable folderListDisplay;
@Inject private HupaController hupaController;
- //FIXME messagesDisplay can not be injected into ToolBarView, why?
+ // FIXME messagesDisplay can not be injected into ToolBarView, why?
private String folderName;
-
- @Override
- public void onStop(){
- //for tool bar work as expected, not to unbind event handlers
- }
-
+
+// @Override
+// public void onStop() {
+// // for tool bar work as expected, not to unbind event handlers
+// }
@Override
public void start(AcceptsOneWidget container, EventBus eventBus) {
@@ -220,8 +222,8 @@ public class ToolBarActivity extends App
this.folderName = folder;
return this;
}
-
- public Displayable getDisplay(){
+
+ public Displayable getDisplay() {
return display;
}
@@ -249,7 +251,7 @@ public class ToolBarActivity extends App
display.getPopup().hide();
}
}));
-
+
registerHandler(display.getDeleteReg());
registerHandler(display.getMarkReg());
registerHandler(display.getReplyReg());
@@ -257,8 +259,6 @@ public class ToolBarActivity extends App
registerHandler(display.getForwardReg());
}
-
-
protected void toMarkRead(boolean read) {
List<Long> uids = new ArrayList<Long>();
for (Message msg : table.getVisibleItems()) {
@@ -278,11 +278,14 @@ public class ToolBarActivity extends App
req.set(action).fire(new Receiver<GenericResult>() {
@Override
public void onSuccess(GenericResult response) {
- hupaController.hideTopLoading();
table.refresh();
- table.setStyleBaseOnTag();
+// table.setStyleBaseOnTag();
+ folderListDisplay.refresh();
+ messagesDisplay.refresh();
+ hupaController.hideTopLoading();
}
});
+
}
public interface Displayable extends WidgetDisplayable {
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java
Thu Sep 12 04:37:35 2013
@@ -65,6 +65,7 @@ import org.apache.hupa.client.activity.C
import org.apache.hupa.client.activity.ComposeToolBarActivity;
>>>>>>> toggle to display/hide the tool bar view to adjust the compose and
>>>>>>> message panel
import org.apache.hupa.client.activity.FolderListActivity;
+<<<<<<< HEAD
import org.apache.hupa.client.activity.LabelListActivity;
import org.apache.hupa.client.activity.LabelPropertiesActivity;
import org.apache.hupa.client.activity.LoginActivity;
@@ -145,6 +146,8 @@ import org.apache.hupa.client.HupaContro
import org.apache.hupa.client.activity.FolderListActivity;
>>>>>>> integrate all of the views to their corresponding activities and
>>>>>>> mappers
import org.apache.hupa.client.activity.IMAPMessageActivity;
+=======
+>>>>>>> try to rearrange the places and history managment.
import org.apache.hupa.client.activity.IMAPMessageListActivity;
import org.apache.hupa.client.activity.LabelListActivity;
import org.apache.hupa.client.activity.LabelPropertiesActivity;
@@ -257,9 +260,12 @@ import org.apache.hupa.client.ui.HupaLay
import org.apache.hupa.client.ui.IMAPMessageListView;
<<<<<<< HEAD
<<<<<<< HEAD
+<<<<<<< HEAD
=======
>>>>>>> 1. improve the inbox folder place.
import org.apache.hupa.client.ui.IMAPMessageView;
+=======
+>>>>>>> try to rearrange the places and history managment.
import org.apache.hupa.client.ui.LabelListView;
import org.apache.hupa.client.ui.LabelPropertiesView;
import org.apache.hupa.client.ui.LoginLayout;
@@ -594,6 +600,7 @@ public class AppGinModule extends Abstra
bind(WestActivity.Displayable.class).to(WestView.class).in(Singleton.class);
bind(IMAPMessageListActivity.Displayable.class).to(IMAPMessageListView.class);
bind(MessageSendActivity.Displayable.class).to(MessageSendView.class);
+<<<<<<< HEAD
bind(IMAPMessageActivity.Displayable.class).to(IMAPMessageView.class);
<<<<<<< HEAD
<<<<<<< HEAD
@@ -627,6 +634,8 @@ public class AppGinModule extends Abstra
=======
=======
+=======
+>>>>>>> try to rearrange the places and history managment.
>>>>>>> integrate all of the views to their corresponding activities and
>>>>>>> mappers
bind(LoginActivity.class).in(Singleton.class);
@@ -637,7 +646,6 @@ public class AppGinModule extends Abstra
bind(WestActivity.class).in(Singleton.class);
bind(IMAPMessageListActivity.class).in(Singleton.class);
bind(MessageSendActivity.class).in(Singleton.class);
- bind(IMAPMessageActivity.class).in(Singleton.class);
bind(MessagesCellTable.class).in(Singleton.class);
bind(FoldersTreeViewModel.class).in(Singleton.class);
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/MessageContentActivityMapper.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/MessageContentActivityMapper.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/MessageContentActivityMapper.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/MessageContentActivityMapper.java
Thu Sep 12 04:37:35 2013
@@ -23,6 +23,7 @@ import org.apache.hupa.client.activity.M
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
+<<<<<<< HEAD
import org.apache.hupa.client.place.MessagePlace;
import com.google.gwt.activity.shared.Activity;
@@ -33,6 +34,9 @@ import com.google.gwt.core.client.RunAsy
import org.apache.hupa.client.place.DefaultPlace;
=======
>>>>>>> scrub code
+=======
+import org.apache.hupa.client.place.IMAPMessagePlace;
+>>>>>>> try to rearrange the places and history managment.
import org.apache.hupa.client.place.MailFolderPlace;
<<<<<<< HEAD
>>>>>>> prepare for message content panel
@@ -111,7 +115,7 @@ public class MessageContentActivityMappe
(MailFolderPlace) place);
=======
public Activity getActivity(final Place place) {
- if (place instanceof MailFolderPlace) {
+ if (place instanceof IMAPMessagePlace) {
return new ActivityAsyncProxy() {
@Override
protected void doAsync(RunAsyncCallback
callback) {
@@ -120,8 +124,7 @@ public class MessageContentActivityMappe
@Override
protected Activity createInstance() {
- return
messageContentActivityProvider.get().with(
- (MailFolderPlace)
place);
+ return
messageContentActivityProvider.get().with(((IMAPMessagePlace)place).getToken());
}
};
>>>>>>> support code split
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/MessageListActivityMapper.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/MessageListActivityMapper.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/MessageListActivityMapper.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/MessageListActivityMapper.java
Thu Sep 12 04:37:35 2013
@@ -35,6 +35,7 @@ import org.apache.hupa.client.place.Defa
=======
>>>>>>> support code split
import org.apache.hupa.client.place.MailFolderPlace;
+<<<<<<< HEAD
>>>>>>> make message list view panel work as expected partly
import com.google.gwt.activity.shared.Activity;
@@ -42,6 +43,11 @@ import com.google.gwt.activity.shared.Ac
<<<<<<< HEAD
>>>>>>> integrate all of the views to their corresponding activities and
>>>>>>> mappers
=======
+=======
+import org.apache.hupa.client.place.SettingPlace;
+
+import com.google.gwt.activity.shared.Activity;
+>>>>>>> try to rearrange the places and history managment.
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
>>>>>>> support code split
@@ -50,10 +56,14 @@ import com.google.inject.Inject;
import com.google.inject.Provider;
<<<<<<< HEAD
+<<<<<<< HEAD
public class MessageListActivityMapper extends _MessageActivityMapper {
=======
public class MessageListActivityMapper implements ActivityMapper {
>>>>>>> integrate all of the views to their corresponding activities and
>>>>>>> mappers
+=======
+public class MessageListActivityMapper extends MainActivityMapper {
+>>>>>>> try to rearrange the places and history managment.
private final Provider<MessageListActivity> messageListActivityProvider;
@Inject
@@ -63,6 +73,7 @@ public class MessageListActivityMapper i
<<<<<<< HEAD
<<<<<<< HEAD
+<<<<<<< HEAD
@Override
protected Activity lazyLoadActivity(final Place place) {
if (place instanceof FolderPlace) {
@@ -95,6 +106,11 @@ public class MessageListActivityMapper i
=======
public Activity getActivity(final Place place) {
if (!(place instanceof MailFolderPlace))
+=======
+ @Override
+ Activity asyncLoadActivity(final Place place) {
+ if (place instanceof SettingPlace)
+>>>>>>> try to rearrange the places and history managment.
return null;
return new ActivityAsyncProxy() {
@Override
@@ -114,7 +130,7 @@ public class MessageListActivityMapper i
=======
@Override
protected Activity createInstance() {
- return
messageListActivityProvider.get().with(((MailFolderPlace) place).getFullName());
+ return messageListActivityProvider.get();
}
};
>>>>>>> fixed issue#57 - really disable the tools in toolbar
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ToolBarActivityMapper.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ToolBarActivityMapper.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ToolBarActivityMapper.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ToolBarActivityMapper.java
Thu Sep 12 04:37:35 2013
@@ -140,7 +140,7 @@ public class ToolBarActivityMapper exten
final ToolBarActivity tba = toolBarActivityProvider.get();
if (place instanceof MailFolderPlace) { // might be from login
page
MailFolderPlace here = (MailFolderPlace) place;
- tba.getDisplay().setParameters(new
Parameters(here.getUser(), here.getFullName(), null, null));
+ tba.getDisplay().setParameters(new Parameters(null,
here.getToken(), null, null));
}
>>>>>>> fixed issue#18
@@ -154,7 +154,7 @@ public class ToolBarActivityMapper exten
protected Activity createInstance() {
String token = null;
if (place instanceof MailFolderPlace) {
- token = ((MailFolderPlace)
place).getFullName();
+ token = ((MailFolderPlace)
place).getToken();
}
return tba.with(token);
}
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/IMAPMessagePlace.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/IMAPMessagePlace.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/IMAPMessagePlace.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/IMAPMessagePlace.java
Thu Sep 12 04:37:35 2013
@@ -24,6 +24,7 @@ package org.apache.hupa.client.place;
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
+<<<<<<< HEAD
=======
import org.apache.hupa.client.activity.IMAPMessageActivity;
>>>>>>> 1. improve the inbox folder place.
@@ -83,10 +84,13 @@ public class IMAPMessagePlace extends Pl
=======
=======
+=======
+>>>>>>> try to rearrange the places and history managment.
import com.google.gwt.place.shared.PlaceTokenizer;
import com.google.gwt.place.shared.Prefix;
public class IMAPMessagePlace extends AbstractPlace {
+<<<<<<< HEAD
>>>>>>> remove some warnings and create the AbstractPlace that can give place
>>>>>>> infomation
>>>>>>> forward and reply message to use RF
@@ -143,6 +147,11 @@ public class IMAPMessagePlace extends Ab
public User getUser() {
return user;
+=======
+ String token;
+ public IMAPMessagePlace(String token){
+ this.token = token;
+>>>>>>> try to rearrange the places and history managment.
}
<<<<<<< HEAD
@@ -203,10 +212,11 @@ public class IMAPMessagePlace extends Ab
@Override
public String getToken(IMAPMessagePlace place) {
- return place.getMessageDetails().getMessageId();
+ return place.getToken();
}
}
+<<<<<<< HEAD
public IMAPMessagePlace with(User user, ImapFolder folder, Message
message, MessageDetails messageDetails) {
this.message = message;
this.messageDetails = messageDetails;
@@ -226,6 +236,10 @@ public class IMAPMessagePlace extends Ab
=======
public String getMessageId() {
return messageId;
+=======
+ public String getToken() {
+ return token;
+>>>>>>> try to rearrange the places and history managment.
}
>>>>>>> prepare for message content panel
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/MailFolderPlace.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/MailFolderPlace.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/MailFolderPlace.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/MailFolderPlace.java
Thu Sep 12 04:37:35 2013
@@ -19,74 +19,19 @@
package org.apache.hupa.client.place;
-import org.apache.hupa.shared.domain.User;
-
import com.google.gwt.place.shared.PlaceTokenizer;
import com.google.gwt.place.shared.Prefix;
public class MailFolderPlace extends AbstractPlace {
- private User user;
- private String uid;
- private String fullName;
- private static final String DELIMITER = "/";
-
- /**
- * Folder places look like: #Mock-Inbox, #INBOX,<br>
- * while message places: #Mock-Inbox/10, #INBOX/1234,
- * #%5BGmail%5DDrafts/18
- *
- * @param token
- */
- public MailFolderPlace(String token) {
- if (isMessagePlace(token)) {
- initPlace4Message(token);
- } else {
- initPlace4Folder(token);
- }
- }
-
- public MailFolderPlace(User user) {
- String token = user.getSettings().getInboxFolderName();
- if (isMessagePlace(token)) {
- initPlace4Message(token);
- } else {
- initPlace4Folder(token);
- }
- this.user = user;
- }
-
- private boolean isMessagePlace(String token) {
- return token.contains(DELIMITER) && isEndWIthDigit(token);
- }
-
- private void initPlace4Folder(String token) {
- fullName = token;
- }
+ private String token;
- private void initPlace4Message(String token) {
- fullName = token.substring(0, token.lastIndexOf(DELIMITER));
- uid = token.substring(token.lastIndexOf(DELIMITER) + 1);
- }
-
- private boolean isEndWIthDigit(String token) {
- return token.substring(token.lastIndexOf(DELIMITER) + 1)
- .matches("\\d+");
- }
-
- public String getUid() {
- return uid;
- }
-
- public String getFullName() {
- return fullName;
+ public MailFolderPlace(String token) {
+ this.token = token;
}
- public User getUser(){
- return user;
- }
// the main place use empty string such that colon'd disappear
- @Prefix("")
+ @Prefix("folder")
public static class Tokenizer implements
PlaceTokenizer<MailFolderPlace> {
@Override
@@ -96,36 +41,11 @@ public class MailFolderPlace extends Abs
@Override
public String getToken(MailFolderPlace place) {
- StringBuilder token = new
StringBuilder(place.getFullName());
- if (place.getUid() != null && place.getUid().length() >
0) {
- token.append(DELIMITER + place.getUid());
- }
- return token.toString();
+ return place.getToken();
}
}
- @Override
- public boolean equals(Object o) {
- if (o == null)
- return false;
- if (o == this)
- return true;
- if (o.getClass() != getClass())
- return false;
- MailFolderPlace place = (MailFolderPlace) o;
- return (fullName == place.fullName || (fullName != null &&
fullName
- .equals(place.getFullName())))
- && (uid == place.uid || (uid != null &&
uid.equals(place
- .getUid())));
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result
- + ((fullName == null) ? 0 :
fullName.hashCode());
- result = prime * result + ((uid == null) ? 0 : uid.hashCode());
- return result;
+ public String getToken() {
+ return token;
}
}
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml
Thu Sep 12 04:37:35 2013
@@ -310,7 +310,7 @@
</g:east>
<g:center>
<g:DockLayoutPanel>
- <g:north size="37">
+ <g:north size="23">
<g:SimplePanel
ui:field="editorToolBar" />
</g:north>
<g:center>
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java
Thu Sep 12 04:37:35 2013
@@ -218,23 +218,28 @@ import java.util.logging.Logger;
=======
>>>>>>> scrub code
import org.apache.hupa.client.activity.FolderListActivity;
+import org.apache.hupa.client.ui.RightCellTree.Css;
>>>>>>> integrate all of the views to their corresponding activities and
>>>>>>> mappers
import com.google.gwt.core.client.GWT;
+import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.cellview.client.CellTree;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.inject.Inject;
public class FolderListView extends Composite implements
FolderListActivity.Displayable {
@UiField SimplePanel thisView;
- private RightCellTree cellTree;
+ private CellTree cellTree;
+ private FoldersTreeViewModel viewModel;
@Inject
public FolderListView(final FoldersTreeViewModel viewModel) {
initWidget(binder.createAndBindUi(this));
<<<<<<< HEAD
+<<<<<<< HEAD
// if (place instanceof ComposePlace) {
// contactPanel = new HTMLPanel("contacts list");
// if (thisView.getWidget() != null
@@ -263,11 +268,30 @@ public class FolderListView extends Comp
>>>>>>> fixed issue#32
=======
cellTree = new RightCellTree(viewModel);
+=======
+ this.viewModel = viewModel;
+ cellTree = new CellTree(viewModel,null,Resources.INSTANCE);
+>>>>>>> try to rearrange the places and history managment.
cellTree.setAnimationEnabled(true);
thisView.add(cellTree);
>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite,
>>>>>>> don't use contact instead of folders list
}
+ public interface Resources extends CellTree.Resources {
+
+ Resources INSTANCE = GWT.create(Resources.class);
+ @Source("res/CssFolderListView.css")
+ public Css cellTreeStyle();
+
+ @Source("res/listicons.png")
+ public ImageResource listicons();
+ }
+
+ @Override
+ public void refresh(){
+ viewModel.refresh();
+ }
+
interface FolderListUiBinder extends UiBinder<SimplePanel,
FolderListView> {
}
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FoldersTreeViewModel.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FoldersTreeViewModel.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FoldersTreeViewModel.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FoldersTreeViewModel.java
Thu Sep 12 04:37:35 2013
@@ -23,7 +23,7 @@ import java.util.List;
import org.apache.hupa.client.HupaController;
import org.apache.hupa.client.activity.NotificationActivity;
-import org.apache.hupa.client.activity.TopBarActivity;
+import org.apache.hupa.client.place.IMAPMessagePlace;
import org.apache.hupa.client.place.MailFolderPlace;
import org.apache.hupa.client.rf.HupaRequestFactory;
import org.apache.hupa.shared.domain.ImapFolder;
@@ -56,7 +56,6 @@ public class FoldersTreeViewModel implem
@Inject private HupaRequestFactory rf;
@Inject private HupaController controller;
@Inject private PlaceController placeController;
- @Inject private TopBarActivity.Displayable topBar;
@Inject private NotificationActivity.Displayable notice;
private User user;
private ImapFolder currentFolder;
@@ -69,11 +68,11 @@ public class FoldersTreeViewModel implem
@SuppressWarnings("unchecked")
@Override
public void onSelectionChange(SelectionChangeEvent
event) {
- topBar.showLoading("loading");//FIXME delay to
show, why
+ controller.showTopLoading("Loading...");
SingleSelectionModel<ImapFolder> selectionModel
= (SingleSelectionModel<ImapFolder>) event.getSource();
currentFolder =
selectionModel.getSelectedObject();
eventBus.fireEvent(new LoadMessagesEvent(user,
selectionModel.getSelectedObject()));
- placeController.goTo(new
MailFolderPlace(selectionModel.getSelectedObject().getFullName()));
+ placeController.goTo(new
IMAPMessagePlace(selectionModel.getSelectedObject().getFullName()));
}
});
eventBus.addHandler(LoginEvent.TYPE, new LoginEventHandler() {
@@ -90,6 +89,11 @@ public class FoldersTreeViewModel implem
return item == null ? null :
item.getFullName();
}
});
+ private ImapFolderListDataProvider dataProvider;
+
+ public void refresh() {
+ dataProvider.refresh();
+ }
/**
* Get the {@link NodeInfo} that provides the children of the specified
@@ -97,11 +101,12 @@ public class FoldersTreeViewModel implem
*/
@Override
public <T> NodeInfo<?> getNodeInfo(T value) {
- return new DefaultNodeInfo<ImapFolder>(new
ImapFolderListDataProvider(rf, (ImapFolder) value), new FolderCell(
- ClickEvent.getType().getName()),
selectionModel, null);
+ dataProvider = new ImapFolderListDataProvider(rf, (ImapFolder)
value);
+ return new DefaultNodeInfo<ImapFolder>(dataProvider, new
FolderCell(ClickEvent.getType().getName()),
+ selectionModel, null);
}
- class FolderCell extends AbstractCell<ImapFolder> implements
HasEditable{
+ class FolderCell extends AbstractCell<ImapFolder> implements
HasEditable {
public FolderCell(String... consumedEvents) {
super(consumedEvents);
}
@@ -111,26 +116,32 @@ public class FoldersTreeViewModel implem
if (value != null) {
sb.appendEscaped(value.getName());
}
+ if (value.getUnseenMessageCount() > 0) {
+ sb.appendHtmlConstant("<span
style='position:absolute;right:6px;top:3px;font-weight:bold;'>(");
+ sb.appendHtmlConstant("" +
value.getUnseenMessageCount());
+ sb.appendHtmlConstant(")</span>");
+ }
}
-// @Override
-// public Set<String> getConsumedEvents() {
-// HashSet<String> events = new HashSet<String>();
-// events.add("click");
-// return events;
-// }
+ // @Override
+ // public Set<String> getConsumedEvents() {
+ // HashSet<String> events = new HashSet<String>();
+ // events.add("click");
+ // return events;
+ // }
// TODO is this a click event?
@Override
public void onBrowserEvent(Context context, Element parent,
ImapFolder value, NativeEvent event,
ValueUpdater<ImapFolder> valueUpdater) {
super.onBrowserEvent(context, parent, value, event,
valueUpdater);
-// if("click".equals(event.getType())){//FIXME why slow in
debug mode
-// topBar.showLoading();
-// }
- if (clickSameFolder(value)) {
+ // if("click".equals(event.getType())){//FIXME why slow
in debug
+ // mode
+ // topBar.showLoading();
+ // }
+// if (clickSameFolder(value)) {
eventBus.fireEvent(new LoadMessagesEvent(user,
value));
placeController.goTo(new
MailFolderPlace(value.getFullName()));
- }
+// }
}
private boolean clickSameFolder(ImapFolder value) {
@@ -139,17 +150,17 @@ public class FoldersTreeViewModel implem
@Override
public void startEdit() {
// TODO Auto-generated method stub
-
+
}
@Override
public void cancelEdit() {
// TODO Auto-generated method stub
-
+
}
@Override
public void stopEdit() {
// TODO Auto-generated method stub
-
+
}
@Override
public boolean isEdit() {
@@ -158,10 +169,11 @@ public class FoldersTreeViewModel implem
}
}
- public class ImapFolderListDataProvider extends
AsyncDataProvider<ImapFolder> {
+ public class ImapFolderListDataProvider extends
AsyncDataProvider<ImapFolder> implements HasRefresh{
private HupaRequestFactory rf;
private ImapFolder folder;
+ private HasData<ImapFolder> display;
public ImapFolderListDataProvider(HupaRequestFactory rf,
ImapFolder folder) {
this.rf = rf;
@@ -171,6 +183,7 @@ public class FoldersTreeViewModel implem
@Override
public void addDataDisplay(HasData<ImapFolder> display) {
super.addDataDisplay(display);
+ this.display = display;
}
@Override
@@ -196,6 +209,11 @@ public class FoldersTreeViewModel implem
}
+ @Override
+ public void refresh() {
+ this.onRangeChanged(display);
+ }
+
}
/**
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelPropertiesView.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelPropertiesView.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelPropertiesView.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelPropertiesView.java
Thu Sep 12 04:37:35 2013
@@ -343,7 +343,7 @@ public class LabelPropertiesView extends
>>>>>>> add rename RF to label setting feature
=======
int parentIndex = wholeList.indexOf(isParent ? labelNode :
labelNode.getParent());
- parent.setSelectedIndex(parentIndex < 0 ? 0 : parentIndex);
+ parent.setSelectedIndex(parentIndex < 0 ? 0 : parentIndex + 1);
}
@Override
public HasClickHandlers getSave() {
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.java
Thu Sep 12 04:37:35 2013
@@ -142,6 +142,7 @@ public class MessageListFooterView exten
SimplePager.Resources pagerResources =
GWT.create(SimplePager.Resources.class);
simplePager = new SimplePager(TextLocation.CENTER,
pagerResources, false, 0, true);
simplePager.setDisplay(table);
+ simplePager.startLoading();
initWidget(binder.createAndBindUi(this));
}
@@ -161,11 +162,15 @@ public class MessageListFooterView exten
private static MessageListFooterUiBinder binder =
GWT.create(MessageListFooterUiBinder.class);
<<<<<<< HEAD
+<<<<<<< HEAD
+=======
+>>>>>>> try to rearrange the places and history managment.
@Override
public SimplePager getPager() {
return simplePager;
}
+<<<<<<< HEAD
@Override
public HasVisibility getLabelsPanel() {
return labelsPanel;
@@ -178,4 +183,6 @@ public class MessageListFooterView exten
=======
>>>>>>> make login page as one part of the overall layout & splite layout to
>>>>>>> little one
+=======
+>>>>>>> try to rearrange the places and history managment.
}
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java
Thu Sep 12 04:37:35 2013
@@ -631,7 +631,7 @@ public class MessagesCellTable extends D
return row.getFlags().contains(IMAPFlag.SEEN);
}
public void markRead(final Message message, final boolean read) {
- setStyleBasedOnSelected(read);
+// setStyleBasedOnSelected(read);
flush();
}
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java?rev=1522371&r1=1522370&r2=1522371&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java
Thu Sep 12 04:37:35 2013
@@ -93,9 +93,14 @@ public class _CenterSettingPanel extends
import java.util.Arrays;
import java.util.List;
+<<<<<<< HEAD
import com.google.gwt.cell.client.TextCell;
>>>>>>> make label settings prototype
+=======
+import com.google.gwt.cell.client.AbstractCell;
+>>>>>>> try to rearrange the places and history managment.
import com.google.gwt.core.client.GWT;
+import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.cellview.client.CellList;
@@ -115,20 +120,20 @@ public class _CenterSettingPanel extends
@UiField SplitLayoutPanel thisPanel;
@UiField SimpleLayoutPanel settingsTab;
-
+
@UiField SimpleLayoutPanel labelListContainer;
@UiField SimplePanel labelPropertiesContainer;
-
+
public _CenterSettingPanel() {
-
+
initWidget(binder.createAndBindUi(this));
settingsTab.setWidget(createTabList());
}
+
private static final List<String> TABS = Arrays.asList("Folders");
private CellList<String> createTabList() {
- TextCell textCell = new TextCell();
- CellList<String> cellList = new CellList<String>(textCell);
+ CellList<String> cellList = new CellList<String>(new
SpanCell());
cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
final SingleSelectionModel<String> selectionModel = new
SingleSelectionModel<String>();
cellList.setSelectionModel(selectionModel);
@@ -136,7 +141,7 @@ public class _CenterSettingPanel extends
public void onSelectionChange(SelectionChangeEvent
event) {
String selected =
selectionModel.getSelectedObject();
if (selected != null) {
-// Window.alert("You selected: " +
selected);
+ // Window.alert("You selected: " +
selected);
}
}
});
@@ -148,9 +153,28 @@ public class _CenterSettingPanel extends
}
<<<<<<< HEAD
+<<<<<<< HEAD
interface _CeterSettingPanelUiBinder extends UiBinder<DockLayoutPanel,
_CenterSettingPanel> {
>>>>>>> attempt to add label setting feature
=======
+=======
+ static class SpanCell extends AbstractCell<String> {
+
+ public SpanCell() {
+ }
+
+ @Override
+ public void render(Context context, String value,
SafeHtmlBuilder sb) {
+ if (value == null) {
+ return;
+ }
+ sb.appendHtmlConstant("<span style='display:
block;color: #376572;text-shadow: 0px 1px 1px #fff;text-decoration:
none;cursor: default;padding: 6px 8px 2px 8px;height: 17px;white-space:
nowrap;'>");
+ sb.appendHtmlConstant(value);
+ sb.appendHtmlConstant("</span>");
+ }
+ }
+
+>>>>>>> try to rearrange the places and history managment.
interface _CeterSettingPanelUiBinder extends UiBinder<SplitLayoutPanel,
_CenterSettingPanel> {
>>>>>>> add layout styles to three part
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]