You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by do...@apache.org on 2013/09/12 06:15:26 UTC

svn commit: r1522317 - in /james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui: ComposeToolBarView.ui.xml MessageListView.java ToolBarView.java ToolBarView.ui.xml

Author: dongxu
Date: Thu Sep 12 04:15:25 2013
New Revision: 1522317

URL: http://svn.apache.org/r1522317
Log:
1.do not select the message which is being focused on. 2.create the mark popup menu

Modified:
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeToolBarView.ui.xml
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListView.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeToolBarView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeToolBarView.ui.xml?rev=1522317&r1=1522316&r2=1522317&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeToolBarView.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeToolBarView.ui.xml Thu Sep 12 04:15:25 2013
@@ -13,10 +13,14 @@
 	xmlns:g='urn:import:com.google.gwt.user.client.ui'>
 	<ui:image field="buttons" src="res/buttons.png" />
 <<<<<<< HEAD
+<<<<<<< HEAD
 	<ui:style>
 =======
 	<ui:style type="org.apache.hupa.client.ui.ToolBarView.Style">
 >>>>>>> toggle to display/hide the tool bar view to adjust the compose and message panel
+=======
+	<ui:style>
+>>>>>>> 1.do not select the message which is being focused on. 2.create the mark popup menu
 		.bar {
 			position: absolute;
 			display: block;

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListView.java?rev=1522317&r1=1522316&r2=1522317&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListView.java Thu Sep 12 04:15:25 2013
@@ -127,7 +127,6 @@ public class MessageListView extends Com
 					for (Message msg : displayedItems) {
 						table.getSelectionModel().setSelected(msg, false);
 					}
-					table.getSelectionModel().setSelected(event.getValue(), true);
 					GetMessageDetailsRequest req = requestFactory.messageDetailsRequest();
 					GetMessageDetailsAction action = req.create(GetMessageDetailsAction.class);
 					final ImapFolder f = req.create(ImapFolder.class);

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.java?rev=1522317&r1=1522316&r2=1522317&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.java Thu Sep 12 04:15:25 2013
@@ -62,8 +62,12 @@ import org.apache.hupa.shared.domain.Use
 
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.event.dom.client.ClickEvent;
+<<<<<<< HEAD
 >>>>>>> composing composing panel
 =======
+=======
+import com.google.gwt.event.dom.client.ClickHandler;
+>>>>>>> 1.do not select the message which is being focused on. 2.create the mark popup menu
 import com.google.gwt.event.dom.client.HasClickHandlers;
 >>>>>>> coping with reply and forward sending message
 import com.google.gwt.place.shared.PlaceController;
@@ -364,8 +368,11 @@ import com.google.gwt.uibinder.client.Ui
 >>>>>>> composing composing panel
 import com.google.gwt.user.client.ui.Anchor;
 import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.DecoratedPopupPanel;
 import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.HTMLPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
 import com.google.inject.Inject;
 import com.google.web.bindery.requestfactory.shared.Receiver;
 
@@ -387,6 +394,20 @@ public class ToolBarView extends Composi
 
 	@UiField Style style;
 
+	interface Style extends CssResource {
+		String disabledButton();
+		String popupMenu();
+		String activeIcon();
+		String toolBarMenu();
+		String listicon();
+		String read();
+		String unread();
+	}
+
+	private VerticalPanel popup;
+	private Anchor markRead;
+	private Anchor markUnread;
+
 	private Parameters parameters;
 
 	public Parameters getParameters() {
@@ -444,10 +465,6 @@ public class ToolBarView extends Composi
 		}
 	}
 
