Author: dongxu
Date: Thu Sep 12 04:01:01 2013
New Revision: 1522285
URL: http://svn.apache.org/r1522285
Log:
beautify composing panel
Added:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/CssComposePanel.css
(with props)
Modified:
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/place/ComposePlace.java
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/ToolBarView.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml
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=1522285&r1=1522284&r2=1522285&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:01:01 2013
@@ -19,6 +19,7 @@
package org.apache.hupa.client.mapper;
+import org.apache.hupa.client.place.ComposePlace;
import org.apache.hupa.client.place.DefaultPlace;
import org.apache.hupa.client.place.IMAPMessagePlace;
import org.apache.hupa.client.place.MailFolderPlace;
@@ -31,7 +32,8 @@ import com.google.gwt.place.shared.WithT
DefaultPlace.Tokenizer.class,
MailFolderPlace.Tokenizer.class,
MessageSendPlace.Tokenizer.class,
- IMAPMessagePlace.Tokenizer.class
+ IMAPMessagePlace.Tokenizer.class,
+ ComposePlace.Tokenizer.class
})
public interface AppPlaceHistoryMapper extends PlaceHistoryMapper {
}
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/ComposePlace.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/ComposePlace.java?rev=1522285&r1=1522284&r2=1522285&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/ComposePlace.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/place/ComposePlace.java
Thu Sep 12 04:01:01 2013
@@ -31,8 +31,12 @@ import com.google.gwt.place.shared.Prefi
public class ComposePlace extends AbstractPlace {
<<<<<<< HEAD
+<<<<<<< HEAD
private String token;
private Parameters parameters;
+=======
+ private String token;
+>>>>>>> beautify composing panel
public ComposePlace(String token) {
this.token = token;
@@ -55,6 +59,7 @@ public class ComposePlace extends Abstra
return place.getToken();
}
}
+<<<<<<< HEAD
public Place with(Parameters parameters) {
this.parameters = parameters;
@@ -79,5 +84,7 @@ public class ComposePlace extends Abstra
}
}
>>>>>>> composing composing panel
+=======
+>>>>>>> beautify composing panel
}
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=1522285&r1=1522284&r2=1522285&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:01:01 2013
@@ -210,7 +210,7 @@ public class FolderListView extends Comp
=======
=======
import org.apache.hupa.client.activity.FolderListActivity;
-import org.apache.hupa.client.place.MailFolderPlace;
+import org.apache.hupa.client.place.ComposePlace;
>>>>>>> integrate all of the views to their corresponding activities and
>>>>>>> mappers
import com.google.gwt.core.client.GWT;
@@ -233,10 +233,11 @@ public class FolderListView extends Comp
@AssistedInject
public FolderListView(final FoldersTreeViewModel viewModel,
final EventBus eventBus, @Assisted Place place) {
- if (place instanceof MailFolderPlace) {
- cellTree = new CellTree(viewModel, null,
Resources.INSTANCE);
- } else {// TODO this viewModel should be contacts
+ if (place instanceof ComposePlace) {
+ // TODO this viewModel should be contacts
cellTree = new CellTree(viewModel, null);
+ } else {
+ cellTree = new CellTree(viewModel, null,
Resources.INSTANCE);
}
cellTree.setAnimationEnabled(true);
initWidget(binder.createAndBindUi(this));
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=1522285&r1=1522284&r2=1522285&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:01:01 2013
@@ -347,7 +347,7 @@ public class ToolBarView extends Composi
ToolBarActivity.Displayable {
@Inject PlaceController placeController;
-
+
@UiField Style style;
@UiField Anchor refresh;
@@ -363,7 +363,7 @@ public class ToolBarView extends Composi
@UiHandler("compose")
void handleClick(ClickEvent e) {
- placeController.goTo(new ComposePlace());
+ placeController.goTo(new ComposePlace("new"));
}
public ToolBarView() {
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java?rev=1522285&r1=1522284&r2=1522285&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java
Thu Sep 12 04:01:01 2013
@@ -20,6 +20,9 @@
package org.apache.hupa.client.ui;
import com.google.gwt.core.client.GWT;
+import com.google.gwt.resources.client.ClientBundle;
+import com.google.gwt.resources.client.CssResource;
+import com.google.gwt.resources.client.CssResource.NotStrict;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
<<<<<<< HEAD
@@ -85,6 +88,7 @@ import com.google.gwt.user.client.ui.Com
import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
+import com.google.gwt.user.client.ui.HTMLTable.RowFormatter;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
@@ -94,16 +98,37 @@ import com.google.gwt.user.client.ui.Tex
public class __ComposePanel extends Composite {
@UiField FlexTable headerTable;
+ @UiField Style style;
+ interface Style extends CssResource {
+ String hiddenInput();
+ String add();
+ String iconlink();
+ String formlinks();
+ }
+
+ public interface Resources extends ClientBundle {
+
+ Resources INSTANCE = GWT.create(Resources.class);
+
+ @NotStrict
+ @Source("res/CssComposePanel.css")
+ public Css stylesheet();
+
+ public interface Css extends CssResource {
+ }
+ }
+
+
public __ComposePanel() {
initWidget(binder.createAndBindUi(this));
FlexCellFormatter cellFormatter =
headerTable.getFlexCellFormatter();
- headerTable.setCellSpacing(5);
- headerTable.setCellPadding(3);
+ RowFormatter rowFormatter = headerTable.getRowFormatter();
// Add some text
- cellFormatter.setHorizontalAlignment(0, 1,
- HasHorizontalAlignment.ALIGN_RIGHT);
+// cellFormatter.setHorizontalAlignment(0, 1,
+// HasHorizontalAlignment.ALIGN_RIGHT);
+
headerTable.setWidget(0, 0, new Label("From"));
headerTable.setWidget(1, 0, new Label("To"));
@@ -111,9 +136,9 @@ public class __ComposePanel extends Comp
headerTable.setWidget(3, 0, new Label("Bcc"));
headerTable.setWidget(4, 0, new Label("Reply-To"));
headerTable.setWidget(5, 0, new Label("Followup-To"));
- headerTable.setWidget(6, 0, new Label("Links"));
+ headerTable.setWidget(6, 0, new Label(""));
headerTable.setWidget(7, 0, new Label("Subject"));
-// cellFormatter.setColSpan(0, 0, 2);
+ // cellFormatter.setColSpan(0, 0, 2);
// Add a button that will add more rows to the table
ListBox lb = new ListBox();
@@ -124,25 +149,51 @@ public class __ComposePanel extends Comp
Button cancel = new Button("Cancel");
HorizontalPanel buttonPanel = new HorizontalPanel();
buttonPanel.add(lb);
- buttonPanel.add(new Anchor("Edit identities"));
+// buttonPanel.add(new Anchor("Edit identities"));
buttonPanel.add(addRowButton);
buttonPanel.add(removeRowButton);
buttonPanel.add(cancel);
headerTable.setWidget(0, 1, buttonPanel);
headerTable.setWidget(1, 1, create());
+
headerTable.setWidget(2, 1, create());
headerTable.setWidget(3, 1, create());
headerTable.setWidget(4, 1, create());
headerTable.setWidget(5, 1, create());
- headerTable.setWidget(6, 1, create());
+
+
+ HorizontalPanel linkPanel = new HorizontalPanel();
+ Anchor cc = new Anchor("Add Cc");
+ cc.addStyleName(style.iconlink());
+ cc.addStyleName(style.add());
+ Anchor bcc = new Anchor("Add Bcc");
+ bcc.addStyleName(style.iconlink());
+ bcc.addStyleName(style.add());
+ Anchor replyTo = new Anchor("Add Reply-To");
+ replyTo.addStyleName(style.iconlink());
+ replyTo.addStyleName(style.add());
+ Anchor followupTo = new Anchor("Add Followup-To");
+ followupTo.addStyleName(style.iconlink());
+ followupTo.addStyleName(style.add());
+ linkPanel.add(cc);
+ linkPanel.add(bcc);
+ linkPanel.add(replyTo);
+ linkPanel.add(followupTo);
+ headerTable.setWidget(6, 1, linkPanel);
+ cellFormatter.addStyleName(6, 1, style.formlinks());
headerTable.setWidget(7, 1, create());
-// cellFormatter
-// .setVerticalAlignment(0, 1,
HasVerticalAlignment.ALIGN_TOP);
+ rowFormatter.addStyleName(2, style.hiddenInput());
+ rowFormatter.addStyleName(3, style.hiddenInput());
+ rowFormatter.addStyleName(4, style.hiddenInput());
+ rowFormatter.addStyleName(5, style.hiddenInput());
+
+ // cellFormatter
+ // .setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_TOP);
// Add two rows to start
-// addRow(headerTable);
-// addRow(headerTable);
+ // addRow(headerTable);
+ // addRow(headerTable);
// Return the panel
headerTable.ensureDebugId("cwFlexTable");
@@ -169,10 +220,10 @@ public class __ComposePanel extends Comp
buttonPanel.add(lb);
buttonPanel.add(addRowButton);
buttonPanel.add(removeRowButton);
-
+
flexTable.setWidget(numRows, 0, buttonPanel);
flexTable.setWidget(numRows, 1, new TextBox());
-// flexTable.getFlexCellFormatter().setRowSpan(0, 1, numRows + 1);
+ // flexTable.getFlexCellFormatter().setRowSpan(0, 1, numRows +
1);
}
/**
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml?rev=1522285&r1=1522284&r2=1522285&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml
Thu Sep 12 04:01:01 2013
@@ -14,8 +14,37 @@
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
=======
xmlns:g='urn:import:com.google.gwt.user.client.ui'
xmlns:hupa='urn:import:org.apache.hupa.client.ui'>
+<<<<<<< HEAD
>>>>>>> preparing for composing panel
<ui:style>
+=======
+ <ui:image field="buttons" src="res/buttons.png" />
+ <ui:style type="org.apache.hupa.client.ui.__ComposePanel.Style">
+ @sprite .iconlink {
+ gwt-image: 'buttons';
+ background-position: -1000px 0;
+ width: auto;
+ height: auto;
+ display: inline-block;
+ color: #888;
+ text-decoration: none;
+ white-space: nowrap;
+ padding: 2px 8px 2px 20px;
+ }
+
+ .add {
+ background-position: -7px -357px;
+ }
+
+ .formlinks {
+ padding: 0 4px;
+ }
+
+ .hiddenInput {
+ display: none
+ }
+
+>>>>>>> beautify composing panel
.box {
border: 1px solid #A3A3A3;
border-radius: 4px;
@@ -77,9 +106,19 @@
margin: 4px 0;
>>>>>>> composing composing panel
}
+
+ .composeHeader td {
+ padding: 1px 8px;
+ }
+
+ .headerTable td {
+ color: #666;
+ cursor: default;
+ }
</ui:style>
<g:DockLayoutPanel ui:field="thisPanel" unit="PX"
addStyleNames="{style.box}">
+<<<<<<< HEAD
<g:north size="135">
<<<<<<< HEAD
<g:SimplePanel ui:field="composeHeaderContainer"
@@ -94,6 +133,9 @@
<g:SimplePanel ui:field="composeStatusContainer"
addStyleNames="{style.mailviewbottom}{style.box}" />
=======
+=======
+ <g:north size="143">
+>>>>>>> beautify composing panel
<g:SimplePanel ui:field="composeHeader"
addStyleNames="{style.composeHeader}">
<g:FlexTable ui:field="headerTable"
addStyleNames="{style.headerTable}" />
</g:SimplePanel>
Added:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/CssComposePanel.css
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/CssComposePanel.css?rev=1522285&view=auto
==============================================================================
(empty)
Propchange:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/CssComposePanel.css
------------------------------------------------------------------------------
svn:executable = *
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]