[kune-commits] r1822 - in trunk: debian src/main/java/cc/kune/core/client/rpcservices src/main/java/cc/kune/core/public src/main/java/cc/kune/core/server/rack/filters/gwts src/main/java/cc/kune/core/server/rpc src/main/java/com/google/wave/splash/text src/main/java/com/google/wave/splash/web/template
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Tue Apr 3 02:06:46 CEST 2012
Author: vjrj_
Date: 2012-04-03 02:06:45 +0200 (Tue, 03 Apr 2012)
New Revision: 1822
Modified:
trunk/debian/changelog
trunk/debian/files
trunk/src/main/java/cc/kune/core/client/rpcservices/UserService.java
trunk/src/main/java/cc/kune/core/public/ws.css
trunk/src/main/java/cc/kune/core/server/rack/filters/gwts/DelegatedRemoteServlet.java
trunk/src/main/java/cc/kune/core/server/rpc/UserRPC.java
trunk/src/main/java/com/google/wave/splash/text/ContentRenderer.java
trunk/src/main/java/com/google/wave/splash/web/template/ThreadedWaveRenderer.java
Log:
NEW - # 210: Many issues with public waves seen from anonymous user
http://kune.ourproject.org/issues/ticket/210
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2012-04-02 20:21:41 UTC (rev 1821)
+++ trunk/debian/changelog 2012-04-03 00:06:45 UTC (rev 1822)
@@ -1,3 +1,9 @@
+kune (0.1.0+b7) oneiric; urgency=low
+
+ * Improved openfire connection. Improved debian init
+
+ -- Vicente J. Ruiz Jurado <vjrj at ourproject.org> Mon, 02 Apr 2012 22:51:59 +0200
+
kune (0.1.0+b6) oneiric; urgency=low
* Several bug fixes (trash, access list,...)
Modified: trunk/debian/files
===================================================================
--- trunk/debian/files 2012-04-02 20:21:41 UTC (rev 1821)
+++ trunk/debian/files 2012-04-03 00:06:45 UTC (rev 1822)
@@ -1 +1 @@
-kune_0.1.0+b6_all.deb java optional
+kune_0.1.0+b7_all.deb java optional
Modified: trunk/src/main/java/cc/kune/core/client/rpcservices/UserService.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/rpcservices/UserService.java 2012-04-02 20:21:41 UTC (rev 1821)
+++ trunk/src/main/java/cc/kune/core/client/rpcservices/UserService.java 2012-04-03 00:06:45 UTC (rev 1822)
@@ -46,6 +46,15 @@
void changePasswd(String userHash, String oldPassword, String newPassword) throws DefaultException;
+ /**
+ * Check user and hash (this is only used for external auth, like the openfire
+ * chat)
+ *
+ * @param username
+ * the username
+ * @param userHash
+ * the user hash
+ */
void checkUserAndHash(String username, String userHash);
void createUser(UserDTO user, boolean wantPersonalHomepage) throws DefaultException;
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2012-04-02 20:21:41 UTC (rev 1821)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2012-04-03 00:06:45 UTC (rev 1822)
@@ -1604,3 +1604,9 @@
width: auto !important;
}
+/* Wave public (not logged) render (splash) */
+
+div.docEditorContainer div.docEditor div.thread {
+ padding: 0 10px !important;
+}
+
Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/gwts/DelegatedRemoteServlet.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/filters/gwts/DelegatedRemoteServlet.java 2012-04-02 20:21:41 UTC (rev 1821)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/gwts/DelegatedRemoteServlet.java 2012-04-03 00:06:45 UTC (rev 1822)
@@ -35,6 +35,11 @@
import com.googlecode.gwtrpccommlayer.server.GwtRpcCommLayerServlet;
import com.googlecode.gwtrpccommlayer.shared.GwtRpcCommLayerPojoRequest;
+/**
+ * The Class DelegatedRemoteServlet extends GwtRpcCommLayerServlet so allow to
+ * call GWT RPC calls from other systems different than the browser. Check :
+ * http://googlewebtoolkit.blogspot.com.es/2010_07_01_archive.html
+ */
public class DelegatedRemoteServlet extends GwtRpcCommLayerServlet {
public static final Log LOG = LogFactory.getLog(DelegatedRemoteServlet.class);
private static final long serialVersionUID = -7646054921925214953L;
@@ -46,7 +51,19 @@
super(servlet);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.googlecode.gwtrpccommlayer.server.GwtRpcCommLayerServlet#
+ * allowGwtRpcPojoRequest()
+ */
@Override
+ protected boolean allowGwtRpcPojoRequest() {
+ // If we want to restrict the external rpc calls per method or classs
+ return super.allowGwtRpcPojoRequest();
+ }
+
+ @Override
protected void doUnexpectedFailure(final Throwable except) {
except.printStackTrace();
super.doUnexpectedFailure(except);
@@ -64,6 +81,7 @@
}
final Class[] arrParameterClasses = lstParameterClasses.toArray(new Class[0]);
+ // patched here for kune
return service.getClass().getMethod(stressTestRequest.getMethodName(), arrParameterClasses);
}
Modified: trunk/src/main/java/cc/kune/core/server/rpc/UserRPC.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rpc/UserRPC.java 2012-04-02 20:21:41 UTC (rev 1821)
+++ trunk/src/main/java/cc/kune/core/server/rpc/UserRPC.java 2012-04-03 00:06:45 UTC (rev 1822)
@@ -134,6 +134,13 @@
userManager.changePasswd(userId, oldPassword, newPassword, true);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * cc.kune.core.client.rpcservices.UserService#checkUserAndHash(java.lang.
+ * String, java.lang.String)
+ */
@Override
@KuneTransactional
public void checkUserAndHash(final String username, final String passwdOrToken) {
Modified: trunk/src/main/java/com/google/wave/splash/text/ContentRenderer.java
===================================================================
--- trunk/src/main/java/com/google/wave/splash/text/ContentRenderer.java 2012-04-02 20:21:41 UTC (rev 1821)
+++ trunk/src/main/java/com/google/wave/splash/text/ContentRenderer.java 2012-04-03 00:06:45 UTC (rev 1822)
@@ -22,6 +22,8 @@
import java.util.SortedSet;
import java.util.TreeSet;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.waveprotocol.wave.client.editor.content.paragraph.DefaultParagraphHtmlRenderer;
import org.waveprotocol.wave.client.editor.content.paragraph.Paragraph;
import org.waveprotocol.wave.client.editor.content.paragraph.Paragraph.Alignment;
@@ -44,7 +46,6 @@
* @author dhanji at gmail.com (Dhanji R. Prasanna)
*/
public class ContentRenderer {
-
/**
* Represents a marker in content that is either the start or end of an
* annotation or a single element.
@@ -97,6 +98,7 @@
return this.element != null;
}
}
+ public static final Log LOG = LogFactory.getLog(ContentRenderer.class);
private final GadgetRenderer gadgetRenderer;
private boolean identing;
@@ -149,6 +151,7 @@
private void renderElement(final Element element, final int index, final List<String> contributors,
final StringBuilder builder) {
final ElementType type = element.getType();
+
switch (type) {
case LINE:
final String t = element.getProperty(Line.LINE_TYPE);
@@ -167,6 +170,8 @@
builder.append("</div> <!-- end h1/h2... header -->");
inheader = false;
}
+ // NOTE: if there exists problems with <br/> or newlines check the
+ // "TODO expensive and silly" comment below
if (t != null && t.equals(Paragraph.LIST_TYPE)) {
// type-0 to 2, margin 22px * i <li class="bullet-type-0"
@@ -199,6 +204,7 @@
fontWeight).append(";\">");
inheader = true;
}
+
// TODO(anthonybaxter): need to handle <line t="li"> and <line t="li"
// i="3">
// TODO(anthonybaxter): also handle H1 &c
@@ -317,6 +323,7 @@
}
// Replace empty paragraphs. (TODO expensive and silly)
- return builder.append("</ul>").toString().replace("<p>\n</p>", "<p><br/></p>");
+ return builder.append("</ul>").toString().replaceAll("<p>\n</p>", "<p><br/></p>").replaceAll(
+ "<p>\n<div style=\"font-size", "<p><br/><div style=\"font-size");
}
}
Modified: trunk/src/main/java/com/google/wave/splash/web/template/ThreadedWaveRenderer.java
===================================================================
--- trunk/src/main/java/com/google/wave/splash/web/template/ThreadedWaveRenderer.java 2012-04-02 20:21:41 UTC (rev 1821)
+++ trunk/src/main/java/com/google/wave/splash/web/template/ThreadedWaveRenderer.java 2012-04-03 00:06:45 UTC (rev 1822)
@@ -391,35 +391,39 @@
final StringBuilder authorString = new StringBuilder();
final int numberOfAuthors = authors.size();
final int len = Math.min(3, numberOfAuthors);
- for (int i = 0; i < len; i++) {
- authorString.append("<div class='authorbar ");
- if (i == 0) {
- authorString.append("first");
+ if (blipData.isRoot()) {
+ blip.put("authorCountClass", "author-count-root");
+ } else {
+ for (int i = 0; i < len; i++) {
+ authorString.append("<div class='authorbar ");
+ if (i == 0) {
+ authorString.append("first");
+ }
+ authorString.append("'><div class=\"avatar\"><img src=\"");
+ final ParticipantProfile author = authors.get(i);
+ authorString.append(author.getImageUrl());
+ authorString.append("\" alt=\"");
+
+ final String name = author.getName();
+ authorString.append(name);
+ authorString.append("\"><span class=\"name\" title=\"");
+ authorString.append(name);
+ authorString.append("\">");
+ authorString.append(name);
+ authorString.append("</span></div></div>");
}
- authorString.append("'><div class=\"avatar\"><img src=\"");
- final ParticipantProfile author = authors.get(i);
- authorString.append(author.getImageUrl());
- authorString.append("\" alt=\"");
- final String name = author.getName();
- authorString.append(name);
- authorString.append("\"><span class=\"name\" title=\"");
- authorString.append(name);
- authorString.append("\">");
- authorString.append(name);
- authorString.append("</span></div></div>");
- }
+ if (numberOfAuthors > 3) {
+ authorString.append("<div class=\"authorbar\">");
+ authorString.append("<div class=\"author-more\">+");
+ authorString.append(numberOfAuthors);
+ authorString.append(" others</div>");
+ authorString.append("</div>");
- if (numberOfAuthors > 3) {
- authorString.append("<div class=\"authorbar\">");
- authorString.append("<div class=\"author-more\">+");
- authorString.append(numberOfAuthors);
- authorString.append(" others</div>");
- authorString.append("</div>");
-
- blip.put("authorCountClass", "author-count-many");
- } else {
- blip.put("authorCountClass", "author-count-" + contributors.size());
+ blip.put("authorCountClass", "author-count-many");
+ } else {
+ blip.put("authorCountClass", "author-count-" + contributors.size());
+ }
}
blip.put("authorString", authorString.toString());
More information about the kune-commits
mailing list