james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From don...@apache.org
Subject svn commit: r1522416 - in /james/hupa/trunk/client/src/main/java/org/apache/hupa/client: activity/ ioc/ mapper/ ui/
Date Thu, 12 Sep 2013 04:55:43 GMT
Author: dongxu
Date: Thu Sep 12 04:55:42 2013
New Revision: 1522416

URL: http://svn.apache.org/r1522416
Log:
prepare to add search feature

Modified:
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/ComposeActivity.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/SearchBoxActivity.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/ActivityManagerInitializer.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SearchBoxView.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/ComposeActivity.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/ComposeActivity.java?rev=1522416&r1=1522415&r2=1522416&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/ComposeActivity.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/ComposeActivity.java
Thu Sep 12 04:55:42 2013
@@ -53,8 +53,6 @@ import org.apache.hupa.shared.domain.Sen
 import org.apache.hupa.shared.domain.SendReplyMessageAction;
 import org.apache.hupa.shared.domain.SmtpMessage;
 import org.apache.hupa.shared.domain.User;
-import org.apache.hupa.shared.events.ContactsUpdatedEvent;
-import org.apache.hupa.shared.events.ContactsUpdatedEventHandler;
 import org.apache.hupa.shared.events.LoginEvent;
 import org.apache.hupa.shared.events.LoginEventHandler;
 import org.apache.hupa.shared.events.MailToEvent;

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/SearchBoxActivity.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/SearchBoxActivity.java?rev=1522416&r1=1522415&r2=1522416&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/SearchBoxActivity.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/SearchBoxActivity.java
Thu Sep 12 04:55:42 2013
@@ -22,12 +22,16 @@ package org.apache.hupa.client.activity;
 import java.util.List;
 
 import org.apache.hupa.shared.domain.Message;
+<<<<<<< HEAD
 import org.apache.hupa.shared.events.MessagesReceivedEvent;
 import org.apache.hupa.shared.events.MessagesReceivedEventHandler;
 import org.apache.hupa.shared.events.RefreshMessagesEvent;
 
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
+=======
+
+>>>>>>> prepare to add search feature
 import com.google.gwt.event.dom.client.HasClickHandlers;
 import com.google.gwt.event.shared.EventBus;
 import com.google.gwt.user.client.ui.AcceptsOneWidget;
@@ -39,6 +43,7 @@ public class SearchBoxActivity extends A
 
 	@Override
 	public void start(AcceptsOneWidget container, EventBus eventBus) {
+<<<<<<< HEAD
 		bindTo(eventBus);
 		container.setWidget(display.asWidget());
 		
@@ -68,6 +73,9 @@ public class SearchBoxActivity extends A
 //            }
 //
 //        }));
+=======
+		container.setWidget(display.asWidget());
+>>>>>>> prepare to add search feature
 	}
 
 	@Inject private Displayable display;

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=1522416&r1=1522415&r2=1522416&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:55:42 2013
@@ -162,6 +162,7 @@ import org.apache.hupa.client.activity.M
 import org.apache.hupa.client.activity.MessageSendActivity;
 import org.apache.hupa.client.activity.NavigationActivity;
 import org.apache.hupa.client.activity.NotificationActivity;
+import org.apache.hupa.client.activity.SearchBoxActivity;
 import org.apache.hupa.client.activity.StatusActivity;
 import org.apache.hupa.client.activity.ToolBarActivity;
 import org.apache.hupa.client.activity.TopActivity;
@@ -252,6 +253,7 @@ import org.apache.hupa.client.mapper.Mes
 import org.apache.hupa.client.mapper.MessageListFooterActivityMapper;
 import org.apache.hupa.client.mapper.NavigationActivityMapper;
 import org.apache.hupa.client.mapper.NotificationActivityMapper;
+import org.apache.hupa.client.mapper.SearchBoxActivityMapper;
 import org.apache.hupa.client.mapper.StatusActivityMapper;
 import org.apache.hupa.client.mapper.ToolBarActivityMapper;
 <<<<<<< HEAD
@@ -296,6 +298,7 @@ import org.apache.hupa.client.ui.Message
 import org.apache.hupa.client.ui.MessagesCellTable;
 import org.apache.hupa.client.ui.NavigationView;
 import org.apache.hupa.client.ui.NotificationView;
+import org.apache.hupa.client.ui.SearchBoxView;
 import org.apache.hupa.client.ui.StatusView;
 import org.apache.hupa.client.ui.ToolBarView;
 import org.apache.hupa.client.ui.TopBarView;
@@ -420,6 +423,9 @@ public class AppGinModule extends Abstra
 		bind(ComposeToolBarActivity.class).in(Singleton.class);
 		bind(ComposeActivity.class).in(Singleton.class);
 <<<<<<< HEAD
