[kune-commits] r1833 - in trunk: . debian src/main/java/cc/kune/common/client/ui src/main/java/cc/kune/core/client src/main/java/cc/kune/events/client/viewer src/main/java/cc/kune/gspace/client/armor src/main/java/cc/kune/gspace/client/tool src/main/java/cc/kune/gspace/client/viewers src/main/java/cc/kune/wave/client src/main/webapp/tutorials

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Tue Apr 10 16:53:30 CEST 2012


Author: vjrj_
Date: 2012-04-10 16:53:28 +0200 (Tue, 10 Apr 2012)
New Revision: 1833

Added:
   trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenter.java
Removed:
   trunk/src/main/java/cc/kune/core/client/cnt/
Modified:
   trunk/TODO
   trunk/debian/changelog
   trunk/debian/files
   trunk/src/main/java/cc/kune/common/client/ui/UiUtils.java
   trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java
   trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPresenter.java
   trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmor.java
   trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmorDefault.java
   trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmorDefault.ui.xml
   trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenterPanel.java
   trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenterPanel.ui.xml
   trunk/src/main/java/cc/kune/gspace/client/tool/ContentViewerSelector.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerView.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsFlowPanel.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerUtils.java
   trunk/src/main/java/cc/kune/wave/client/WaveStatusIndicator.java
   trunk/src/main/webapp/tutorials/wiki.svg
Log:
NEW - # 193: Add a tool intro tutorial instead of the sample contents 
http://kune.ourproject.org/issues/ticket/193

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/TODO	2012-04-10 14:53:28 UTC (rev 1833)
@@ -28,6 +28,8 @@
 2012-04-09 00:14:34 AuthenticatedMethodInterceptor [INFO] Userhash received: null
 2012-04-09 00:14:34 AuthenticatedMethodInterceptor [INFO] --------------------------------------------------------------------------------
 
+** Central Deck
+
 ** Permission tables
 
 |---------------------------+-------------+--------------|

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/debian/changelog	2012-04-10 14:53:28 UTC (rev 1833)
@@ -1,3 +1,9 @@
+kune (0.1.0+b9) oneiric; urgency=low
+
+  * Tutorials updated. WaveStatusIndicator fixed.
+
+ -- Vicente J. Ruiz Jurado <vjrj at ourproject.org>  Mon, 09 Apr 2012 23:19:19 +0200
+
 kune (0.1.0+b8) oneiric; urgency=low
 
   * Perms in Events fixed. Wave updated. Lists deletion by admin.

Modified: trunk/debian/files
===================================================================
--- trunk/debian/files	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/debian/files	2012-04-10 14:53:28 UTC (rev 1833)
@@ -1 +1 @@
-kune_0.1.0+b8_all.deb java optional
+kune_0.1.0+b9_all.deb java optional

Modified: trunk/src/main/java/cc/kune/common/client/ui/UiUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/UiUtils.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/common/client/ui/UiUtils.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -24,13 +24,13 @@
 
 public class UiUtils {
 
-    public static void clear(final ForIsWidget widget) {
-        final Panel panel = (Panel) widget;
-        panel.clear();
-        // final int widgetCount = panel.getWidgetCount();
-        // for (int i = 0; i < widgetCount && widgetCount > 0; i++) {
-        // panel.remove(i);
-        // }
-    }
+  public static void clear(final ForIsWidget widget) {
+    final Panel panel = (Panel) widget;
+    panel.clear();
+    // final int widgetCount = panel.getWidgetCount();
+    // for (int i = 0; i < widgetCount && widgetCount > 0; i++) {
+    // panel.remove(i);
+    // }
+  }
 
 }

Modified: trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -53,6 +53,8 @@
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.event.dom.client.DoubleClickHandler;
 import com.google.gwt.event.logical.shared.OpenHandler;
