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 ma...@apache.org on 2014/03/02 13:12:27 UTC
svn commit: r1573291 [4/8] - 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/MessagesCellTable.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java?rev=1573291&r1=1573290&r2=1573291&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 Sun Mar 2 12:12:22 2014
@@ -23,9 +23,7 @@ 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;
@@ -33,35 +31,30 @@ import org.apache.hupa.client.activity.T
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 org.apache.hupa.shared.events.MessageListRangeChangedEvent;
-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.SafeHtmlCell;
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.safehtml.shared.SafeHtml;
+import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
+import com.google.gwt.safehtml.shared.SafeHtmlUtils;
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;
@@ -75,8 +68,6 @@ import com.google.gwt.view.client.MultiS
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> {
@@ -90,10 +81,10 @@ public class MessagesCellTable extends D
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();
+ Column<Message, ?> fromCol;
+ Column<Message, ?> subjectCol;
+ Column<Message, ?> attachedCol;
+ Column<Message, ?> dateCol;
public interface Resources extends DataGrid.Resources {
@@ -123,8 +114,7 @@ public class MessagesCellTable extends D
PlaceController pc;
HupaRequestFactory rf;
- private MessageListDataProvider dataProvider;
- public static final String CONTACTS_STORE = "hupa-contacts";
+ protected MessageListDataProvider dataProvider;
public class MessageListDataProvider extends AsyncDataProvider<Message> implements HasRefresh {
@@ -141,85 +131,32 @@ public class MessagesCellTable extends D
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());
- }
+ public void setFechMessagesResult(FetchMessagesResult response) {
+ if (response == null || response.getRealCount() == 0) {
+ updateRowCount(-1, true);
+ } else {
+ final List<Message> messages = response.getMessages();
+ updateRowCount(response.getRealCount(), true);
+ updateRowData(display.getVisibleRange().getStart(), messages);
+ getColumnSortList().push(dateCol);
+ }
}
-
+
@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();
- }
- });
-
+ protected void onRangeChanged(final HasData<Message> display) {
+ Scheduler.get().scheduleDeferred(new ScheduledCommand() {
+ public void execute() {
+ eventBus.fireEvent(new MessageListRangeChangedEvent(
+ display.getVisibleRange().getStart(),
+ display.getVisibleRange().getLength(),
+ searchValue));
+ }
+ });
}
}
-
- public void setSearchValue(String searchValue){
+
+ public void setSearchValue(String searchValue) {
this.searchValue = searchValue;
}
@@ -246,18 +183,27 @@ public class MessagesCellTable extends D
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);
- }
- }
+// @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);
+// }
+// }
}
+
+ @Override
+ protected void onAttach() {
+ super.onAttach();
+ if (dataProvider == null) {
+ dataProvider = new MessageListDataProvider();
+ dataProvider.addDataDisplay(this);
+ }
+ }
@Inject
public MessagesCellTable(final HupaImageBundle imageBundle, final HupaConstants constants,
@@ -291,6 +237,11 @@ public class MessagesCellTable extends D
}
});
+ fromCol = getFromColumn();
+ subjectCol = getSubjectColumn();
+ attachedCol = getAttachmentColumn();
+ dateCol = getDateColumn();
+
addColumn(checkboxCol, new CheckboxHeader(selectionModel, dataProvider));
setColumnWidth(checkboxCol, 3, Unit.EM);
addColumn(fromCol, constants.mailTableFrom());
@@ -309,55 +260,50 @@ public class MessagesCellTable extends D
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();
+ AsyncHandler columnSortHandler = new AsyncHandler(this);
+ addColumnSortHandler(columnSortHandler);
+ fromCol.setSortable(true);
+ subjectCol.setSortable(true);
+ attachedCol.setSortable(true);
+ dateCol.setSortable(true);
}
- // TODO: this should be perform in the server side, but in the meanwhile it is useful
+ // 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);
+ 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);
+ 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) {
@@ -400,6 +346,7 @@ public class MessagesCellTable extends D
if (size >= 1) {
toolBar.enableDealingTools(true);
toolBar.enableSendingTools(false);
+ toolBar.enableUpdatingTools(false);
} else {
toolBar.enableAllTools(false);
}
@@ -412,52 +359,44 @@ public class MessagesCellTable extends D
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;
- }
+
+ protected Column<Message, SafeHtml> getFromColumn () {
+ return new Column<Message, SafeHtml>(new SafeHtmlCell()) {
+ @Override
+ public SafeHtml getValue(Message object) {
+ SafeHtmlBuilder sb = new SafeHtmlBuilder();
+ sb.append(SafeHtmlUtils.fromString(object.getFrom() == null ? "" : object.getFrom()));
+ return sb.toSafeHtml();
+ }
+ };
}
+
+ protected Column<Message, SafeHtml> getSubjectColumn () {
+ return new Column<Message, SafeHtml>(new SafeHtmlCell()) {
+ @Override
+ public SafeHtml getValue(Message object) {
+ SafeHtmlBuilder sb = new SafeHtmlBuilder();
+ sb.append(SafeHtmlUtils.fromString(object.getSubject() == null ? "" : object.getSubject()));
+ return sb.toSafeHtml();
+ }
+ };
+ }
- 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)));
- }
+ protected Column<Message, ImageResource> getAttachmentColumn () {
+ return new Column<Message, ImageResource>(new ImageResourceCell()) {
+ public ImageResource getValue(Message object) {
+ return object.hasAttachment() ? imageBundle.attachmentIcon() : null;
+ }
+ };
+ }
- @Override
- public Date getValue(Message object) {
- return object.getReceivedDate();
- }
- }
+ protected Column<Message, Date> getDateColumn() {
+ return new Column<Message, Date>(new DateCell(DateTimeFormat.getFormat("dd.MMM.yyyy"))) {
+ public Date getValue(Message object) {
+ return object.getReceivedDate();
+ }
+ };
+ }
public void setStyleBaseOnTag() {
setRowStyles(new RowStyles<Message>() {
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=1573291&r1=1573290&r2=1573291&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 Sun Mar 2 12:12:22 2014
@@ -19,6 +19,7 @@
package org.apache.hupa.client.ui;
+import org.apache.hupa.client.HupaController;
import org.apache.hupa.client.activity.NavigationActivity;
import org.apache.hupa.client.place.FolderPlace;
import org.apache.hupa.client.place.SettingPlace;
@@ -30,25 +31,21 @@ 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;
-import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.inject.Inject;
-public class NavigationView extends Composite implements NavigationActivity.Displayable{
-
- @Inject PlaceController placeController;
+public class NavigationView extends Composite implements NavigationActivity.Displayable {
+
+ @Inject PlaceController placeController;
@UiField Anchor mail;
@UiField Anchor setting;
- @UiField Anchor contact;
- @UiField SimplePanel contactOuter;
@UiField SimplePanel mailOuter;
@UiField SimplePanel settingOuter;
-
+
@UiField Style style;
-
interface Style extends CssResource {
String selected();
@@ -60,58 +57,40 @@ public class NavigationView extends Comp
public NavigationView() {
initWidget(binder.createAndBindUi(this));
}
-
+
@UiHandler("mail")
- public void onMailClick(ClickEvent e){
- mailOuter.addStyleName(style.selected());
- mail.addStyleName(style.mailInnerSelected());
-
- settingOuter.removeStyleName(style.selected());
- setting.removeStyleName(style.settingsInnerSelected());
-
- contactOuter.removeStyleName(style.selected());
- contact.removeStyleName(style.contactInnerSelected());
- //FIXME need the configure one
- if(GWT.isProdMode()){
- placeController.goTo(new FolderPlace("INBOX"));
- }else{
- placeController.goTo(new FolderPlace("Mock-Inbox"));
- }
+ public void onMailClick(ClickEvent e) {
+ select(1);
+ placeController.goTo(new FolderPlace(HupaController.user.getSettings().getInboxFolderName()));
}
-
-
-
+
@UiHandler("setting")
- public void onSettingClick(ClickEvent e){
- mailOuter.removeStyleName(style.selected());
- mail.removeStyleName(style.mailInnerSelected());
- contactOuter.removeStyleName(style.selected());
- contact.removeStyleName(style.contactInnerSelected());
-
- settingOuter.addStyleName(style.selected());
- setting.addStyleName(style.settingsInnerSelected());
+ public void onSettingClick(ClickEvent e) {
+ select(2);
placeController.goTo(new SettingPlace("labels"));
}
-
-
- @UiHandler("contact")
- public void onContactClick(ClickEvent e){
- Window.alert("//TODO");
-// 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"));
- }
-
-
interface NavigationUiBinder extends UiBinder<DockLayoutPanel, NavigationView> {
}
private static NavigationUiBinder binder = GWT.create(NavigationUiBinder.class);
+ @Override
+ public void select(int idx) {
+ switch (idx) {
+ case 2:
+ mailOuter.removeStyleName(style.selected());
+ mail.removeStyleName(style.mailInnerSelected());
+ settingOuter.addStyleName(style.selected());
+ setting.addStyleName(style.settingsInnerSelected());
+ break;
+ default:
+ mailOuter.addStyleName(style.selected());
+ mail.addStyleName(style.mailInnerSelected());
+ settingOuter.removeStyleName(style.selected());
+ setting.removeStyleName(style.settingsInnerSelected());
+ break;
+ }
+ }
+
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.ui.xml?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/NavigationView.ui.xml Sun Mar 2 12:12:22 2014
@@ -93,22 +93,13 @@
</g:SimplePanel>
</g:west>
<g:center>
- <g:SimplePanel ui:field="contactOuter" addStyleNames="{style.navigation}">
- <g:Anchor ui:field="contact"
- addStyleNames="
- {style.contactInner} {style.inner}">
- Contacts
- </g:Anchor>
- </g:SimplePanel>
- </g:center>
- <g:east size="97">
- <g:SimplePanel ui:field="settingOuter" addStyleNames="{style.navigation}">
- <g:Anchor ui:field="setting"
- addStyleNames="
+ <g:SimplePanel ui:field="settingOuter" addStyleNames="{style.navigation}">
+ <g:Anchor ui:field="setting"
+ addStyleNames="
{style.settingsInner} {style.inner}">
- Settings
- </g:Anchor>
- </g:SimplePanel>
- </g:east>
+ Settings
+ </g:Anchor>
+ </g:SimplePanel>
+ </g:center>
</g:DockLayoutPanel>
</ui:UiBinder>
\ No newline at end of file
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.java?rev=1573291&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SettingLabelPanel.java Sun Mar 2 12:12:22 2014
@@ -0,0 +1,63 @@
+/****************************************************************
+ * 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 com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+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.SimpleLayoutPanel;
+import com.google.gwt.user.client.ui.SplitLayoutPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class SettingLabelPanel extends Composite {
+
+ @UiField SimpleLayoutPanel labelListContainer;
+ @UiField SimpleLayoutPanel labelPropertiesContainer;
+
+ public SettingLabelPanel() {
+ initWidget(binder.createAndBindUi(this));
+ }
+
+ public AcceptsOneWidget getLabelListView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ labelListContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getLabelPropertiesView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ labelPropertiesContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ interface Binder extends UiBinder<SplitLayoutPanel, SettingLabelPanel> {
+ }
+
+ 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=1573291&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 Sun Mar 2 12:12:22 2014
@@ -0,0 +1,126 @@
+<!-- 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>
+ <g:west size="260">
+ <g:DockLayoutPanel addStyleNames="{style.listbox} {style.uibox}">
+ <g:north size="34">
+ <g:HTML>
+ <h2 class="{style.boxtitle}">IMAP-Folders</h2>
+ </g:HTML>
+ </g:north>
+ <g:center>
+ <g:SimpleLayoutPanel ui:field="labelListContainer" />
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:west>
+ <g:center>
+ <g:DockLayoutPanel addStyleNames="{style.uibox} {style.contentbox}">
+ <g:north size="34">
+ <g:HTML>
+ <h2 class="{style.boxtitle}">Folder properties</h2>
+ </g:HTML>
+ </g:north>
+ <g:center>
+ <g:SimpleLayoutPanel ui:field="labelPropertiesContainer" />
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:center>
+ </g:SplitLayoutPanel>
+</ui:UiBinder>
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=1573291&r1=1573290&r2=1573291&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 Sun Mar 2 12:12:22 2014
@@ -29,21 +29,26 @@ import com.google.gwt.uibinder.client.Ui
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
+import com.google.gwt.user.client.ui.Widget;
public class SettingNavView extends Composite implements SettingNavActivity.Displayable {
- @UiField Element navLabelsItem;
- @UiField Anchor labelsAnchor;
-
- public SettingNavView() {
- initWidget(binder.createAndBindUi(this));
+ @UiField public Element navLabelsItem;
+ @UiField public Anchor labelsAnchor;
+
+ @SuppressWarnings("rawtypes")
+ protected UiBinder getBinder() {
+ return GWT.create(Binder.class);
+ }
+
+ @SuppressWarnings("unchecked")
+ public SettingNavView() {
+ initWidget((Widget)getBinder().createAndBindUi(this));
}
interface Binder extends UiBinder<HTMLPanel, SettingNavView> {
}
- private static Binder binder = GWT.create(Binder.class);
-
@Override
public HasClickHandlers getLabelsAchor() {
return labelsAnchor;
@@ -51,14 +56,11 @@ public class SettingNavView extends Comp
@Override
public void singleSelect(int i) {
- switch(i){
- default:selectNavLabelItem();
- }
+ selectNavLabelItem();
}
- private void selectNavLabelItem() {
- String clazz = navLabelsItem.getAttribute("class");
- navLabelsItem.setAttribute("class", clazz + " selected");
+ protected void selectNavLabelItem() {
+ 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=1573291&r1=1573290&r2=1573291&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 Sun Mar 2 12:12:22 2014
@@ -11,27 +11,16 @@
<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>
+ <g:Anchor ui:field="labelsAnchor">IMAP-Folders</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
+</ui:UiBinder>
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=1573291&r1=1573290&r2=1573291&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 Sun Mar 2 12:12:22 2014
@@ -21,17 +21,18 @@ package org.apache.hupa.client.ui;
import org.apache.hupa.client.activity.ToolBarActivity;
import org.apache.hupa.client.place.ComposePlace;
-import org.apache.hupa.client.rf.HupaRequestFactory;
import org.apache.hupa.shared.domain.Message;
import org.apache.hupa.shared.domain.MessageDetails;
import org.apache.hupa.shared.domain.User;
import org.apache.hupa.shared.events.DeleteClickEvent;
+import org.apache.hupa.shared.events.ShowRawEvent;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.place.shared.PlaceController;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.uibinder.client.UiBinder;
@@ -50,27 +51,38 @@ import com.google.inject.Inject;
public class ToolBarView extends Composite implements ToolBarActivity.Displayable {
@Inject private PlaceController placeController;
- @Inject private HupaRequestFactory requestFactory;
@Inject private EventBus eventBus;
- @UiField Anchor refresh;
- @UiField Anchor compose;
- @UiField Anchor reply;
- @UiField HTMLPanel replyAllGroup;
- @UiField Anchor replyAll;
- @UiField HTMLPanel forwardGroup;
- @UiField Anchor forward;
- @UiField Anchor delete;
- @UiField Anchor mark;
- @UiField Anchor more;
-
- @UiField HTMLPanel replyAllTip;
- @UiField HTMLPanel forwardTip;
+ @UiField public Anchor refresh;
+ @UiField public Anchor compose;
+ @UiField public Anchor reply;
+ @UiField public HTMLPanel replyAllGroup;
+ @UiField public Anchor replyAll;
+ @UiField public HTMLPanel forwardGroup;
+ @UiField public Anchor forward;
+ @UiField public Anchor delete;
+ @UiField public Anchor mark;
+ @UiField public Anchor raw;
+ @UiField public Anchor more;
+
+ @UiField public HTMLPanel replyAllTip;
+ @UiField public HTMLPanel forwardTip;
- @UiField Style style;
+ // FIXME: !!!! The handlers management in this view is awful.
+ // It should use @UiHandlers with a enable/disble property.
+
+ // Absolutely!!!
+
+ HandlerRegistration deleteReg;
+ HandlerRegistration markReg;
+ HandlerRegistration replyReg;
+ HandlerRegistration replyAllReg;
+ HandlerRegistration forwardReg;
+
+ @UiField public Style style;
- interface Style extends CssResource {
+ public interface Style extends CssResource {
String disabledButton();
String popupMenu();
String activeIcon();
@@ -141,22 +153,19 @@ public class ToolBarView extends Composi
this.oldDetails = oldDetails;
}
}
+
+ interface ToolBarUiBinder extends UiBinder<FlowPanel, ToolBarView> {
+ }
+
+ @SuppressWarnings("rawtypes")
+ protected UiBinder getBinder() {
+ return GWT.create(ToolBarUiBinder.class);
+ }
-
- public ToolBarView() {
- initWidget(binder.createAndBindUi(this));
+ @SuppressWarnings("unchecked")
+ public ToolBarView() {
+ initWidget((Widget)getBinder().createAndBindUi(this));
simplePopup.addStyleName(style.popupMenu());
- mark.addClickHandler(new ClickHandler() {
- public void onClick(ClickEvent event) {
- // Reposition the popup relative to the button
- Widget source = (Widget) event.getSource();
- int left = source.getAbsoluteLeft();
- int top = source.getAbsoluteTop() + source.getOffsetHeight();
- simplePopup.setPopupPosition(left, top);
- // Show the popup
- simplePopup.show();
- }
- });
popup = new VerticalPanel();
markRead = new Anchor("As Read");
markUnread = new Anchor("As Unread");
@@ -170,51 +179,48 @@ public class ToolBarView extends Composi
popup.add(markRead);
popup.add(markUnread);
simplePopup.setWidget(popup);
-
- mark.addClickHandler(markHandler);
- delete.addClickHandler(deleteHandler);
- reply.addClickHandler(replyHandler);
- replyAll.addClickHandler(replyAllHandler);
- forward.addClickHandler(forwardHandler);
}
@UiHandler("compose")
- void handleClick(ClickEvent e) {
+ public void handleClick(ClickEvent e) {
placeController.goTo(new ComposePlace("new").with(parameters));
}
- private ClickHandler forwardHandler = new ClickHandler(){
+
+ private ClickHandler forwardHandler = new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
- placeController.goTo(new ComposePlace("forward").with(parameters));
+ placeController.goTo(new ComposePlace("forward").with(parameters));
}
-
+
};
- private ClickHandler replyAllHandler = new ClickHandler(){
+ private ClickHandler replyAllHandler = new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
- placeController.goTo(new ComposePlace("replyAll").with(parameters));
+ placeController.goTo(new ComposePlace("replyAll").with(parameters));
}
-
+
};
- private ClickHandler replyHandler = new ClickHandler(){
+ private ClickHandler replyHandler = new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
placeController.goTo(new ComposePlace("reply").with(parameters));
}
-
+
};
- private ClickHandler deleteHandler = new ClickHandler(){
+ private ClickHandler deleteHandler = new ClickHandler() {
@Override
- public void onClick(ClickEvent event) {
- eventBus.fireEvent(new DeleteClickEvent());
+ public void onClick(ClickEvent event) {
+ eventBus.fireEvent(new DeleteClickEvent());
}
};
+
private ClickHandler markHandler = new ClickHandler() {
public void onClick(ClickEvent event) {
+ // Reposition the popup relative to the button
Widget source = (Widget) event.getSource();
int left = source.getAbsoluteLeft();
int top = source.getAbsoluteTop() + source.getOffsetHeight();
@@ -222,6 +228,16 @@ public class ToolBarView extends Composi
simplePopup.show();
}
};
+
+ private ClickHandler rawHandler = new ClickHandler() {
+ @Override
+ public void onClick(ClickEvent event) {
+ eventBus.fireEvent(new ShowRawEvent());
+ }
+ };
+
+ private HandlerRegistration rawReg;
+
@Override
public HasClickHandlers getMark() {
return mark;
@@ -264,11 +280,15 @@ public class ToolBarView extends Composi
public HasClickHandlers getDelete() {
return delete;
}
-
+ @Override
+ public HasClickHandlers getRefresh() {
+ return refresh;
+ }
@Override
public void enableAllTools(boolean is) {
this.enableSendingTools(is);
this.enableDealingTools(is);
+ this.enableUpdatingTools(is);
}
@Override
public void enableSendingTools(boolean is) {
@@ -288,12 +308,28 @@ public class ToolBarView extends Composi
}
}
+ public void enableUpdatingTools(boolean is) {
+ }
+
private void addSendingDisableds() {
reply.addStyleName(style.disabledButton());
replyAllGroup.addStyleName(style.disabledButton());
forwardGroup.addStyleName(style.disabledButton());
replyAllTip.addStyleName(style.disabledButton());
forwardTip.addStyleName(style.disabledButton());
+ raw.addStyleName(style.disabledButton());
+
+ if (replyReg != null) {
+ replyReg = removeHandler(replyReg);
+ replyAllReg = removeHandler(replyAllReg);
+ forwardReg = removeHandler(forwardReg);
+ rawReg = removeHandler(rawReg);
+ replyReg = null;
+ replyAllReg = null;
+ forwardReg = null;
+ rawReg = null;
+ }
+
}
private void removeSendingDisableds() {
@@ -302,27 +338,36 @@ public class ToolBarView extends Composi
forwardGroup.removeStyleName(style.disabledButton());
replyAllTip.removeStyleName(style.disabledButton());
forwardTip.removeStyleName(style.disabledButton());
+ raw.removeStyleName(style.disabledButton());
+
+ if (rawReg == null) rawReg = raw.addClickHandler(rawHandler);
+ if (replyReg == null) replyReg = reply.addClickHandler(replyHandler);
+ if (replyAllReg == null) replyAllReg = replyAll.addClickHandler(replyAllHandler);
+ if (forwardReg == null) forwardReg = forward.addClickHandler(forwardHandler);
}
-
-
+
private void addDealingDisableds() {
+ if (deleteReg != null) {
+ deleteReg = removeHandler(deleteReg);
+ markReg = removeHandler(markReg);
+ deleteReg = null;
+ markReg = null;
+ }
delete.addStyleName(style.disabledButton());
mark.addStyleName(style.disabledButton());
}
private void removeDealingDisableds() {
+ if (deleteReg == null) deleteReg = delete.addClickHandler(deleteHandler);
+ if (markReg == null) markReg = mark.addClickHandler(markHandler);
delete.removeStyleName(style.disabledButton());
mark.removeStyleName(style.disabledButton());
}
- interface ToolBarUiBinder extends UiBinder<FlowPanel, ToolBarView> {
+ protected HandlerRegistration removeHandler(HandlerRegistration handler) {
+ if (handler != null) handler.removeHandler();
+ return null;
}
- private static ToolBarUiBinder binder = GWT.create(ToolBarUiBinder.class);
-
- @Override
- public HasClickHandlers getRefresh() {
- return refresh;
- }
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml Sun Mar 2 12:12:22 2014
@@ -41,7 +41,7 @@
font-size: 10px;
color: #555;
min-width: 50px;
- max-width: 75px;
+ max-width: 175px;
height: 13px;
overflow: hidden;
text-overflow: ellipsis;
@@ -116,6 +116,11 @@
.delete {
background-position: center -690px;
}
+
+ .deleteContent {
+ background-position: center -770px;
+ width: 80px;
+ }
.mark {
background-position: center -1094px;
@@ -123,7 +128,15 @@
.more {
background-position: center -850px;
+ display:none;
}
+ .update {
+ background-position: center -1135px;
+ width: 80px;
+ }
+ .raw {
+ background-position: center -810px;
+ }
.disabledButton {
opacity: 0.4;
@@ -177,31 +190,35 @@
.unread {
background-position: 0 -1198px;
}
+
+
</ui:style>
<g:FlowPanel addStyleNames="{style.bar}" ui:field="ToolBar">
- <g:Anchor ui:field="refresh" addStyleNames="{style.button} {style.checkMail} {style.handCursor}">Refresh</g:Anchor>
- <g:Anchor ui:field="compose" addStyleNames="{style.button} {style.compose} {style.handCursor}">Compose</g:Anchor>
+ <g:Anchor ui:field="refresh" addStyleNames="{style.button} {style.checkMail} {style.handCursor}" title="Refresh">Refresh</g:Anchor>
+ <g:Anchor ui:field="compose" addStyleNames="{style.button} {style.compose} {style.handCursor}" title="Compose">Compose</g:Anchor>
<g:HTMLPanel tag="span" addStyleNames="{style.spacer}"></g:HTMLPanel>
<g:Anchor ui:field="reply"
- addStyleNames="{style.button} {style.reply} {style.handCursor}">Reply</g:Anchor>
+ addStyleNames="{style.button} {style.reply} {style.handCursor}" title="Reply">Reply</g:Anchor>
<g:HTMLPanel ui:field="replyAllGroup" tag="span"
- addStyleNames="{style.dropButton} {style.handCursor}">
+ addStyleNames="{style.dropButton} {style.handCursor}" title="Reply all">
<g:Anchor ui:field="replyAll" addStyleNames="{style.button} {style.replyAll}">Reply all
</g:Anchor>
<g:HTMLPanel ui:field="replyAllTip" tag="span" addStyleNames="{style.dropButtonTip}" />
</g:HTMLPanel>
<g:HTMLPanel ui:field="forwardGroup" tag="span"
- addStyleNames="{style.dropButton} {style.handCursor}">
+ addStyleNames="{style.dropButton} {style.handCursor}" title="Forward">
<g:Anchor ui:field="forward" addStyleNames="{style.button} {style.forward}">Forward
</g:Anchor>
<g:HTMLPanel ui:field="forwardTip" tag="span" addStyleNames="{style.dropButtonTip}" />
</g:HTMLPanel>
+ <g:Anchor ui:field="raw"
+ addStyleNames="{style.button} {style.raw} {style.handCursor}" title="Show original">Show Raw</g:Anchor>
<g:Anchor ui:field="delete"
- addStyleNames="{style.button} {style.delete} {style.handCursor}">Delete</g:Anchor>
+ addStyleNames="{style.button} {style.delete} {style.handCursor}" title="Delete">Delete</g:Anchor>
<g:Anchor ui:field="mark"
- addStyleNames="{style.button} {style.mark} {style.handCursor}">Mark</g:Anchor>
+ addStyleNames="{style.button} {style.mark} {style.handCursor}" title="Mark as">Mark</g:Anchor>
<g:Anchor ui:field="more"
- addStyleNames="{style.button} {style.more} {style.handCursor}">More</g:Anchor>
+ addStyleNames="{style.button} {style.more} {style.handCursor}" title="More...">More</g:Anchor>
</g:FlowPanel>
</ui:UiBinder>
\ No newline at end of file
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.java?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.java Sun Mar 2 12:12:22 2014
@@ -37,11 +37,11 @@ public class _CenterComposePanel extends
public _CenterComposePanel() {
initWidget(binder.createAndBindUi(this));
- thisPanel.setWidgetMinSize(outlinePanel, 144);
+// thisPanel.setWidgetHidden(outlinePanel, true);
}
- public AcceptsOneWidget getContactListView() {
- return outlinePanel.getContactListView();
+ public AcceptsOneWidget getAddressListView() {
+ return outlinePanel.getAddressListView();
}
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=1573291&r1=1573290&r2=1573291&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 Sun Mar 2 12:12:22 2014
@@ -19,7 +19,11 @@
package org.apache.hupa.client.ui;
+import org.apache.hupa.client.place.SettingPlace;
+
import com.google.gwt.core.client.GWT;
+import com.google.gwt.dom.client.Style.Unit;
+import com.google.gwt.query.client.GQuery;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
@@ -27,31 +31,47 @@ import com.google.gwt.user.cellview.clie
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;
public class _CenterSettingPanel extends Composite {
-
- @UiField SplitLayoutPanel thisPanel;
+ @UiField public SplitLayoutPanel thisPanel;
- @UiField SimpleLayoutPanel settingNavContainer;
+ @UiField public SimpleLayoutPanel settingNavContainer;
- @UiField SimpleLayoutPanel labelListContainer;
- @UiField SimplePanel labelPropertiesContainer;
-
- @UiField protected Style style;
+ @UiField public SettingLabelPanel settingLabelPanel;
+
+ @UiField public LayoutPanel settingBox;
- interface Style extends CssResource {
-
+ @UiField public Style style;
+
+ public interface Style extends CssResource {
}
-
- public _CenterSettingPanel() {
- initWidget(binder.createAndBindUi(this));
+ public void arrangeLayout(int lyt) {
+ settingBox.setWidgetLeftWidth(settingLabelPanel, 0, Unit.PCT, 100, Unit.PCT);
+ settingBox.setWidgetTopHeight(settingLabelPanel, 0, Unit.PCT, 100, Unit.PCT);
+ }
+
+ interface _CenterSettingPanelUiBinder extends UiBinder<SplitLayoutPanel, _CenterSettingPanel> {
+ }
+
+ @SuppressWarnings("rawtypes")
+ protected static UiBinder binder;
+
+ @SuppressWarnings("unchecked")
+ public _CenterSettingPanel() {
+ binder = createBinder();
+ initWidget((SplitLayoutPanel)binder.createAndBindUi(this));
}
+
+ @SuppressWarnings("rawtypes")
+ protected UiBinder createBinder() {
+ return GWT.create(_CenterSettingPanelUiBinder.class);
+ }
public interface Resources extends CellList.Resources {
@@ -61,29 +81,14 @@ public class _CenterSettingPanel extends
public CellList.Style cellListStyle();
}
- interface _CeterSettingPanelUiBinder extends UiBinder<SplitLayoutPanel, _CenterSettingPanel> {
- }
-
- 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();
}
-
+
public AcceptsOneWidget getSettingNavView() {
return new AcceptsOneWidget() {
@Override
@@ -92,4 +97,8 @@ public class _CenterSettingPanel extends
}
};
}
+
+ public void swithTo(SettingPlace sp) {
+ GQuery.console.log("_CenterSetting... swithTo " + sp + " " + sp.getToken());
+ }
}
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=1573291&r1=1573290&r2=1573291&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 Sun Mar 2 12:12:22 2014
@@ -119,31 +119,11 @@
</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:LayoutPanel>
</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/_ToolPanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java Sun Mar 2 12:12:22 2014
@@ -40,7 +40,7 @@ public class _ToolPanel extends Composit
initWidget(binder.createAndBindUi(this));
}
- void toggleTo(int layout) {
+ public void toggleTo(int layout) {
switch (layout) {
case HupaLayout.LAYOUT_MESSAGE:
this.toggleToCompose(false);break;
@@ -53,15 +53,15 @@ public class _ToolPanel extends Composit
}
private void hideAll() {
- toolBarContainer.setVisible(false);
- searchBoxContainer.setVisible(false);
- composeToolBarContainer.setVisible(false);
+ thisPanel.setWidgetHidden(toolBarContainer, true);
+ thisPanel.setWidgetHidden(searchBoxContainer, true);
+ thisPanel.setWidgetHidden(composeToolBarContainer, true);
}
protected void toggleToCompose(boolean visible) {
- toolBarContainer.setVisible(!visible);
- searchBoxContainer.setVisible(!visible);
- composeToolBarContainer.setVisible(visible);
+ thisPanel.setWidgetHidden(toolBarContainer, visible);
+ thisPanel.setWidgetHidden(searchBoxContainer, visible);
+ thisPanel.setWidgetHidden(composeToolBarContainer, !visible);
}
public AcceptsOneWidget getToolBarView() {
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml Sun Mar 2 12:12:22 2014
@@ -12,7 +12,7 @@
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<g:DockLayoutPanel unit="PX" ui:field="thisPanel">
- <g:west size="518">
+ <g:west size="718">
<g:SimplePanel ui:field="toolBarContainer" />
</g:west>
<g:center>
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml Sun Mar 2 12:12:22 2014
@@ -45,7 +45,7 @@
padding: 3px 8px;
}
- .composeHeader td textarea,.composeHeader td input {
+ .composeHeader td textarea,.composeHeader td input[type="text"] {
width: 100%;
height: 13px;
resize: none;
@@ -77,4 +77,4 @@
addStyleNames="{style.mailviewbottom}{style.box}" />
</g:south>
</g:DockLayoutPanel>
-</ui:UiBinder>
\ No newline at end of file
+</ui:UiBinder>
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.ui.xml?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.ui.xml Sun Mar 2 12:12:22 2014
@@ -11,7 +11,6 @@
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
- <ui:image field="originLogo" src="res/hupa-logo-original-transparent.png" />
<ui:style>
.box {
border: 1px solid #A3A3A3;
@@ -42,28 +41,6 @@
border-radius: 0 0 4px 4px;
}
- @sprite .messageContent {
- margin: 8px;
- gwt-image: 'originLogo';
- background-position: center center;
- width: auto;
- height: auto;
- filter: grayscale(100%);
- -webkit-filter: grayscale(100%);
- -moz-filter: grayscale(100%);
- -ms-filter: grayscale(100%);
- -o-filter: grayscale(100%);
- opacity: 0.7;
- }
-
- @sprite .messageContentWorkAround {
- margin: 8px 0 8px 8px;
- padding-right: 8px;
- gwt-image: 'originLogo';
- background-position: center center;
- width: auto;
- height: auto;
- }
</ui:style>
<g:SplitLayoutPanel ui:field="thisPanel">
<g:north size="200">
@@ -87,8 +64,7 @@
<g:DockLayoutPanel unit="PX" addStyleNames="{style.box}"
ui:field="messageContentBox">
<g:center>
- <g:SimpleLayoutPanel ui:field="messageContentContainer"
- addStyleNames="{style.messageContentWorkAround}" />
+ <g:SimpleLayoutPanel ui:field="messageContentContainer"/>
</g:center>
<g:south size="0">
<g:SimplePanel ui:field="statusContainer" />
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlineComposePanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlineComposePanel.java?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlineComposePanel.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlineComposePanel.java Sun Mar 2 12:12:22 2014
@@ -31,26 +31,24 @@ import com.google.gwt.user.client.ui.Wid
public class __OutlineComposePanel extends Composite {
- @UiField ScrollPanel contactListContainer;
+ @UiField ScrollPanel addressListContainer;
public __OutlineComposePanel() {
initWidget(binder.createAndBindUi(this));
}
- public AcceptsOneWidget getContactListView() {
+ public AcceptsOneWidget getAddressListView() {
return new AcceptsOneWidget() {
@Override
public void setWidget(IsWidget w) {
- contactListContainer.setWidget(Widget.asWidgetOrNull(w));
+ addressListContainer.setWidget(Widget.asWidgetOrNull(w));
}
};
}
- interface __OutlinePanelUiBinder extends
- UiBinder<DockLayoutPanel, __OutlineComposePanel> {
+ interface Binder extends UiBinder<DockLayoutPanel, __OutlineComposePanel> {
}
- private static __OutlinePanelUiBinder binder = GWT
- .create(__OutlinePanelUiBinder.class);
+ private static Binder binder = GWT.create(Binder.class);
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlineComposePanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlineComposePanel.ui.xml?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlineComposePanel.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlineComposePanel.ui.xml Sun Mar 2 12:12:22 2014
@@ -51,7 +51,7 @@
<g:DockLayoutPanel unit="PX" ui:field="thisPanel"
addStyleNames="{style.folderList} {style.box} {style.listBox}">
<g:center>
- <g:ScrollPanel ui:field="contactListContainer" />
+ <g:ScrollPanel ui:field="addressListContainer" />
</g:center>
<g:south size="41">
<g:SimplePanel styleName="{style.boxFooter}">
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlinePanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlinePanel.java?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlinePanel.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__OutlinePanel.java Sun Mar 2 12:12:22 2014
@@ -46,11 +46,9 @@ public class __OutlinePanel extends Comp
};
}
- interface __OutlinePanelUiBinder extends
- UiBinder<DockLayoutPanel, __OutlinePanel> {
+ interface Binder extends UiBinder<DockLayoutPanel, __OutlinePanel> {
}
- private static __OutlinePanelUiBinder binder = GWT
- .create(__OutlinePanelUiBinder.class);
+ private static Binder binder = GWT.create(Binder.class);
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/CssLabelListView.css
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/CssLabelListView.css?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/CssLabelListView.css (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/CssLabelListView.css Sun Mar 2 12:12:22 2014
@@ -16,6 +16,7 @@
.cellListWidget {
cursor:default;
+ white-space: nowrap;
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/buttons.png
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/buttons.png?rev=1573291&r1=1573290&r2=1573291&view=diff
==============================================================================
Files james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/buttons.png (original) and james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/res/buttons.png Sun Mar 2 12:12:22 2014 differ
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa-sd.html
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa-sd.html?rev=1573291&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa-sd.html (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa-sd.html Sun Mar 2 12:12:22 2014
@@ -0,0 +1,72 @@
+<!--
+ 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.
+-->
+<!DOCTYPE HTML>
+
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <!--[if lt IE 9]>
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <![endif]-->
+
+ <link rel="Shortcut Icon" href="favicon.ico" type="image/x-icon"/>
+ <link href="styles.css" type="text/css" rel="stylesheet" />
+
+ <title>Hupa webmail</title>
+ <!-- define loading style early -->
+ <style type="text/css">
+ div.loading {
+ width: 100%;
+ height: 100%;
+ background-color: #d8ecfd;
+ }
+ .loading img {
+ position: absolute;
+ top: 37%;
+ left: 50%;
+ }
+ #login {
+ display: none;
+ }
+ </style>
+ </head>
+
+ <body>
+ <!-- An image is shown while the application is loaded -->
+ <!-- It will be removed as soon as the app is ready -->
+ <div id="loading" class="loading">
+ <img src="images/hupa-spinning.gif">
+ </div>
+
+ <!-- We need this because passwords in forms rendered by js are not saved in browsers -->
+ <div id="login">
+ <form id="loginForm" action="hupa/clear.cache.gif" method="post">
+ <input autocomplete="on" id="email" name="email" type="text">
+ <input autocomplete="on" id="password" name="password" type="password">
+ </form>
+ </div>
+
+ <!-- Necessary for history support -->
+ <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
+
+ <!-- Download attachments needs this -->
+ <iframe src="" id="__download" style="width:0;height:0;border:0"></iframe>
+
+
+ <!-- load the application at the end when loading is being shown -->
+ <script type="text/javascript" src="http://localhost:9876/hupa/hupa.nocache.js"></script>
+
+</html>
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa.css
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa.css?rev=1573291&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa.css (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa.css Sun Mar 2 12:12:22 2014
@@ -0,0 +1,487 @@
+/*
+ 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.
+*/
+/************[ Fonts ]***************************/
+body,table td,select,* {
+ font-family: arial, 'comic sans ms', sans-serif, helvetica, verdana;
+ font-size: 12px;
+}
+
+body {
+ font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ color: #333;
+ background: url(images/linen.jpg) repeat #d1d5d8;
+ margin: 0;
+}
+
+body.noscroll { /* also avoids bounce effect in Chrome and Safari */
+ overflow: hidden;
+}
+
+/************[ widget: MyDialogBox ]****************/
+.hupa-dialog-box td.dialogMiddleCenter {
+ background: #fae5b0;
+}
+
+.hupa-dialog-box .dialogContent .gwt-Label {
+ font-weight: bold;
+ margin: 15px;
+}
+
+.hupa-dialog-box .Caption {
+ font-size: 14px;
+}
+
+/************[ widget: RndPanel ]****************/
+.hupa-rounded {
+ border: 1px solid #7FAAFF;
+ border-radius: 5px;
+ overflow: hidden;
+}
+
+/************[ widget: Loading ]*************************************/
+div.hupa-loading {
+ background: url(images/ajax-loader.gif) no-repeat;
+ padding-left: 25px;
+ width: 100px;
+ height: 14px;
+ white-space: nowrap;
+ margin-top: 5px;
+ margin-left: auto;
+ margin-right: auto;
+ text-align: left;
+ vertical-align: top;
+}
+
+/************[ widget: EnableHyperLink ]*********/
+.gwt-Hyperlink {
+ color: #0d0eb0;
+ text-decoration: underline;
+ cursor: pointer;
+}
+
+.hupa-hyperlink .gwt-Hyperlink-disabled {
+ color: #8d8d8d;
+}
+
+div.gwt-Hyperlink,div.gwt-Anchor {
+ padding-left: 4px;
+}
+
+/************[ view: AppView ]*******************/
+div.Hupa {
+ text-align: left;
+ margin-top: 0px;
+ padding: 0px;
+ width: 100%;
+ min-width: 400px;
+}
+
+* html div.Hupa {
+ margin-top: 0px;
+}
+
+div.hupa-logo {
+ height: 64px;
+ background: url(images/hupa-logo-64-transparent.png) no-repeat;
+}
+
+div.hupa-top {
+ padding-left: 90px;
+ margin-right: 8px;
+}
+
+* html div.hupa-top {
+ padding-left: 0px;
+}
+
+div.hupa-top-wrap {
+ height: 64px;
+ background-color: #C5D9FF;
+}
+
+div.cgb-RPC-hupa-top-wrap {
+ height: 59px;
+}
+
+table.hupa-top {
+ width: 100%;
+ margin-bottom: 0px;
+}
+
+table.hupa-button-bar td div {
+ padding-top: 12px;
+}
+
+div.hupa-loginfo-label,div.hupa-loginfo-user {
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
+.hupa-loginfo-user {
+ font-style: italic;
+ font-weight: bold;
+}
+
+.hupa-menu-button {
+ margin-right: 15px;
+}
+
+div.hupa-header {
+ display: none;
+ padding-left: 10px;
+ height: 32px;
+}
+
+.hupa-central {
+ clear: both;
+ margin: 8px 8px 8px 8px;
+ min-height: 200px;
+}
+
+* html div.cgb-RPC-hupa-main {
+ height: 500px;
+ text-align: center;
+}
+
+.hupa-flash {
+ background-color: #fae5b0;
+ text-align: center;
+ margin: auto auto 2px auto;
+ width: 50%;
+ position: absolute;
+ top: 45px;
+ left: 25%;
+}
+
+* html div.hupa-flash {
+ border: none;
+ background: none;
+}
+
+* html .hupa-flash div {
+ background-color: #fae5b0;
+}
+
+.hupa-flash div.gwt-Label {
+ padding: 5px 20px 5px 20px;
+}
+
+div.hupa-bottom {
+ text-align: center;
+}
+/************[ view: LoginView ]*******************/
+.hupa-login {
+ margin: 10pt auto;
+ width: 20%;
+ text-align: right;
+ position: relative;
+ left: 50%;
+ padding: 20px;
+ border: 1px solid #7FAAFF;
+ box-shadow: 0 1px 4px grey;
+ border-radius: 5px;
+}
+
+.hupa-login td {
+ text-align: center;
+}
+
+.hupa-login-form {
+ padding: 10px;
+}
+
+.hupa-login-textbox {
+ width: 230px;
+ background-color: #d8ecfd;
+ border: 1px solid #7FAAFF;
+ margin-left: 5px;
+}
+
+/*************[ view: MainView ]*********************/
+.hupa-tree {
+ width: 158px;
+ overflow: hidden;
+}
+
+/************[ widget: CommandsBar ]*********/
+.hupa-commands-bar {
+ width: 100%;
+ background-color: #deeeff;
+}
+
+/************[ view: IMAPMessageListView ]*******************/
+.hupa-msglist,.hupa-msg-top-bar,.hupa-msgtable {
+ width: 100%;
+}
+
+.hupa-msg-top-bar {
+ padding: 10px 4px 10px 4px;
+ background-color: #C3D9FF;
+}
+
+.hupa-msgtable-row {
+ text-align: left;
+ vertical-align: top;
+ padding: 0px 10px 0px 10px;
+ cursor: pointer;
+}
+
+.hupa-msgtable-unseen {
+ font-weight: bold;
+}
+
+.hupa-msgtable-empty {
+ font-weight: bold;
+ text-align: center;
+ padding: 20px;
+}
+
+.hupa-search-box {
+ width: 150px;
+}
+
+input[type=text],input[type=file],textarea {
+ background-color: #d8ecfd;
+ border: 1px solid #7FAAFF;
+}
+
+.dragdrop-dragable {
+ background: red;
+}
+
+.gwt-SuggestBoxPopup {
+ font-size: 10px;
+}
+
+.hupa-buttons .gwt-ListBox {
+ margin-left: 5px;
+ padding-left: 3px;
+}
+
+/*************[ buttonbars ]*********************/
+.hupa-buttons {
+ white-space: nowrap;
+}
+
+.hupa-buttons td {
+ padding-left: 3px;
+}
+
+.hupa-buttons div {
+ white-space: nowrap;
+ vertical-align: middle;
+}
+
+.hupa-buttons .gwt-Hyperlink {
+ padding-left: 6px;
+}
+
+/************[ widget: MessageHeaders ]*******************/
+table.hupa-msg-headers {
+ background-color: #C3D9FF;
+}
+
+.hupa-msg-headers td.label {
+ width: 175px;
+ text-align: right;
+ font-weight: bold;
+ padding-right: 5px;
+}
+
+/************[ view: IMAPMessageView ]*******************/
+table.hupa-msgview {
+ width: 100%;
+}
+
+div.hupa-msgview-content {
+ padding: 20px;
+}
+
+.hupa-attachment .hupa-hyperlink {
+ padding-left: 5px;
+ font-style: italic;
+ color: #0d0eb0;
+ text-decoration: underline;
+ cursor: pointer;
+ width: 155px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.hupa-attachment-view {
+ margin-left: 10px;
+}
+
+/************[ view: MessageSendView ]*******************/
+table.hupa-msgsend {
+ width: 100%;
+}
+
+.hupa-validate-error {
+ border: 1pt solid red;
+ background-color: #fae5b0;
+}
+
+/************[ view: ContactsView ]*******************/
+table.hupa-contacts {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+/************************************************************************/
+/*** Non re-factored stuff ***/
+.cbg-ButtonContent {
+ font-size: 80%;
+}
+
+.hupa-ErrorLabel,.gwt-PagingOptions .errorMessage {
+ color: #FF0000;
+}
+
+.gwt-ScrollTable .dataTable td {
+ border-top: 1pt solid #EEEEEE;
+ white-space: nowrap;
+ padding: 0px 10px 0px 10px;
+ overflow: hidden;
+ font-size: 12px;
+ cursor: pointer;
+}
+
+.gwt-ScrollTable .dataTable tr.highlighted {
+ background: #FAD163;
+}
+
+.gwt-ScrollTable .dataTable tr.selected td {
+ background: #FFF7D7;
+}
+
+.hupa-IMAPFolder-unseen {
+ font-weight: bold;
+}
+
+.hupa-IMAPFolder-selected {
+ background: #f1e77b;
+ width: 100%;
+}
+
+.hupa-droptarget-invalid {
+ color: red;
+}
+
+.hupa-editor {
+ border-left: 1px solid #CCC;
+ border-right: 1px solid #CCC;
+}
+
+/**** HTML5 shadows and gradients ****/
+.hupa-rounded {
+ box-shadow: 0 1px 4px grey;
+}
+
+.hupa-top-wrap,.hupa-login-box,.hupa-msg-top-bar {
+ background: -moz-linear-gradient(#FFFFFF, #C5D9FF);
+ background: -webkit-linear-gradient(#FFFFFF, #C5D9FF);
+ background: -o-linear-gradient(#FFFFFF, #C5D9FF);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF',
+ endColorstr='#C5D9FF', GradientType=0 );
+}
+
+.hupa-commands-bar {
+ background: -moz-linear-gradient(#C5D9FF, #eaeaea);
+ background: -webkit-linear-gradient(#C5D9FF, #eaeaea);
+ background: -o-linear-gradient(#C5D9FF, #eaeaea);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#C5D9FF',
+ endColorstr='#eaeaea', GradientType=0 );
+}
+
+.hupa-tree {
+ background: -moz-linear-gradient(#C5D9FF, #eaeaea);
+ background: -webkit-linear-gradient(#C5D9FF, #eaeaea);
+ background: -o-linear-gradient(#C5D9FF, #eaeaea);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#C5D9FF',
+ endColorstr='#eaeaea', GradientType=0 );
+}
+
+div.hupa-main {
+ background: -moz-linear-gradient(#eaeaea, #fafafa);
+ background: -webkit-linear-gradient(#eaeaea, #fafafa);
+ background: -o-linear-gradient(#eaeaea, #fafafa);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eaeaea',
+ endColorstr='#fafafa', GradientType=0 );
+}
+
+.hupa-flash,.hupa-dialog-box td.dialogMiddleCenter {
+ background: -moz-linear-gradient(#fae5b0, #eaeaea);
+ background: -webkit-linear-gradient(#fae5b0, #eaeaea);
+ background: -o-linear-gradient(#fae5b0, #eaeaea);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fae5b0',
+ endColorstr='#eaeaea', GradientType=0 );
+}
+
+.hupa-login-form,.hupa-bottom {
+ text-shadow: 1px 1px 3px #666666;
+}
+
+* html .hupa-bottom {
+ filter: progid:DXImageTransform.Microsoft.Shadow(color='#666666',
+ Direction=135, Strength=1 );
+}
+
+.hupa-button {
+ background: #FFFFFF;
+ background: -moz-linear-gradient(#FFFFFF, #EDEDED);
+ background: -webkit-linear-gradient(#FFFFFF, #EDEDED);
+ background: -o-linear-gradient(#FFFFFF, #EDEDED);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF',
+ endColorstr='#EDEDED', GradientType=0 );
+ border: 1px solid #B7B7B7;
+ color: #606060;
+ border-radius: 2em 2em 2em 2em;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
+ cursor: pointer;
+ display: inline-block;
+ font: 10px;
+ margin: 0 2px;
+ outline: medium none;
+ padding: 2px 10px;
+ text-align: center;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
+ vertical-align: baseline;
+}
+
+.hupa-button:hover {
+ background: #ededed;
+ background: -moz-linear-gradient(#FFFFFF, #dcdcdc);
+ background: -webkit-linear-gradient(#FFFFFF, #dcdcdc);
+ background: -o-linear-gradient(#FFFFFF, #dcdcdc);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF',
+ endColorstr='#dcdcdc', GradientType=0 );
+}
+
+.gwt-DecoratorPanel .middleCenter {
+ height: 100%;
+ width: 100%;
+}
+
+.gwt-SuggestBox {
+ border-radius: 50px;
+ max-height: 8px;
+}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa.html
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa.html?rev=1573291&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa.html (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/public/Hupa.html Sun Mar 2 12:12:22 2014
@@ -0,0 +1,72 @@
+<!--
+ 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.
+-->
+<!DOCTYPE HTML>
+
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <!--[if lt IE 9]>
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <![endif]-->
+
+ <link rel="Shortcut Icon" href="favicon.ico" type="image/x-icon"/>
+ <link href="styles.css" type="text/css" rel="stylesheet" />
+
+ <title>Hupa webmail</title>
+ <!-- define loading style early -->
+ <style type="text/css">
+ div.loading {
+ width: 100%;
+ height: 100%;
+ background-color: #d8ecfd;
+ }
+ .loading img {
+ position: absolute;
+ top: 37%;
+ left: 50%;
+ }
+ #login {
+ display: none;
+ }
+ </style>
+ </head>
+
+ <body>
+ <!-- An image is shown while the application is loaded -->
+ <!-- It will be removed as soon as the app is ready -->
+ <div id="loading" class="loading">
+ <img src="images/hupa-spinning.gif">
+ </div>
+
+ <!-- We need this because passwords in forms rendered by js are not saved in browsers -->
+ <div id="login">
+ <form id="loginForm" action="hupa/clear.cache.gif" method="post">
+ <input autocomplete="on" id="email" name="email" type="text">
+ <input autocomplete="on" id="password" name="password" type="password">
+ </form>
+ </div>
+
+ <!-- Necessary for history support -->
+ <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
+
+ <!-- Download attachments needs this -->
+ <iframe src="" id="__download" style="width:0;height:0;border:0"></iframe>
+
+
+ <!-- load the application at the end when loading is being shown -->
+ <script type="text/javascript" src="hupa.nocache.js"></script>
+
+</html>
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/favicon.ico
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/favicon.ico?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/favicon.ico
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/ajax-loader.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/ajax-loader.gif?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/ajax-loader.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/buttons.png
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/buttons.png?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/buttons.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/circles.png
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/circles.png?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/circles.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hborder.png
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hborder.png?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hborder.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-32.jpg
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-32.jpg?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-32.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-48.jpg
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-48.jpg?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-48.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-49-transparent.png
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-49-transparent.png?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-49-transparent.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-64-transparent.png
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-64-transparent.png?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-64-transparent.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-64.jpg
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-64.jpg?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-64.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-original-transparent.png
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-original-transparent.png?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-original-transparent.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-original.jpg
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-original.jpg?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
Propchange: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-logo-original.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-spinning.gif
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/public/images/hupa-spinning.gif?rev=1573291&view=auto
==============================================================================
Binary file - no diff available.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org