james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From don...@apache.org
Subject svn commit: r1522403 - in /james/hupa/trunk/client/src/main/java/org/apache/hupa/client: activity/MessageContentActivity.java activity/MessageListActivity.java ui/MessageContentView.java
Date Thu, 12 Sep 2013 04:50:53 GMT
Author: dongxu
Date: Thu Sep 12 04:50:53 2013
New Revision: 1522403

URL: http://svn.apache.org/r1522403
Log:
fixed issue#76 with adding delete handler event

Modified:
    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/ui/MessageContentView.java

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=1522403&r1=1522402&r2=1522403&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:50:53 2013
@@ -191,6 +191,8 @@ import org.apache.hupa.shared.domain.Get
 import org.apache.hupa.shared.domain.GetMessageDetailsResult;
 import org.apache.hupa.shared.domain.ImapFolder;
 import org.apache.hupa.shared.domain.MessageAttachment;
+import org.apache.hupa.shared.events.DeleteClickEvent;
+import org.apache.hupa.shared.events.DeleteClickEventHandler;
 
 import com.google.gwt.activity.shared.Activity;
 import com.google.gwt.event.shared.EventBus;
@@ -210,6 +212,7 @@ public class MessageContentActivity exte
 
 	@Override
 	public void start(AcceptsOneWidget container, EventBus eventBus) {
+		bindTo(eventBus);
 		if (isUidSet()) {
 			GetMessageDetailsRequest req = rf.messageDetailsRequest();
 			GetMessageDetailsAction action = req.create(GetMessageDetailsAction.class);
@@ -238,6 +241,7 @@ public class MessageContentActivity exte
 	}
 
 <<<<<<< HEAD
+<<<<<<< HEAD
 	@Inject private Displayable display;
 <<<<<<< HEAD
 	
@@ -247,6 +251,17 @@ public class MessageContentActivity exte
 =======
 =======
 =======
+=======
+	private void bindTo(EventBus eventBus) {
+		eventBus.addHandler(DeleteClickEvent.TYPE, new DeleteClickEventHandler() {
+			@Override
+			public void onDeleteClickEvent(DeleteClickEvent event) {
+				display.clearContent();
+			}
+		});
+	}
+
+>>>>>>> fixed issue#76 with adding delete handler event
 	private boolean isUidSet() {
 		return uid != null && uid.matches("\\d+");
 	}
@@ -259,6 +274,7 @@ public class MessageContentActivity exte
 	public interface Displayable extends IsWidget {
 >>>>>>> replace with IsWidget
 		void fillMessageContent(String messageContent);
+		void clearContent();
 		void setAttachments(List<MessageAttachment> attachements, String folder, long uid);
 	}
 

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=1522403&r1=1522402&r2=1522403&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:50:53 2013
@@ -341,8 +341,6 @@ public class MessageListActivity extends
 						public void onSuccess(GetMessageDetailsResult response) {
 							eventBus.fireEvent(new ExpandMessageEvent(user, new ImapFolderImpl(folderName), event
 									.getValue(), response.getMessageDetails()));
-							// display.getGrid().getSelectionModel().setSelected(event.getValue(),
-							// true);
 							display.getGrid().getSelectionModel().setSelected(event.getValue(), true);
 							toolBar.enableAllTools(true);
 							ToolBarView.Parameters p = new ToolBarView.Parameters(user, folderName, event.getValue(),

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageContentView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageContentView.java?rev=1522403&r1=1522402&r2=1522403&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageContentView.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageContentView.java
Thu Sep 12 04:50:53 2013
@@ -432,5 +432,13 @@ public class MessageContentView extends 
 				+ "=" + uid + (inline ? "&" + SConsts.PARAM_MODE + "=inline" : "");
 	}
 
+<<<<<<< HEAD
 >>>>>>> fixed issue#64, add attachments region in message content view
+=======
+	@Override
+	public void clearContent() {
+		messageContentHTML.setHTML("");
+	}
+
+>>>>>>> fixed issue#76 with adding delete handler event
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message