-	interface Style extends CssResource {
-		String disabledButton();
-	}
-
 	@UiHandler("compose")
 	void handleClick(ClickEvent e) {
 		placeController.goTo(new ComposePlace("new").with(parameters));
@@ -493,11 +510,40 @@ public class ToolBarView extends Composi
 		initWidget(binder.createAndBindUi(this));
 <<<<<<< HEAD
 <<<<<<< HEAD
+<<<<<<< HEAD
 >>>>>>> make login page as one part of the overall layout & splite layout to little one
 =======
 		reply.addStyleName(style.disabledButton());
 >>>>>>> dynamical style tool bar
 =======
+=======
+		final DecoratedPopupPanel simplePopup = new DecoratedPopupPanel(true);
+		simplePopup.addStyleName(style.popupMenu());
+		mark.addClickHandler(new ClickHandler() {
+			public void onClick(ClickEvent event) {
+				// Reposition the popup relative to the button
+				Widget source = (Widget) event.getSource();
+				int left = source.getAbsoluteLeft();
+				int top = source.getAbsoluteTop() + source.getOffsetHeight();
+				simplePopup.setPopupPosition(left, top);
+				// Show the popup
+				simplePopup.show();
+			}
+		});
+		popup = new VerticalPanel();
+		markRead = new Anchor("As Unread");
+		markUnread = new Anchor("As Read");
+		popup.addStyleName(style.toolBarMenu());
+		markRead.addStyleName(style.activeIcon());
+		markRead.addStyleName(style.listicon());
+		markRead.addStyleName(style.read());
+		markUnread.addStyleName(style.activeIcon());
+		markUnread.addStyleName(style.listicon());
+		markUnread.addStyleName(style.unread());
+		popup.add(markRead);
+		popup.add(markUnread);
+		simplePopup.setWidget(popup);
+>>>>>>> 1.do not select the message which is being focused on. 2.create the mark popup menu
 	}
 
 	@Override
@@ -522,6 +568,7 @@ public class ToolBarView extends Composi
 		replyAllGroup.addStyleName(style.disabledButton());
 		forwardGroup.addStyleName(style.disabledButton());
 		delete.addStyleName(style.disabledButton());
+		mark.addStyleName(style.disabledButton());
 	}
 
 	@Override
@@ -530,7 +577,11 @@ public class ToolBarView extends Composi
 		replyAllGroup.removeStyleName(style.disabledButton());
 		forwardGroup.removeStyleName(style.disabledButton());
 		delete.removeStyleName(style.disabledButton());
+<<<<<<< HEAD
 >>>>>>> add enable tool bar buttons toggling event, with being related to issue #31
+=======
+		mark.removeStyleName(style.disabledButton());
+>>>>>>> 1.do not select the message which is being focused on. 2.create the mark popup menu
 	}
 
 	interface ToolBarUiBinder extends UiBinder<FlowPanel, ToolBarView> {

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml?rev=1522317&r1=1522316&r2=1522317&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml Thu Sep 12 04:15:25 2013
@@ -43,6 +43,9 @@
 		}
 		
 <<<<<<< HEAD
+<<<<<<< HEAD
+=======
+>>>>>>> 1.do not select the message which is being focused on. 2.create the mark popup menu
 		@sprite .listicon {
 			gwt-image: 'listicons';
 			display: block;
@@ -53,8 +56,11 @@
 			opacity: 0.99;
 		}
 		
+<<<<<<< HEAD
 =======
 >>>>>>> make login page as one part of the overall layout & splite layout to little one
+=======
+>>>>>>> 1.do not select the message which is being focused on. 2.create the mark popup menu
 		@sprite .button {
 			gwt-image: 'buttons';
 			text-align: center;
@@ -272,6 +278,48 @@
 			opacity: 0.4;
 			cursor: default;
 		}
+		
+		.popupMenu {
+			width: auto;
+			background: #444;
+			border: 1px solid #999;
+			z-index: 240;
+			border-radius: 4px;
+			box-shadow: 0 2px 6px 0 #333;
+			-moz-box-shadow: 0 2px 6px 0 #333;
+			-webkit-box-shadow: 0 2px 6px 0 #333;
+			-o-box-shadow: 0 2px 6px 0 #333;
+		}
+		
+		.popupMenu td {
+			border-top: 1px solid #5a5a5a;
+			border-bottom: 1px solid #333;
+		}
+		
+		.toolBarMenu {
+			margin: 0;
+			padding: 0;
+		}
+		
+		.activeIcon {
+			display: block;
+			white-space: nowrap;
+			color: #666;
+			text-shadow: 0px 1px 1px #333;
+			text-decoration: none;
+			min-height: 14px;
+			color: #eee;
+			padding: 2px 20px;
+			cursor: default;
+		}
+		
+		.read {
+			background-position: 0 -1222px;
+		}
+		
+		.unread {
+			background-position: 0 -1198px;
+		}
 	</ui:style>
 
 	<g:FlowPanel addStyleNames="{style.bar}" ui:field="ToolBar">
