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/08/22 17:29:58 UTC
svn commit: r1516486 [2/4] - in /james/hupa/trunk: ./ client/
client/src/main/java/org/apache/hupa/
client/src/main/java/org/apache/hupa/client/
client/src/main/java/org/apache/hupa/client/activity/
client/src/main/java/org/apache/hupa/client/ioc/ clie...
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.java?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.java Thu Aug 22 15:29:57 2013
@@ -19,16 +19,12 @@
package org.apache.hupa.client.ui;
-<<<<<<< HEAD
-import org.apache.hupa.client.activity.MessageListFooterActivity;
-=======
import java.util.ArrayList;
import java.util.List;
import org.apache.hupa.client.activity.MessageListFooterActivity;
import org.apache.hupa.client.rf.HupaRequestFactory;
import org.apache.hupa.shared.domain.ImapFolder;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
@@ -36,23 +32,6 @@ import com.google.gwt.uibinder.client.Ui
import com.google.gwt.user.cellview.client.SimplePager;
import com.google.gwt.user.cellview.client.SimplePager.TextLocation;
import com.google.gwt.user.client.ui.Composite;
-<<<<<<< HEAD
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.inject.Inject;
-
-public class MessageListFooterView extends Composite implements MessageListFooterActivity.Displayable {
-
- @UiField(provided = true)
- SimplePager simplePager;
-
- @Inject
- public MessageListFooterView(final MessagesCellTable table) {
- SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
- simplePager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true);
- simplePager.setDisplay(table);
-// simplePager.setRangeLimited(false);
- initWidget(binder.createAndBindUi(this));
-=======
import com.google.gwt.user.client.ui.HasVisibility;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.ListBox;
@@ -134,7 +113,6 @@ public class MessageListFooterView exten
labels.addItem(folderNode.getNameForDisplay().replace(" ", ". "), folderNode.getPath());
}
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
interface MessageListFooterUiBinder extends UiBinder<HorizontalPanel, MessageListFooterView> {
@@ -147,8 +125,6 @@ public class MessageListFooterView exten
return simplePager;
}
-<<<<<<< HEAD
-=======
@Override
public HasVisibility getLabelsPanel() {
return labelsPanel;
@@ -159,5 +135,4 @@ public class MessageListFooterView exten
return labels;
}
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.ui.xml?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListFooterView.ui.xml Thu Aug 22 15:29:57 2013
@@ -20,13 +20,8 @@
</ui:style>
<g:HorizontalPanel>
<c:SimplePager ui:field="simplePager" />
-<<<<<<< HEAD
- <g:SimplePanel addStyleNames="{style.moveMessage}">
- <g:HTML>Hello</g:HTML>
-=======
<g:SimplePanel ui:field="labelsPanel" addStyleNames="{style.moveMessage}">
<g:ListBox ui:field="labels"></g:ListBox>
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
</g:SimplePanel>
</g:HorizontalPanel>
</ui:UiBinder>
\ No newline at end of file
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=1516486&r1=1516485&r2=1516486&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 Aug 22 15:29:57 2013
@@ -87,14 +87,11 @@ public class MessageListView extends Com
public void onResize() {
grid.onResize();
}
-<<<<<<< HEAD
-=======
@Override
public void setSearchValue(String searchValue){
grid.setSearchValue(searchValue);
}
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java Thu Aug 22 15:29:57 2013
@@ -1,534 +1,475 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one *
- * or more contributor license agreements. See the NOTICE file *
- * distributed with this work for additional information *
- * regarding copyright ownership. The ASF licenses this file *
- * to you under the Apache License, Version 2.0 (the *
- * "License"); you may not use this file except in compliance *
- * with the License. You may obtain a copy of the License at *
- * *
- * http://www.apache.org/licenses/LICENSE-2.0 *
- * *
- * Unless required by applicable law or agreed to in writing, *
- * software distributed under the License is distributed on an *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
- * KIND, either express or implied. See the License for the *
- * specific language governing permissions and limitations *
- * under the License. *
- ****************************************************************/
-
-package org.apache.hupa.client.ui;
-
-<<<<<<< HEAD
-import java.util.Date;
-import java.util.List;
-=======
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
-
-import org.apache.hupa.client.HupaConstants;
-import org.apache.hupa.client.HupaController;
-import org.apache.hupa.client.activity.ToolBarActivity;
-import org.apache.hupa.client.bundles.HupaImageBundle;
-import org.apache.hupa.client.place.FolderPlace;
-import org.apache.hupa.client.place.MessagePlace;
-import org.apache.hupa.client.rf.FetchMessagesRequest;
-import org.apache.hupa.client.rf.HupaRequestFactory;
-import org.apache.hupa.shared.data.MessageImpl.IMAPFlag;
-import org.apache.hupa.shared.domain.FetchMessagesAction;
-import org.apache.hupa.shared.domain.FetchMessagesResult;
-import org.apache.hupa.shared.domain.ImapFolder;
-import org.apache.hupa.shared.domain.Message;
-<<<<<<< HEAD
-=======
-import org.apache.hupa.shared.events.MessagesReceivedEvent;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
-
-import com.google.gwt.cell.client.Cell.Context;
-import com.google.gwt.cell.client.CheckboxCell;
-import com.google.gwt.cell.client.DateCell;
-import com.google.gwt.cell.client.FieldUpdater;
-import com.google.gwt.cell.client.ImageResourceCell;
-import com.google.gwt.cell.client.TextCell;
-import com.google.gwt.cell.client.ValueUpdater;
-import com.google.gwt.core.client.GWT;
-<<<<<<< HEAD
-=======
-import com.google.gwt.core.client.Scheduler;
-import com.google.gwt.core.client.Scheduler.ScheduledCommand;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
-import com.google.gwt.dom.client.Element;
-import com.google.gwt.dom.client.InputElement;
-import com.google.gwt.dom.client.NativeEvent;
-import com.google.gwt.dom.client.Style.Unit;
-import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.i18n.client.DateTimeFormat;
-import com.google.gwt.place.shared.Place;
-import com.google.gwt.place.shared.PlaceController;
-import com.google.gwt.resources.client.ImageResource;
-<<<<<<< HEAD
-import com.google.gwt.user.cellview.client.Column;
-=======
-import com.google.gwt.storage.client.Storage;
-import com.google.gwt.user.cellview.client.Column;
-import com.google.gwt.user.cellview.client.ColumnSortEvent.AsyncHandler;
-import com.google.gwt.user.cellview.client.ColumnSortList.ColumnSortInfo;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
-import com.google.gwt.user.cellview.client.DataGrid;
-import com.google.gwt.user.cellview.client.Header;
-import com.google.gwt.user.cellview.client.RowStyles;
-import com.google.gwt.view.client.AsyncDataProvider;
-import com.google.gwt.view.client.DefaultSelectionEventManager;
-import com.google.gwt.view.client.HasData;
-import com.google.gwt.view.client.MultiSelectionModel;
-import com.google.gwt.view.client.ProvidesKey;
-<<<<<<< HEAD
-=======
-import com.google.gwt.view.client.Range;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
-import com.google.inject.Inject;
-import com.google.web.bindery.requestfactory.shared.Receiver;
-import com.google.web.bindery.requestfactory.shared.ServerFailure;
-
-public class MessagesCellTable extends DataGrid<Message> {
-
- @Inject private ToolBarActivity.Displayable toolBar;
- @Inject protected HupaController hc;
- @Inject EventBus eventBus;
- private String folderName;
- private String searchValue;
-
-<<<<<<< HEAD
- public static final int PAGE_SIZE = 25;
-=======
- public static final int PAGE_SIZE = 100;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
-
- private HupaImageBundle imageBundle;
- CheckboxColumn checkboxCol = new CheckboxColumn();
- Column<Message, ?> fromCol = new FromColumn();
- Column<Message, ?> subjectCol = new SubjectColumn();
- Column<Message, ?> attachedCol = new AttachmentColumn();
- Column<Message, ?> dateCol = new DateColumn();
-
- public interface Resources extends DataGrid.Resources {
-
- Resources INSTANCE = GWT.create(Resources.class);
-
- @Source("res/CssMessagesCellTable.css")
- CustomStyle dataGridStyle();
- }
-
- public interface CustomStyle extends Style {
- String fontBold();
- String fontNormal();
- }
-
- public CheckboxColumn getCheckboxCol() {
- return checkboxCol;
- }
-
- public final ProvidesKey<Message> KEY_PROVIDER = new ProvidesKey<Message>() {
- @Override
- public Object getKey(Message item) {
- return item == null ? null : item.getUid();
- }
- };
- private final MultiSelectionModel<? super Message> selectionModel = new MultiSelectionModel<Message>(KEY_PROVIDER);
-
- PlaceController pc;
- HupaRequestFactory rf;
-
- private MessageListDataProvider dataProvider;
-<<<<<<< HEAD
-=======
- public static final String CONTACTS_STORE = "hupa-contacts";
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
-
- public class MessageListDataProvider extends AsyncDataProvider<Message> implements HasRefresh {
-
- HasData<Message> display;
-
- @Override
- public void addDataDisplay(HasData<Message> display) {
- super.addDataDisplay(display);
- this.display = display;
- }
-
- @Override
- public void refresh() {
- this.onRangeChanged(display);
- }
-
-<<<<<<< HEAD
-=======
- Set<String> contacts = new LinkedHashSet<String>();
- private Storage contactsStore = null;
-
- private void cacheContacts(List<Message> messages) {
- for (Message message : messages) {
- message.getFrom();
- message.getTo();
- message.getCc();
- message.getReplyto();
-
- contacts.add(message.getFrom());
- contacts.add(message.getReplyto());
-
- for (String to : message.getTo()) {
- contacts.add(to);
- }
- for (String cc : message.getCc()) {
- contacts.add(cc);
- }
- }
- saveToLocalStorage(contacts);
- }
- private void saveToLocalStorage(Set<String> contacts) {
- contactsStore = Storage.getLocalStorageIfSupported();
- if (contactsStore != null) {
- String contactsString = contactsStore.getItem(CONTACTS_STORE);
- if (null != contactsString) {
- for (String contact : contactsString.split(",")) {
- contacts.add(contact.replace("[", "").replace("]", "").trim());
- }
- }
- contactsStore.setItem(CONTACTS_STORE, contacts.toString());
- }
- }
-
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
- @Override
- protected void onRangeChanged(HasData<Message> display) {
- FetchMessagesRequest req = rf.messagesRequest();
- FetchMessagesAction action = req.create(FetchMessagesAction.class);
- final ImapFolder f = req.create(ImapFolder.class);
-<<<<<<< HEAD
- final int start = display.getVisibleRange().getStart();
-=======
- final int start = display.getVisibleRange().getStart();
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
- f.setFullName(parseFolderName(pc));
- action.setFolder(f);
- action.setOffset(display.getVisibleRange().getLength());
- action.setSearchString(searchValue);
- action.setStart(start);
- req.fetch(action).fire(new Receiver<FetchMessagesResult>() {
- @Override
- public void onSuccess(final FetchMessagesResult response) {
- if (response == null || response.getRealCount() == 0) {
- updateRowCount(-1, true);
- } else {
- updateRowCount(response.getRealCount(), true);
- updateRowData(start, response.getMessages());
-<<<<<<< HEAD
- }
- hc.hideTopLoading();
-=======
- getColumnSortList().push(dateCol);
- }
- hc.hideTopLoading();
- Scheduler.get().scheduleDeferred(new ScheduledCommand() {
- public void execute() {
- cacheContacts(response.getMessages());
- eventBus.fireEvent(new MessagesReceivedEvent(f, response.getMessages()));
- }
- });
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
- }
-
- @Override
- public void onFailure(ServerFailure error) {
- if (error.isFatal()) {
- throw new RuntimeException(error.getMessage());
- }
- hc.hideTopLoading();
- }
- });
-
- }
-
- }
-
-<<<<<<< HEAD
-=======
- public void setSearchValue(String searchValue){
- this.searchValue = searchValue;
- }
-
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
- public final class CheckboxHeader extends Header<Boolean> {
-
- private final MultiSelectionModel<? super Message> selectionModel;
- private final AsyncDataProvider<Message> provider;
-
-<<<<<<< HEAD
- public CheckboxHeader(MultiSelectionModel<? super Message> selectionModel,
- AsyncDataProvider<Message> provider) {
-=======
- public CheckboxHeader(MultiSelectionModel<? super Message> selectionModel, AsyncDataProvider<Message> provider) {
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
- super(new CheckboxCell());
- this.selectionModel = selectionModel;
- this.provider = provider;
- }
-
- @Override
- public Boolean getValue() {
-<<<<<<< HEAD
- if(selectionModel == null || provider==null){
- return false;
- }
- if(selectionModel.getSelectedSet().size() == 0 || provider.getDataDisplays().size() == 0){
-=======
- if (selectionModel == null || provider == null) {
- return false;
- }
- if (selectionModel.getSelectedSet().size() == 0 || provider.getDataDisplays().size() == 0) {
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
- return false;
- }
- boolean allItemsSelected = selectionModel.getSelectedSet().size() == provider.getDataDisplays().size();
- return allItemsSelected;
- }
-
- @Override
- public void onBrowserEvent(Context context, Element elem, NativeEvent event) {
- InputElement input = elem.getFirstChild().cast();
- Boolean isChecked = input.isChecked();
- List<Message> displayedItems = MessagesCellTable.this.getVisibleItems();
- for (Message element : displayedItems) {
- selectionModel.setSelected(element, isChecked);
- checkboxCol.getFieldUpdater().update(0, element, isChecked);
- }
- }
-
- }
-
- @Inject
- public MessagesCellTable(final HupaImageBundle imageBundle, final HupaConstants constants,
- final PlaceController pc, final HupaRequestFactory rf) {
- super(PAGE_SIZE, Resources.INSTANCE);
- this.pc = pc;
- this.rf = rf;
- this.imageBundle = imageBundle;
-
- CheckboxCell headerCheckbox = new CheckboxCell();
- ImageResourceCell headerAttached = new ImageResourceCell();
- Header<Boolean> header = new Header<Boolean>(headerCheckbox) {
- @Override
- public Boolean getValue() {
- return false;
- }
- };
- Header<ImageResource> attachedPin = new Header<ImageResource>(headerAttached) {
- @Override
- public ImageResource getValue() {
- return imageBundle.attachmentIcon();
- }
- };
- header.setUpdater(new ValueUpdater<Boolean>() {
- @Override
- public void update(Boolean value) {
- List<Message> displayedItems = MessagesCellTable.this.getVisibleItems();
- for (Message msg : displayedItems) {
- checkboxCol.getFieldUpdater().update(0, msg, value);
- }
- }
- });
-
- addColumn(checkboxCol, new CheckboxHeader(selectionModel, dataProvider));
- setColumnWidth(checkboxCol, 3, Unit.EM);
- addColumn(fromCol, constants.mailTableFrom());
- setColumnWidth(fromCol, 40, Unit.PCT);
- addColumn(subjectCol, constants.mailTableSubject());
- setColumnWidth(subjectCol, 60, Unit.PCT);
- addColumn(attachedCol, attachedPin);
- setColumnWidth(attachedCol, 33, Unit.PX);
- addColumn(dateCol, constants.mailTableDate());
- setColumnWidth(dateCol, 10, Unit.EM);
- setRowCount(PAGE_SIZE, false);
- this.setStyleBaseOnTag();
- // redraw();
- setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
- setAutoHeaderRefreshDisabled(true);
-
- setSelectionModel(selectionModel, DefaultSelectionEventManager.<Message> createBlacklistManager(0));
-
- if (dataProvider == null) {
- dataProvider = new MessageListDataProvider();
- dataProvider.addDataDisplay(this);
- }
-<<<<<<< HEAD
- refresh();
- }
-
- private String parseFolderName(final PlaceController pc) {
-=======
-
- // make table sortable
- AsyncHandler columnSortHandler = new AsyncHandler(this);
- addColumnSortHandler(columnSortHandler);
- fromCol.setSortable(true);
- subjectCol.setSortable(true);
- attachedCol.setSortable(true);
- dateCol.setSortable(true);
-
- refresh();
- }
-
- // TODO: this should be perform in the server side, but in the meanwhile it is useful
- // some kind of sorting in client side.
- @Override
- public void setVisibleRangeAndClearData(Range range, boolean forceRangeChangeEvent) {
- final ColumnSortInfo sortInfo = getColumnSortList().get(0);
-
- List<Message> sortedList = new ArrayList<Message>(getVisibleItems());
- Collections.sort(sortedList, new Comparator<Message>() {
- public int compare(Message o1, Message o2) {
- Column<?,?> column = sortInfo.getColumn();
- Message a = sortInfo.isAscending() ? o1 : o2;
- Message b = sortInfo.isAscending() ? o2 : o1;
- if (fromCol.equals(column)) {
- return a.getFrom().compareToIgnoreCase(b.getFrom());
- }
- if (attachedCol.equals(column)) {
- return Boolean.valueOf(a.hasAttachment()).compareTo(Boolean.valueOf(b.hasAttachment()));
- }
- if (dateCol.equals(column)) {
- return a.getReceivedDate().compareTo(b.getReceivedDate());
- }
- if (subjectCol.equals(column)) {
- // Remove Re & Fwd, using ugly regex since replaceAll is not case-insensitive in client side.
- String s1 = a.getSubject().replaceAll("^([Rr][Ee]|[Ff][Ww][Dd]): (.+)$", "$2 ");
- String s2 = b.getSubject().replaceAll("^([Rr][Ee]|[Ff][Ww][Dd]): (.+)$", "$2 ");
- return s1.compareTo(s2);
- }
- return 0;
- }
- });
- dataProvider.updateRowData(range.getStart(), sortedList);
- }
-
- public String parseFolderName(final PlaceController pc) {
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
- Place place = pc.getWhere();
- if (place instanceof FolderPlace) {
- folderName = ((FolderPlace) place).getToken();
- } else if (place instanceof MessagePlace) {
- folderName = ((MessagePlace) place).getTokenWrapper().getFolder();
- }
- return folderName;
- }
-
- Message message; // the object selected by selectionModel
-
- public String getMessageStyle(Message row) {
- return haveRead(row) ? getReadStyle() : getUnreadStyle();
- }
- private String getUnreadStyle() {
- return Resources.INSTANCE.dataGridStyle().fontBold();
- }
-
- private String getReadStyle() {
- return Resources.INSTANCE.dataGridStyle().fontNormal();
- }
-
- private boolean haveRead(Message row) {
- return row.getFlags().contains(IMAPFlag.SEEN);
- }
- public void markRead(final Message message, final boolean read) {
- flush();
- }
-
- public class CheckboxColumn extends Column<Message, Boolean> {
-
- public CheckboxColumn() {
- super(new CheckboxCell(false, false));
- setFieldUpdater(new FieldUpdater<Message, Boolean>() {
- @Override
- public void update(int index, Message object, Boolean value) {
- selectionModel.setSelected(object, value);
- int size = selectionModel.getSelectedSet().size();
- if (size >= 1) {
- toolBar.enableDealingTools(true);
- toolBar.enableSendingTools(false);
- } else {
- toolBar.enableAllTools(false);
- }
- }
- });
- }
-
- @Override
- public Boolean getValue(Message object) {
- return selectionModel.isSelected(object);
- }
- }
-
- private class FromColumn extends Column<Message, String> {
- public FromColumn() {
- super(new TextCell());
- }
-
- @Override
- public String getValue(Message object) {
- return object.getFrom();
- }
- }
-
- private class SubjectColumn extends Column<Message, String> {
- public SubjectColumn() {
- super(new TextCell());
- }
-
- @Override
- public String getValue(Message object) {
- return object.getSubject();
- }
- }
-
- private class AttachmentColumn extends Column<Message, ImageResource> {
- public AttachmentColumn() {
- super(new ImageResourceCell());
- }
-
- @Override
- public ImageResource getValue(Message object) {
- return object.hasAttachment() ? imageBundle.attachmentIcon() : null;
- }
- }
-
- private class DateColumn extends Column<Message, Date> {
- private static final String DATE_FORMAT = "dd.MMM.yyyy";
-
- public DateColumn() {
- super(new DateCell(DateTimeFormat.getFormat(DATE_FORMAT)));
- }
-
- @Override
- public Date getValue(Message object) {
- return object.getReceivedDate();
- }
- }
-
- public void setStyleBaseOnTag() {
- setRowStyles(new RowStyles<Message>() {
- @Override
- public String getStyleNames(Message row, int rowIndex) {
- return getMessageStyle(row);
- }
- });
- }
- public void refresh() {
- dataProvider.refresh();
- redrawHeaders();
- }
-
-}
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.hupa.client.HupaConstants;
+import org.apache.hupa.client.HupaController;
+import org.apache.hupa.client.activity.ToolBarActivity;
+import org.apache.hupa.client.bundles.HupaImageBundle;
+import org.apache.hupa.client.place.FolderPlace;
+import org.apache.hupa.client.place.MessagePlace;
+import org.apache.hupa.client.rf.FetchMessagesRequest;
+import org.apache.hupa.client.rf.HupaRequestFactory;
+import org.apache.hupa.shared.data.MessageImpl.IMAPFlag;
+import org.apache.hupa.shared.domain.FetchMessagesAction;
+import org.apache.hupa.shared.domain.FetchMessagesResult;
+import org.apache.hupa.shared.domain.ImapFolder;
+import org.apache.hupa.shared.domain.Message;
+import org.apache.hupa.shared.events.MessagesReceivedEvent;
+
+import com.google.gwt.cell.client.Cell.Context;
+import com.google.gwt.cell.client.CheckboxCell;
+import com.google.gwt.cell.client.DateCell;
+import com.google.gwt.cell.client.FieldUpdater;
+import com.google.gwt.cell.client.ImageResourceCell;
+import com.google.gwt.cell.client.TextCell;
+import com.google.gwt.cell.client.ValueUpdater;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.dom.client.InputElement;
+import com.google.gwt.dom.client.NativeEvent;
+import com.google.gwt.dom.client.Style.Unit;
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.place.shared.Place;
+import com.google.gwt.place.shared.PlaceController;
+import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.storage.client.Storage;
+import com.google.gwt.user.cellview.client.Column;
+import com.google.gwt.user.cellview.client.ColumnSortEvent.AsyncHandler;
+import com.google.gwt.user.cellview.client.ColumnSortList.ColumnSortInfo;
+import com.google.gwt.user.cellview.client.DataGrid;
+import com.google.gwt.user.cellview.client.Header;
+import com.google.gwt.user.cellview.client.RowStyles;
+import com.google.gwt.view.client.AsyncDataProvider;
+import com.google.gwt.view.client.DefaultSelectionEventManager;
+import com.google.gwt.view.client.HasData;
+import com.google.gwt.view.client.MultiSelectionModel;
+import com.google.gwt.view.client.ProvidesKey;
+import com.google.gwt.view.client.Range;
+import com.google.inject.Inject;
+import com.google.web.bindery.requestfactory.shared.Receiver;
+import com.google.web.bindery.requestfactory.shared.ServerFailure;
+
+public class MessagesCellTable extends DataGrid<Message> {
+
+ @Inject private ToolBarActivity.Displayable toolBar;
+ @Inject protected HupaController hc;
+ @Inject EventBus eventBus;
+ private String folderName;
+ private String searchValue;
+
+ public static final int PAGE_SIZE = 100;
+
+ private HupaImageBundle imageBundle;
+ CheckboxColumn checkboxCol = new CheckboxColumn();
+ Column<Message, ?> fromCol = new FromColumn();
+ Column<Message, ?> subjectCol = new SubjectColumn();
+ Column<Message, ?> attachedCol = new AttachmentColumn();
+ Column<Message, ?> dateCol = new DateColumn();
+
+ public interface Resources extends DataGrid.Resources {
+
+ Resources INSTANCE = GWT.create(Resources.class);
+
+ @Source("res/CssMessagesCellTable.css")
+ CustomStyle dataGridStyle();
+ }
+
+ public interface CustomStyle extends Style {
+ String fontBold();
+ String fontNormal();
+ }
+
+ public CheckboxColumn getCheckboxCol() {
+ return checkboxCol;
+ }
+
+ public final ProvidesKey<Message> KEY_PROVIDER = new ProvidesKey<Message>() {
+ @Override
+ public Object getKey(Message item) {
+ return item == null ? null : item.getUid();
+ }
+ };
+ private final MultiSelectionModel<? super Message> selectionModel = new MultiSelectionModel<Message>(KEY_PROVIDER);
+
+ PlaceController pc;
+ HupaRequestFactory rf;
+
+ private MessageListDataProvider dataProvider;
+ public static final String CONTACTS_STORE = "hupa-contacts";
+
+ public class MessageListDataProvider extends AsyncDataProvider<Message> implements HasRefresh {
+
+ HasData<Message> display;
+
+ @Override
+ public void addDataDisplay(HasData<Message> display) {
+ super.addDataDisplay(display);
+ this.display = display;
+ }
+
+ @Override
+ public void refresh() {
+ this.onRangeChanged(display);
+ }
+
+ Set<String> contacts = new LinkedHashSet<String>();
+ private Storage contactsStore = null;
+
+ private void cacheContacts(List<Message> messages) {
+ for (Message message : messages) {
+ message.getFrom();
+ message.getTo();
+ message.getCc();
+ message.getReplyto();
+
+ contacts.add(message.getFrom());
+ contacts.add(message.getReplyto());
+
+ for (String to : message.getTo()) {
+ contacts.add(to);
+ }
+ for (String cc : message.getCc()) {
+ contacts.add(cc);
+ }
+ }
+ saveToLocalStorage(contacts);
+ }
+ private void saveToLocalStorage(Set<String> contacts) {
+ contactsStore = Storage.getLocalStorageIfSupported();
+ if (contactsStore != null) {
+ String contactsString = contactsStore.getItem(CONTACTS_STORE);
+ if (null != contactsString) {
+ for (String contact : contactsString.split(",")) {
+ contacts.add(contact.replace("[", "").replace("]", "").trim());
+ }
+ }
+ contactsStore.setItem(CONTACTS_STORE, contacts.toString());
+ }
+ }
+
+ @Override
+ protected void onRangeChanged(HasData<Message> display) {
+ FetchMessagesRequest req = rf.messagesRequest();
+ FetchMessagesAction action = req.create(FetchMessagesAction.class);
+ final ImapFolder f = req.create(ImapFolder.class);
+ final int start = display.getVisibleRange().getStart();
+ f.setFullName(parseFolderName(pc));
+ action.setFolder(f);
+ action.setOffset(display.getVisibleRange().getLength());
+ action.setSearchString(searchValue);
+ action.setStart(start);
+ req.fetch(action).fire(new Receiver<FetchMessagesResult>() {
+ @Override
+ public void onSuccess(final FetchMessagesResult response) {
+ if (response == null || response.getRealCount() == 0) {
+ updateRowCount(-1, true);
+ } else {
+ updateRowCount(response.getRealCount(), true);
+ updateRowData(start, response.getMessages());
+ getColumnSortList().push(dateCol);
+ }
+ hc.hideTopLoading();
+ Scheduler.get().scheduleDeferred(new ScheduledCommand() {
+ public void execute() {
+ cacheContacts(response.getMessages());
+ eventBus.fireEvent(new MessagesReceivedEvent(f, response.getMessages()));
+ }
+ });
+ }
+
+ @Override
+ public void onFailure(ServerFailure error) {
+ if (error.isFatal()) {
+ throw new RuntimeException(error.getMessage());
+ }
+ hc.hideTopLoading();
+ }
+ });
+
+ }
+
+ }
+
+ public void setSearchValue(String searchValue){
+ this.searchValue = searchValue;
+ }
+
+ public final class CheckboxHeader extends Header<Boolean> {
+
+ private final MultiSelectionModel<? super Message> selectionModel;
+ private final AsyncDataProvider<Message> provider;
+
+ public CheckboxHeader(MultiSelectionModel<? super Message> selectionModel, AsyncDataProvider<Message> provider) {
+ super(new CheckboxCell());
+ this.selectionModel = selectionModel;
+ this.provider = provider;
+ }
+
+ @Override
+ public Boolean getValue() {
+ if (selectionModel == null || provider == null) {
+ return false;
+ }
+ if (selectionModel.getSelectedSet().size() == 0 || provider.getDataDisplays().size() == 0) {
+ return false;
+ }
+ boolean allItemsSelected = selectionModel.getSelectedSet().size() == provider.getDataDisplays().size();
+ return allItemsSelected;
+ }
+
+ @Override
+ public void onBrowserEvent(Context context, Element elem, NativeEvent event) {
+ InputElement input = elem.getFirstChild().cast();
+ Boolean isChecked = input.isChecked();
+ List<Message> displayedItems = MessagesCellTable.this.getVisibleItems();
+ for (Message element : displayedItems) {
+ selectionModel.setSelected(element, isChecked);
+ checkboxCol.getFieldUpdater().update(0, element, isChecked);
+ }
+ }
+
+ }
+
+ @Inject
+ public MessagesCellTable(final HupaImageBundle imageBundle, final HupaConstants constants,
+ final PlaceController pc, final HupaRequestFactory rf) {
+ super(PAGE_SIZE, Resources.INSTANCE);
+ this.pc = pc;
+ this.rf = rf;
+ this.imageBundle = imageBundle;
+
+ CheckboxCell headerCheckbox = new CheckboxCell();
+ ImageResourceCell headerAttached = new ImageResourceCell();
+ Header<Boolean> header = new Header<Boolean>(headerCheckbox) {
+ @Override
+ public Boolean getValue() {
+ return false;
+ }
+ };
+ Header<ImageResource> attachedPin = new Header<ImageResource>(headerAttached) {
+ @Override
+ public ImageResource getValue() {
+ return imageBundle.attachmentIcon();
+ }
+ };
+ header.setUpdater(new ValueUpdater<Boolean>() {
+ @Override
+ public void update(Boolean value) {
+ List<Message> displayedItems = MessagesCellTable.this.getVisibleItems();
+ for (Message msg : displayedItems) {
+ checkboxCol.getFieldUpdater().update(0, msg, value);
+ }
+ }
+ });
+
+ addColumn(checkboxCol, new CheckboxHeader(selectionModel, dataProvider));
+ setColumnWidth(checkboxCol, 3, Unit.EM);
+ addColumn(fromCol, constants.mailTableFrom());
+ setColumnWidth(fromCol, 40, Unit.PCT);
+ addColumn(subjectCol, constants.mailTableSubject());
+ setColumnWidth(subjectCol, 60, Unit.PCT);
+ addColumn(attachedCol, attachedPin);
+ setColumnWidth(attachedCol, 33, Unit.PX);
+ addColumn(dateCol, constants.mailTableDate());
+ setColumnWidth(dateCol, 10, Unit.EM);
+ setRowCount(PAGE_SIZE, false);
+ this.setStyleBaseOnTag();
+ // redraw();
+ setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
+ setAutoHeaderRefreshDisabled(true);
+
+ setSelectionModel(selectionModel, DefaultSelectionEventManager.<Message> createBlacklistManager(0));
+
+ if (dataProvider == null) {
+ dataProvider = new MessageListDataProvider();
+ dataProvider.addDataDisplay(this);
+ }
+
+ // make table sortable
+ AsyncHandler columnSortHandler = new AsyncHandler(this);
+ addColumnSortHandler(columnSortHandler);
+ fromCol.setSortable(true);
+ subjectCol.setSortable(true);
+ attachedCol.setSortable(true);
+ dateCol.setSortable(true);
+
+ refresh();
+ }
+
+ // TODO: this should be perform in the server side, but in the meanwhile it is useful
+ // some kind of sorting in client side.
+ @Override
+ public void setVisibleRangeAndClearData(Range range, boolean forceRangeChangeEvent) {
+ final ColumnSortInfo sortInfo = getColumnSortList().get(0);
+
+ List<Message> sortedList = new ArrayList<Message>(getVisibleItems());
+ Collections.sort(sortedList, new Comparator<Message>() {
+ public int compare(Message o1, Message o2) {
+ Column<?,?> column = sortInfo.getColumn();
+ Message a = sortInfo.isAscending() ? o1 : o2;
+ Message b = sortInfo.isAscending() ? o2 : o1;
+ if (fromCol.equals(column)) {
+ return a.getFrom().compareToIgnoreCase(b.getFrom());
+ }
+ if (attachedCol.equals(column)) {
+ return Boolean.valueOf(a.hasAttachment()).compareTo(Boolean.valueOf(b.hasAttachment()));
+ }
+ if (dateCol.equals(column)) {
+ return a.getReceivedDate().compareTo(b.getReceivedDate());
+ }
+ if (subjectCol.equals(column)) {
+ // Remove Re & Fwd, using ugly regex since replaceAll is not case-insensitive in client side.
+ String s1 = a.getSubject().replaceAll("^([Rr][Ee]|[Ff][Ww][Dd]): (.+)$", "$2 ");
+ String s2 = b.getSubject().replaceAll("^([Rr][Ee]|[Ff][Ww][Dd]): (.+)$", "$2 ");
+ return s1.compareTo(s2);
+ }
+ return 0;
+ }
+ });
+ dataProvider.updateRowData(range.getStart(), sortedList);
+ }
+
+ public String parseFolderName(final PlaceController pc) {
+ Place place = pc.getWhere();
+ if (place instanceof FolderPlace) {
+ folderName = ((FolderPlace) place).getToken();
+ } else if (place instanceof MessagePlace) {
+ folderName = ((MessagePlace) place).getTokenWrapper().getFolder();
+ }
+ return folderName;
+ }
+
+ Message message; // the object selected by selectionModel
+
+ public String getMessageStyle(Message row) {
+ return haveRead(row) ? getReadStyle() : getUnreadStyle();
+ }
+ private String getUnreadStyle() {
+ return Resources.INSTANCE.dataGridStyle().fontBold();
+ }
+
+ private String getReadStyle() {
+ return Resources.INSTANCE.dataGridStyle().fontNormal();
+ }
+
+ private boolean haveRead(Message row) {
+ return row.getFlags().contains(IMAPFlag.SEEN);
+ }
+ public void markRead(final Message message, final boolean read) {
+ flush();
+ }
+
+ public class CheckboxColumn extends Column<Message, Boolean> {
+
+ public CheckboxColumn() {
+ super(new CheckboxCell(false, false));
+ setFieldUpdater(new FieldUpdater<Message, Boolean>() {
+ @Override
+ public void update(int index, Message object, Boolean value) {
+ selectionModel.setSelected(object, value);
+ int size = selectionModel.getSelectedSet().size();
+ if (size >= 1) {
+ toolBar.enableDealingTools(true);
+ toolBar.enableSendingTools(false);
+ } else {
+ toolBar.enableAllTools(false);
+ }
+ }
+ });
+ }
+
+ @Override
+ public Boolean getValue(Message object) {
+ return selectionModel.isSelected(object);
+ }
+ }
+
+ private class FromColumn extends Column<Message, String> {
+ public FromColumn() {
+ super(new TextCell());
+ }
+
+ @Override
+ public String getValue(Message object) {
+ return object.getFrom();
+ }
+ }
+
+ private class SubjectColumn extends Column<Message, String> {
+ public SubjectColumn() {
+ super(new TextCell());
+ }
+
+ @Override
+ public String getValue(Message object) {
+ return object.getSubject();
+ }
+ }
+
+ private class AttachmentColumn extends Column<Message, ImageResource> {
+ public AttachmentColumn() {
+ super(new ImageResourceCell());
+ }
+
+ @Override
+ public ImageResource getValue(Message object) {
+ return object.hasAttachment() ? imageBundle.attachmentIcon() : null;
+ }
+ }
+
+ private class DateColumn extends Column<Message, Date> {
+ private static final String DATE_FORMAT = "dd.MMM.yyyy";
+
+ public DateColumn() {
+ super(new DateCell(DateTimeFormat.getFormat(DATE_FORMAT)));
+ }
+
+ @Override
+ public Date getValue(Message object) {
+ return object.getReceivedDate();
+ }
+ }
+
+ public void setStyleBaseOnTag() {
+ setRowStyles(new RowStyles<Message>() {
+ @Override
+ public String getStyleNames(Message row, int rowIndex) {
+ return getMessageStyle(row);
+ }
+ });
+ }
+ public void refresh() {
+ dataProvider.refresh();
+ redrawHeaders();
+ }
+
+}
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=1516486&r1=1516485&r2=1516486&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 Aug 22 15:29:57 2013
@@ -31,10 +31,7 @@ import com.google.gwt.resources.client.C
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
-<<<<<<< HEAD
-=======
import com.google.gwt.user.client.Window;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DockLayoutPanel;
@@ -94,26 +91,12 @@ public class NavigationView extends Comp
settingOuter.addStyleName(style.selected());
setting.addStyleName(style.settingsInnerSelected());
-<<<<<<< HEAD
- placeController.goTo(new SettingPlace("folders"));
-=======
placeController.goTo(new SettingPlace("labels"));
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
@UiHandler("contact")
public void onContactClick(ClickEvent e){
-<<<<<<< HEAD
- 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"));
-=======
Window.alert("//TODO");
// mailOuter.removeStyleName(style.selected());
// mail.removeStyleName(style.mailInnerSelected());
@@ -123,7 +106,6 @@ public class NavigationView extends Comp
// settingOuter.removeStyleName(style.selected());
// setting.removeStyleName(style.settingsInnerSelected());
// placeController.goTo(new ContactPlace("contacts"));
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
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=1516486&r1=1516485&r2=1516486&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 Aug 22 15:29:57 2013
@@ -29,11 +29,8 @@ 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;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
@@ -42,26 +39,11 @@ 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;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
public class SearchBoxView extends Composite implements SearchBoxActivity.Displayable {
private MultiWordSuggestOracle oracle = new MultiWordSuggestOracle(" ,@");
-<<<<<<< HEAD
- 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) {
-=======
private TextBox searchBox = new TextBox();
private Button searchButton = new Button("Search");
@UiField protected HorizontalPanel thisPanel;
@@ -83,7 +65,6 @@ 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(""))) {
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
searchButton.click();
}
}
Copied: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingEcsPanel.java (from r1516205, james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetContainerDisplayable.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingEcsPanel.java?p2=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingEcsPanel.java&p1=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetContainerDisplayable.java&r1=1516205&r2=1516486&rev=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetContainerDisplayable.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingEcsPanel.java Thu Aug 22 15:29:57 2013
@@ -19,20 +19,22 @@
package org.apache.hupa.client.ui;
-<<<<<<< HEAD
-import com.google.gwt.user.client.ui.Widget;
+import org.apache.hupa.client.activity.StatusActivity;
-public interface WidgetContainerDisplayable extends WidgetDisplayable {
-=======
-import com.google.gwt.user.client.ui.IsWidget;
-import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.SimpleLayoutPanel;
-public interface WidgetContainerDisplayable extends IsWidget {
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
+public class SettingEcsPanel extends Composite implements StatusActivity.Displayable {
- void addWidget( Widget widget );
+ public SettingEcsPanel() {
+ initWidget(binder.createAndBindUi(this));
+ }
- void removeWidget( Widget widget );
+ interface Binder extends UiBinder<SimpleLayoutPanel, SettingEcsPanel> {
+ }
+
+ private static Binder binder = GWT.create(Binder.class);
- void showWidget( Widget widget );
}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingEcsPanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingEcsPanel.ui.xml?rev=1516486&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingEcsPanel.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingEcsPanel.ui.xml Thu Aug 22 15:29:57 2013
@@ -0,0 +1,109 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+
+ <ui:style src="res/CssSplitLayoutPanel.css">
+ .uibox {
+ border: 1px solid #a3a3a3;
+ border-radius: 4px;
+ overflow: hidden;
+ box-shadow: 0 0 2px #999;
+ -o-box-shadow: 0 0 2px #999;
+ -webkit-box-shadow: 0 0 2px #999;
+ -moz-box-shadow: 0 0 2px #999;
+ background: #fff;
+ }
+
+ .listbox {
+ background: #d9ecf4;
+ overflow: hidden;
+ }
+
+ .listbox .scroller {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ bottom: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ }
+
+ .listbox .scroller.withfooter {
+ bottom: 42px;
+ }
+
+ .listbox .boxtitle+.scroller {
+ top: 34px;
+ }
+
+ .boxtitle,.uibox .listing thead td {
+ font-size: 12px;
+ font-weight: bold;
+ padding: 10px 8px 3px 8px;
+ height: 20px; /* doesn't affect table-cells in FF */
+ margin: 0;
+ text-shadow: 0px 1px 1px #fff;
+ border-bottom: 1px solid #bbd3da;
+ white-space: nowrap;
+ }
+
+ .uibox .boxtitle,.uibox .listing thead td {
+ background: #b0ccd7;
+ color: #004458;
+ border-radius: 4px 4px 0 0;
+ }
+
+ .contentbox .boxtitle {
+ color: #777;
+ background: #eee;
+ background: -moz-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee),
+ color-stop(100%, #dfdfdf) );
+ background: -o-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: -ms-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ border-bottom: 1px solid #ccc;
+ }
+
+ .contentbox .scroller {
+ position: absolute;
+ top: 34px;
+ left: 0;
+ right: 0;
+ bottom: 28px;
+ overflow: auto;
+ }
+
+ body.iframe .boxtitle {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ z-index: 100;
+ }
+
+ .boxcontent {
+ padding: 10px;
+ }
+ </ui:style>
+ <g:SimpleLayoutPanel addStyleNames="{style.uibox} {style.contentbox}">
+ <g:HTMLPanel>
+ <h2 class="{style.boxtitle}">Envelope-Content Splitting(ECS)</h2>
+ <g:FlowPanel addStyleNames="{style.boxcontent}">
+ <g:SimplePanel ui:field="ecsSettingContainer" />
+ </g:FlowPanel>
+ <div class="{style.statusbar}" />
+ </g:HTMLPanel>
+ </g:SimpleLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
Copied: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.java (from r1516205, james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingNavView.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.java?p2=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.java&p1=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingNavView.java&r1=1516205&r2=1516486&rev=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingNavView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.java Thu Aug 22 15:29:57 2013
@@ -19,46 +19,49 @@
package org.apache.hupa.client.ui;
-import org.apache.hupa.client.activity.SettingNavActivity;
+import org.apache.hupa.client.activity.StatusActivity;
import com.google.gwt.core.client.GWT;
-import com.google.gwt.dom.client.Element;
-import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HTMLPanel;
+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.SplitLayoutPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class SettingLabelPanel extends Composite implements StatusActivity.Displayable {
-public class SettingNavView extends Composite implements SettingNavActivity.Displayable {
-
- @UiField Element navLabelsItem;
- @UiField Anchor labelsAnchor;
- public SettingNavView() {
+ @UiField SimpleLayoutPanel labelListContainer;
+ @UiField SimplePanel labelPropertiesContainer;
+ public SettingLabelPanel() {
initWidget(binder.createAndBindUi(this));
}
- interface Binder extends UiBinder<HTMLPanel, SettingNavView> {
+ public AcceptsOneWidget getLabelListView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ labelListContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
}
- private static Binder binder = GWT.create(Binder.class);
-
- @Override
- public HasClickHandlers getLabelsAchor() {
- return labelsAnchor;
+ public AcceptsOneWidget getLabelPropertiesView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ labelPropertiesContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
}
- @Override
- public void singleSelect(int i) {
- switch(i){
- default:selectNavLabelItem();
- }
+ interface Binder extends UiBinder<SplitLayoutPanel, SettingLabelPanel> {
}
- private void selectNavLabelItem() {
- String clazz = navLabelsItem.getAttribute("class");
- navLabelsItem.setAttribute("class", clazz + " selected");
- }
+ private static Binder binder = GWT.create(Binder.class);
}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.ui.xml?rev=1516486&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.ui.xml Thu Aug 22 15:29:57 2013
@@ -0,0 +1,125 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+
+ <ui:style src="res/CssSplitLayoutPanel.css">
+ .uibox {
+ border: 1px solid #a3a3a3;
+ border-radius: 4px;
+ overflow: hidden;
+ box-shadow: 0 0 2px #999;
+ -o-box-shadow: 0 0 2px #999;
+ -webkit-box-shadow: 0 0 2px #999;
+ -moz-box-shadow: 0 0 2px #999;
+ background: #fff;
+ }
+
+ .listbox {
+ background: #d9ecf4;
+ overflow: hidden;
+ }
+
+ .listbox .scroller {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ bottom: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ }
+
+ .listbox .scroller.withfooter {
+ bottom: 42px;
+ }
+
+ .listbox .boxtitle+.scroller {
+ top: 34px;
+ }
+
+ .boxtitle,.uibox .listing thead td {
+ font-size: 12px;
+ font-weight: bold;
+ padding: 10px 8px 3px 8px;
+ height: 20px; /* doesn't affect table-cells in FF */
+ margin: 0;
+ text-shadow: 0px 1px 1px #fff;
+ border-bottom: 1px solid #bbd3da;
+ white-space: nowrap;
+ }
+
+ .uibox .boxtitle,.uibox .listing thead td {
+ background: #b0ccd7;
+ color: #004458;
+ border-radius: 4px 4px 0 0;
+ }
+
+ .contentbox .boxtitle {
+ color: #777;
+ background: #eee;
+ background: -moz-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee),
+ color-stop(100%, #dfdfdf) );
+ background: -o-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: -ms-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ border-bottom: 1px solid #ccc;
+ }
+
+ .contentbox .scroller {
+ position: absolute;
+ top: 34px;
+ left: 0;
+ right: 0;
+ bottom: 28px;
+ overflow: auto;
+ }
+
+ body.iframe .boxtitle {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ z-index: 100;
+ }
+
+ .boxcontent {
+ padding: 10px;
+ }
+ </ui:style>
+ <g:SplitLayoutPanel ui:field="thisPanel">
+ <g:west size="260">
+ <g:DockLayoutPanel addStyleNames="{style.listbox} {style.uibox}">
+ <g:north size="34">
+ <g:HTML>
+ <h2 class="{style.boxtitle}">Folders</h2>
+ </g:HTML>
+ </g:north>
+ <g:center>
+ <g:SimpleLayoutPanel ui:field="labelListContainer" />
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:west>
+ <g:center>
+ <g:SimpleLayoutPanel addStyleNames="{style.uibox} {style.contentbox}">
+ <g:HTMLPanel>
+ <h2 class="{style.boxtitle}">Folder properties</h2>
+ <g:FlowPanel addStyleNames="{style.boxcontent}">
+ <g:SimplePanel ui:field="labelPropertiesContainer"></g:SimplePanel>
+ </g:FlowPanel>
+ <div class="{style.statusbar}" />
+ </g:HTMLPanel>
+ </g:SimpleLayoutPanel>
+ </g:center>
+ </g:SplitLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingNavView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingNavView.java?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingNavView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingNavView.java Thu Aug 22 15:29:57 2013
@@ -33,7 +33,10 @@ import com.google.gwt.user.client.ui.HTM
public class SettingNavView extends Composite implements SettingNavActivity.Displayable {
@UiField Element navLabelsItem;
+ @UiField Element navEcsItem;
+
@UiField Anchor labelsAnchor;
+ @UiField Anchor ecsAnchor;
public SettingNavView() {
initWidget(binder.createAndBindUi(this));
@@ -50,15 +53,31 @@ public class SettingNavView extends Comp
}
@Override
+ public HasClickHandlers getEcsAchor() {
+ return ecsAnchor;
+ }
+
+
+ @Override
public void singleSelect(int i) {
switch(i){
+ case 2:selectEcsItem();break;
default:selectNavLabelItem();
}
}
- private void selectNavLabelItem() {
- String clazz = navLabelsItem.getAttribute("class");
- navLabelsItem.setAttribute("class", clazz + " selected");
+ private void selectEcsItem() {
+ String labelClass = navLabelsItem.getAttribute("class");
+ navLabelsItem.setAttribute("class", labelClass.replace("selected", ""));
+ String ecsClass = navEcsItem.getAttribute("class");
+ navEcsItem.setAttribute("class", ecsClass + " selected");
+
}
+ private void selectNavLabelItem() {
+ String ecsClass = navEcsItem.getAttribute("class");
+ navEcsItem.setAttribute("class", ecsClass.replace("selected", ""));
+ String labelClass = navLabelsItem.getAttribute("class");
+ navLabelsItem.setAttribute("class", labelClass + " selected");
+ }
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingNavView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingNavView.ui.xml?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingNavView.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingNavView.ui.xml Thu Aug 22 15:29:57 2013
@@ -11,27 +11,20 @@
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
- <ui:style>
- .selected {
- font-weight: bold;
- }
- </ui:style>
<g:HTMLPanel ui:field="thisPanel">
<div id="settings-sections" class="uibox listbox">
<h2 class="boxtitle">Settings</h2>
<div id="settings-tabs" class="scroller">
<span class="listitem folders selected" ui:field="navLabelsItem">
- <g:Anchor ui:field="labelsAnchor">Labels
+ <g:Anchor ui:field="labelsAnchor">Labels</g:Anchor>
+ </span>
+ <span class="listitem preferences" ui:field="navEcsItem">
+ <g:Anchor ui:field="ecsAnchor">Envelope-Content Splitting
</g:Anchor>
</span>
- <!-- <span id="settingstabfolders" class="listitem preferences selected">
- <a title="Manage folders" id="rcmbtn106" >Folders</a> </span> -->
- <!-- <span id="settingstabidentities" class="listitem identities"> <a
- title="Manage identities for this account" id="rcmbtn107" >Identities</a>
+ <!-- <span class="listitem identities"> <g:Anchor ui:field="others">Ohters</g:Anchor>
</span> -->
-
</div>
</div>
-
</g:HTMLPanel>
</ui:UiBinder>
\ No newline at end of file
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=1516486&r1=1516485&r2=1516486&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 Aug 22 15:29:57 2013
@@ -32,10 +32,6 @@ import com.google.gwt.event.dom.client.C
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.event.shared.EventBus;
-<<<<<<< HEAD
-import com.google.gwt.event.shared.HandlerRegistration;
-=======
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
import com.google.gwt.place.shared.PlaceController;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.uibinder.client.UiBinder;
@@ -71,18 +67,8 @@ public class ToolBarView extends Composi
@UiField HTMLPanel replyAllTip;
@UiField HTMLPanel forwardTip;
-<<<<<<< HEAD
- HandlerRegistration replyReg;
- HandlerRegistration replyAllReg;
- HandlerRegistration forwardReg;
- HandlerRegistration deleteReg;
- HandlerRegistration markReg;
-
- @UiField Style style;
-=======
@UiField Style style;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
interface Style extends CssResource {
String disabledButton();
@@ -185,19 +171,11 @@ public class ToolBarView extends Composi
popup.add(markUnread);
simplePopup.setWidget(popup);
-<<<<<<< HEAD
- markReg = mark.addClickHandler(markHandler);
- deleteReg = delete.addClickHandler(deleteHandler);
- replyReg = reply.addClickHandler(replyHandler);
- replyAllReg = replyAll.addClickHandler(replyAllHandler);
- forwardReg = forward.addClickHandler(forwardHandler);
-=======
mark.addClickHandler(markHandler);
delete.addClickHandler(deleteHandler);
reply.addClickHandler(replyHandler);
replyAll.addClickHandler(replyAllHandler);
forward.addClickHandler(forwardHandler);
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
@UiHandler("compose")
@@ -316,17 +294,6 @@ public class ToolBarView extends Composi
forwardGroup.addStyleName(style.disabledButton());
replyAllTip.addStyleName(style.disabledButton());
forwardTip.addStyleName(style.disabledButton());
-<<<<<<< HEAD
-// if(replyReg != null){
-// replyReg.removeHandler();
-// replyAllReg.removeHandler();
-// forwardReg.removeHandler();
-// replyReg = null;
-// replyAllReg = null;
-// forwardReg = null;
-// }
-=======
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
private void removeSendingDisableds() {
@@ -335,19 +302,6 @@ public class ToolBarView extends Composi
forwardGroup.removeStyleName(style.disabledButton());
replyAllTip.removeStyleName(style.disabledButton());
forwardTip.removeStyleName(style.disabledButton());
-<<<<<<< HEAD
-
-// if(replyReg != null){
-// replyReg.removeHandler();
-// replyAllReg.removeHandler();
-// forwardReg.removeHandler();
-// }
-// replyReg = reply.addClickHandler(replyHandler);
-// replyAllReg = replyAll.addClickHandler(replyAllHandler);
-// forwardReg = forward.addClickHandler(forwardHandler);
-
-=======
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
@@ -355,31 +309,11 @@ public class ToolBarView extends Composi
private void addDealingDisableds() {
delete.addStyleName(style.disabledButton());
mark.addStyleName(style.disabledButton());
-<<<<<<< HEAD
-
-// if(deleteReg != null){
-// deleteReg.removeHandler();
-// markReg.removeHandler();
-// deleteReg = null;
-// markReg = null;
-// }
-=======
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
private void removeDealingDisableds() {
delete.removeStyleName(style.disabledButton());
mark.removeStyleName(style.disabledButton());
-<<<<<<< HEAD
-
-// if(markReg != null){
-// deleteReg.removeHandler();
-// markReg.removeHandler();
-// }
-// markReg = mark.addClickHandler(markHandler);
-// deleteReg = delete.addClickHandler(deleteHandler);
-=======
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
interface ToolBarUiBinder extends UiBinder<FlowPanel, ToolBarView> {
@@ -388,35 +322,7 @@ public class ToolBarView extends Composi
private static ToolBarUiBinder binder = GWT.create(ToolBarUiBinder.class);
@Override
-<<<<<<< HEAD
- public HandlerRegistration getForwardReg() {
- return forwardReg;
- }
-
- @Override
- public HandlerRegistration getReplyAllReg() {
- return replyAllReg;
- }
-
- @Override
- public HandlerRegistration getReplyReg() {
- return replyReg;
- }
-
- @Override
- public HandlerRegistration getMarkReg() {
- return markReg;
- }
-
- @Override
- public HandlerRegistration getDeleteReg() {
- return deleteReg;
- }
-
-
-=======
public HasClickHandlers getRefresh() {
return refresh;
}
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.java?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.java Thu Aug 22 15:29:57 2013
@@ -83,10 +83,7 @@ public class TopBarView extends Composit
@Override
public void showUserName(String userName){
-<<<<<<< HEAD
-=======
userLabel.clear();
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
userLabel.add(new HTML(userName));
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetContainerDisplayable.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetContainerDisplayable.java?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetContainerDisplayable.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetContainerDisplayable.java Thu Aug 22 15:29:57 2013
@@ -19,16 +19,10 @@
package org.apache.hupa.client.ui;
-<<<<<<< HEAD
-import com.google.gwt.user.client.ui.Widget;
-
-public interface WidgetContainerDisplayable extends WidgetDisplayable {
-=======
import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.Widget;
public interface WidgetContainerDisplayable extends IsWidget {
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
void addWidget( Widget widget );
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java Thu Aug 22 15:29:57 2013
@@ -19,79 +19,64 @@
package org.apache.hupa.client.ui;
-<<<<<<< HEAD
-import java.util.Arrays;
-import java.util.List;
+import org.apache.hupa.client.place.SettingPlace;
-import org.apache.hupa.client.ui.FolderListView.Resources;
-
-import com.google.gwt.cell.client.AbstractCell;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.resources.client.ClientBundle.Source;
-import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.user.cellview.client.CellList;
-import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy;
-=======
import com.google.gwt.core.client.GWT;
+import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.cellview.client.CellList;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.LayoutPanel;
import com.google.gwt.user.client.ui.SimpleLayoutPanel;
-import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.SplitLayoutPanel;
import com.google.gwt.user.client.ui.Widget;
-<<<<<<< HEAD
-import com.google.gwt.view.client.SelectionChangeEvent;
-import com.google.gwt.view.client.SingleSelectionModel;
public class _CenterSettingPanel extends Composite {
- @UiField SplitLayoutPanel thisPanel;
-
- @UiField SimpleLayoutPanel settingsTab;
+ public static final int LAYOUT_LABEL = 0x01;
+ public static final int LAYOUT_ECS = 0x02;
- @UiField SimpleLayoutPanel labelListContainer;
- @UiField SimplePanel labelPropertiesContainer;
+ @UiField SplitLayoutPanel thisPanel;
- public _CenterSettingPanel() {
+ @UiField SimpleLayoutPanel settingNavContainer;
- initWidget(binder.createAndBindUi(this));
- settingsTab.setWidget(createTabList());
- }
+ @UiField SettingLabelPanel settingLabelPanel;
+ @UiField SettingEcsPanel settingEcsPanel;
- private static final List<String> TABS = Arrays.asList("Folders");
+ @UiField LayoutPanel settingBox;
-=======
+ @UiField protected Style style;
-public class _CenterSettingPanel extends Composite {
-
+ interface Style extends CssResource {
- @UiField SplitLayoutPanel thisPanel;
+ }
- @UiField SimpleLayoutPanel settingNavContainer;
+ public void arrangeLayout(int lyt) {
+ showOrHideLabel(lyt);
+ showOrHideEcs(lyt);
+ }
- @UiField SimpleLayoutPanel labelListContainer;
- @UiField SimplePanel labelPropertiesContainer;
-
- @UiField protected Style style;
+ private void showOrHideLabel(int lyt) {
+ settingBox.setWidgetLeftWidth(settingLabelPanel, 0, Unit.PCT, (lyt & LAYOUT_LABEL) / LAYOUT_LABEL * 100,
+ Unit.PCT);
+ settingBox.setWidgetTopHeight(settingLabelPanel, 0, Unit.PCT, (lyt & LAYOUT_LABEL) / LAYOUT_LABEL * 100,
+ Unit.PCT);
+ }
- interface Style extends CssResource {
-
+ private void showOrHideEcs(int lyt) {
+ settingBox.setWidgetLeftWidth(settingEcsPanel, 0, Unit.PCT, (lyt & LAYOUT_ECS) / LAYOUT_ECS * 100, Unit.PCT);
+ settingBox.setWidgetTopHeight(settingEcsPanel, 0, Unit.PCT, (lyt & LAYOUT_ECS) / LAYOUT_ECS * 100, Unit.PCT);
}
-
+
public _CenterSettingPanel() {
initWidget(binder.createAndBindUi(this));
}
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
public interface Resources extends CellList.Resources {
Resources INSTANCE = GWT.create(Resources.class);
@@ -99,44 +84,6 @@ public class _CenterSettingPanel extends
@Source("res/CssLabelListView.css")
public CellList.Style cellListStyle();
}
-<<<<<<< HEAD
- private CellList<String> createTabList() {
- CellList<String> cellList = new CellList<String>(new SpanCell(), Resources.INSTANCE);
- cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
- final SingleSelectionModel<String> selectionModel = new SingleSelectionModel<String>();
- cellList.setSelectionModel(selectionModel);
- selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
- public void onSelectionChange(SelectionChangeEvent event) {
- String selected = selectionModel.getSelectedObject();
- if (selected != null) {
- // Window.alert("You selected: " + selected);
- }
- }
- });
- cellList.setRowCount(TABS.size(), true);
-
- // Push the data into the widget.
- cellList.setRowData(0, TABS);
- return cellList;
- }
-
- static class SpanCell extends AbstractCell<String> {
-
- public SpanCell() {
- }
-
- @Override
- public void render(Context context, String value, SafeHtmlBuilder sb) {
- if (value == null) {
- return;
- }
- sb.appendHtmlConstant("<span >");
- sb.appendHtmlConstant(value);
- sb.appendHtmlConstant("</span>");
- }
- }
-=======
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
interface _CeterSettingPanelUiBinder extends UiBinder<SplitLayoutPanel, _CenterSettingPanel> {
}
@@ -144,24 +91,12 @@ public class _CenterSettingPanel extends
private static _CeterSettingPanelUiBinder binder = GWT.create(_CeterSettingPanelUiBinder.class);
public AcceptsOneWidget getLabelListView() {
- return new AcceptsOneWidget() {
- @Override
- public void setWidget(IsWidget w) {
- labelListContainer.setWidget(Widget.asWidgetOrNull(w));
- }
- };
+ return settingLabelPanel.getLabelListView();
}
public AcceptsOneWidget getLabelPropertiesView() {
- return new AcceptsOneWidget() {
- @Override
- public void setWidget(IsWidget w) {
- labelPropertiesContainer.setWidget(Widget.asWidgetOrNull(w));
- }
- };
+ return settingLabelPanel.getLabelPropertiesView();
}
-<<<<<<< HEAD
-=======
public AcceptsOneWidget getSettingNavView() {
return new AcceptsOneWidget() {
@@ -171,5 +106,16 @@ public class _CenterSettingPanel extends
}
};
}
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
+
+ public void swithTo(SettingPlace sp) {
+ int lyt;
+ if ("ecs".equals(sp.getToken())) {
+ lyt = LAYOUT_ECS;
+ } else {
+ lyt = LAYOUT_LABEL;
+ }
+ showOrHideEcs(lyt);
+ showOrHideLabel(lyt);
+
+ }
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.ui.xml?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.ui.xml Thu Aug 22 15:29:57 2013
@@ -11,97 +11,6 @@
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:hupa='urn:import:org.apache.hupa.client.ui'>
-<<<<<<< HEAD
- <ui:style src="res/CssSplitLayoutPanel.css">
- .scroller {
- overflow: auto;
- }
-
- .uibox {
- border: 1px solid #a3a3a3;
- border-radius: 4px;
- overflow: hidden;
- box-shadow: 0 0 2px #999;
- -o-box-shadow: 0 0 2px #999;
- -webkit-box-shadow: 0 0 2px #999;
- -moz-box-shadow: 0 0 2px #999;
- background: #fff;
- }
-
- .listbox {
- background: #d9ecf4;
- overflow: hidden;
- }
-
- .listbox .scroller {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- bottom: 0;
- overflow-x: hidden;
- overflow-y: auto;
- }
-
- .listbox .scroller.withfooter {
- bottom: 42px;
- }
-
- .listbox .boxtitle+.scroller {
- top: 34px;
- }
-
- .boxtitle,.uibox .listing thead td {
- font-size: 12px;
- font-weight: bold;
- padding: 10px 8px 3px 8px;
- height: 20px; /* doesn't affect table-cells in FF */
- margin: 0;
- text-shadow: 0px 1px 1px #fff;
- border-bottom: 1px solid #bbd3da;
- white-space: nowrap;
- }
-
- .uibox .boxtitle,.uibox .listing thead td {
- background: #b0ccd7;
- color: #004458;
- border-radius: 4px 4px 0 0;
- }
-
- .contentbox .boxtitle {
- color: #777;
- background: #eee;
- background: -moz-linear-gradient(top, #eee 0%, #dfdfdf 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee),
- color-stop(100%, #dfdfdf) );
- background: -o-linear-gradient(top, #eee 0%, #dfdfdf 100%);
- background: -ms-linear-gradient(top, #eee 0%, #dfdfdf 100%);
- background: linear-gradient(top, #eee 0%, #dfdfdf 100%);
- border-bottom: 1px solid #ccc;
- }
-
- .contentbox .scroller {
- position: absolute;
- top: 34px;
- left: 0;
- right: 0;
- bottom: 28px;
- overflow: auto;
- }
-
- body.iframe .boxtitle {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- z-index: 100;
- }
-
- .boxcontent {
- padding: 10px;
- }
- </ui:style>
-=======
<ui:style src="res/CssSplitLayoutPanel.css"
type="org.apache.hupa.client.ui._CenterSettingPanel.Style">
.scroller {
@@ -192,59 +101,32 @@
padding: 10px;
}
</ui:style>
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
<g:SplitLayoutPanel ui:field="thisPanel"
addStyleNames="{style.splitLayoutPanel}">
<g:west size="220">
<g:DockLayoutPanel addStyleNames="{style.listbox} {style.uibox}">
-<<<<<<< HEAD
- <g:north size="34">
-=======
<g:north size="0">
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
<g:HTML>
<h2 class="{style.boxtitle}">Settings</h2>
</g:HTML>
</g:north>
<g:center>
-<<<<<<< HEAD
- <g:SimpleLayoutPanel ui:field="settingsTab"
- addStyleNames="{style.scroller}" />
-=======
<g:SimpleLayoutPanel ui:field="settingNavContainer"
addStyleNames="{style.scroller}">
</g:SimpleLayoutPanel>
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
</g:center>
</g:DockLayoutPanel>
</g:west>
<g:center>
- <g:SplitLayoutPanel>
- <g:west size="260">
- <g:DockLayoutPanel addStyleNames="{style.listbox} {style.uibox}">
- <g:north size="34">
- <g:HTML>
- <h2 class="{style.boxtitle}">Folders</h2>
- </g:HTML>
- </g:north>
- <g:center>
- <g:SimpleLayoutPanel ui:field="labelListContainer" />
- </g:center>
- </g:DockLayoutPanel>
- </g:west>
- <g:center>
- <g:SimpleLayoutPanel addStyleNames="{style.uibox} {style.contentbox}">
- <g:HTMLPanel>
- <h2 class="{style.boxtitle}">Folder properties</h2>
- <g:FlowPanel addStyleNames="{style.boxcontent}">
- <g:SimplePanel ui:field="labelPropertiesContainer"></g:SimplePanel>
- </g:FlowPanel>
- <div class="{style.statusbar}" />
- </g:HTMLPanel>
- </g:SimpleLayoutPanel>
- </g:center>
- </g:SplitLayoutPanel>
+ <g:LayoutPanel ui:field="settingBox">
+ <g:layer left="0%" width="100%" top="0%" height="100%">
+ <hupa:SettingLabelPanel ui:field="settingLabelPanel" />
+ </g:layer>
+ <g:layer left="0%" width="0" top="0%" height="0">
+ <hupa:SettingEcsPanel ui:field="settingEcsPanel" />
+ </g:layer>
+ </g:LayoutPanel>
</g:center>
</g:SplitLayoutPanel>
</ui:UiBinder>
\ No newline at end of file
Modified: james/hupa/trunk/client/src/main/webapp/styles.css
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/webapp/styles.css?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/webapp/styles.css (original)
+++ james/hupa/trunk/client/src/main/webapp/styles.css Thu Aug 22 15:29:57 2013
@@ -2152,9 +2152,6 @@ fieldset.tab {
color: #0d0eb0;
text-decoration: underline;
cursor: pointer;
-<<<<<<< HEAD
-}
-=======
}
@@ -2485,4 +2482,3 @@ fieldset.tab {
.webkit #pluginlist td.source {
width: 9em;
}
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
Modified: james/hupa/trunk/client/src/test/java/org/apache/hupa/client/mock/MockMessageSendDisplay.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/test/java/org/apache/hupa/client/mock/MockMessageSendDisplay.java?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/client/src/test/java/org/apache/hupa/client/mock/MockMessageSendDisplay.java (original)
+++ james/hupa/trunk/client/src/test/java/org/apache/hupa/client/mock/MockMessageSendDisplay.java Thu Aug 22 15:29:57 2013
@@ -21,11 +21,7 @@ package org.apache.hupa.client.mock;
import gwtupload.client.IUploader;
-<<<<<<< HEAD
-import org.apache.hupa.client.activity.MessageSendActivity.Displayable;
-=======
import org.apache.hupa.client.activity.ComposeActivity.Displayable;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
import org.apache.hupa.shared.rpc.ContactsResult.Contact;
import org.apache.hupa.widgets.ui.HasEnable;
@@ -33,10 +29,7 @@ import com.google.gwt.event.dom.client.H
import com.google.gwt.user.client.ui.Focusable;
import com.google.gwt.user.client.ui.HasHTML;
import com.google.gwt.user.client.ui.HasText;
-<<<<<<< HEAD
-=======
import com.google.gwt.user.client.ui.ListBox;
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
import com.google.gwt.user.client.ui.Widget;
public class MockMessageSendDisplay implements Displayable {
@@ -77,13 +70,6 @@ public class MockMessageSendDisplay impl
return editorFocus;
}
-<<<<<<< HEAD
- public HasText getFromText() {
- return fromText;
- }
-
-=======
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
public HasHTML getMessageHTML() {
return messageHtml;
}
@@ -142,8 +128,6 @@ public class MockMessageSendDisplay impl
return true;
}
-<<<<<<< HEAD
-=======
@Override
public void showCc() {
// TODO Auto-generated method stub
@@ -294,5 +278,4 @@ public class MockMessageSendDisplay impl
return null;
}
->>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
}
Modified: james/hupa/trunk/mock/pom.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/mock/pom.xml?rev=1516486&r1=1516485&r2=1516486&view=diff
==============================================================================
--- james/hupa/trunk/mock/pom.xml (original)
+++ james/hupa/trunk/mock/pom.xml Thu Aug 22 15:29:57 2013
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.james.hupa</groupId>
<artifactId>hupa-parent</artifactId>
- <version>0.0.5-SNAPSHOT</version>
+ <version>0.0.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hupa-mock</artifactId>
Added: james/hupa/trunk/mock/src/main/resources/mime/11.msg
URL: http://svn.apache.org/viewvc/james/hupa/trunk/mock/src/main/resources/mime/11.msg?rev=1516486&view=auto
==============================================================================
--- james/hupa/trunk/mock/src/main/resources/mime/11.msg (added)
+++ james/hupa/trunk/mock/src/main/resources/mime/11.msg Thu Aug 22 15:29:57 2013
@@ -0,0 +1,58 @@
+Delivered-To: mcdodot@gmail.com
+Received: by 10.60.131.212 with SMTP id oo20csp72677oeb;
+ Mon, 10 Jun 2013 08:20:07 -0700 (PDT)
+X-Received: by 10.205.24.6 with SMTP id rc6mr1584559bkb.141.1370877606962;
+ Mon, 10 Jun 2013 08:20:06 -0700 (PDT)
+Return-Path: <ec...@gmail.com>
+Received: from mail-bk0-x233.google.com (mail-bk0-x233.google.com [2a00:1450:4008:c01::233])
+ by mx.google.com with ESMTPS id kf6si1566340bkb.107.2013.06.10.08.20.06
+ for <mc...@gmail.com>
+ (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
+ Mon, 10 Jun 2013 08:20:06 -0700 (PDT)
+Received-SPF: pass (google.com: domain of echowdx@gmail.com designates 2a00:1450:4008:c01::233 as permitted sender) client-ip=2a00:1450:4008:c01::233;
+Authentication-Results: mx.google.com;
+ spf=pass (google.com: domain of echowdx@gmail.com designates 2a00:1450:4008:c01::233 as permitted sender) smtp.mail=echowdx@gmail.com;
+ dkim=pass header.i=@gmail.com
+Received: by mail-bk0-x233.google.com with SMTP id ji1so2631218bkc.24
+ for <mc...@gmail.com>; Mon, 10 Jun 2013 08:20:06 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+ d=gmail.com; s=20120113;
+ h=message-id:date:from:user-agent:mime-version:to:subject:references
+ :in-reply-to:x-chiaramail-content-pointer
+ :x-chiaramail-content-server-name:x-chiaramail-content-server-port
+ :content-type:content-transfer-encoding;
+ bh=40fimkYYpXaLiVIKuTv2tLgUPaqUGA1DOkoRGdypt/8=;
+ b=AzWWH4udXhYp8dNi1IdLVpDKDZVeNA2363k1/NhOHYucX/tPZSBWdpT9tNPBjxDEiV
+ O/8nINUhZfC8ClQy4ZPvd/VklvH6jLZG3+uzkUVX5lXDVokWwtz6DhSgb6k7nFwFkNeL
+ ImHWZcROVkYbghoGhIvuW/2EElAvOOKCw9mPLuh3jLv2ymFAX3Qo/Gdkq17tGaxdk1Bx
+ BrZ4DaAoK1Tnb0CCRNqUWX8UWToYzgXED22PUtSD6FjWHT9hOFBlgWFAdcK6bIOOKHec
+ XFuhLrB7bvKUSooMUG3vrWQmgzo8e0uEWyLez1blwYn7maOpuNO4P3937dm4JkE4yxGB
+ wSLQ==
+X-Received: by 10.204.187.209 with SMTP id cx17mr1609776bkb.143.1370877606450;
+ Mon, 10 Jun 2013 08:20:06 -0700 (PDT)
+Return-Path: <ec...@gmail.com>
+Received: from [10.20.0.2] ([69.85.95.7])
+ by mx.google.com with ESMTPSA id tl1sm4088263bkb.7.2013.06.10.08.20.04
+ for <mc...@gmail.com>
+ (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
+ Mon, 10 Jun 2013 08:20:05 -0700 (PDT)
+Message-ID: <51...@gmail.com>
+Date: Mon, 10 Jun 2013 23:20:00 +0800
+From: dongxu <ec...@gmail.com>
+User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
+MIME-Version: 1.0
+To: Manuel Carrasco <mc...@gmail.com>
+Subject: Re: Test 1
+References: <51...@gmail.com>
+In-Reply-To: <51...@gmail.com>
+X-ChiaraMail-Content-Pointer: 8
+X-ChiaraMail-Content-Server-Name: www.chiaramail.com
+X-ChiaraMail-Content-Server-Port: 443
+Content-Type: text/plain; charset=ISO-8859-1; format=flowed
+Content-Transfer-Encoding: 7bit
+
+This message was sent using ECS technology
+(http://en.wikipedia.org/wiki/Envelope-content_splitting), but your mail
+client does not support ECS. Please download and install the appropriate
+ECS-enabling software for your mail client
+(http://www.chiaramail.com/download_extension.html) to read this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org