[kune-commits] r1347 - in trunk/src: main/java/cc/kune/common/client/ui/dialogs main/java/cc/kune/common/client/ui/dialogs/tabbed main/java/cc/kune/common/public main/java/cc/kune/core/public main/java/cc/kune/core/server/state main/java/cc/kune/gspace/client/options/license main/java/cc/kune/gspace/client/options/logo main/java/cc/kune/gspace/client/options/pscape main/java/cc/kune/gspace/client/options/tools test/java/cc/kune/core/server/access test/java/cc/kune/core/server/integration/content test/java/org/ourproject/kune

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Thu May 5 18:19:38 CEST 2011


Author: vjrj_
Date: 2011-05-05 18:19:38 +0200 (Thu, 05 May 2011)
New Revision: 1347

Removed:
   trunk/src/test/java/org/ourproject/kune/rack/
Modified:
   trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.java
   trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.ui.xml
   trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
   trunk/src/main/java/cc/kune/common/public/kune-common.css
   trunk/src/main/java/cc/kune/core/public/ws.css
   trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java
   trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java
   trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPanel.java
   trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java
   trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfPanel.java
   trunk/src/test/java/cc/kune/core/server/access/FinderTest.java
   trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceSaveTest.java
Log:
Options UI and test fixes

Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.java	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.java	2011-05-05 16:19:38 UTC (rev 1347)
@@ -51,7 +51,7 @@
   @UiField
   IconLabel title;
   @UiField
-  VerticalPanel vp;
+  FlowPanel vp;
 
   public BasicDialog() {
     initWidget(uiBinder.createAndBindUi(this));

Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.ui.xml	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.ui.xml	2011-05-05 16:19:38 UTC (rev 1347)
@@ -4,10 +4,9 @@
   <g:VerticalPanel spacing="12"
     addStyleNames="k-dialog-outerp, k-bottom-10corners">
     <g:SimplePanel>
-      <g:VerticalPanel addStyleNames="k-dialog-innerp, k-3corners"
-        spacing="10">
-        <k:IconLabel ui:field="title" addStyleNames="k-dialog-title" />
-          <g:VerticalPanel ui:field="vp" />
+      <g:VerticalPanel addStyleNames="k-dialog-innerp, k-3corners">
+        <k:IconLabel ui:field="title" addStyleNames="k-dialog-title, " />
+          <g:FlowPanel ui:field="vp" addStyleNames="kune-Margin-Medium-trbl" />
         <g:VerticalPanel ui:field="bottomPanel" width="100%"></g:VerticalPanel>
       </g:VerticalPanel>
     </g:SimplePanel>

Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java	2011-05-05 16:19:38 UTC (rev 1347)
@@ -94,6 +94,7 @@
         dialogId).sndButtonTitle(sndBtnTitle).title(title).build();
     messageErrorBar = new MessageToolbar(images, errorLabelId);
     tabPanel = new DecoratedTabPanel();
+    tabPanel.getDeckPanel().setSize(String.valueOf(width), String.valueOf(height));
     dialog.getInnerPanel().add(tabPanel);
   }
 

Modified: trunk/src/main/java/cc/kune/common/public/kune-common.css
===================================================================
--- trunk/src/main/java/cc/kune/common/public/kune-common.css	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/main/java/cc/kune/common/public/kune-common.css	2011-05-05 16:19:38 UTC (rev 1347)
@@ -138,7 +138,7 @@
   color: #552200;
   font-size: 20px;
   font-weight: bold;
-  margin: 5px 0 5px 10px;
+  margin: 10px 0 10px 10px;
 }
 
 .k-dialog-innerp {
@@ -156,10 +156,6 @@
   margin: 10px
 }
 