@@ -308,17 +356,23 @@
 		<g:Anchor ui:field="compose" addStyleNames="{style.button} {style.compose}">Compose</g:Anchor>
 >>>>>>> add enable tool bar buttons toggling event, with being related to issue #31
 		<g:HTMLPanel tag="span" addStyleNames="{style.spacer}"></g:HTMLPanel>
-		<g:Anchor ui:field="reply" addStyleNames="{style.button} {style.reply} {style.disabledButton}">Reply</g:Anchor>
-		<g:HTMLPanel ui:field="replyAllGroup" tag="span" addStyleNames="{style.dropButton} {style.disabledButton}">
-			<g:Anchor ui:field="replyAll" addStyleNames="{style.button} {style.replyAll}">Reply all</g:Anchor>
+		<g:Anchor ui:field="reply"
+			addStyleNames="{style.button} {style.reply} {style.disabledButton}">Reply</g:Anchor>
+		<g:HTMLPanel ui:field="replyAllGroup" tag="span"
+			addStyleNames="{style.dropButton} {style.disabledButton}">
+			<g:Anchor ui:field="replyAll" addStyleNames="{style.button} {style.replyAll}">Reply all
+			</g:Anchor>
 			<g:HTMLPanel tag="span" addStyleNames="{style.dropButtonTip}"></g:HTMLPanel>
 		</g:HTMLPanel>
-		<g:HTMLPanel ui:field="forwardGroup" tag="span" addStyleNames="{style.dropButton} {style.disabledButton}">
-			<g:Anchor ui:field="forward" addStyleNames="{style.button} {style.forward}">Forward</g:Anchor>
+		<g:HTMLPanel ui:field="forwardGroup" tag="span"
+			addStyleNames="{style.dropButton} {style.disabledButton}">
+			<g:Anchor ui:field="forward" addStyleNames="{style.button} {style.forward}">Forward
+			</g:Anchor>
 			<g:HTMLPanel tag="span" addStyleNames="{style.dropButtonTip}"></g:HTMLPanel>
 		</g:HTMLPanel>
 <<<<<<< HEAD
 <<<<<<< HEAD
+<<<<<<< HEAD
 		<g:Anchor addStyleNames="{style.button} {style.delete}">Delete</g:Anchor>
 		<g:Anchor addStyleNames="{style.button} {style.mark}">Mark</g:Anchor>
 		<g:Anchor addStyleNames="{style.button} {style.more}">More</g:Anchor>
@@ -333,5 +387,13 @@
 		<g:Anchor ui:field="mark" addStyleNames="{style.button} {style.mark} {style.disabledButton}">Mark</g:Anchor>
 		<g:Anchor ui:field="more" addStyleNames="{style.button} {style.more} {style.disabledButton}">More</g:Anchor>
 >>>>>>> add enable tool bar buttons toggling event, with being related to issue #31
+=======
+		<g:Anchor ui:field="delete"
+			addStyleNames="{style.button} {style.delete} {style.disabledButton}">Delete</g:Anchor>
+		<g:Anchor ui:field="mark"
+			addStyleNames="{style.button} {style.mark} {style.disabledButton}">Mark</g:Anchor>
+		<g:Anchor ui:field="more"
+			addStyleNames="{style.button} {style.more} {style.disabledButton}">More</g:Anchor>
+>>>>>>> 1.do not select the message which is being focused on. 2.create the mark popup menu
 	</g:FlowPanel>
 </ui:UiBinder>
\ No newline at end of file



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