+import com.google.gwt.event.logical.shared.ResizeEvent;
+import com.google.gwt.event.logical.shared.ResizeHandler;
 import com.google.gwt.event.logical.shared.SelectionHandler;
 import com.google.gwt.event.shared.EventBus;
 import com.google.gwt.event.shared.GwtEvent;
@@ -61,6 +63,7 @@
 import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.Event.NativePreviewEvent;
 import com.google.gwt.user.client.Event.NativePreviewHandler;
+import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
@@ -99,6 +102,12 @@
       }
     });
     contentTitle = new ContentTitleWidget(i18n, gsArmor, capabilitiesRegistry.getIconsRegistry());
+    Window.addResizeHandler(new ResizeHandler() {
+      @Override
+      public void onResize(final ResizeEvent event) {
+        resizeCalendar();
+      }
+    });
   }
 
   @Override
@@ -134,7 +143,7 @@
   @Override
   public void addItem(final FolderItemDescriptor item, final ClickHandler clickHandler,
       final DoubleClickHandler doubleClickHandler) {
-    // TODO Auto-generated method stub
+    // Do nothing right now, calendar appointments has a different treatment
   }
 
   @Override
@@ -166,12 +175,13 @@
   public void attach() {
     calendar.setSettings(setCalendarSettings());
     super.attach();
-    gsArmor.enableCenterScroll(false);
   }
 
   @Override
   public void clearAppointments() {
-    calendar.clearAppointments();
+    if (calendar.getAppointments().size() > 0) {
+      calendar.clearAppointments();
+    }
   }
 
   @Override
@@ -235,6 +245,11 @@
     calendar.removeAppointment(appointment, fireEvents);
   }
 
+  protected void resizeCalendar() {
+    super.resizeHeight(calendar);
+    calendar.doLayout();
+  }
+
   @Override
   public void resumeLayout() {
     calendar.resumeLayout();
@@ -285,6 +300,13 @@
   }
 
   @Override
+  public void showFolder() {
+    super.showFolder();
+    gsArmor.enableCenterScroll(false);
+    resizeCalendar();
+  }
+
+  @Override
   public void suspendLayout() {
     calendar.suspendLayout();
   }
@@ -301,6 +323,7 @@
       fmt = DateTimeFormat.getFormat("EEEE, MMMM dd, yyyy");
       break;
     case MONTH:
+    default:
       fmt = DateTimeFormat.getFormat("MMMM yyyy");
       break;
     }