-.k-dialog-innerp table {
-  margin: 5px;
-}
-
 .k-dialog-btn {
   text-shadow: 1px 1px 1px #FFFFFF;
   font-weight: bold;
@@ -638,4 +634,20 @@
 
 .k-btn-min {
   min-width: 19px !important;
-}
\ No newline at end of file
+}
+
+.k-overflow-y-scroll {
+  overflow-y: scroll;
+}
+.k-overflow-y-auto {
+  overflow-y: auto;
+}
+.k-overflow-x-scroll {
+  overflow-x: scroll;
+}
+
+.k-tab-panel {
+    padding: 10px;
+    background-color: #F2F0F0;
+    border: 1px solid #D0D0D0;
+}

Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/main/java/cc/kune/core/public/ws.css	2011-05-05 16:19:38 UTC (rev 1347)
@@ -90,52 +90,6 @@
 
 }
 
-.gwt-TabPanel {
-
-}
-
-.gwt-TabPanelBottom {
-  border-left: 1px solid #87b3ff;
-  border-right: 1px solid #87b3ff;
-  border-bottom: 1px solid #87b3ff;
-}
-
-.gwt-TabBar {
-  font-size: smaller;
-}
-
-.gwt-TabBar .gwt-TabBarFirst {
-  height: 100%;
-  border-bottom: 1px solid #87b3ff;
-  border-right: 1px solid #87b3ff;
-  padding-left: 3px;
-}
-
-.gwt-TabBar .gwt-TabBarRest {
-  border-bottom: 1px solid #87b3ff;
-  padding-right: 3px;
-}
-
-.gwt-TabBar .gwt-TabBarItem {
-  border-top: 1px solid #87b3ff;
-  border-bottom: 1px solid #87b3ff;
-  padding: 2px;
-  cursor: hand;
-  white-space: nowrap;
-  border-right: 1px solid #87b3ff;
-}
-
-.gwt-TabBar .gwt-TabBarItem-selected {
-  font-weight: bold;
-  background-color: #e8eef7;
-  border-top: 1px solid #87b3ff;
-  border-right: 1px solid #87b3ff;
-  border-bottom: 1px solid #e8eef7;
-  padding: 2px;
-  cursor: default;
-  white-space: nowrap;
-}
-
 .gwt-PushButton-up {
   background-color: #C3D9FF;
   padding: 2px;
@@ -1203,4 +1157,90 @@
 
 .k-table-cell {
   display: table-cell;
-}
\ No newline at end of file
+}
+
+/* Decorated tabbar */
+
+.gwt-DecoratedTabBar {
+}
+.gwt-DecoratedTabBar .gwt-TabBarFirst {
+  width: 5px;  /* first tab distance from the left */
+}
+.gwt-DecoratedTabBar .gwt-TabBarRest {
+}
+.gwt-DecoratedTabBar .gwt-TabBarItem {
+  border-collapse: collapse;
+  margin-left: 6px;
+}
+.gwt-DecoratedTabBar .tabTopCenter {
+  padding: 0px;
+  background: #e3e3e3;
+}
+.gwt-DecoratedTabBar .tabTopLeft,
+.gwt-DecoratedTabBar .tabTopRight {
+  padding: 0px;
+  zoom: 1;
+}
+.gwt-DecoratedTabBar .tabTopLeftInner,
+.gwt-DecoratedTabBar .tabTopRightInner {
+  width: 6px;
+  height: 6px;
+}
+.gwt-DecoratedTabBar .tabTopLeft {
+  background: url(images/corner.png) no-repeat 0px -55px;
+  -background: url(images/corner_ie6.png) no-repeat 0px -55px;
+}
+.gwt-DecoratedTabBar .tabTopRight {
+  background: url(images/corner.png) no-repeat -6px -55px;
+  -background: url(images/corner_ie6.png) no-repeat -6px -55px;
+}
+* html .gwt-DecoratedTabBar .tabTopLeftInner,
+* html .gwt-DecoratedTabBar .tabTopRightInner {
+  width: 6px;
+  height: 6px;
+  overflow: hidden;
+}
+.gwt-DecoratedTabBar .tabMiddleLeft,
+.gwt-DecoratedTabBar .tabMiddleRight {
+  width: 6px;
+  padding: 0px;
+  background: #e3e3e3 url(images/hborder.png) repeat-x 0px -1463px;
+}
+.gwt-DecoratedTabBar .tabMiddleLeftInner,
+.gwt-DecoratedTabBar .tabMiddleRightInner {
+  width: 1px;
+  height: 1px;
+}
+.gwt-DecoratedTabBar .tabMiddleCenter {
+  padding: 0px 4px 2px 4px;
+  cursor: pointer;
+  cursor: hand;
+  color: black;
+  font-weight: bold;
+  text-align: center;
+  background: #e3e3e3 url(images/hborder.png) repeat-x 0px -1463px;
+}
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter {
+  background: #747474;
+}
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
+  background-position: 0px -61px;
+}
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
+  background-position: -6px -61px;
+}
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft,
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight {
+  background: #bcbcbc url(images/hborder.png) repeat-x 0px -2511px;
+}
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleCenter {
+  cursor: default;
+  background: #bcbcbc url(images/hborder.png) repeat-x 0px -2511px;
+  color: white;
+}
+.gwt-DecoratedTabBar .gwt-TabBarItem-disabled .tabMiddleCenter {
+  cursor: default;
+  color: #999999;
+}
+
+/* end Decorated tabbar */

