james-server-dev mailing list archives

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

URL: http://svn.apache.org/r1522412
Log:
prepared for issue#73, established the UI layout

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/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/mapper/AppPlaceHistoryMapper.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/HupaLayout.ui.xml
    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/NavigationView.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.ui.xml

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=1522412&r1=1522411&r2=1522412&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:54:19 2013
@@ -44,6 +44,7 @@ import org.apache.hupa.client.place.Comp
 <<<<<<< HEAD
 <<<<<<< HEAD
 <<<<<<< HEAD
+<<<<<<< HEAD
 import org.apache.hupa.client.place.ContactPlace;
 import org.apache.hupa.client.place.FolderPlace;
 import org.apache.hupa.client.place.HupaPlace;
@@ -87,6 +88,9 @@ import org.apache.hupa.client.place.Mail
 >>>>>>> prepare to make composeView's reload work
 =======
 =======
+=======
+import org.apache.hupa.client.place.ContactPlace;
+>>>>>>> prepared for issue#73, established the UI layout
 import org.apache.hupa.client.place.FolderPlace;
 import org.apache.hupa.client.place.HupaPlace;
 >>>>>>> change place management and make refresh folder and message
list more gentle
@@ -364,7 +368,9 @@ public class HupaController {
 				//FIXME when gmail mode
 				this.placeController.goTo(new FolderPlace("INBOX"));
 			}