Modified: trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPresenter.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPresenter.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -304,6 +304,7 @@
   @Override
   public void setContent(@Nonnull final HasContent state) {
     folderViewerUtils.setContent(getView(), state);
+    getView().showFolder();
     final StateEventContainerDTO eventState = (StateEventContainerDTO) state;
     updateMenuItems();
     getView().clearAppointments();

Modified: trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmor.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmor.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmor.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -20,7 +20,6 @@
 package cc.kune.gspace.client.armor;
 
 import cc.kune.common.client.actions.ui.IsActionExtensible;
-import cc.kune.common.shared.utils.Pair;
 import cc.kune.gspace.client.maxmin.IsMaximizable;
 
 import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget;
@@ -33,9 +32,9 @@
 
   void enableCenterScroll(boolean enable);
 
-  ForIsWidget getDocContainer();
+  GSpaceCenter getDocContainer();
 
-  Pair<Integer, Integer> getDocContainerSize();
+  int getDocContainerHeight();
 
   ForIsWidget getDocFooter();
 

Modified: trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmorDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmorDefault.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmorDefault.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -23,10 +23,8 @@
 
 import cc.kune.common.client.actions.ui.ActionFlowPanel;
 import cc.kune.common.client.actions.ui.IsActionExtensible;
-import cc.kune.common.shared.utils.Pair;
 
 import com.google.gwt.core.client.GWT;
-import com.google.gwt.dom.client.Style.Overflow;
 import com.google.gwt.dom.client.Style.Position;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
@@ -37,7 +35,6 @@
 import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget;
 import com.google.gwt.user.client.ui.IsWidget;
-import com.google.gwt.user.client.ui.ScrollPanel;
 import com.google.gwt.user.client.ui.SimplePanel;
 import com.google.gwt.user.client.ui.SplitLayoutPanel;
 import com.google.gwt.user.client.ui.TabLayoutPanel;
@@ -59,10 +56,8 @@
   @UiField
   VerticalPanel centerNorth;
   @UiField
-  ScrollPanel centerScroll;
+  GSpaceCenterPanel centerPanel;
   @UiField
-  FlowPanel docContainer;
-  @UiField
   DockLayoutPanel docContainerParent;
   @UiField
   FlowPanel docFooter;
@@ -140,27 +135,17 @@
 
   @Override
   public void enableCenterScroll(final boolean enable) {
-    // TODO use here Element.getStyle()...
-    if (enable) {
-      centerScroll.setAlwaysShowScrollBars(false);
-      DOM.setStyleAttribute(centerScroll.getElement(), "position", "absolute");
-      DOM.setStyleAttribute((Element) centerScroll.getElement().getFirstChildElement(), "position",
-          "relative");
-    } else {
-      centerScroll.getElement().getStyle().setOverflow(Overflow.HIDDEN);
-      DOM.setStyleAttribute(centerScroll.getElement(), "position", "");
-      DOM.setStyleAttribute((Element) centerScroll.getElement().getFirstChildElement(), "position", "");
-    }
+    centerPanel.enableCenterScroll(enable);
   }
 
   @Override
-  public ForIsWidget getDocContainer() {
-    return docContainer;
+  public GSpaceCenter getDocContainer() {
+    return centerPanel;
   }
 
   @Override
-  public Pair<Integer, Integer> getDocContainerSize() {
-    return Pair.create(centerScroll.getOffsetHeight(), centerScroll.getOffsetWidth());
+  public int getDocContainerHeight() {
+    return centerPanel.getHeight();
   }
 
   @Override
@@ -281,14 +266,6 @@
 
   @Override
   public void setMaximized(final boolean maximized) {
-    // setMaximized(docFooter.getParent(), maximized);
-    // setMaximized(entityFooter.getParent(), maximized);
-    // setMaximized(entityHeader.getParent(), maximized);
-    // setMaximized(entityToolsContainer, maximized);
-    // splitCenter.setWidgetSize(centerScroll, getAbsoluteLeft())
-    // setMaximized(splitCenter.getWidget(0), maximized);
-    // setMaximized(splitCenter.getWidget(2), maximized);
-    // setMaximized(splitEast, maximized);
     groupSpace.setWidgetSize(splitEast, maximized ? 0 : EAST_WIDTH);
     splitCenter.setWidgetSize(centerNorth, maximized ? 7 : CENTER_NORTH_HEIGHT);
     splitCenter.setWidgetSize(entityFooter, maximized ? 7 : CENTER_SOUTH_HEIGHT);

Modified: trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmorDefault.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmorDefault.ui.xml	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceArmorDefault.ui.xml	2012-04-10 14:53:28 UTC (rev 1833)
@@ -1,7 +1,7 @@
 <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
 <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
   xmlns:co="urn:import:cc.kune.core.client" xmlns:kp="urn:import:cc.kune.pspace.client"
-  xmlns:g="urn:import:com.google.gwt.user.client.ui">
+  xmlns:kg="urn:import:cc.kune.gspace.client.armor" xmlns:g="urn:import:com.google.gwt.user.client.ui">
   <ui:with field='res'
     type='cc.kune.gspace.client.armor.resources.GSpaceArmorResources'/>
   <ui:style>
@@ -43,8 +43,8 @@
                 <g:DockLayoutPanel unit="PX" ui:field="splitCenter"
                   styleName="{res.style.entityCentralContainer}">
                   <g:north size="153">
-                    <g:VerticalPanel width="100%" ui:field="centerNorth"
-                      height="153px">
+                    <g:VerticalPanel width="100%"
+                      ui:field="centerNorth" height="153px">
                       <g:FlowPanel height="70px" width="100%"
                         styleName="{res.style.entityHeader}" ui:field="entityHeader">
                         <!--<g:RichTextArea width="100%" height="70px" /> -->
@@ -69,12 +69,8 @@
                         <g:SimplePanel/>
                       </g:east>
                       <g:center>
-                        <g:ScrollPanel ui:field="centerScroll"
-                          styleName="{res.style.docEditor}">
-                          <g:FlowPanel width="auto" height="auto"
-                            styleName="{res.style.docEditorContainer}"
-                            ui:field="docContainer"/>
-                        </g:ScrollPanel>
+                        <kg:GSpaceCenterPanel
+                          ui:field="centerPanel"/>
                       </g:center>
                       <g:south size="33.0">
                         <g:VerticalPanel height="33px"

Added: trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenter.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenter.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -0,0 +1,30 @@
+/*
+ *
+ * Copyright (C) 2007-2012 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 cc.kune.gspace.client.armor;
+
+import com.google.gwt.user.client.ui.InsertPanel;
+import com.google.gwt.user.client.ui.IsWidget;
+
+public interface GSpaceCenter extends InsertPanel.ForIsWidget {
+  void clear();
+
+  void showWidget(IsWidget widget);
+}

Modified: trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenterPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenterPanel.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenterPanel.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -28,13 +28,14 @@
 import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.DeckPanel;
-import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.InsertPanel;
+import com.google.gwt.user.client.ui.IsWidget;
 import com.google.gwt.user.client.ui.ScrollPanel;
 import com.google.gwt.user.client.ui.Widget;
 import com.google.inject.Singleton;
 
 @Singleton
-public class GSpaceCenterPanel extends Composite {
+public class GSpaceCenterPanel extends Composite implements GSpaceCenter {
 
   interface GSpaceCenterPanelUiBinder extends UiBinder<Widget, GSpaceCenterPanel> {
   }
@@ -43,15 +44,26 @@
   ScrollPanel centerScroll;
   @UiField
   DeckPanel deck;
-  @UiField
-  FlowPanel infoPanel;
-  @UiField
-  FlowPanel mainPanel;
 
   public GSpaceCenterPanel() {
     initWidget(uiBinder.createAndBindUi(this));
   }
 
+  @Override
+  public void add(final IsWidget w) {
+    deck.add(w);
+  }
+
+  @Override
+  public void add(final Widget w) {
+    deck.add(w);
+  }
+
+  @Override
+  public void clear() {
+    deck.clear();
+  }
+
   public void enableCenterScroll(final boolean enable) {
     // TODO use here Element.getStyle()...
     if (enable) {
@@ -66,4 +78,53 @@
       DOM.setStyleAttribute((Element) centerScroll.getElement().getFirstChildElement(), "position", "");
     }
   }
+
+  InsertPanel.ForIsWidget getDeck() {
+    return deck;
+  }
+
+  public int getHeight() {
+    return centerScroll.getOffsetHeight();
+  }
+
+  @Override
+  public Widget getWidget(final int index) {
+    return deck.getWidget(index);
+  }
+
+  @Override
+  public int getWidgetCount() {
+    return deck.getWidgetCount();
+  }
+
+  @Override
+  public int getWidgetIndex(final IsWidget child) {
+    return deck.getWidgetIndex(child);
+  }
+
+  @Override
+  public int getWidgetIndex(final Widget child) {
+    return deck.getWidgetIndex(child);
+  }
+
+  @Override
+  public void insert(final IsWidget w, final int beforeIndex) {
+    deck.insert(w, beforeIndex);
+  }
+
+  @Override
+  public void insert(final Widget w, final int beforeIndex) {
+    deck.insert(w, beforeIndex);
+  }
+
+  @Override
+  public boolean remove(final int index) {
+    return deck.remove(index);
+  }
+
+  @Override
+  public void showWidget(final IsWidget widget) {
+    deck.showWidget(deck.getWidgetIndex(widget));
+  }
+
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenterPanel.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenterPanel.ui.xml	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/gspace/client/armor/GSpaceCenterPanel.ui.xml	2012-04-10 14:53:28 UTC (rev 1833)
@@ -3,14 +3,11 @@
   xmlns:g="urn:import:com.google.gwt.user.client.ui">
   <ui:with field='res'
     type='cc.kune.gspace.client.armor.resources.GSpaceArmorResources'/>
-  <ui:style>    
+  <ui:style>  
   </ui:style>
   <g:ScrollPanel ui:field="centerScroll" styleName="{res.style.docEditor}">
-    <g:DeckPanel ui:field="deck" width="auto" height="auto">
-      <g:FlowPanel width="auto" height="auto"
-        styleName="{res.style.docEditorContainer}" ui:field="infoPanel"/>
-      <g:FlowPanel width="auto" height="auto"
-        styleName="{res.style.docEditorContainer}" ui:field="mainPanel"/>
+    <g:DeckPanel ui:field="deck" width="auto" height="auto"
+      styleName="{res.style.docEditorContainer}">
     </g:DeckPanel>
   </g:ScrollPanel>
 </ui:UiBinder> 
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/gspace/client/tool/ContentViewerSelector.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/tool/ContentViewerSelector.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/gspace/client/tool/ContentViewerSelector.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -28,8 +28,8 @@
 import cc.kune.common.client.log.Log;
 import cc.kune.common.client.notify.NotifyUser;
 import cc.kune.core.client.events.AppStartEvent;
+import cc.kune.core.client.events.AppStartEvent.AppStartHandler;
 import cc.kune.core.client.events.StateChangedEvent;
-import cc.kune.core.client.events.AppStartEvent.AppStartHandler;
 import cc.kune.core.client.events.StateChangedEvent.StateChangedHandler;
 import cc.kune.core.client.state.Session;
 import cc.kune.core.client.state.StateManager;

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -24,13 +24,13 @@
 import cc.kune.common.client.ui.HasEditHandler;
 import cc.kune.common.client.ui.UiUtils;
 import cc.kune.common.shared.i18n.I18nTranslationService;
-import cc.kune.common.shared.utils.Pair;
 import cc.kune.core.client.dnd.FolderContainerDropController;
 import cc.kune.core.client.dnd.FolderContentDropController;
 import cc.kune.core.client.dnd.KuneDragController;
 import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
 import cc.kune.core.shared.dto.StateContainerDTO;
 import cc.kune.gspace.client.armor.GSpaceArmor;
+import cc.kune.gspace.client.armor.GSpaceCenter;
 import cc.kune.gspace.client.viewers.FolderViewerPresenter.FolderViewerView;
 
 import com.google.gwt.event.logical.shared.ResizeEvent;
@@ -39,7 +39,6 @@
 import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.InlineLabel;
-import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget;
 import com.google.gwt.user.client.ui.Widget;
 import com.google.inject.Provider;
 import com.gwtplatform.mvp.client.ViewImpl;
@@ -92,16 +91,13 @@
 
   @Override
   public void attach() {
-    final ForIsWidget docContainer = gsArmor.getDocContainer();
-    docContainer.add(widget);
-    gsArmor.enableCenterScroll(true);
   }
 
   @Override
   public void clear() {
     gsArmor.getSubheaderToolbar().clear();
     gsArmor.getDocFooterToolbar().clear();
-    UiUtils.clear(gsArmor.getDocContainer());
+    gsArmor.getDocContainer().clear();
     UiUtils.clear(gsArmor.getDocHeader());
   }
 
@@ -125,9 +121,12 @@
     contentTitle.highlightTitle();
   }
 
+  protected void resizeHeight(final Widget w) {
+    w.setHeight(String.valueOf(gsArmor.getDocContainerHeight()));
+  }
+
   private void resizeTutorialFrame() {
-    final Pair<Integer, Integer> size = gsArmor.getDocContainerSize();
-    tutorialViewer.setHeigth(size.getLeft());
+    tutorialViewer.setHeigth(gsArmor.getDocContainerHeight());
   }
 
   @Override
@@ -160,14 +159,28 @@
 
   @Override
   public void showEmptyMsg(final String emptyMessage) {
+    gsArmor.enableCenterScroll(false);
     emptyLabel.setText(emptyMessage);
     gsArmor.getDocContainer().add(emptyPanel);
+    gsArmor.getDocContainer().showWidget(emptyPanel);
   }
 
   @Override
+  public void showFolder() {
+    gsArmor.enableCenterScroll(true);
+    final GSpaceCenter docContainer = gsArmor.getDocContainer();
+    docContainer.add(widget);
+    docContainer.showWidget(widget);
+  }
+
+  @Override
   public void showTutorial(final String tool) {
-    UiUtils.clear(gsArmor.getDocContainer());
+    gsArmor.enableCenterScroll(false);
+    final GSpaceCenter docContainer = gsArmor.getDocContainer();
+    // docContainer.clear();
+    final Widget tutorial = tutorialViewer.show(tool);
     resizeTutorialFrame();
-    gsArmor.getDocContainer().add(tutorialViewer.show(tool));
+    docContainer.add(tutorial);
+    docContainer.showWidget(tutorial);
   }
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerView.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerView.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -54,5 +54,7 @@
 
   void showEmptyMsg(String message);
 
+  void showFolder();
+
   void showTutorial(String tool);
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -40,6 +40,7 @@
 import cc.kune.core.client.state.StateManager;
 import cc.kune.core.shared.dto.StateContentDTO;
 import cc.kune.gspace.client.armor.GSpaceArmor;
+import cc.kune.gspace.client.armor.GSpaceCenter;
 import cc.kune.gspace.client.viewers.ContentViewerPresenter.ContentViewerView;
 import cc.kune.wave.client.KuneStagesProvider;
 import cc.kune.wave.client.WaveClientClearEvent;
@@ -59,7 +60,6 @@
 import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.DeckPanel;
 import com.google.gwt.user.client.ui.InlineHTML;
-import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget;
 import com.google.gwt.user.client.ui.Widget;
 import com.google.inject.Inject;
 import com.gwtplatform.mvp.client.ViewImpl;
@@ -129,8 +129,9 @@
 
   @Override
   public void attach() {
-    final ForIsWidget docContainer = gsArmor.getDocContainer();
+    final GSpaceCenter docContainer = gsArmor.getDocContainer();
     docContainer.add(widget);
+    docContainer.showWidget(widget);
   }
 
   @Override
@@ -143,7 +144,7 @@
     onlyViewPanel.setHTML("");
     gsArmor.getSubheaderToolbar().clear();
     gsArmor.getDocFooterToolbar().clear();
-    UiUtils.clear(gsArmor.getDocContainer());
+    gsArmor.getDocContainer().clear();
     UiUtils.clear(gsArmor.getDocHeader());
     waveClear();
   }

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsFlowPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsFlowPanel.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsFlowPanel.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -111,7 +111,9 @@
   @Override
   public void setContainer(final StateContainerDTO state) {
     super.setContainer(state);
-    gsArmor.getDocContainer().add(new HTML("<b>Note:</b> This GUI is provisional<br/>"));
+    final HTML html = new HTML("<b>Note:</b> This GUI is provisional<br/>");
+    gsArmor.getDocContainer().add(html);
+    gsArmor.getDocContainer().showWidget(html);
   }
 
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerUtils.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerUtils.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -162,6 +162,7 @@
             content.getMimeType(), content.getStatus(), content.getStateToken().copy().clearDocument(),
             content.getRights(), content.getModifiedOn(), false);
       }
+      getView().showFolder();
     }
   }
 

Modified: trunk/src/main/java/cc/kune/wave/client/WaveStatusIndicator.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WaveStatusIndicator.java	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/java/cc/kune/wave/client/WaveStatusIndicator.java	2012-04-10 14:53:28 UTC (rev 1833)
@@ -56,6 +56,7 @@
         public void onNetworkStatus(final NetworkStatusEvent event) {
           switch (event.getStatus()) {
           case CONNECTED:
+           goOnline();
             break;
           case RECONNECTED:
             session.check(new AsyncCallbackSimple<Void>() {

Modified: trunk/src/main/webapp/tutorials/wiki.svg
===================================================================
--- trunk/src/main/webapp/tutorials/wiki.svg	2012-04-09 18:07:48 UTC (rev 1832)
+++ trunk/src/main/webapp/tutorials/wiki.svg	2012-04-10 14:53:28 UTC (rev 1833)
@@ -25,7 +25,7 @@
      borderopacity="1.0"
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
-     inkscape:zoom="1.5869046"
+     inkscape:zoom="1.6809434"
      inkscape:cx="243.10117"
      inkscape:cy="1308.5714"
      inkscape:document-units="px"
@@ -49,13 +49,13 @@
   </script>
   <script
      id="kunelang"
-     xlink:href="lang.js" />
+     xlink:href="/home/vjrj/proyectos/dev/kune/trunk/src/main/webapp/tutorials/lang.js" />
   <!-- End kune i18n part -->
   <!-- Start kune font part -->
   <xhtml:link
-     href="http://fonts.googleapis.com/css?family=Ubuntu"
+     type="text/css"
      rel="stylesheet"
-     type="text/css" />
+     href="http://fonts.googleapis.com/css?family=Ubuntu" />
   <style
      id="style26201">
     text { font-family: 'Ubuntu'; text-rendering: geometricPrecision; }
@@ -341,7 +341,6 @@
        style="opacity:0.5;fill:none;stroke:#ff5555;stroke-width:0.66635472;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
   </g>
   <g
-     sodipodi:insensitive="true"
      style="display:inline"
      inkscape:label="graphics"
      id="layer6"
@@ -541,7 +540,9 @@
          y="187.54723"
          x="195.88776"
          id="tspan3436"
-         sodipodi:role="line">Esto acelera su actualización</tspan><tspan
+         sodipodi:role="line">Esto <tspan
+   id="tspan3328"
+   style="font-weight:bold">acelera</tspan> su actualización</tspan><tspan
          y="202.54723"
          x="195.88776"
          sodipodi:role="line"
@@ -672,7 +673,9 @@
          sodipodi:role="line"
          id="tspan21610"
          x="195.88776"
-         y="187.54723">This feature speeds up the </tspan><tspan
+         y="187.54723">This feature <tspan
+   id="tspan3326"
+   style="font-weight:bold">speeds</tspan> up the </tspan><tspan
          id="tspan16059"
          sodipodi:role="line"
          x="195.88776"
@@ -689,20 +692,23 @@
        xml:space="preserve"
        style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:125%;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#aa4400;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:24;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
        x="199.21805"
-       y="-9.6079397"
+       y="432.21884"
        id="text27455"
-       sodipodi:linespacing="125%"
-       transform="translate(0,435.82679)"><tspan
+       sodipodi:linespacing="125%"><tspan
          id="tspan27465"
-         y="-9.6079397"
+         y="432.21884"
          x="199.21805"
-         sodipodi:role="line">The Wiki pages are similar to the documents.</tspan><tspan
+         sodipodi:role="line">The Wiki pages are <tspan
+   style="font-weight:bold"
+   id="tspan5103">similar to the documents.</tspan></tspan><tspan
          id="tspan16055"
-         y="5.3920603"
+         y="447.21884"
          x="199.21805"
-         sodipodi:role="line">However, wikis can be edited by anyone</tspan><tspan
+         sodipodi:role="line">However, wikis <tspan
+   style="font-weight:bold"
+   id="tspan5101">can be edited by anyone</tspan></tspan><tspan
          id="tspan16057"
-         y="20.392059"
+         y="462.21884"
          x="199.21805"
          sodipodi:role="line">and not only by the group members</tspan></text>
   </g>
@@ -718,23 +724,23 @@
      ns1:version="11.11-07001323"
      id="sozi-style">#sozi-toc text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}#sozi-toc text:hover{fill:#0cf;cursor:pointer}#sozi-toc text.sozi-toc-current{fill:#fa4}#sozi-toc-background{stroke:#222;stroke-opacity:.1;stroke-width:10;fill:#222;fill-opacity:.9}.sozi-toc-arrow{fill:#eff;fill-opacity:.75;stroke:none}.sozi-toc-arrow:hover{fill:#0cf}</style>
   <ns1:frame
-     ns1:transition-profile="linear"
+     ns1:refid="rect4591"
+     ns1:sequence="1"
+     ns1:transition-duration-ms="1000"
+     ns1:hide="true"
+     ns1:clip="true"
+     ns1:title="intro"
+     ns1:transition-zoom-percent="0"
+     ns1:timeout-ms="5000"
      ns1:timeout-enable="false"
-     ns1:timeout-ms="5000"
-     ns1:transition-zoom-percent="0"
-     ns1:title="intro"
-     ns1:clip="true"
-     ns1:hide="true"
-     ns1:transition-duration-ms="1000"
-     ns1:sequence="1"
-     ns1:refid="rect4591" />
+     ns1:transition-profile="linear" />
   <ns1:frame
      ns1:refid="rect8725"
      ns1:sequence="2"
      ns1:transition-duration-ms="1000"
      ns1:hide="true"
      ns1:clip="true"
-     ns1:title="asdocs"
+     ns1:title="edited"
      ns1:transition-zoom-percent="0"
      ns1:timeout-ms="5000"
      ns1:timeout-enable="false"
@@ -744,12 +750,23 @@
      ns1:timeout-enable="false"
      ns1:timeout-ms="5000"
      ns1:transition-zoom-percent="0"
-     ns1:title="new"
+     ns1:title="speeds"
      ns1:clip="true"
      ns1:hide="true"
      ns1:transition-duration-ms="1000"
+     ns1:sequence="3"
+     ns1:refid="rect7368" />
+  <ns1:frame
+     ns1:refid="rect6444"
      ns1:sequence="4"
-     ns1:refid="rect6444" />
+     ns1:transition-duration-ms="1000"
+     ns1:hide="true"
+     ns1:clip="true"
+     ns1:title="new"
+     ns1:transition-zoom-percent="0"
+     ns1:timeout-ms="5000"
+     ns1:timeout-enable="false"
+     ns1:transition-profile="linear" />
   <ns1:frame
      ns1:transition-profile="linear"
      ns1:timeout-enable="false"
@@ -761,15 +778,4 @@
      ns1:transition-duration-ms="1000"
      ns1:sequence="5"
      ns1:refid="rect14204" />
-  <ns1:frame
-     ns1:transition-profile="linear"
-     ns1:timeout-enable="false"
-     ns1:timeout-ms="5000"
-     ns1:transition-zoom-percent="0"
-     ns1:title="fast"
-     ns1:clip="true"
-     ns1:hide="true"
-     ns1:transition-duration-ms="1000"
-     ns1:sequence="3"
-     ns1:refid="rect7368" />
 </svg>




More information about the kune-commits mailing list