Modified: trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java	2011-05-05 16:19:38 UTC (rev 1347)
@@ -19,8 +19,6 @@
  */
 package cc.kune.core.server.state;
 
-import java.sql.Date;
-
 import org.waveprotocol.wave.model.waveref.InvalidWaveRefException;
 import org.waveprotocol.wave.util.escapers.jvm.JavaWaverefEncoder;
 
@@ -110,13 +108,14 @@
       try {
         final Wavelet wavelet = kuneWaveManager.fetchWavelet(
             JavaWaverefEncoder.decodeWaveRefFromPath(waveId), content.getAuthors().get(0).getShortName());
-        state.setContent(wavelet.getRootBlip().getContent());
+        final String currentContent = wavelet.getRootBlip().getContent();
+        state.setContent(currentContent);
         // Well we "cache" the last modified time of waves in db (w'll find
-        // another way to
-        // do it better in the future with db persitence of waves)
+        // another way to do it better in the future with db persitence of
+        // waves)
         contentManager.setModifiedOn(content, wavelet.getLastModifiedTime());
+        // contentManager.save(userLogged, content, currentContent);
         state.setTitle(wavelet.getTitle());
-        state.setModifiedOn(new Date(wavelet.getLastModifiedTime()));
         state.setIsParticipant(userLogged != User.UNKNOWN_USER ? kuneWaveManager.isParticipant(wavelet,
             userLogged.getShortName()) : false);
       } catch (final InvalidWaveRefException e) {

Modified: trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java	2011-05-05 16:19:38 UTC (rev 1347)
@@ -30,10 +30,10 @@
 import com.google.gwt.event.dom.client.HasClickHandlers;
 import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.Image;
 import com.google.gwt.user.client.ui.IsWidget;
 import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.VerticalPanel;
 
 public class EntityOptionsDefLicensePanel extends Composite implements EntityOptionsDefLicenseView {
 
@@ -43,19 +43,20 @@
 
   public EntityOptionsDefLicensePanel(final I18nTranslationService i18n, final CoreResources res) {
     tabTitle = new IconLabel(res.copyleft(), i18n.t("License"));
-    tabTitle.setHeight("22px");
-    final VerticalPanel vp = new VerticalPanel();
+    final FlowPanel flow = new FlowPanel();
     final Label intro = new Label();
     intro.setWordWrap(true);
     intro.setText(i18n.t("This is the default license for all the contents of this group (you can also select another different license per content):"));
-    vp.add(intro);
+    flow.add(intro);
     licenseImage = new Image();
-    vp.add(licenseImage);
+    flow.add(licenseImage);
     licenseImage.addStyleName("kune-pointer");
     change = new Button(i18n.t("Change"));
-    initWidget(vp);
-    super.setHeight(String.valueOf(EntityOptionsView.HEIGHT));
-    super.setWidth(String.valueOf(EntityOptionsView.WIDTH));
+    initWidget(flow);
+    flow.setHeight(String.valueOf(EntityOptionsView.HEIGHT) + "px");
+    flow.setWidth(String.valueOf(EntityOptionsView.WIDTH) + "px");
+    flow.addStyleName("k-overflow-y-auto");
+    flow.addStyleName("k-tab-panel");
   }
 
   @Override

Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPanel.java	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPanel.java	2011-05-05 16:19:38 UTC (rev 1347)
@@ -22,7 +22,6 @@
 import cc.kune.common.client.log.Log;
 import cc.kune.common.client.ui.IconLabel;
 import cc.kune.common.client.utils.OnAcceptCallback;
-import cc.kune.common.client.utils.TextUtils;
 import cc.kune.core.client.resources.CoreMessages;
 import cc.kune.core.client.resources.nav.NavResources;
 import cc.kune.core.client.services.FileConstants;
@@ -46,173 +45,173 @@
 
 public class EntityOptionsLogoPanel extends Composite implements EntityOptionsLogoView {
 
-    public static final String ICON_UPLD_SERVLET = "servlets/EntityLogoUploadManager";
-    private final Label dialogInfoLabel;
-    private final FileUpload fileUpload = new FileUpload();
-    private final FormPanel form = new FormPanel();
-    private final I18nTranslationService i18n;
-    private OnAcceptCallback onAccept;
-    private final IconLabel tabTitle;
-    private final Hidden tokenField;
-    private final Hidden userhashField;
+  public static final String ICON_UPLD_SERVLET = "servlets/EntityLogoUploadManager";
+  private final Label dialogInfoLabel;
+  private final FileUpload fileUpload = new FileUpload();
+  private final FormPanel form = new FormPanel();
+  private final I18nTranslationService i18n;
+  private OnAcceptCallback onAccept;
+  private final IconLabel tabTitle;
+  private final Hidden tokenField;
+  private final Hidden userhashField;
 
-    // private final TextField file;
+  // private final TextField file;
 
-    public EntityOptionsLogoPanel(final EventBus eventBus, final I18nTranslationService i18n, final String panelId,
-            final String buttonId, final String inputId, final NavResources res) {
-        super();
-        this.i18n = i18n;
-        tabTitle = new IconLabel(res.picture(), "");
-        // super.setButtonAlign(HorizontalAlignment.LEFT);
-        // super.setFrame(true);
-        // super.setAutoScroll(false);
-        // super.setBorder(false);
-        // super.setFileUpload(true);
-        // super.setWidth(400);
-        // super.setIconCls("k-picture-icon");
-        // super.setMethod(Method.POST);
-        // super.setUrl(ICON_UPLD_SERVLET);
-        // super.setWaitMsgTarget(true);
-        // super.setHideLabels(true);
-        // super.setPadding(10);
-        // super.addFormListener(new FormListener() {
-        // @Override
-        // public boolean doBeforeAction(final Form form) {
-        // return true;
-        // }
-        //
-        // @Override
-        // public void onActionComplete(final Form form, final int httpStatus,
-        // final String responseText) {
-        // presenter.onSubmitComplete(httpStatus, responseText);
-        // }
-        //
-        // @Override
-        // public void onActionFailed(final Form form, final int httpStatus,
-        // final String responseText) {
-        // presenter.onSubmitFailed(httpStatus, responseText);
-        // }
-        // });
-        // super.add(dialogInfoLabel);
-        // file = new TextField("File", inputId);
-        // final EventCallback keyListener = new EventCallback() {
-        // @Override
-        // public void execute(final EventObject e) {
-        // // setEnableFileField();
-        // }
-        // };
-        // file.addKeyPressListener(keyListener);
-        // file.setId(inputId);
-        // file.setInputType("file");
-        // super.add(file);
-        // final FieldListenerAdapter changeListener = new
-        // FieldListenerAdapter() {
-        // @Override
-        // public void onChange(final Field field, final Object newVal, final
-        // Object oldVal) {
-        // NotifyUser.info("change");
-        // // setEnableFileField();
-        // }
-        // };
-        // // Don't works:
-        // file.addListener(changeListener);
-        // setId(panelId);
-        //
-        // sendButton.setId(buttonId);
-        // super.addButton(sendButton);
+  public EntityOptionsLogoPanel(final EventBus eventBus, final I18nTranslationService i18n,
+      final String panelId, final String buttonId, final String inputId, final NavResources res) {
+    super();
+    this.i18n = i18n;
+    tabTitle = new IconLabel(res.picture(), "");
+    // super.setButtonAlign(HorizontalAlignment.LEFT);
+    // super.setFrame(true);
+    // super.setAutoScroll(false);
+    // super.setBorder(false);
+    // super.setFileUpload(true);
+    // super.setWidth(400);
+    // super.setIconCls("k-picture-icon");
+    // super.setMethod(Method.POST);
+    // super.setUrl(ICON_UPLD_SERVLET);
+    // super.setWaitMsgTarget(true);
+    // super.setHideLabels(true);
+    // super.setPadding(10);
+    // super.addFormListener(new FormListener() {
+    // @Override
+    // public boolean doBeforeAction(final Form form) {
+    // return true;
+    // }
+    //
+    // @Override
+    // public void onActionComplete(final Form form, final int httpStatus,
+    // final String responseText) {
+    // presenter.onSubmitComplete(httpStatus, responseText);
+    // }
+    //
+    // @Override
+    // public void onActionFailed(final Form form, final int httpStatus,
+    // final String responseText) {
+    // presenter.onSubmitFailed(httpStatus, responseText);
+    // }
+    // });
+    // super.add(dialogInfoLabel);
+    // file = new TextField("File", inputId);
+    // final EventCallback keyListener = new EventCallback() {
+    // @Override
+    // public void execute(final EventObject e) {
+    // // setEnableFileField();
+    // }
+    // };
+    // file.addKeyPressListener(keyListener);
+    // file.setId(inputId);
+    // file.setInputType("file");
+    // super.add(file);
+    // final FieldListenerAdapter changeListener = new
+    // FieldListenerAdapter() {
+    // @Override
+    // public void onChange(final Field field, final Object newVal, final
+    // Object oldVal) {
+    // NotifyUser.info("change");
+    // // setEnableFileField();
+    // }
+    // };
+    // // Don't works:
+    // file.addListener(changeListener);
+    // setId(panelId);
+    //
+    // sendButton.setId(buttonId);
+    // super.addButton(sendButton);
 
-        dialogInfoLabel = new Label();
-        dialogInfoLabel.setWordWrap(true);
+    dialogInfoLabel = new Label();
+    dialogInfoLabel.setWordWrap(true);
+    dialogInfoLabel.addStyleName("kune-Margin-20-tb");
+    form.setEncoding(FormPanel.ENCODING_MULTIPART);
+    form.setMethod(FormPanel.METHOD_POST);
+    form.setAction(GWT.getModuleBaseURL() + ICON_UPLD_SERVLET);
 
-        form.setEncoding(FormPanel.ENCODING_MULTIPART);
-        form.setMethod(FormPanel.METHOD_POST);
-        form.setAction(GWT.getModuleBaseURL() + ICON_UPLD_SERVLET);
+    userhashField = new Hidden(FileConstants.HASH, FileConstants.HASH);
+    tokenField = new Hidden(FileConstants.TOKEN, FileConstants.TOKEN);
 
-        userhashField = new Hidden(FileConstants.HASH, FileConstants.HASH);
-        tokenField = new Hidden(FileConstants.TOKEN, FileConstants.TOKEN);
+    final VerticalPanel holder = new VerticalPanel();
 
-        final VerticalPanel holder = new VerticalPanel();
+    fileUpload.setName("upload");
+    holder.add(dialogInfoLabel);
+    holder.add(fileUpload);
+    holder.add(userhashField);
+    holder.add(tokenField);
+    holder.add(new Button(i18n.t("Send"), new ClickHandler() {
+      @Override
+      public void onClick(final ClickEvent event) {
+        Log.info("You selected: " + fileUpload.getFilename(), null);
+        form.submit();
+      }
+    }));
 
-        fileUpload.setName("upload");
-        holder.add(dialogInfoLabel);
-        holder.add(fileUpload);
-        holder.add(userhashField);
-        holder.add(tokenField);
-        holder.add(new Button(i18n.t("Send"), new ClickHandler() {
-            @Override
-            public void onClick(final ClickEvent event) {
-                Log.info("You selected: " + fileUpload.getFilename(), null);
-                form.submit();
-            }
-        }));
+    form.addSubmitHandler(new FormPanel.SubmitHandler() {
+      @Override
+      public void onSubmit(final SubmitEvent event) {
+        // final String filename = file.getValueAsString();
+        // if (filename != null && filename.length() > 0) {
+        // getForm().submit();
+        // }
 
-        form.addSubmitHandler(new FormPanel.SubmitHandler() {
-            @Override
-            public void onSubmit(final SubmitEvent event) {
-                // final String filename = file.getValueAsString();
-                // if (filename != null && filename.length() > 0) {
-                // getForm().submit();
-                // }
+        if (!"".equalsIgnoreCase(fileUpload.getFilename())) {
+          GWT.log("UPLOADING FILE????", null);
+          // NOW WHAT????
+        } else {
+          event.cancel(); // cancel the event
+        }
 
-                if (!"".equalsIgnoreCase(fileUpload.getFilename())) {
-                    GWT.log("UPLOADING FILE????", null);
-                    // NOW WHAT????
-                } else {
-                    event.cancel(); // cancel the event
-                }
+      }
+    });
 
-            }
-        });
+    form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {
+      @Override
+      public void onSubmitComplete(final SubmitCompleteEvent event) {
+        CurrentLogoChangedEvent.fire(eventBus);
+      }
+    });
+    form.add(holder);
+    initWidget(form);
+    setHeight(String.valueOf(EntityOptionsView.HEIGHT) + "px");
+    setWidth(String.valueOf(EntityOptionsView.WIDTH) + "px");
+    addStyleName("k-overflow-y-auto");
+    addStyleName("k-tab-panel");
+  }
 
-        form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {
-            @Override
-            public void onSubmitComplete(final SubmitCompleteEvent event) {
-                CurrentLogoChangedEvent.fire(eventBus);
-            }
-        });
-        form.add(holder);
-        initWidget(form);
-        setHeight(String.valueOf(EntityOptionsView.HEIGHT));
-        setWidth(String.valueOf(EntityOptionsView.WIDTH));
-    }
+  @Override
+  public OnAcceptCallback getOnSubmit() {
+    // TODO Auto-generated method stub
+    return null;
+  }
 
-    @Override
-    public OnAcceptCallback getOnSubmit() {
-        // TODO Auto-generated method stub
-        return null;
-    }
+  @Override
+  public IsWidget getTabTitle() {
+    return tabTitle;
+  }
 
-    @Override
-    public IsWidget getTabTitle() {
-        return tabTitle;
-    }
+  public void reset() {
+    form.reset();
+  }
 
-    public void reset() {
-        form.reset();
-    }
+  @Override
+  public void setNormalGroupsLabels() {
+    dialogInfoLabel.setText(i18n.t("Select an image in your computer as the logo for this group. "
+        + "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
+        FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT));
+    tabTitle.setText(CoreMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE);
+  }
 
-    @Override
-    public void setNormalGroupsLabels() {
-        dialogInfoLabel.setText(i18n.t("Select an image in your computer as the logo for this group. "
-                + "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
-                FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT)
-                + TextUtils.brbr());
-        tabTitle.setText(CoreMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE);
-    }
+  @Override
+  public void setPersonalGroupsLabels() {
+    dialogInfoLabel.setText(i18n.t("Select an image in your computer as your avatar. "
+        + "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
+        FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT));
+    tabTitle.setText(CoreMessages.ENT_LOGO_SELECTOR_PERSON_TITLE);
+  }
 
-    @Override
-    public void setPersonalGroupsLabels() {
-        dialogInfoLabel.setText(i18n.t("Select an image in your computer as your avatar. "
-                + "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
-                FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT)
-                + "<br/><br/>");
-        tabTitle.setText(CoreMessages.ENT_LOGO_SELECTOR_PERSON_TITLE);
-    }
+  @Override
+  public void setUploadParams(final String userHash, final String token) {
+    userhashField.setValue(userHash);
+    tokenField.setValue(token);
+  }
 
-    @Override
-    public void setUploadParams(final String userHash, final String token) {
-        userhashField.setValue(userHash);
-        tokenField.setValue(token);
-    }
-
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java	2011-05-05 16:19:38 UTC (rev 1347)
@@ -35,13 +35,14 @@
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.event.dom.client.HasClickHandlers;
 import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.Image;
 import com.google.gwt.user.client.ui.IsWidget;
 import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.VerticalPanel;
 
-public class EntityOptionsPublicSpaceConfPanel extends VerticalPanel implements
+public class EntityOptionsPublicSpaceConfPanel extends FlowPanel implements
     EntityOptionsPublicSpaceConfView {
 
   private final Image backImage;
@@ -55,13 +56,8 @@
       final FileDownloadUtils downUtils, final CoreResources res) {
     this.downUtils = downUtils;
     tabTitle = new IconLabel(res.themeChoose(), i18n.t("Style"));
-    // super.setIconCls("k-colors-icon");
-    // super.setAutoScroll(true);
-    // super.setBorder(false);
-    super.setHeight(String.valueOf(EntityOptionsView.HEIGHT));
-    super.setWidth(String.valueOf(EntityOptionsView.WIDTH));
-    // super.setFrame(true);
-    // super.setPaddings(10);
+    super.setHeight(String.valueOf(EntityOptionsView.HEIGHT) + "px");
+    super.setWidth(String.valueOf(EntityOptionsView.WIDTH) + "px");
 
     final HorizontalPanel wsHP = new HorizontalPanel();
     final Label wsThemeInfo = new Label(i18n.t("Change this workspace theme:"));
@@ -92,7 +88,7 @@
 
       @Override
       public void onClick(final ClickEvent event) {
-        NotifyUser.info(TextUtils.IN_DEVELOPMENT_P);
+        NotifyUser.info(TextUtils.IN_DEVELOPMENT);
       }
     };
     for (int i = 1; i <= 6; i++) {
@@ -103,6 +99,8 @@
     }
     add(stylesPanel);
     setBackImageVisibleImpl(false);
+    super.addStyleName("k-overflow-y-auto");
+    super.addStyleName("k-tab-panel");
   }
 
   @Override

