[kune-commits] r1103 - in trunk: . script
src/main/java/org/ourproject/kune/platf/client/ui/rte/basic
src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg
src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia
src/main/java/org/ourproject/kune/workspace/client/cnt
vjrj
vjrj at ourproject.org
Wed Apr 29 14:01:32 CEST 2009
Author: vjrj
Date: 2009-04-29 14:01:29 +0200 (Wed, 29 Apr 2009)
New Revision: 1103
Modified:
trunk/DEV-GUIDE
trunk/INSTALL
trunk/TROUBLESHOOT
trunk/script/liquibase-migrate.sh
trunk/script/liquibase-rollback.sh
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/ContentPosition.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/ImageInfo.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/InsertMediaAbstractPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/MediaUtils.java
trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPresenter.java
Log:
Centered videos preview. Some doc improved.
Modified: trunk/DEV-GUIDE
===================================================================
--- trunk/DEV-GUIDE 2009-04-28 12:53:10 UTC (rev 1102)
+++ trunk/DEV-GUIDE 2009-04-29 12:01:29 UTC (rev 1103)
@@ -179,7 +179,7 @@
For start the hosted mode, you can both execute from command line:
- mvn gwt:gwt
+ mvn com.totsp.gwt:maven-googlewebtoolkit2-plugin:gwt
Also, you can generate a hosted mode launch configuration in eclipse. We have a "Run configuration" (Run > Open Run Dialog) in eclipse with Project: "org.ourproject.kune" with Main class: "com.google.gwt.dev.GWTShell", with this program arguments (or similar): "-noserver -out gwt-out /kune/?locale=en&log_level=INFO -port 8080" and in the "Classpath User Entries":
* gwt-dev-[linux|mac|windows].jar (Add External Jar and choose it from your gwt installation directory)
@@ -190,7 +190,7 @@
-Xmx512M
before run hosted mode compile once with:
- mvn gwt:compile
+ mvn com.totsp.gwt:maven-googlewebtoolkit2-plugin:compile
and deploy with:
script/deploy_gwt.sh
and then we run jetty (with "script/server.sh" also you can run server in debug mode, see TROUBLESHOOT). This is quite useful to put breakpoints in the server code.
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2009-04-28 12:53:10 UTC (rev 1102)
+++ trunk/INSTALL 2009-04-29 12:01:29 UTC (rev 1103)
@@ -49,7 +49,7 @@
- Compile with maven:
# (in the trunk directory)
mvn compile -Dliquibase.should.run=false
- mvn gwt:compile
+ mvn com.totsp.gwt:maven-googlewebtoolkit2-plugin:compile
- Copy the target to src directory (only for test):
./script/deploy_gwt.sh
Modified: trunk/TROUBLESHOOT
===================================================================
--- trunk/TROUBLESHOOT 2009-04-28 12:53:10 UTC (rev 1102)
+++ trunk/TROUBLESHOOT 2009-04-29 12:01:29 UTC (rev 1103)
@@ -16,4 +16,13 @@
==Emite troubleshooting==
See:
-http://code.google.com/p/emite/wiki/Troubleshooting
\ No newline at end of file
+http://code.google.com/p/emite/wiki/Troubleshooting
+
+==Liquibase==
+
+=== Checksum errors ===
+
+Migration Failed: Validation Failed:1 change sets failed MD5Sum Check src/main/resources/db/liquibase_changelog.xml :: 18 :: vjrj :: (MD5Sum: bde0aa519108e1e3d1f29bb2483bc9)
+
+Don't try to update the liquibase changelogs you have already use. Better create new ones to delete, update, and so on. If you are developing and want to clear the checksums, you can use the command "clearCheckSums". See script/liquibase-* and http://www.liquibase.org/manual/command_line
+
Modified: trunk/script/liquibase-migrate.sh
===================================================================
--- trunk/script/liquibase-migrate.sh 2009-04-28 12:53:10 UTC (rev 1102)
+++ trunk/script/liquibase-migrate.sh 2009-04-29 12:01:29 UTC (rev 1103)
@@ -1,6 +1,6 @@
java -jar $M2_REPO/org/liquibase/liquibase-core/1.4.1/liquibase-core-1.4.1.jar \
--driver=com.mysql.jdbc.Driver \
- --classpath=~/.m2/repository/mysql/mysql-connector-java/5.0.5/mysql-connector-java-5.0.5.jar \
+ --classpath=$M2_REPO/mysql/mysql-connector-java/5.0.5/mysql-connector-java-5.0.5.jar \
--changeLogFile=src/main/resources/db/liquibase_changelog.xml \
--url="jdbc:mysql://localhost/kune_dev" \
--username=kune \
Modified: trunk/script/liquibase-rollback.sh
===================================================================
--- trunk/script/liquibase-rollback.sh 2009-04-28 12:53:10 UTC (rev 1102)
+++ trunk/script/liquibase-rollback.sh 2009-04-29 12:01:29 UTC (rev 1103)
@@ -1,6 +1,6 @@
java -jar $M2_REPO/org/liquibase/liquibase-core/1.4.1/liquibase-core-1.4.1.jar \
--driver=com.mysql.jdbc.Driver \
- --classpath=~/.m2/repository/mysql/mysql-connector-java/5.0.5/mysql-connector-java-5.0.5.jar \
+ --classpath=$M2_REPO/mysql/mysql-connector-java/5.0.5/mysql-connector-java-5.0.5.jar \
--changeLogFile=src/main/resources/db/liquibase_changelog.xml \
--url="jdbc:mysql://localhost/kune_dev" \
--username=kune \
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java 2009-04-28 12:53:10 UTC (rev 1102)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java 2009-04-29 12:01:29 UTC (rev 1103)
@@ -40,8 +40,8 @@
public class RTEditorPresenter implements RTEditor {
private final String fontNames[] = { "Times New Roman", "Arial", "Courier New", "Georgia", "Trebuchet", "Verdana" };
- private final String fontSizes[] = { "Extra small", "Very small", "Small", "Medium", "Large", "Very large",
- "Extra large" };
+ private final String fontSizes[] = { "Extra small", "Very small (normal)", "Small", "Medium", "Large",
+ "Very large", "Extra large" };
private static final RichTextArea.FontSize[] fontSizesConstants = new RichTextArea.FontSize[] {
RichTextArea.FontSize.XX_SMALL, RichTextArea.FontSize.X_SMALL, RichTextArea.FontSize.SMALL,
RichTextArea.FontSize.MEDIUM, RichTextArea.FontSize.LARGE, RichTextArea.FontSize.X_LARGE,
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/ContentPosition.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/ContentPosition.java 2009-04-28 12:53:10 UTC (rev 1102)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/ContentPosition.java 2009-04-29 12:01:29 UTC (rev 1103)
@@ -5,6 +5,7 @@
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.ui.HTML;
public class ContentPosition {
@@ -16,18 +17,6 @@
private static Object[][] positionObjs;
- public static Element getElementPosition(final Element element, final boolean wraptext, final String position) {
- if (!wraptext || position.equals(ContentPosition.CENTER)) {
- com.google.gwt.user.client.Element divEl = DOM.createDiv();
- CSS.setProperty(divEl, CSS.A.TEXT_ALIGN, position);
- divEl.setInnerHTML(element.getString());
- return divEl;
- } else {
- CSS.setProperty(element, CSS.A.FLOAT, position);
- return element;
- }
- }
-
public static Object[][] getPositions() {
if (positionObjs == null) {
String[][] values = positions;
@@ -40,4 +29,26 @@
}
return positionObjs;
}
+
+ public static String setCenterPosition(final String elementCode) {
+ return setPosition(elementCode, false, CENTER);
+ }
+
+ public static Element setPosition(final Element element, final boolean wraptext, final String position) {
+ if (!wraptext || position.equals(ContentPosition.CENTER)) {
+ com.google.gwt.user.client.Element divEl = DOM.createDiv();
+ CSS.setProperty(divEl, CSS.A.TEXT_ALIGN, position);
+ divEl.setInnerHTML(element.getString());
+ return divEl;
+ } else {
+ CSS.setProperty(element, CSS.A.FLOAT, position);
+ return element;
+ }
+ }
+
+ public static String setPosition(final String elementCode, final boolean wraptext, final String position) {
+ HTML html = new HTML(elementCode);
+ html.removeStyleName("gwt-HTML");
+ return setPosition(html.getElement(), wraptext, position).getString();
+ }
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/ImageInfo.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/ImageInfo.java 2009-04-28 12:53:10 UTC (rev 1102)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/ImageInfo.java 2009-04-29 12:01:29 UTC (rev 1103)
@@ -105,7 +105,7 @@
com.google.gwt.user.client.Element img = DOM.createImg();
DOM.setElementProperty(img, "src", src);
CSS.setProperty(img, CSS.A.WIDTH, getStyleSize());
- return ContentPosition.getElementPosition(img, wraptext, position);
+ return ContentPosition.setPosition(img, wraptext, position);
}
private String getStyleSize() {
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/InsertMediaAbstractPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/InsertMediaAbstractPanel.java 2009-04-28 12:53:10 UTC (rev 1102)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/InsertMediaAbstractPanel.java 2009-04-29 12:01:29 UTC (rev 1103)
@@ -5,7 +5,6 @@
import org.ourproject.kune.platf.client.ui.rte.insertimg.abstractimg.InsertElementAbstractPanel;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.InsertMediaDialogView;
-import com.google.gwt.user.client.ui.HTML;
import com.gwtext.client.widgets.Component;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.form.TextField;
@@ -60,7 +59,7 @@
}
public String setPosition(final String embedElement) {
- return ContentPosition.getElementPosition(new HTML(embedElement).getElement(), getWrapText(), getPosition()).getString();
+ return ContentPosition.setPosition(embedElement, getWrapText(), getPosition());
}
private void defValues() {
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/MediaUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/MediaUtils.java 2009-04-28 12:53:10 UTC (rev 1102)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/MediaUtils.java 2009-04-29 12:01:29 UTC (rev 1103)
@@ -3,6 +3,7 @@
import org.ourproject.kune.platf.client.dto.StateToken;
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
+import org.ourproject.kune.platf.client.ui.rte.insertimg.ContentPosition;
public class MediaUtils {
@@ -18,23 +19,27 @@
}
public String getAviEmbed(final StateToken token) {
- return session.getInitData().getAviEmbedObject().replace(DOC_URL_TAG,
- session.getSiteUrl() + downloadUtils.getUrl(token));
+ return setCenterPosition(session.getInitData().getAviEmbedObject().replace(DOC_URL_TAG,
+ session.getSiteUrl() + downloadUtils.getUrl(token)));
}
public String getFlvEmbed(final StateToken token) {
- return session.getInitData().getFlvEmbedObject().replace(DOC_URL_TAG,
- session.getSiteUrl() + downloadUtils.getUrl(token));
+ return setCenterPosition(session.getInitData().getFlvEmbedObject().replace(DOC_URL_TAG,
+ session.getSiteUrl() + downloadUtils.getUrl(token)));
}
public String getMp3Embed(final StateToken token) {
- return session.getInitData().getMp3EmbedObject().replace(DOC_URL_TAG,
- session.getSiteUrl() + downloadUtils.getUrl(token));
+ return setCenterPosition(session.getInitData().getMp3EmbedObject().replace(DOC_URL_TAG,
+ session.getSiteUrl() + downloadUtils.getUrl(token)));
}
public String getOggEmbed(final StateToken token) {
- return session.getInitData().getOggEmbedObject().replace(DOC_URL_TAG,
- session.getSiteUrl() + downloadUtils.getUrl(token));
+ return setCenterPosition(session.getInitData().getOggEmbedObject().replace(DOC_URL_TAG,
+ session.getSiteUrl() + downloadUtils.getUrl(token)));
}
+ private String setCenterPosition(final String elementCode) {
+ return ContentPosition.setCenterPosition(elementCode);
+ }
+
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPresenter.java 2009-04-28 12:53:10 UTC (rev 1102)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPresenter.java 2009-04-29 12:01:29 UTC (rev 1103)
@@ -89,13 +89,13 @@
view.showImage(fileDownloadUtils.getImageUrl(token), fileDownloadUtils.getImageResizedUrl(token,
ImageSize.sized), true);
} else if (mimeType.isMp3()) {
- view.setContent(mediaUtils.get().getMp3Embed(token), false);
+ view.setRawContent(mediaUtils.get().getMp3Embed(token));
} else if (mimeType.isOgg()) {
- view.setContent(mediaUtils.get().getOggEmbed(token), false);
+ view.setRawContent(mediaUtils.get().getOggEmbed(token));
} else if (mimeType.isFlv()) {
- view.setContent(mediaUtils.get().getFlvEmbed(token), false);
+ view.setRawContent(mediaUtils.get().getFlvEmbed(token));
} else if (mimeType.isAvi()) {
- view.setContent(mediaUtils.get().getAviEmbed(token), false);
+ view.setRawContent(mediaUtils.get().getAviEmbed(token));
} else if (mimeType.isText()) {
view.setContent(contentBody, true);
} else {
More information about the kune-commits
mailing list