Author: dongxu
Date: Thu Sep 12 04:03:58 2013
New Revision: 1522294
URL: http://svn.apache.org/r1522294
Log:
scrub code
Added:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.java~HEAD
- copied, changed from r1522293,
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml~HEAD
- copied, changed from r1522293,
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml
Removed:
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/ui/ComposeView.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml
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/_CenterPanel.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.ui.xml
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.java?rev=1522294&r1=1522293&r2=1522294&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.java
Thu Sep 12 04:03:58 2013
@@ -19,25 +19,70 @@
package org.apache.hupa.client.ui;
-import org.apache.hupa.client.HupaCSS;
-import org.apache.hupa.client.HupaConstants;
-import org.apache.hupa.client.HupaMessages;
-import org.apache.hupa.client.activity.ComposeActivity;
-import org.apache.hupa.client.validation.AddStyleAction;
-import org.apache.hupa.client.validation.EmailListValidator;
-import org.apache.hupa.client.validation.NotEmptyValidator;
-import org.apache.hupa.client.validation.SetFocusAction;
-import org.apache.hupa.shared.SConsts;
-import org.apache.hupa.widgets.editor.Editor;
-import org.apache.hupa.widgets.editor.Toolbar;
-import org.apache.hupa.widgets.ui.MultiValueSuggestArea;
-
import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.HasClickHandlers;
+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
+<<<<<<< HEAD
+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.IsWidget;
+import com.google.gwt.user.client.ui.SimpleLayoutPanel;
+import com.google.gwt.user.client.ui.SimplePanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class __ComposePanel extends Composite {
+
+ @UiField protected SimplePanel composeHeaderContainer;
+ @UiField protected SimpleLayoutPanel composeContentContainer;
+ @UiField protected SimplePanel composeStatusContainer;
+
+ public __ComposePanel() {
+ initWidget(binder.createAndBindUi(this));
+ }
+
+ interface __ComposePanelUiBinder extends
+ UiBinder<DockLayoutPanel, __ComposePanel> {
+ }
+
+ private static __ComposePanelUiBinder binder = GWT
+ .create(__ComposePanelUiBinder.class);
+
+ public AcceptsOneWidget getComposeHeaderContainer() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+
composeHeaderContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getComposeContentContainer() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+
composeContentContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getComposeStatusContainer() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+
composeStatusContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+=======
+=======
import com.google.gwt.user.client.ui.Anchor;
+>>>>>>> composing composing panel
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DockLayoutPanel;
@@ -45,62 +90,14 @@ import com.google.gwt.user.client.ui.Fle
import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTMLTable.RowFormatter;
-import com.google.gwt.user.client.ui.HasHTML;
-import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
-import com.google.gwt.user.client.ui.SimplePanel;
-import com.google.gwt.user.client.ui.TextArea;
import com.google.gwt.user.client.ui.TextBox;
-import com.google.inject.Inject;
-
-import eu.maydu.gwt.validation.client.DefaultValidationProcessor;
-import eu.maydu.gwt.validation.client.ValidationProcessor;
-import eu.maydu.gwt.validation.client.i18n.ValidationMessages;
-import gwtupload.client.BaseUploadStatus;
-import gwtupload.client.IFileInput.FileInputType;
-import gwtupload.client.IUploadStatus;
-import gwtupload.client.IUploader;
-import gwtupload.client.MultiUploader;
-
-public class ComposeView extends Composite implements
ComposeActivity.Displayable {
-
- @UiField protected DockLayoutPanel thisPanel;
- @UiField protected SimplePanel header;
- @UiField protected FlexTable headerTable;
- @UiField protected SimplePanel editorToolBar;
- @UiField protected SimplePanel composeEditor;
- @UiField protected FlowPanel attach;
- @UiField protected Style style;
- private ListBox selectFrom;
- /* we only need one instance for all suggestion-boxes */
- private MultiValueSuggestArea toSuggest = new MultiValueSuggestArea("
,@<>");
- private MultiValueSuggestArea ccSuggest = new
MultiValueSuggestArea(toSuggest.getOracle());
- private MultiValueSuggestArea bccSuggest = new
MultiValueSuggestArea(toSuggest.getOracle());
- private TextBox subject = new TextBox();
-
- private Button sendButton;
- private Button saveButton;
- private Button cancelButton;
-
- private Anchor addCcButton;
- private Anchor addBccButton;
- private Anchor addReplyButton;
- private Anchor addFollowupButton;
-
- private Anchor _CcButton = new Anchor("x");
- private Anchor _BccButton = new Anchor("x");
- private Anchor _ReplyButton = new Anchor("x");
- private Anchor _FollowupButton = new Anchor("x");
-
- private FlexCellFormatter cellFormatter;
- private RowFormatter rowFormatter;
-
- private Editor editor;
- private ValidationProcessor validator;
- private MultiUploader uploader = null;
+public class ComposeView extends Composite {
+ @UiField FlexTable headerTable;
+ @UiField Style style;
private static final int ROW_FROM = 0;
private static final int ROW_TO = 1;
private static final int ROW_CC = 2;
@@ -110,347 +107,137 @@ public class ComposeView extends Composi
private static final int ROW_SWITCH = 6;
private static final int ROW_SUBJECT = 7;
- private static final int ROW_HEIGHT = 33;
-
interface Style extends CssResource {
- String show();
- String hide();
- String iconlink();
+ String hiddenInput();
+
String add();
- String cancel();
+
+ String iconlink();
+
String formlinks();
+
String left();
+
String right();
+
String operation();
}
- @Inject
- public ComposeView(HupaConstants constants, HupaMessages messages) {
- initWidget(binder.createAndBindUi(this));
- initFormatters();
- createFirstColumn();
- createSecondColumn();
- bindValidators(messages);
- createEditor(constants);
- }
+ public interface Resources extends ClientBundle {
- private void createEditor(HupaConstants constants) {
- editor = new Editor();
- BaseUploadStatus uploadStatus = new BaseUploadStatus();
-
uploadStatus.setCancelConfiguration(IUploadStatus.DEFAULT_CANCEL_CFG);
- uploader = new MultiUploader(FileInputType.ANCHOR,
uploadStatus);
- uploader.setServletPath(GWT.getModuleBaseURL() +
SConsts.SERVLET_UPLOAD);
- uploader.avoidRepeatFiles(true);
- uploader.setI18Constants(constants);
- attach.add(uploader);
-
- Toolbar toolbar = new Toolbar(editor.getArea(), constants);
- toolbar.ensureDebugId("hupa-editor-toolbar");
- editorToolBar.add(toolbar);
- composeEditor.add(editor);
- }
+ Resources INSTANCE = GWT.create(Resources.class);
- private void bindValidators(HupaMessages messages) {
- SetFocusAction fAction = new SetFocusAction();
- AddStyleAction sAction = new AddStyleAction(HupaCSS.C_validate,
3000);
- validator = new DefaultValidationProcessor(new
ValidationMessages(messages));
- validator.addValidators("cc",
- new
EmailListValidator(getCc()).addActionForFailure(sAction).addActionForFailure(fAction));
- validator.addValidators("bcc", new
EmailListValidator(getBcc()).addActionForFailure(sAction)
- .addActionForFailure(fAction));
- validator.addValidators("to",
- new
EmailListValidator(getTo()).addActionForFailure(sAction).addActionForFailure(fAction),
- new
NotEmptyValidator(getTo()).addActionForFailure(sAction).addActionForFailure(fAction));
- }
+ @NotStrict
+ @Source("res/CssComposePanel.css")
+ public Css stylesheet();
- private void initFormatters() {
- cellFormatter = headerTable.getFlexCellFormatter();
- rowFormatter = headerTable.getRowFormatter();
+ public interface Css extends CssResource {
+ }
}
- private void createSecondColumn() {
- selectFrom = new ListBox();
- sendButton = new Button("Send message");
- saveButton = new Button("Save as draft");
- cancelButton = new Button("Cancel");
+ public ComposeView() {
+ initWidget(binder.createAndBindUi(this));
+ FlexCellFormatter cellFormatter =
headerTable.getFlexCellFormatter();
+ RowFormatter rowFormatter = headerTable.getRowFormatter();
+
+ // Add some text
+ // cellFormatter.setHorizontalAlignment(0, 1,
+ // HasHorizontalAlignment.ALIGN_RIGHT);
+
+ headerTable.setWidget(ROW_FROM, 0, new Label("From"));
+
+ headerTable.setWidget(ROW_TO, 0, new Label("To"));
+ headerTable.setWidget(ROW_CC, 0, new Label("Cc"));
+ headerTable.setWidget(ROW_BCC, 0, new Label("Bcc"));
+ headerTable.setWidget(ROW_REPLY, 0, new Label("Reply-To"));
+ headerTable.setWidget(ROW_FOLLOWUP, 0, new
Label("Followup-To"));
+ headerTable.setWidget(ROW_SWITCH, 0, new Label(""));
+ headerTable.setWidget(ROW_SUBJECT, 0, new Label("Subject"));
+ // cellFormatter.setColSpan(0, 0, 2);
+
+ // Add a button that will add more rows to the table
+ ListBox lb = new ListBox();
+ lb.addItem("echowdx#googlemail.com");
+ lb.addItem("bar");
+ Button addRowButton = new Button("Send message");
+ Button removeRowButton = new Button("Save as draft");
+ Button cancel = new Button("Cancel");
FlowPanel operationPanel = new FlowPanel();
FlowPanel contactPanel = new FlowPanel();
FlowPanel buttonPanel = new FlowPanel();
- contactPanel.add(selectFrom);
+
+ contactPanel.add(lb);
contactPanel.addStyleName(style.left());
// buttonPanel.add(new Anchor("Edit identities"));
- buttonPanel.add(sendButton);
- buttonPanel.add(saveButton);
- buttonPanel.add(cancelButton);
+ buttonPanel.add(addRowButton);
+ buttonPanel.add(removeRowButton);
+ buttonPanel.add(cancel);
buttonPanel.addStyleName(style.right());
operationPanel.add(contactPanel);
operationPanel.add(buttonPanel);
operationPanel.addStyleName(style.operation());
headerTable.setWidget(ROW_FROM, 1, operationPanel);
- headerTable.setWidget(ROW_TO, 1, toSuggest);
- headerTable.setWidget(ROW_CC, 1, ccSuggest);
- headerTable.setWidget(ROW_BCC, 1, bccSuggest);
- headerTable.setWidget(ROW_REPLY, 1, create());
- headerTable.setWidget(ROW_FOLLOWUP, 1, create());
- headerTable.setWidget(ROW_SWITCH, 1, createOpsPanel());
- cellFormatter.addStyleName(ROW_SWITCH, 1, style.formlinks());
- headerTable.setWidget(ROW_SUBJECT, 1, subject);
- rowFormatter.addStyleName(ROW_CC, style.hide());
- rowFormatter.addStyleName(ROW_BCC, style.hide());
- rowFormatter.addStyleName(ROW_REPLY, style.hide());
- rowFormatter.addStyleName(ROW_FOLLOWUP, style.hide());
- }
-
- private void createFirstColumn() {
- headerTable.setWidget(ROW_FROM, 0, new Label("From"));
- headerTable.setWidget(ROW_TO, 0, new Label("To"));
- headerTable.setWidget(ROW_CC, 0, createCell("Cc", _CcButton));
- headerTable.setWidget(ROW_BCC, 0, createCell("Bcc",
_BccButton));
- headerTable.setWidget(ROW_REPLY, 0, createCell("Reply",
_ReplyButton));
- headerTable.setWidget(ROW_FOLLOWUP, 0, createCell("Follow",
_FollowupButton));
- headerTable.setWidget(ROW_SWITCH, 0, new Label(""));
- headerTable.setWidget(ROW_SUBJECT, 0, new Label("Subject"));
- }
-
- private FlowPanel createCell(String labelText, Anchor w) {
- FlowPanel ccCell = new FlowPanel();
- Label cc = new Label(labelText);
- cc.addStyleName(style.left());
- ccCell.add(cc);
- w.addStyleName(style.iconlink());
- w.addStyleName(style.cancel());
- ccCell.add(w);
- return ccCell;
- }
-
- private FlowPanel createOpsPanel() {
- FlowPanel addOpsPanel = new FlowPanel();
- addCcButton = new Anchor("Add Cc");
- addCcButton.addStyleName(style.iconlink());
- addCcButton.addStyleName(style.add());
- addBccButton = new Anchor("Add Bcc");
- addBccButton.addStyleName(style.iconlink());
- addBccButton.addStyleName(style.add());
- addReplyButton = new Anchor("Add Reply-To");
- addReplyButton.addStyleName(style.iconlink());
- addReplyButton.addStyleName(style.add());
- addFollowupButton = new Anchor("Add Followup-To");
- addFollowupButton.addStyleName(style.iconlink());
- addFollowupButton.addStyleName(style.add());
- addOpsPanel.add(addCcButton);
- addOpsPanel.add(addBccButton);
- // TODO the other operations
- // addOpsPanel.add(addReplyButton);
- // addOpsPanel.add(addFollowupButton);
- return addOpsPanel;
- }
-
- HasText emptyText = new HasText() {
- @Override
- public String getText() {
- return "";
- }
- @Override
- public void setText(String text) {
- }
- };
+
- @Override
- public HasText getTo() {
- return toSuggest;
- }
-
- @Override
- public HasText getCc() {
- if (isShowing(ROW_CC))
- return ccSuggest;
- else
- return emptyText;
- }
-
- @Override
- public HasText getBcc() {
- if (isShowing(ROW_BCC))
- return bccSuggest;
- else
- return emptyText;
- }
-
- @Override
- public HasClickHandlers getSendClick() {
- return sendButton;
- }
-
- @Override
- public HasClickHandlers getCancelClick(){
- return cancelButton;
- }
-
- @Override
- public HasClickHandlers getCcClick() {
- return addCcButton;
- }
-
- @Override
- public HasClickHandlers get_CcClick() {
- return _CcButton;
- }
-
- @Override
- public HasClickHandlers getBccClick() {
- return addBccButton;
- }
-
- @Override
- public HasClickHandlers get_BccClick() {
- return _BccButton;
- }
-
- @Override
- public HasClickHandlers getReplyClick() {
- return addReplyButton;
- }
-
- @Override
- public HasClickHandlers get_ReplyClick() {
- return _ReplyButton;
- }
-
- @Override
- public HasClickHandlers getFollowupClick() {
- return addFollowupButton;
- }
-
- @Override
- public HasClickHandlers get_FollowupClick() {
- return _FollowupButton;
- }
-
- @Override
- public HasText getSubject() {
- return subject;
- }
-
- @Override
- public boolean validate() {
- return this.validator.validate();
- }
-
- @Override
- public String getFromText() {
- // TODO hardcode to the first identifier
- return selectFrom.getItemText(0);
- }
+ TextBox to = new TextBox();
+ to.setWidth("100%");
+ to.setFocus(true);
+ headerTable.setWidget(ROW_TO, 1, to);
- @Override
- public ListBox getFromList() {
- return selectFrom;
- }
-
- @Override
- public HasText getMessage() {
- return editor;
- }
-
- @Override
- public HasHTML getMessageHTML() {
- return editor;
- }
-
- @Override
- public IUploader getUploader() {
- return uploader;
- }
-
- @Override
- public void showCc() {
- showRow(ROW_CC);
- // hide(addCcButton);
- }
-
- @Override
- public void hideCc() {
- hideRow(ROW_CC);
- // show(addCcButton);
- }
-
- @Override
- public void showBcc() {
- showRow(ROW_BCC);
- // hide(addBccButton);
- }
-
- @Override
- public void hideBcc() {
- hideRow(ROW_BCC);
- // show(addBccButton);
- }
-
- @Override
- public void showReply() {
- showRow(ROW_REPLY);
- // hide(addReplyButton);
- }
-
- @Override
- public void hideReply() {
- hideRow(ROW_REPLY);
- // show(addReplyButton);
- }
-
- @Override
- public void showFollowup() {
- showRow(ROW_FOLLOWUP);
- // hide(addFollowupButton);
- }
+ headerTable.setWidget(ROW_CC, 1, create());
+ headerTable.setWidget(ROW_BCC, 1, create());
+ headerTable.setWidget(ROW_REPLY, 1, create());
+ headerTable.setWidget(ROW_FOLLOWUP, 1, create());
- @Override
- public void hideFollowup() {
- hideRow(ROW_FOLLOWUP);
- // show(addFollowupButton);
- }
-
+ FlowPanel linkPanel = new FlowPanel();
+ 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(ROW_SWITCH, 1, linkPanel);
+ cellFormatter.addStyleName(ROW_SWITCH, 1, style.formlinks());
+ headerTable.setWidget(ROW_SUBJECT, 1, create());
- @Override
- public void fillContactList(String[] contacts){
- toSuggest.fillOracle(contacts);
- }
-
- private void showRow(int row) {
- if (isShowing(row)) {
- return;
- }
- rowFormatter.removeStyleName(row, style.hide());
- rowFormatter.addStyleName(row, style.show());
- thisPanel.setWidgetSize(header, thisPanel.getWidgetSize(header)
+ ROW_HEIGHT);
- }
+ rowFormatter.addStyleName(ROW_CC, style.hiddenInput());
+ rowFormatter.addStyleName(ROW_BCC, style.hiddenInput());
+ rowFormatter.addStyleName(ROW_REPLY, style.hiddenInput());
+ rowFormatter.addStyleName(ROW_FOLLOWUP, style.hiddenInput());
- private void hideRow(int row) {
- if (isHiding(row)) {
- return;
- }
- rowFormatter.removeStyleName(row, style.show());
- rowFormatter.addStyleName(row, style.hide());
- thisPanel.setWidgetSize(header, thisPanel.getWidgetSize(header)
- ROW_HEIGHT);
- }
+ // cellFormatter
+ // .setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_TOP);
- private boolean isShowing(int row) {
- return rowFormatter.getStyleName(row).contains(style.show());
- }
+ // Add two rows to start
+ // addRow(headerTable);
+ // addRow(headerTable);
- private boolean isHiding(int row) {
- return rowFormatter.getStyleName(row).contains(style.hide());
+ // Return the panel
+ headerTable.ensureDebugId("cwFlexTable");
}
- // TODO
- private TextArea create() {
- TextArea t = new TextArea();
+ private TextBox create() {
+ TextBox t = new TextBox();
+ t.setWidth("100%");
return t;
}
- interface ComposeUiBinder extends UiBinder<DockLayoutPanel,
ComposeView> {
+ interface __ComposePanelUiBinder extends
+ UiBinder<DockLayoutPanel, ComposeView> {
}
- private static ComposeUiBinder binder =
GWT.create(ComposeUiBinder.class);
+ private static __ComposePanelUiBinder binder = GWT
+ .create(__ComposePanelUiBinder.class);
+>>>>>>> preparing for composing panel
}
Copied:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.java~HEAD
(from r1522293,
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.java)
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.java%7EHEAD?p2=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.java%7EHEAD&p1=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.java&r1=1522293&r2=1522294&rev=1522294&view=diff
==============================================================================
(empty)
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml?rev=1522294&r1=1522293&r2=1522294&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml
Thu Sep 12 04:03:58 2013
@@ -10,9 +10,54 @@
language governing permissions and limitations under the License. -->
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+<<<<<<< HEAD
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.ComposeView.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;
+ }
+
+ .left {
+ float: left;
+ }
+
+ .right {
+ float: right;
+ }
+
+ .operation {
+ margin: 0 -1px;
+ }
+
+ .add {
+ background-position: -7px -357px;
+ margin-right: 6px;
+ }
+
+ .formlinks {
+ padding: 0 4px;
+ }
+
+ .hiddenInput {
+ display: none
+ }
+
+>>>>>>> beautify composing panel
.box {
border: 1px solid #A3A3A3;
border-radius: 4px;
@@ -24,7 +69,7 @@
background: white;
}
- .header {
+ .composeHeader {
border-radius: 4px 4px 0 0;
-webkit-box-shadow: 0 2px 3px 0 #999;
-moz-box-shadow: 0 2px 3px 0 #999;
@@ -42,11 +87,12 @@
border-bottom: 1px solid #dfdfdf;
}
- .header td {
+<<<<<<< HEAD
+ .composeHeader td {
padding: 3px 8px;
}
- .header td textarea,.header td input {
+ .composeHeader td textarea,.composeHeader td input {
width: 100%;
height: 13px;
resize: none;
@@ -60,66 +106,22 @@
bottom: 0;
width: 100%;
height: 26px;
- }
-
- @sprite .iconlink {
- gwt-image: 'buttons';
- background-position: -1000px 0;
- width: auto;
- height: auto;
- display: inline-block;
- color: #888;
- text-decoration: none;
- white-space: nowrap;
- }
-
- .left {
- float: left;
- }
-
- .right {
- float: right;
- }
-
- .operation {
- margin: 0 -1px;
- }
-
- .add {
- background-position: -7px -357px;
- margin-right: 6px;
- padding: 2px 8px 2px 20px;
- }
-
- .cancel {
- background-position: -7px -377px;
- float: right;
- position: relative;
- text-indent: -5000px;
- top: -2px;
- width: 15px;
- height: 17px;
- }
-
- .formlinks {
- padding: 0 4px;
- }
-
- .hide {
- display: none;
- }
-
- .show {
- display: inner-block;
- }
-
+=======
.headerTable {
display: table;
border-collapse: separate;
border-spacing: 2px;
border-color: gray;
+<<<<<<< HEAD
+>>>>>>> preparing for composing panel
+=======
width: 99%;
margin: 4px 0;
+>>>>>>> composing composing panel
+ }
+
+ .composeHeader td {
+ padding: 3px 8px;
}
.headerTable td {
@@ -137,6 +139,14 @@
white-space: nowrap;
}
+ .composebodycontainer {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 260px;
+ bottom: 0;
+ }
+
.composeattachments {
position: absolute;
right: 0;
@@ -149,12 +159,12 @@
overflow: auto;
}
- .composebodycontainer {
+ .mailviewbottom {
position: absolute;
- top: 0;
left: 0;
- right: 260px;
bottom: 0;
+ width: 100%;
+ height: 26px;
}
.statusbar {
@@ -177,49 +187,55 @@
overflow: hidden;
text-overflow: ellipsis;
}
-
- .uploader{
-
-}
-.uploaderCancel{}
-.uploaderFilename{}
</ui:style>
<g:DockLayoutPanel ui:field="thisPanel" unit="PX"
addStyleNames="{style.box}">
+<<<<<<< HEAD
+<<<<<<< HEAD
<g:north size="135">
- <g:SimplePanel ui:field="header"
addStyleNames="{style.header}">
- <g:FlexTable ui:field="headerTable"
addStyleNames="{style.headerTable}" />
+<<<<<<< HEAD
+ <g:SimplePanel ui:field="composeHeaderContainer"
+ addStyleNames="{style.composeHeader}">
</g:SimplePanel>
</g:north>
<g:center>
<g:SimpleLayoutPanel ui:field="composeContentContainer">
- <g:DockLayoutPanel unit="PX">
- <g:north size="23">
- <g:HTMLPanel
addStyleNames="{style.composeoptionsbox}">composeOption</g:HTMLPanel>
- </g:north>
- <g:east size="257">
- <g:FlowPanel ui:field="attach"
addStyleNames="{style.composeattachments}">
- </g:FlowPanel>
- </g:east>
- <g:center>
- <g:DockLayoutPanel>
- <g:north size="23">
- <g:SimplePanel
ui:field="editorToolBar" />
- </g:north>
- <g:center>
- <g:SimplePanel
ui:field="composeEditor"
-
addStyleNames="{style.composebodycontainer}" />
- </g:center>
- </g:DockLayoutPanel>
- </g:center>
- </g:DockLayoutPanel>
</g:SimpleLayoutPanel>
</g:center>
<g:south size="28">
<g:SimplePanel ui:field="composeStatusContainer"
+
addStyleNames="{style.mailviewbottom}{style.box}" />
+=======
+=======
+ <g:north size="143">
+>>>>>>> beautify composing panel
+=======
+ <g:north size="135">
+>>>>>>> fine tuning the pixel of composing panel, while issue #35 should be
fixed later
+ <g:SimplePanel ui:field="composeHeader"
addStyleNames="{style.composeHeader}">
+ <g:FlexTable ui:field="headerTable"
addStyleNames="{style.headerTable}" />
+ </g:SimplePanel>
+ </g:north>
+ <g:center>
+ <g:DockLayoutPanel ui:field="composeContent" unit="PX">
+ <g:north size="23">
+ <g:HTMLPanel
addStyleNames="{style.composeoptionsbox}">composeOption</g:HTMLPanel>
+ </g:north>
+ <g:east size="257">
+ <g:HTMLPanel
addStyleNames="{style.composeattachments}">composeAttachment
+ </g:HTMLPanel>
+ </g:east>
+ <g:center>
+ <g:HTMLPanel
addStyleNames="{style.composebodycontainer}">composeBody</g:HTMLPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:center>
+ <g:south size="28">
+ <g:SimplePanel ui:field="composeStatus"
addStyleNames="{style.mailviewbottom}{style.box}">
<g:HTMLPanel
addStyleNames="{style.statusbar}">composeStatus</g:HTMLPanel>
</g:SimplePanel>
+>>>>>>> preparing for composing panel
</g:south>
</g:DockLayoutPanel>
</ui:UiBinder>
\ No newline at end of file
Copied:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml~HEAD
(from r1522293,
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml)
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml%7EHEAD?p2=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml%7EHEAD&p1=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml&r1=1522293&r2=1522294&rev=1522294&view=diff
==============================================================================
(empty)
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=1522294&r1=1522293&r2=1522294&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:03:58 2013
@@ -344,21 +344,40 @@ public interface HupaLayout {
=======
@Override
public void switchToCompose() {
- if
(centerPanel.thisPanel.getWidgetIndex(centerPanel.contentPanel) >= 0) {
- centerPanel.thisPanel.remove(centerPanel.contentPanel);
- centerPanel.thisPanel.add(centerPanel.composePanel);
+ if (isMessageOccupied()) {
+ changeToCompose();
}
}
+ private void changeToCompose() {
+ centerPanel.thisPanel.remove(centerPanel.contentPanel);
+ centerPanel.thisPanel.add(centerPanel.composeView);
+ }
+
+ private boolean isMessageOccupied() {
+ return
centerPanel.thisPanel.getWidgetIndex(centerPanel.contentPanel) >= 0;
+ }
+
@Override
public void switchToMessage() {
- if
(centerPanel.thisPanel.getWidgetIndex(centerPanel.contentPanel) >= 0)
+ if (isMessageOccupied())
return;
- if
(centerPanel.thisPanel.getWidgetIndex(centerPanel.composePanel) >= 0) {
- centerPanel.thisPanel.remove(centerPanel.composePanel);
- centerPanel.thisPanel.add(centerPanel.contentPanel);
+ if (isComposeOccupied()) {
+ changeToMessage();
}
}
+<<<<<<< HEAD
>>>>>>> could change main panel dynamically currently by clicking the compose
>>>>>>> button
+=======
+ private void changeToMessage() {
+ centerPanel.thisPanel.remove(centerPanel.composeView);
+ centerPanel.thisPanel.add(centerPanel.contentPanel);
+ }
+
+ private boolean isComposeOccupied() {
+ return
centerPanel.thisPanel.getWidgetIndex(centerPanel.composeView) >= 0;
+ }
+
+>>>>>>> scrub code
}
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.java?rev=1522294&r1=1522293&r2=1522294&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.java
Thu Sep 12 04:03:58 2013
@@ -37,17 +37,21 @@ public class _CenterPanel extends Compos
@UiField __OutlinePanel outlinePanel;
@UiField __ContentPanel contentPanel;
<<<<<<< HEAD
+<<<<<<< HEAD
>>>>>>> split the layout panel to more small ones
=======
@UiField __ComposePanel composePanel;
>>>>>>> preparing for composing panel
+=======
+ @UiField ComposeView composeView;
+>>>>>>> scrub code
public _CenterPanel() {
initWidget(binder.createAndBindUi(this));
thisPanel.setWidgetMinSize(outlinePanel, 144);
- thisPanel.setWidgetHidden(composePanel, true);
-// thisPanel.remove(contentPanel);
-// thisPanel.add(composePanel);
+ thisPanel.setWidgetHidden(composeView, true);
+ // thisPanel.remove(contentPanel);
+ // thisPanel.add(composePanel);
}
public AcceptsOneWidget getFolderListView() {
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.ui.xml
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.ui.xml?rev=1522294&r1=1522293&r2=1522294&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.ui.xml
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.ui.xml
Thu Sep 12 04:03:58 2013
@@ -26,7 +26,7 @@
<hupa:__ContentPanel ui:field="contentPanel" />
</g:center>
<g:south size="0">
- <hupa:__ComposePanel ui:field="composePanel" />
+ <hupa:ComposeView ui:field="composeView" />
</g:south>
</g:SplitLayoutPanel>
</ui:UiBinder>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]