[kune-commits] r1065 - in trunk/src/main/java/org/ourproject/kune:
platf/client/actions/toolbar platf/client/services
platf/client/ui platf/client/ui/rte workspace/client
workspace/client/cxt workspace/client/editor
workspace/client/sitebar/sitepublic
workspace/client/sitebar/sitesearch
workspace/client/sitebar/siteusermenu workspace/client/skel
workspace/client/socialnet workspace/client/title
vjrj
vjrj at ourproject.org
Tue Mar 10 04:17:36 CET 2009
Author: vjrj
Date: 2009-03-10 04:17:33 +0100 (Tue, 10 Mar 2009)
New Revision: 1065
Added:
trunk/src/main/java/org/ourproject/kune/platf/client/ui/AbstractToolbar.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/FlowToolbar.java
trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextTopToolbar.java
Removed:
trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextTopToolBar.java
Modified:
trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/KunePlatformModule.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/SimpleToolbar.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/TestRTEDialog.java
trunk/src/main/java/org/ourproject/kune/workspace/client/KuneWorkspaceModule.java
trunk/src/main/java/org/ourproject/kune/workspace/client/editor/ContentEditor.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/skel/ActionCntCtxToolbarPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntityWorkspace.java
trunk/src/main/java/org/ourproject/kune/workspace/client/skel/WorkspaceSkeleton.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePanel.java
Log:
Incomplete - task Better RTE (Rich Text Editor) support
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -30,6 +30,8 @@
import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor;
import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor;
import org.ourproject.kune.platf.client.actions.ActionToolbarPosition;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
+import org.ourproject.kune.platf.client.ui.FlowToolbar;
import org.ourproject.kune.platf.client.ui.SimpleToolbar;
import com.allen_sauer.gwt.log.client.Log;
@@ -52,11 +54,19 @@
private final HashMap<String, Item> menuItems;
private final HashMap<String, ToolbarButton> buttons;
private final Provider<ActionManager> actionManagerProvider;
- protected final SimpleToolbar toolbar;
+ protected final AbstractToolbar toolbar;
public ActionToolbarPanel(final Provider<ActionManager> actionManagerProvider) {
- toolbar = new SimpleToolbar();
- toolbar.setWidth("100%");
+ this(actionManagerProvider, false);
+ }
+
+ public ActionToolbarPanel(final Provider<ActionManager> actionManagerProvider, boolean flow) {
+ if (flow) {
+ toolbar = new FlowToolbar();
+ } else {
+ toolbar = new SimpleToolbar();
+ }
+ // toolbar.setWidth("100%");
this.actionManagerProvider = actionManagerProvider;
menus = new HashMap<String, Menu>();
@@ -77,6 +87,7 @@
if (action.hasLeftSeparator()) {
add(toolbar, action.getLeftSeparator());
}
+ addFloatStyle(button);
toolbar.add(button);
if (action.hasRightSeparator()) {
add(toolbar, action.getRightSeparator());
@@ -121,7 +132,7 @@
return 0;
}
- public SimpleToolbar getToolbar() {
+ public AbstractToolbar getToolbar() {
return toolbar;
}
@@ -181,7 +192,7 @@
}
}
- private Widget add(final SimpleToolbar toolbar, final ActionToolbarButtonSeparator separator) {
+ private Widget add(final AbstractToolbar toolbar, final ActionToolbarButtonSeparator separator) {
switch (separator) {
case fill:
return toolbar.addFill();
@@ -194,9 +205,16 @@
}
private void add(final Widget widget) {
+ addFloatStyle(widget);
toolbar.add(widget);
}
+ private void addFloatStyle(Widget widget) {
+ if (toolbar instanceof FlowToolbar) {
+ widget.addStyleName("kune-floatleft");
+ }
+ }
+
private void addSeparator(Menu menu, boolean separator) {
if (separator) {
menu.addSeparator();
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KunePlatformModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KunePlatformModule.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KunePlatformModule.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -234,7 +234,7 @@
}, new Factory<RTEActionSndToolbar>(RTEActionSndToolbar.class) {
@Override
public RTEActionSndToolbar create() {
- final ActionToolbarPanel<Object> panel = new ActionToolbarPanel<Object>($$(ActionManager.class));
+ final ActionToolbarPanel<Object> panel = new ActionToolbarPanel<Object>($$(ActionManager.class), true);
final RTEActionSndToolbarPresenter toolbar = new RTEActionSndToolbarPresenter(panel);
return toolbar;
}
Added: trunk/src/main/java/org/ourproject/kune/platf/client/ui/AbstractToolbar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/AbstractToolbar.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/AbstractToolbar.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -0,0 +1,34 @@
+package org.ourproject.kune.platf.client.ui;
+
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.HasVerticalAlignment.VerticalAlignmentConstant;
+
+public interface AbstractToolbar {
+
+ void add(final Widget widget);
+
+ void add(final Widget widget, VerticalAlignmentConstant valign);
+
+ Widget addFill();
+
+ Widget addSeparator();
+
+ Widget addSpacer();
+
+ int getOffsetHeight();
+
+ void insert(final Widget widget, int position);
+
+ boolean isAttached();
+
+ void remove(final Widget widget);
+
+ void removeAll();
+
+ void setCleanStyle();
+
+ void setHeight(String height);
+
+ void setNormalStyle();
+
+}
\ No newline at end of file
Added: trunk/src/main/java/org/ourproject/kune/platf/client/ui/FlowToolbar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/FlowToolbar.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/FlowToolbar.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -0,0 +1,102 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.platf.client.ui;
+
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.HasVerticalAlignment.VerticalAlignmentConstant;
+
+public class FlowToolbar extends Composite implements AbstractToolbar {
+
+ private final HorizontalPanel mainPanel;
+ private final FlowPanel childPanel;
+
+ public FlowToolbar() {
+ mainPanel = new HorizontalPanel();
+ childPanel = new FlowPanel();
+ mainPanel.add(childPanel);
+ initWidget(mainPanel);
+ }
+
+ public void add(final Widget widget) {
+ childPanel.add(widget);
+ }
+
+ public void add(final Widget widget, VerticalAlignmentConstant valign) {
+ childPanel.add(widget);
+ }
+
+ public Widget addFill() {
+ final Label emptyLabel = new Label("");
+ this.add(emptyLabel);
+ return emptyLabel;
+ }
+
+ public Widget addSeparator() {
+ final Label emptyLabel = new Label("");
+ emptyLabel.setStyleName("ytb-sep");
+ emptyLabel.addStyleName("k-toolbar-sep");
+ this.add(emptyLabel);
+ return emptyLabel;
+ }
+
+ public Widget addSpacer() {
+ final Label emptyLabel = new Label("");
+ emptyLabel.setStyleName("ytb-spacer");
+ this.add(emptyLabel);
+ return emptyLabel;
+ }
+
+ public void insert(final Widget widget, int position) {
+ childPanel.insert(widget, position);
+ }
+
+ public void remove(final Widget widget) {
+ childPanel.remove(widget);
+ }
+
+ public void removeAll() {
+ childPanel.clear();
+ }
+
+ public void setCleanStyle() {
+ setBasicStyle();
+ addStyleName("k-blank-toolbar");
+ }
+
+ @Override
+ public void setHeight(String height) {
+ mainPanel.setHeight(height);
+ childPanel.setHeight(height);
+ }
+
+ public void setNormalStyle() {
+ setBasicStyle();
+ addStyleName("k-toolbar-bottom-line");
+ }
+
+ private void setBasicStyle() {
+ setStyleName("x-toolbar");
+ addStyleName("x-panel");
+ }
+}
\ No newline at end of file
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/SimpleToolbar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/SimpleToolbar.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/SimpleToolbar.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -26,7 +26,7 @@
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.HasVerticalAlignment.VerticalAlignmentConstant;
-public class SimpleToolbar extends Composite {
+public class SimpleToolbar extends Composite implements AbstractToolbar {
private final HorizontalPanel childPanel;
private final HorizontalPanel mainPanel;
@@ -49,11 +49,6 @@
childPanel.setCellVerticalAlignment(widget, valign);
}
- public void add(final Widget widget, VerticalAlignmentConstant valign, int position) {
- childPanel.insert(widget, position);
- childPanel.setCellVerticalAlignment(widget, valign);
- }
-
public Widget addFill() {
final Label emptyLabel = new Label("");
this.add(emptyLabel);
@@ -89,10 +84,6 @@
childPanel.clear();
}
- public void setCellWidth(Widget widget, String width) {
- childPanel.setCellWidth(widget, width);
- }
-
public void setCleanStyle() {
setBasicStyle();
addStyleName("k-blank-toolbar");
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/TestRTEDialog.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/TestRTEDialog.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/TestRTEDialog.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -4,6 +4,7 @@
import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog;
import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.widgets.Window;
import com.gwtext.client.widgets.event.WindowListenerAdapter;
@@ -18,8 +19,8 @@
final VerticalPanel vp = new VerticalPanel();
RTEditor basicEditor = editor.getBasicEditor();
- vp.add(((ActionToolbarPanel<Object>) basicEditor.getTopBar().getView()).getToolbar());
- vp.add(((ActionToolbarPanel<Object>) basicEditor.getSndBar().getView()).getToolbar());
+ vp.add((Widget) ((ActionToolbarPanel<Object>) basicEditor.getTopBar().getView()).getToolbar());
+ vp.add((Widget) ((ActionToolbarPanel<Object>) basicEditor.getSndBar().getView()).getToolbar());
final RTEditorPanel editorPanel = (RTEditorPanel) basicEditor.getEditorArea();
vp.add(editorPanel.getRTE());
basicEditor.setExtended(true);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/KuneWorkspaceModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/KuneWorkspaceModule.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/KuneWorkspaceModule.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -57,7 +57,7 @@
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigatorPanel;
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigatorPresenter;
import org.ourproject.kune.workspace.client.cxt.ActionContextBottomToolbar;
-import org.ourproject.kune.workspace.client.cxt.ActionContextTopToolBar;
+import org.ourproject.kune.workspace.client.cxt.ActionContextTopToolbar;
import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
import org.ourproject.kune.workspace.client.cxt.ContextPropEditorPanel;
@@ -915,13 +915,13 @@
$(RTEImgResources.class), $(WorkspaceSkeleton.class));
}
});
- register(NoDecoration.class, new Factory<ActionContextTopToolBar>(ActionContextTopToolBar.class) {
+ register(NoDecoration.class, new Factory<ActionContextTopToolbar>(ActionContextTopToolbar.class) {
@Override
- public ActionContextTopToolBar create() {
+ public ActionContextTopToolbar create() {
final ActionCntCtxToolbarPanel<StateToken> panel = new ActionCntCtxToolbarPanel<StateToken>(
AbstractFoldableContentActions.CONTEXT_TOPBAR, $$(ActionManager.class),
$(WorkspaceSkeleton.class));
- final ActionContextTopToolBar toolbar = new ActionContextTopToolBar(panel);
+ final ActionContextTopToolbar toolbar = new ActionContextTopToolbar(panel);
return toolbar;
}
});
@@ -942,7 +942,7 @@
public ContextNavigator create() {
final ContextNavigatorPresenter presenter = new ContextNavigatorPresenter($(StateManager.class),
$(Session.class), $(I18nTranslationService.class), $(ContentIconsRegistry.class),
- $(ContentCapabilitiesRegistry.class), $(ActionContextTopToolBar.class),
+ $(ContentCapabilitiesRegistry.class), $(ActionContextTopToolbar.class),
$(ActionContextBottomToolbar.class), $(ContextActionRegistry.class),
$$(FileDownloadUtils.class), true, $(RenameAction.class));
final ContextNavigatorPanel panel = new ContextNavigatorPanel(presenter,
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextTopToolBar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextTopToolBar.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextTopToolBar.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -1,33 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.cxt;
-
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter;
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
-import org.ourproject.kune.platf.client.dto.StateToken;
-
-public class ActionContextTopToolBar extends ActionToolbarPresenter<StateToken> implements ActionToolbar<StateToken> {
-
- public ActionContextTopToolBar(ActionToolbarView<StateToken> toolbar) {
- super(toolbar);
- }
-
-}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextTopToolbar.java (from rev 1064, trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextTopToolBar.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextTopToolBar.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextTopToolbar.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -0,0 +1,33 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.cxt;
+
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
+import org.ourproject.kune.platf.client.dto.StateToken;
+
+public class ActionContextTopToolbar extends ActionToolbarPresenter<StateToken> implements ActionToolbar<StateToken> {
+
+ public ActionContextTopToolbar(ActionToolbarView<StateToken> toolbar) {
+ super(toolbar);
+ }
+
+}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/ContentEditor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/ContentEditor.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/ContentEditor.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -3,7 +3,7 @@
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.platf.client.ui.SimpleToolbar;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
import org.ourproject.kune.platf.client.ui.rte.RTESavingEditorPresenter;
import org.ourproject.kune.platf.client.ui.rte.RTEditor;
import org.ourproject.kune.platf.client.ui.rte.RTEditorPanel;
@@ -16,6 +16,7 @@
import com.calclab.suco.client.events.Listener;
import com.calclab.suco.client.events.Listener0;
import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.widgets.BoxComponent;
import com.gwtext.client.widgets.event.ContainerListenerAdapter;
@@ -25,7 +26,7 @@
private final VerticalPanel vp;
private final RTEditor basicEditor;
private final RTEditorPanel editorPanel;
- private final SimpleToolbar topbar;
+ private final AbstractToolbar topbar;
public ContentEditor(RTEditor editor, boolean autoSave, I18nTranslationService i18n, StateManager stateManager,
SiteSignOutLink siteSignOutLink, DeferredCommandWrapper deferredCommandWrapper,
@@ -35,12 +36,11 @@
vp = new VerticalPanel();
basicEditor = super.getBasicEditor();
- vp.add(((ActionToolbarPanel<Object>) basicEditor.getSndBar().getView()).getToolbar());
+ vp.add((Widget) ((ActionToolbarPanel<Object>) basicEditor.getSndBar().getView()).getToolbar());
editorPanel = (RTEditorPanel) basicEditor.getEditorArea();
vp.add(editorPanel.getRTE());
basicEditor.setExtended(true);
vp.setWidth("100%");
- adjHeight(ws.getEntityWorkspace().getContentHeight());
ws.getEntityWorkspace().addContentListener(new ContainerListenerAdapter() {
@Override
public void onResize(final BoxComponent component, final int adjWidth, final int adjHeight,
@@ -55,9 +55,10 @@
public void edit(String html, Listener<String> onSave, Listener0 onEditCancelled) {
Toolbar contentTopBar = ws.getEntityWorkspace().getContentTopBar();
contentTopBar.removeAll();
- contentTopBar.add(topbar);
+ contentTopBar.add((Widget) topbar);
ws.getEntityWorkspace().setContent(vp);
super.edit(html, onSave, onEditCancelled);
+ adjHeight(ws.getEntityWorkspace().getContentHeight());
}
@Override
@@ -67,7 +68,11 @@
}
private void adjHeight(final int height) {
- int newHeight = height - WorkspaceSkeleton.DEF_TOOLBAR_HEIGHT - 27;
+ AbstractToolbar sndbar = ((ActionToolbarPanel<Object>) basicEditor.getSndBar().getView()).getToolbar();
+ int barHeight = sndbar.getOffsetHeight();
+ int newHeight = height - 20 - barHeight;
+ // Log.debug("Sndbar height: " + barHeight + " new height: " +
+ // newHeight);
editorPanel.adjustSize(newHeight);
vp.setCellHeight(editorPanel.getRTE(), "" + newHeight);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -21,8 +21,8 @@
import org.ourproject.kune.platf.client.i18n.I18nUITranslationService;
import org.ourproject.kune.platf.client.services.Images;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
import org.ourproject.kune.platf.client.ui.IconLabel;
-import org.ourproject.kune.platf.client.ui.SimpleToolbar;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.Window;
@@ -49,7 +49,7 @@
contentNoPublic.ensureDebugId(SITE_CONTENT_NO_PUBLIC);
publicHP.add(gotoPublic);
publicHP.add(contentNoPublic);
- final SimpleToolbar siteBar = ws.getSiteBar();
+ final AbstractToolbar siteBar = ws.getSiteBar();
siteBar.add(publicHP);
siteBar.addFill();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPanel.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPanel.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -20,7 +20,7 @@
package org.ourproject.kune.workspace.client.sitebar.sitesearch;
import org.ourproject.kune.platf.client.services.Images;
-import org.ourproject.kune.platf.client.ui.SimpleToolbar;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
@@ -40,7 +40,7 @@
private final PushButton searchButton;
private final TextBox searchTextBox;
- private final SimpleToolbar siteBar;
+ private final AbstractToolbar siteBar;
public SiteSearchPanel(final SiteSearchPresenter presenter, final WorkspaceSkeleton ws, Images img) {
siteBar = ws.getSiteBar();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -22,8 +22,8 @@
import org.ourproject.kune.platf.client.PlatfMessages;
import org.ourproject.kune.platf.client.dto.GroupDTO;
import org.ourproject.kune.platf.client.i18n.I18nUITranslationService;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
import org.ourproject.kune.platf.client.ui.MenuItemCollection;
-import org.ourproject.kune.platf.client.ui.SimpleToolbar;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.ui.ClickListener;
@@ -52,7 +52,7 @@
loggedUserMenu = new PushButton("");
loggedUserMenu.ensureDebugId(LOGGED_USER_MENU);
loggedUserMenu.setStyleName("k-sitebar-labellink");
- SimpleToolbar siteBar = ws.getSiteBar();
+ AbstractToolbar siteBar = ws.getSiteBar();
siteBar.add(loggedUserMenu);
separator = siteBar.addSeparator();
userMenu = new Menu();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/skel/ActionCntCtxToolbarPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/skel/ActionCntCtxToolbarPanel.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/skel/ActionCntCtxToolbarPanel.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -25,6 +25,7 @@
import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.user.client.ui.Widget;
public class ActionCntCtxToolbarPanel<T> extends ActionToolbarPanel<T> {
@@ -50,14 +51,14 @@
public void attach() {
if (!toolbar.isAttached()) {
wsToolbar.removeAll();
- wsToolbar.add(toolbar);
+ wsToolbar.add((Widget) toolbar);
}
}
@Override
public void detach() {
if (toolbar.isAttached()) {
- wsToolbar.remove(toolbar);
+ wsToolbar.remove((Widget) toolbar);
}
}
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntityWorkspace.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntityWorkspace.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntityWorkspace.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -19,6 +19,7 @@
\*/
package org.ourproject.kune.workspace.client.skel;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
import org.ourproject.kune.platf.client.ui.RoundedPanel;
import org.ourproject.kune.platf.client.ui.SimpleToolbar;
import org.ourproject.kune.workspace.client.themes.WsTheme;
@@ -165,7 +166,7 @@
content.clear();
}
- public SimpleToolbar getBottomTitle() {
+ public AbstractToolbar getBottomTitle() {
return bottom;
}
@@ -197,11 +198,11 @@
return mainFitPanel;
}
- public SimpleToolbar getSubTitle() {
+ public AbstractToolbar getSubTitle() {
return subTitle;
}
- public SimpleToolbar getTitleComponent() {
+ public AbstractToolbar getTitleComponent() {
return title;
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/skel/WorkspaceSkeleton.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/skel/WorkspaceSkeleton.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/skel/WorkspaceSkeleton.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -19,6 +19,7 @@
\*/
package org.ourproject.kune.workspace.client.skel;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
import org.ourproject.kune.platf.client.ui.SimpleToolbar;
import org.ourproject.kune.workspace.client.themes.WsTheme;
@@ -106,7 +107,7 @@
return entity.getEntityWorkspace();
}
- public SimpleToolbar getSiteBar() {
+ public AbstractToolbar getSiteBar() {
return sitebar;
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -28,8 +28,8 @@
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
import org.ourproject.kune.platf.client.ui.BasicThumb;
-import org.ourproject.kune.platf.client.ui.SimpleToolbar;
import org.ourproject.kune.workspace.client.skel.SummaryPanel;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
@@ -48,7 +48,7 @@
private final Label otherBuddiesLabel;
private final I18nTranslationService i18n;
private final ActionManager actionManager;
- private final SimpleToolbar toolbar;
+ private final AbstractToolbar toolbar;
private final Label noBuddiesPublic;
public BuddiesSummaryPanel(final BuddiesSummaryPresenter presenter, final WorkspaceSkeleton ws,
@@ -65,7 +65,7 @@
vp.add(otherBuddiesLabel);
toolbar = ((ActionToolbarPanel<UserSimpleDTO>) actionToolbarView).getToolbar();
toolbar.setCleanStyle();
- vp.add(toolbar);
+ vp.add((Widget) toolbar);
super.add(vp);
addInSummary();
noBuddiesPublic = new Label(i18n.t(PlatfMessages.BUDDIES_NOT_PUBLIC));
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -25,7 +25,7 @@
import org.ourproject.kune.platf.client.dto.GroupDTO;
import org.ourproject.kune.platf.client.dto.StateToken;
import org.ourproject.kune.platf.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.platf.client.ui.SimpleToolbar;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
import org.ourproject.kune.platf.client.ui.gridmenu.GridDragConfiguration;
import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuPanel;
@@ -38,6 +38,7 @@
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.widgets.BoxComponent;
import com.gwtext.client.widgets.MessageBox;
import com.gwtext.client.widgets.event.ContainerListenerAdapter;
@@ -47,7 +48,7 @@
private final GridMenuPanel<GroupDTO> gridMenuPanel;
private final I18nUITranslationService i18n;
private final GroupMembersSummaryPresenter presenter;
- private final SimpleToolbar toolbar;
+ private final AbstractToolbar toolbar;
private final Label noMembersPublic;
public GroupMembersSummaryPanel(final GroupMembersSummaryPresenter presenter, final I18nUITranslationService i18n,
@@ -79,7 +80,7 @@
toolbar = ((ActionToolbarPanel<StateToken>) actionToolbarView).getToolbar();
toolbar.setCleanStyle();
- super.add(toolbar);
+ super.add((Widget) toolbar);
super.addInSummary();
ws.addListenerInEntitySummary(new ContainerListenerAdapter() {
@Override
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -24,7 +24,7 @@
import org.ourproject.kune.platf.client.dto.GroupDTO;
import org.ourproject.kune.platf.client.dto.StateToken;
import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
-import org.ourproject.kune.platf.client.ui.SimpleToolbar;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuPanel;
import org.ourproject.kune.workspace.client.skel.SummaryPanel;
@@ -32,13 +32,14 @@
import org.ourproject.kune.workspace.client.themes.WsTheme;
import com.calclab.suco.client.events.Listener;
+import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.widgets.BoxComponent;
import com.gwtext.client.widgets.event.ContainerListenerAdapter;
public class ParticipationSummaryPanel extends SummaryPanel implements ParticipationSummaryView {
private final GridMenuPanel<GroupDTO> gridMenuPanel;
- private final SimpleToolbar toolbar;
+ private final AbstractToolbar toolbar;
public ParticipationSummaryPanel(final ParticipationSummaryPresenter presenter, final I18nTranslationService i18n,
final WorkspaceSkeleton ws, ActionToolbarView<StateToken> actionToolbarView) {
@@ -55,7 +56,7 @@
super.add(gridMenuPanel);
toolbar = ((ActionToolbarPanel<StateToken>) actionToolbarView).getToolbar();
toolbar.setCleanStyle();
- super.add(toolbar);
+ super.add((Widget) toolbar);
addInSummary();
ws.addListenerInEntitySummary(new ContainerListenerAdapter() {
@Override
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePanel.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePanel.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.workspace.client.title;
-import org.ourproject.kune.platf.client.ui.SimpleToolbar;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.ui.Label;
@@ -32,7 +32,7 @@
subTitleLeftLabel = new Label();
subTitleRightLabel = new Label();
- final SimpleToolbar wsSubTitle = ws.getEntityWorkspace().getSubTitle();
+ final AbstractToolbar wsSubTitle = ws.getEntityWorkspace().getSubTitle();
wsSubTitle.add(subTitleLeftLabel);
wsSubTitle.addFill();
wsSubTitle.add(subTitleRightLabel);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePanel.java 2009-03-10 00:05:50 UTC (rev 1064)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePanel.java 2009-03-10 03:17:33 UTC (rev 1065)
@@ -19,8 +19,8 @@
*/
package org.ourproject.kune.workspace.client.title;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
import org.ourproject.kune.platf.client.ui.IconLabelEditable;
-import org.ourproject.kune.platf.client.ui.SimpleToolbar;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.calclab.suco.client.events.Listener2;
@@ -40,7 +40,7 @@
}
});
- final SimpleToolbar wsTitle = ws.getEntityWorkspace().getTitleComponent();
+ final AbstractToolbar wsTitle = ws.getEntityWorkspace().getTitleComponent();
wsTitle.add(icon);
wsTitle.add(titleLabel);
wsTitle.addFill();
More information about the kune-commits
mailing list