Modified: trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfPanel.java	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfPanel.java	2011-05-05 16:19:38 UTC (rev 1347)
@@ -48,12 +48,14 @@
   public EntityOptionsToolsConfPanel(final I18nTranslationService i18n, final CoreResources res) {
     tabTitle = new IconLabel(res.kunePreferences(), i18n.t("Tools"));
     this.i18n = i18n;
-    super.setHeight(EntityOptionsView.HEIGHT);
+    // super.setHeight(EntityOptionsView.HEIGHT);
     super.setWidth(EntityOptionsView.WIDTH);
     super.setFrame(true);
     super.add(new HiddenField());
     super.getFormPanel().setLabelWidth(20);
     fields = new HashMap<String, CheckBox>();
+    super.addStyleName("k-overflow-y-auto");
+    // super.addStyleName("k-tab-panel");
   }
 
   @Override
@@ -65,7 +67,6 @@
       @Override
       public void handleEvent(final BaseEvent be) {
         handler.onClick(null);
-        // presenter.onCheck(tool, checked);
       }
     });
     super.add(checkbox);

Modified: trunk/src/test/java/cc/kune/core/server/access/FinderTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/access/FinderTest.java	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/test/java/cc/kune/core/server/access/FinderTest.java	2011-05-05 16:19:38 UTC (rev 1347)
@@ -22,6 +22,7 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 
+import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
 