+<<<<<<< HEAD
+=======
+>>>>>>> prepare to add search feature
 		bind(SearchBoxActivity.class).in(Singleton.class);
 		
 		bind(LabelListActivity.class).in(Singleton.class);
@@ -990,10 +996,14 @@ public class AppGinModule extends Abstra
 	@Singleton
 <<<<<<< HEAD
 <<<<<<< HEAD
+<<<<<<< HEAD
+=======
+>>>>>>> prepare to add search feature
 	@Named("SearchBoxRegion")
 	public ActivityManager getSearchBoxActivityMapper(SearchBoxActivityMapper activityMapper,
 			EventBus eventBus) {
 		return new ActivityManager(activityMapper, eventBus);
+<<<<<<< HEAD
 =======
 	protected DispatchAsync provideDispatchAsync(ExceptionHandler exceptionHandler) {
 		return new CachingDispatchAsync(exceptionHandler);
@@ -1041,6 +1051,12 @@ public class AppGinModule extends Abstra
 >>>>>>> use GinFactoryModuleBuilder to inject multiple displayable instances
of some activities
 =======
 >>>>>>> make compose panel managed by activity manager, there is a problem
here that whether the hidden view will be lazy loaded regarding the code split mechnism
+=======
+	}
+
+	@Provides
+	@Singleton
+>>>>>>> prepare to add search feature
 	public PlaceController getPlaceController(EventBus eventBus) {
 		return new PlaceController(eventBus);
 	}

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ActivityManagerInitializer.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ActivityManagerInitializer.java?rev=1522416&r1=1522415&r2=1522416&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ActivityManagerInitializer.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ActivityManagerInitializer.java
Thu Sep 12 04:55:42 2013
@@ -51,6 +51,7 @@ public class ActivityManagerInitializer 
 			@Named("MessageContentRegion") ActivityManager messageContentActivityManager,
 			@Named("StatusRegion") ActivityManager statusActivityManager,
 			@Named("ComposeToolBarRegion") ActivityManager composeToolBarActivityManager,
+			@Named("SearchBoxRegion") ActivityManager searchBoxActivityManager,
 			@Named("ComposeRegion") ActivityManager composeActivityManager) {
 		contactsListActivityManager.setDisplay(hupaLayout.getContactsListView());
 		contactPropertiesActivityManager.setDisplay(hupaLayout.getContactPropertiesView());
@@ -68,6 +69,7 @@ public class ActivityManagerInitializer 
 		messageContentActivityManager.setDisplay(hupaLayout.getMessageContentView());
 		statusActivityManager.setDisplay(hupaLayout.getStatusView());
 		composeToolBarActivityManager.setDisplay(hupaLayout.getComposeToolBarView());
+		searchBoxActivityManager.setDisplay(hupaLayout.getSearchBoxView());
 		composeActivityManager.setDisplay(hupaLayout.getComposeView());
 	}
 

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.java?rev=1522416&r1=1522415&r2=1522416&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.java Thu Sep
12 04:55:42 2013
@@ -135,7 +135,11 @@ public class HupaLayout implements HupaL
 	public AcceptsOneWidget getComposeToolBarView() {
 		return toolPanel.getComposeToolBarView();
 	}
-
+	
+	@Override
+	public AcceptsOneWidget getSearchBoxView() {
+		return toolPanel.getSearchBoxView();
+	}
 	@Override
 	public AcceptsOneWidget getSearchBoxView() {
 		return toolPanel.getSearchBoxView();

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java?rev=1522416&r1=1522415&r2=1522416&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java Thu
Sep 12 04:55:42 2013
@@ -170,5 +170,10 @@ public interface HupaLayoutable extends 
 	AcceptsOneWidget getContactPropertiesView();
 
 	AcceptsOneWidget getContactsListView();
+<<<<<<< HEAD
 >>>>>>> prepared for issue#73, established the UI layout
+=======
+
+	AcceptsOneWidget getSearchBoxView();
+>>>>>>> prepare to add search feature
 }

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SearchBoxView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SearchBoxView.java?rev=1522416&r1=1522415&r2=1522416&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SearchBoxView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SearchBoxView.java Thu
Sep 12 04:55:42 2013
@@ -29,8 +29,11 @@ import com.google.gwt.event.dom.client.H
 import com.google.gwt.event.dom.client.KeyCodes;
 import com.google.gwt.event.dom.client.KeyUpEvent;
 import com.google.gwt.event.dom.client.KeyUpHandler;
+<<<<<<< HEAD
 import com.google.gwt.event.logical.shared.ValueChangeEvent;
 import com.google.gwt.event.logical.shared.ValueChangeHandler;