-		} else if (place instanceof SettingPlace) {
+		} else if (place instanceof ContactPlace) {
+			hupaLayout.switchTo(HupaLayout.LAYOUT_CONTACT);
+		}  else if (place instanceof SettingPlace) {
 			hupaLayout.switchTo(HupaLayout.LAYOUT_SETTING);
 		} else if(place instanceof HupaPlace){
 			hupaLayout.switchTo(HupaLayout.LAYOUT_MESSAGE);

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=1522412&r1=1522411&r2=1522412&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:54:19 2013
@@ -52,6 +52,7 @@ import org.apache.hupa.client.activity.C
 import org.apache.hupa.client.activity.ComposeToolBarActivity;
 import org.apache.hupa.client.activity.ContactPropertiesActivity;
 import org.apache.hupa.client.activity.ContactsListActivity;
+<<<<<<< HEAD
 =======
 import org.apache.hupa.client.activity.ComposeContentActivity;
 import org.apache.hupa.client.activity.ComposeHeaderActivity;
@@ -64,6 +65,8 @@ import org.apache.hupa.client.activity.C
 >>>>>>> make send text mail work excellently
 import org.apache.hupa.client.activity.ComposeToolBarActivity;
 >>>>>>> toggle to display/hide the tool bar view to adjust the compose
and message panel
+=======
+>>>>>>> prepared for issue#73, established the UI layout
 import org.apache.hupa.client.activity.FolderListActivity;
 <<<<<<< HEAD
 import org.apache.hupa.client.activity.LabelListActivity;
@@ -233,7 +236,12 @@ import org.apache.hupa.client.mapper.Cac
 import org.apache.hupa.client.mapper.ComposeActivityMapper;
 >>>>>>> make send text mail work excellently
 import org.apache.hupa.client.mapper.ComposeToolBarActivityMapper;
+<<<<<<< HEAD
 >>>>>>> toggle to display/hide the tool bar view to adjust the compose
and message panel
+=======
+import org.apache.hupa.client.mapper.ContactPropertiesActivityMapper;
+import org.apache.hupa.client.mapper.ContactsListActivityMapper;
+>>>>>>> prepared for issue#73, established the UI layout
 import org.apache.hupa.client.mapper.FolderListActivityMapper;
 import org.apache.hupa.client.mapper.LabelListActivityMapper;
 import org.apache.hupa.client.mapper.LabelPropertiesActivityMapper;
@@ -260,6 +268,8 @@ import org.apache.hupa.client.place.Defa
 import org.apache.hupa.client.rf.HupaRequestFactory;
 import org.apache.hupa.client.ui.ComposeToolBarView;
 import org.apache.hupa.client.ui.ComposeView;
+import org.apache.hupa.client.ui.ContactPropertiesView;
+import org.apache.hupa.client.ui.ContactsListView;
 import org.apache.hupa.client.ui.FolderListView;
 import org.apache.hupa.client.ui.FoldersTreeViewModel;
 import org.apache.hupa.client.ui.HupaLayout;
@@ -377,6 +387,7 @@ public class AppGinModule extends Abstra
 		bind(LabelPropertiesActivity.Displayable.class).to(LabelPropertiesView.class).in(Singleton.class);
 		bind(ContactsListActivity.Displayable.class).to(ContactsListView.class).in(Singleton.class);
 		bind(ContactPropertiesActivity.Displayable.class).to(ContactPropertiesView.class).in(Singleton.class);
+<<<<<<< HEAD
 =======
 		bind(ComposeActivity.Displayable.class).to(ComposeView.class).in(Singleton.class);
 <<<<<<< HEAD
@@ -395,6 +406,8 @@ public class AppGinModule extends Abstra
 =======
 		bind(LabelPropertiesActivity.Displayable.class).to(LabelPropertiesView.class).in(Singleton.class);
 >>>>>>> add rename RF to label setting feature
+=======
+>>>>>>> prepared for issue#73, established the UI layout
 
 		bind(LoginActivity.class).in(Singleton.class);
 		bind(TopBarActivity.class).in(Singleton.class);
@@ -716,6 +729,20 @@ public class AppGinModule extends Abstra
 	
 	@Provides
 	@Singleton
+	@Named("ContactsListRegion")
+	public ActivityManager getContactsListActivityMapper(ContactsListActivityMapper activityMapper,
EventBus eventBus) {
+		return new ActivityManager(activityMapper, eventBus);
+	}
+	
+	@Provides
+	@Singleton
+	@Named("ContactPropertiesRegion")
+	public ActivityManager getContactPropertiesActivityMapper(ContactPropertiesActivityMapper
activityMapper, EventBus eventBus) {
+		return new ActivityManager(activityMapper, eventBus);
+	}
+	
+	@Provides
+	@Singleton
 	@Named("LabelListRegion")
 	public ActivityManager getLabelListActivityMapper(LabelListActivityMapper activityMapper,
EventBus eventBus) {
 		return new ActivityManager(activityMapper, 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=1522412&r1=1522411&r2=1522412&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:54:19 2013
@@ -35,8 +35,10 @@ public class ActivityManagerInitializer 
 	@Inject
 	public ActivityManagerInitializer(LoginLayoutable loginLayout, HupaLayoutable hupaLayout,
 
-	@Named("LabelListRegion") ActivityManager labelListActivityManager,
-	@Named("LabelPropertiesRegion") ActivityManager labelPropertiesActivityManager,
+	@Named("ContactsListRegion") ActivityManager contactsListActivityManager,
+			@Named("ContactPropertiesRegion") ActivityManager contactPropertiesActivityManager,
+			@Named("LabelListRegion") ActivityManager labelListActivityManager,
+			@Named("LabelPropertiesRegion") ActivityManager labelPropertiesActivityManager,
 			@Named("LoginPage") ActivityManager loginActivityManager,
 			@Named("TopBarRegion") ActivityManager topBarActivityManager,
 			@Named("LogoRegion") ActivityManager logoActivityManager,
@@ -48,9 +50,10 @@ public class ActivityManagerInitializer 
 			@Named("MessageListFooterRegion") ActivityManager messageListFooterActivityManager,
 			@Named("MessageContentRegion") ActivityManager messageContentActivityManager,
 			@Named("StatusRegion") ActivityManager statusActivityManager,
-			@Named("ComposeToolBarRegion") ActivityManager composeToolBarActivityManager
-			,@Named("ComposeRegion") ActivityManager composeActivityManager
-			) {
+			@Named("ComposeToolBarRegion") ActivityManager composeToolBarActivityManager,
+			@Named("ComposeRegion") ActivityManager composeActivityManager) {
+		contactsListActivityManager.setDisplay(hupaLayout.getContactsListView());
+		contactPropertiesActivityManager.setDisplay(hupaLayout.getContactPropertiesView());
 		labelPropertiesActivityManager.setDisplay(hupaLayout.getLabelPropertiesView());
 		labelListActivityManager.setDisplay(hupaLayout.getLabelListView());
 		loginActivityManager.setDisplay(loginLayout.getLoginView());

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/AppPlaceHistoryMapper.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/AppPlaceHistoryMapper.java?rev=1522412&r1=1522411&r2=1522412&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/AppPlaceHistoryMapper.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/AppPlaceHistoryMapper.java
Thu Sep 12 04:54:19 2013
@@ -20,6 +20,7 @@
 package org.apache.hupa.client.mapper;
 
 import org.apache.hupa.client.place.ComposePlace;
+import org.apache.hupa.client.place.ContactPlace;
 import org.apache.hupa.client.place.DefaultPlace;
 import org.apache.hupa.client.place.MessagePlace;
 import org.apache.hupa.client.place.FolderPlace;
@@ -35,7 +36,8 @@ import com.google.gwt.place.shared.WithT
     MessageSendPlace.Tokenizer.class,
     MessagePlace.Tokenizer.class,
     ComposePlace.Tokenizer.class,
-    SettingPlace.Tokenizer.class
+    SettingPlace.Tokenizer.class,
+    ContactPlace.Tokenizer.class
 })
 public interface AppPlaceHistoryMapper extends PlaceHistoryMapper {
 }

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=1522412&r1=1522411&r2=1522412&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:54:19 2013
@@ -261,7 +261,8 @@ public class HupaLayout implements HupaL
 	 */
 	public static final int LAYOUT_MESSAGE = 0x01;
 	public static final int LAYOUT_COMPOSE = 0x02;
-	public static final int LAYOUT_SETTING = 0x04;
+	public static final int LAYOUT_CONTACT = 0x04;
+	public static final int LAYOUT_SETTING = 0x08;
 
 	@UiField SimplePanel topBarContainer;
 	@UiField SimplePanel logoContainer;
@@ -274,6 +275,7 @@ public class HupaLayout implements HupaL
 	@UiField _CenterPanel centerPanel;
 	@UiField _CenterComposePanel composePanel;
 	@UiField _CenterSettingPanel settingPanel;
+	@UiField _CenterContactPanel contactPanel;
 
 	private LayoutPanel hupaMainPanel;
 
@@ -386,6 +388,7 @@ public class HupaLayout implements HupaL
 
 <<<<<<< HEAD
 <<<<<<< HEAD
+<<<<<<< HEAD
 	@Override
 	public AcceptsOneWidget getComposeHeader() {
 		return centerPanel.getComposeHeader();
@@ -441,11 +444,29 @@ public interface HupaLayout {
 >>>>>>> toggle to display/hide the tool bar view to adjust the compose
and message panel
 =======
 =======
+=======
+	@Override
+	public AcceptsOneWidget getContactsListView() {
+		return contactPanel.getContactListView();
+	}
+
+	@Override
+	public AcceptsOneWidget getContactPropertiesView() {
+		return contactPanel.getContactPropertiesView();
+	}
+
+>>>>>>> prepared for issue#73, established the UI layout
 	private void arrangeLayout(int lyt) {
 		toolPanel.toggleTo(lyt);
 		showOrHideMessage(lyt);
 		showOrHideCompose(lyt);
 		showOrHideSetting(lyt);
+		showOrHideContact(lyt);
+	}
+
+	private void showOrHideContact(int lyt) {
+		mainBox.setWidgetLeftWidth(contactPanel, 0, Unit.PCT, (lyt & LAYOUT_CONTACT) / LAYOUT_CONTACT
* 100, Unit.PCT);
+		mainBox.setWidgetTopHeight(contactPanel, 0, Unit.PCT, (lyt & LAYOUT_CONTACT) / LAYOUT_CONTACT
* 100, Unit.PCT);
 	}
 
 	private void showOrHideSetting(int lyt) {

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.ui.xml?rev=1522412&r1=1522411&r2=1522412&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.ui.xml Thu
Sep 12 04:54:19 2013
@@ -275,6 +275,9 @@
 							<hupa:_CenterSettingPanel ui:field="settingPanel" />
 						</g:layer>
                         <g:layer left="0%" width="0%" top="0%" height="0%">
+                            <hupa:_CenterContactPanel ui:field="contactPanel" />
+                        </g:layer>
+                        <g:layer left="0%" width="0%" top="0%" height="0%">
                             <hupa:_CenterComposePanel ui:field="composePanel" />
                         </g:layer>
 					</g:LayoutPanel>

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=1522412&r1=1522411&r2=1522412&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:54:19 2013
@@ -163,5 +163,12 @@ public interface HupaLayoutable extends 
 	AcceptsOneWidget getLabelPropertiesView();
 
 	void switchTo(int layout);
+<<<<<<< HEAD
 >>>>>>> make layout can be arranged by clicking the navigation buttons;
make the layout changing by set their sizes to zero rather than remove/add from their parent
widgets; merge to the master branch.
+=======
+
+	AcceptsOneWidget getContactPropertiesView();
+
+	AcceptsOneWidget getContactsListView();
+>>>>>>> prepared for issue#73, established the UI layout
 }

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.java?rev=1522412&r1=1522411&r2=1522412&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.java Thu
Sep 12 04:54:19 2013
@@ -24,6 +24,9 @@ package org.apache.hupa.client.ui;
 import org.apache.hupa.client.activity.NavigationActivity;
 <<<<<<< HEAD
 <<<<<<< HEAD
+<<<<<<< HEAD
+=======
+>>>>>>> prepared for issue#73, established the UI layout
 import org.apache.hupa.client.place.ContactPlace;
 import org.apache.hupa.client.place.FolderPlace;
 =======
@@ -74,7 +77,11 @@ public class NavigationView extends Comp
 	@UiField SimplePanel contactOuter;
 =======
 	@UiField Anchor contact;
+<<<<<<< HEAD
 >>>>>>> make navigation styles shufflling be working as expected
+=======
+	@UiField SimplePanel contactOuter;
+>>>>>>> prepared for issue#73, established the UI layout
 	@UiField SimplePanel mailOuter;
 	@UiField SimplePanel settingOuter;
 	
@@ -86,6 +93,7 @@ public class NavigationView extends Comp
 		String settingsInnerSelected();
 		String mailInnerSelected();
 <<<<<<< HEAD
+<<<<<<< HEAD
 		String contactInnerSelected();
 	}
 =======
@@ -107,6 +115,9 @@ public class NavigationView extends Comp
 =======
 >>>>>>> try to make switch to setting work
 =======
+=======
+		String contactInnerSelected();
+>>>>>>> prepared for issue#73, established the UI layout
 	}
 >>>>>>> make navigation styles shufflling be working as expected
 
@@ -170,22 +181,49 @@ public class NavigationView extends Comp
 	@UiHandler("mail")
 	public void onMailClick(ClickEvent e){
 		mailOuter.addStyleName(style.selected());
-		settingOuter.removeStyleName(style.selected());
 		mail.addStyleName(style.mailInnerSelected());
+		
+		settingOuter.removeStyleName(style.selected());
 		setting.removeStyleName(style.settingsInnerSelected());
+		
+		contactOuter.removeStyleName(style.selected());
+		contact.removeStyleName(style.contactInnerSelected());
 		//FIXME need the default one
-		placeController.goTo(new FolderPlace("Mock-Inbox"));
+		placeController.goTo(new FolderPlace("INBOX"));
 	}
 	
+	
+	
 	@UiHandler("setting")
 	public void onSettingClick(ClickEvent e){
 		mailOuter.removeStyleName(style.selected());
-		settingOuter.addStyleName(style.selected());
 		mail.removeStyleName(style.mailInnerSelected());
+		contactOuter.removeStyleName(style.selected());
+		contact.removeStyleName(style.contactInnerSelected());
+		
+		settingOuter.addStyleName(style.selected());
 		setting.addStyleName(style.settingsInnerSelected());
 		placeController.goTo(new SettingPlace("folders"));
 	}
+<<<<<<< HEAD
 >>>>>>> try to make switch to setting work
+=======
+	
+
+	@UiHandler("contact")
+	public void onContactClick(ClickEvent e){
+		mailOuter.removeStyleName(style.selected());
+		mail.removeStyleName(style.mailInnerSelected());
+		contactOuter.addStyleName(style.selected());
+		contact.addStyleName(style.contactInnerSelected());
+		
+		settingOuter.removeStyleName(style.selected());
+		setting.removeStyleName(style.settingsInnerSelected());
+		placeController.goTo(new ContactPlace("contacts"));
+	}
+	
+	
+>>>>>>> prepared for issue#73, established the UI layout
 
 	interface NavigationUiBinder extends UiBinder<DockLayoutPanel, NavigationView> {
 	}

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.ui.xml?rev=1522412&r1=1522411&r2=1522412&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.ui.xml
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.ui.xml
Thu Sep 12 04:54:19 2013
@@ -79,11 +79,17 @@
 			background-position: 0 -48px;
 		}
 <<<<<<< HEAD
+<<<<<<< HEAD
         .navigation .contactInnerSelected {
             background-position: 0 -72px;
         }
 =======
 >>>>>>> make login page as one part of the overall layout & splite
layout to little one
+=======
+        .navigation .contactInnerSelected {
+            background-position: 0 -72px;
+        }
+>>>>>>> prepared for issue#73, established the UI layout
 		
 		.navigation a.contact:hover span.inner,.navigation a.contact.selected span.inner
 			{
@@ -146,6 +152,7 @@
 		</g:west>
 		<g:center>
 <<<<<<< HEAD
+<<<<<<< HEAD
 			<g:SimplePanel ui:field="contactOuter" addStyleNames="{style.navigation}">
 				<g:Anchor  ui:field="contact"
 =======
@@ -154,6 +161,9 @@
 				<g:Anchor
 >>>>>>> make login page as one part of the overall layout & splite
layout to little one
 =======
+=======
+			<g:SimplePanel ui:field="contactOuter" addStyleNames="{style.navigation}">
+>>>>>>> prepared for issue#73, established the UI layout
 				<g:Anchor  ui:field="contact"
 >>>>>>> make navigation styles shufflling be working as expected
 					addStyleNames="



---------------------------------------------------------------------
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