@@ -76,6 +77,15 @@
     finder.getContent(new StateToken("groupShortName", "toolName", "5", "1"), null);
   }
 
+  @Before
+  public void createSession() {
+    this.groupManager = Mockito.mock(GroupManager.class);
+    this.containerManager = Mockito.mock(ContainerManager.class);
+    this.contentManager = Mockito.mock(ContentManager.class);
+    this.rateManager = Mockito.mock(RateManager.class);
+    this.finder = new FinderServiceDefault(groupManager, containerManager, contentManager, rateManager);
+  }
+
   @Test
   public void getGroupDefaultContent() throws Exception {
     final Group group = new Group();

Modified: trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceSaveTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceSaveTest.java	2011-05-05 14:46:37 UTC (rev 1346)
+++ trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceSaveTest.java	2011-05-05 16:19:38 UTC (rev 1347)
@@ -22,7 +22,6 @@
 import static org.junit.Assert.assertEquals;
 
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import cc.kune.core.server.TestDomainHelper;
@@ -31,39 +30,40 @@
 
 public class ContentServiceSaveTest extends ContentServiceIntegrationTest {
 
-    private StateContentDTO defaultContent;
+  private StateContentDTO defaultContent;
 
-    @Before
-    public void init() throws Exception {
-        new IntegrationTestHelper(this);
-        defaultContent = getSiteDefaultContent();
-        doLogin();
-    }
+  @Before
+  public void init() throws Exception {
+    new IntegrationTestHelper(this);
+    defaultContent = getSiteDefaultContent();
+    doLogin();
+  }
 
-    @Test
-    public void testSaveAndRetrieve() throws Exception {
-        // We set the same content (in this case a wave id)
-        final String text = defaultContent.getWaveRef();
-        final int version = defaultContent.getVersion();
-        contentService.save(getHash(), defaultContent.getStateToken(), text);
-        final StateContentDTO again = (StateContentDTO) contentService.getContent(getHash(),
-                defaultContent.getStateToken());
-        assertEquals(text, again.getWaveRef());
-        assertEquals(version + 1, again.getVersion());
-        assertEquals(0, again.getRateByUsers().intValue());
-        assertEquals(new Double(0), again.getRate());
-    }
+  @Test
+  public void testSaveAndRetrieve() throws Exception {
+    final String text = "Some content";
+    final int version = defaultContent.getVersion();
+    contentService.save(getHash(), defaultContent.getStateToken(), text);
+    final StateContentDTO again = (StateContentDTO) contentService.getContent(getHash(),
+        defaultContent.getStateToken());
+    assertEquals(defaultContent.getWaveRef(), again.getWaveRef());
+    assertEquals(version + 2, again.getVersion());
+    assertEquals(0, again.getRateByUsers().intValue());
+    // Here we fetch the wave content (no the db content)
+    // assertEquals(text, again.getContent());
+    assertEquals(new Double(0), again.getRate());
+  }
 
-    @Ignore
-    @Test
-    public void testSaveAndRetrieveBig() throws Exception {
-        final String text = TestDomainHelper.createBigText();
-        final int version = defaultContent.getVersion();
-        contentService.save(getHash(), defaultContent.getStateToken(), text);
-        final StateContentDTO again = (StateContentDTO) contentService.getContent(getHash(),
-                defaultContent.getStateToken());
-        assertEquals(version + 1, again.getVersion());
-        assertEquals(text, again.getContent());
-    }
+  @Test
+  public void testSaveAndRetrieveBig() throws Exception {
+    final String text = TestDomainHelper.createBigText();
+    final int version = defaultContent.getVersion();
+    contentService.save(getHash(), defaultContent.getStateToken(), text);
+    final StateContentDTO again = (StateContentDTO) contentService.getContent(getHash(),
+        defaultContent.getStateToken());
+    assertEquals(version + 2, again.getVersion());
+    // Here we fetch the wave content (no the db content)
+    // assertEquals(text, again.getContent());
+  }
 
 }




More information about the kune-commits mailing list