+=======
+>>>>>>> prepare to add search feature
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
 import com.google.gwt.user.client.ui.Button;
@@ -39,11 +42,15 @@ import com.google.gwt.user.client.ui.Has
 import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.MultiWordSuggestOracle;
 import com.google.gwt.user.client.ui.SuggestBox;
+<<<<<<< HEAD
 import com.google.gwt.user.client.ui.TextBox;
+=======
+>>>>>>> prepare to add search feature
 
 public class SearchBoxView extends Composite implements SearchBoxActivity.Displayable {
 
 	private MultiWordSuggestOracle oracle = new MultiWordSuggestOracle(" ,@");
+<<<<<<< HEAD
 	private TextBox searchBox = new TextBox();
 	private Button searchButton = new Button("Search");
 	@UiField protected HorizontalPanel thisPanel;
@@ -65,6 +72,18 @@ public class SearchBoxView extends Compo
 		searchBox.addKeyUpHandler(new KeyUpHandler() {
 			public void onKeyUp(KeyUpEvent event) {
 				if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER || (event.getNativeKeyCode() == KeyCodes.KEY_BACKSPACE
&& searchBox.getText().trim().equals(""))) {
+=======
+	private SuggestBox searchBox = new SuggestBox(oracle);
+	private Button searchButton = new Button("Search");
+	@UiField protected HorizontalPanel thisPanel;
+
+	public SearchBoxView() {
+		initWidget(binder.createAndBindUi(this));
+
+		searchBox.addKeyUpHandler(new KeyUpHandler() {
+			public void onKeyUp(KeyUpEvent event) {
+				if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
+>>>>>>> prepare to add search feature
 					searchButton.click();
 				}
 			}

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java?rev=1522416&r1=1522415&r2=1522416&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java Thu Sep
12 04:55:42 2013
@@ -25,7 +25,6 @@ import com.google.gwt.uibinder.client.Ui
 import com.google.gwt.user.client.ui.AcceptsOneWidget;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.DockLayoutPanel;
-import com.google.gwt.user.client.ui.HTMLPanel;
 import com.google.gwt.user.client.ui.IsWidget;
 import com.google.gwt.user.client.ui.SimplePanel;
 import com.google.gwt.user.client.ui.Widget;
@@ -35,7 +34,7 @@ public class _ToolPanel extends Composit
 	@UiField protected DockLayoutPanel thisPanel;
 	@UiField protected SimplePanel toolBarContainer;
 	@UiField protected SimplePanel composeToolBarContainer;
-	@UiField protected HTMLPanel searchFilterContainer;
+	@UiField protected SimplePanel searchBoxContainer;
 
 	public _ToolPanel() {
 		initWidget(binder.createAndBindUi(this));
@@ -55,13 +54,13 @@ public class _ToolPanel extends Composit
 
 	private void hideAll() {
 		toolBarContainer.setVisible(false);
-		searchFilterContainer.setVisible(false);
+		searchBoxContainer.setVisible(false);
 		composeToolBarContainer.setVisible(false);
 	}
 
 	protected void toggleToCompose(boolean visible) {
 		toolBarContainer.setVisible(!visible);
-		searchFilterContainer.setVisible(!visible);
+		searchBoxContainer.setVisible(!visible);
 		composeToolBarContainer.setVisible(visible);
 	}
 
@@ -83,6 +82,15 @@ public class _ToolPanel extends Composit
 		};
 	}
 
+	public AcceptsOneWidget getSearchBoxView() {
+		return new AcceptsOneWidget() {
+			@Override
+			public void setWidget(IsWidget w) {
+				searchBoxContainer.setWidget(Widget.asWidgetOrNull(w));
+			}
+		};
+	}
+
 	interface _ToolPanelUiBinder extends UiBinder<DockLayoutPanel, _ToolPanel> {
 	}
 

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml?rev=1522416&r1=1522415&r2=1522416&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml Thu
Sep 12 04:55:42 2013
@@ -15,14 +15,12 @@
 		<g:west size="518">
 			<g:SimplePanel ui:field="toolBarContainer" />
 		</g:west>
-		<g:east size="180">
-			<g:HTMLPanel ui:field="searchFilterContainer">
-				Search
-				<input style='color: gray;' value='//TODO' />
-			</g:HTMLPanel>
-		</g:east>
 		<g:center>
-            <g:SimplePanel ui:field="composeToolBarContainer" />
+			<g:SimplePanel ui:field="composeToolBarContainer" />
 		</g:center>
+		<g:east size="200">
+			<g:SimplePanel ui:field="searchBoxContainer">
+			</g:SimplePanel>
+		</g:east>
 	</g:DockLayoutPanel>
 </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


Mime
View raw message