[kune-commits] r1599 - in trunk/src/main: java/cc/kune/core/client/actions/xml java/cc/kune/gspace/client/viewers webapp webapp/others webapp/others/js
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Thu Nov 10 22:22:37 CET 2011
Author: vjrj_
Date: 2011-11-10 22:22:37 +0100 (Thu, 10 Nov 2011)
New Revision: 1599
Added:
trunk/src/main/webapp/others/js/
trunk/src/main/webapp/others/js/fake-selenium-pointer.js
Modified:
trunk/src/main/java/cc/kune/core/client/actions/xml/AddGadgetAction.java
trunk/src/main/java/cc/kune/core/client/actions/xml/NewGadgetAction.java
trunk/src/main/java/cc/kune/core/client/actions/xml/XMLActionsParser.java
trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java
trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java
trunk/src/main/webapp/ws.html
Log:
Modified: trunk/src/main/java/cc/kune/core/client/actions/xml/AddGadgetAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/actions/xml/AddGadgetAction.java 2011-11-10 01:10:27 UTC (rev 1598)
+++ trunk/src/main/java/cc/kune/core/client/actions/xml/AddGadgetAction.java 2011-11-10 21:22:37 UTC (rev 1599)
@@ -25,34 +25,22 @@
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.dto.AccessRolDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.gspace.client.viewers.ContentViewerPresenter;
import com.google.inject.Provider;
public class AddGadgetAction extends RolAction {
private final Provider<ContentServiceAsync> contentService;
- private final ContentViewerPresenter contentViewer;
private final String gadgetName;
- private final I18nTranslationService i18n;
private final Session session;
- private final StateManager stateManager;
- public AddGadgetAction(final Provider<ContentServiceAsync> contentService,
- final ContentViewerPresenter contentViewerPresenter, final StateManager stateManager,
- final Session session, final I18nTranslationService i18n, final AccessRolDTO rol,
- final boolean authNeeded, final String gadgetName, final String iconUrl) {
+ public AddGadgetAction(final Provider<ContentServiceAsync> contentService, final Session session,
+ final AccessRolDTO rol, final boolean authNeeded, final String gadgetName, final String iconUrl) {
super(rol, authNeeded);
this.contentService = contentService;
- this.contentViewer = contentViewerPresenter;
- this.stateManager = stateManager;
- this.i18n = i18n;
this.gadgetName = gadgetName;
this.session = session;
-
putValue(Action.SMALL_ICON, iconUrl);
}
@@ -62,9 +50,6 @@
gadgetName, new AsyncCallbackSimple<Void>() {
@Override
public void onSuccess(final Void result) {
- // NotifyUser.info(i18n.t("[%s] created succesfully", title));
- // stateManager.setRetrievedStateAndGo(result);
- // contentViewer.blinkTitle();
}
});
}
Modified: trunk/src/main/java/cc/kune/core/client/actions/xml/NewGadgetAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/actions/xml/NewGadgetAction.java 2011-11-10 01:10:27 UTC (rev 1598)
+++ trunk/src/main/java/cc/kune/core/client/actions/xml/NewGadgetAction.java 2011-11-10 21:22:37 UTC (rev 1599)
@@ -66,8 +66,8 @@
@Override
public void actionPerformed(final ActionEvent event) {
- contentService.get().addNewContentWithGadget(session.getUserHash(), session.getCurrentStateToken(), gadgetName,
- typeId, i18n.t(title), i18n.t(body), new AsyncCallbackSimple<StateContentDTO>() {
+ contentService.get().addNewContentWithGadget(session.getUserHash(), session.getCurrentStateToken(),
+ gadgetName, typeId, i18n.t(title), i18n.t(body), new AsyncCallbackSimple<StateContentDTO>() {
@Override
public void onSuccess(final StateContentDTO result) {
NotifyUser.info(i18n.t("[%s] created succesfully", title));
Modified: trunk/src/main/java/cc/kune/core/client/actions/xml/XMLActionsParser.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/actions/xml/XMLActionsParser.java 2011-11-10 01:10:27 UTC (rev 1598)
+++ trunk/src/main/java/cc/kune/core/client/actions/xml/XMLActionsParser.java 2011-11-10 21:22:37 UTC (rev 1599)
@@ -171,7 +171,7 @@
if (origTypeId.equals(destTypeId)) {
// We are adding a gadget in a doc (nor creating a gadget in a
// container)
- action = new AddGadgetAction(contentService, contentViewer, stateManager, session, i18n,
+ action = new AddGadgetAction(contentService, session,
descrip.getRol().getRolRequired(), descrip.getRol().isAuthNeed(),
extension.getExtName(), extension.getIconUrl());
} else {
Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java 2011-11-10 01:10:27 UTC (rev 1598)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java 2011-11-10 21:22:37 UTC (rev 1599)
@@ -82,6 +82,7 @@
@Override
public void clear() {
gsArmor.getSubheaderToolbar().clear();
+ gsArmor.getDocFooterToolbar().clear();
UiUtils.clear(gsArmor.getDocContainer());
UiUtils.clear(gsArmor.getDocHeader());
}
Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java 2011-11-10 01:10:27 UTC (rev 1598)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java 2011-11-10 21:22:37 UTC (rev 1599)
@@ -132,6 +132,7 @@
public void clear() {
onlyViewPanel.setHTML("");
gsArmor.getSubheaderToolbar().clear();
+ gsArmor.getDocFooterToolbar().clear();
UiUtils.clear(gsArmor.getDocContainer());
UiUtils.clear(gsArmor.getDocHeader());
waveClear();
Added: trunk/src/main/webapp/others/js/fake-selenium-pointer.js
===================================================================
--- trunk/src/main/webapp/others/js/fake-selenium-pointer.js (rev 0)
+++ trunk/src/main/webapp/others/js/fake-selenium-pointer.js 2011-11-10 21:22:37 UTC (rev 1599)
@@ -0,0 +1,41 @@
+// This is only used for selenium tests (remove in production)
+var newx;
+var newy;
+var k_cur_x;
+var k_cur_y;
+
+function kmove(x, y) {
+ // We adjust a litte bit to put the pointer close to the ui object but not
+ // very close
+ newx = x + 2;
+ newy = y + 10;
+ kmoveit();
+}
+
+function kmoveit() {
+ for (inc = 0; inc <= 1; inc = inc + 0.01) {
+ k_cur_x = Math.round(k_cur_x * (1 - inc) + newx * inc);
+ k_cur_y = Math.round(k_cur_y * (1 - inc) + newy * inc);
+ window.setTimeout('ksetCursorPos(' + k_cur_x + ", " + k_cur_y + ')',
+ 2000 * inc);
+ }
+}
+
+function ksetCursor(x, y) {
+ k_cur_x = x;
+ k_cur_y = y;
+}
+
+function ksetCursorPos(x, y) {
+ document.getElementById('kcursor').style.top = x + 'px';
+ document.getElementById('kcursor').style.left = y + 'px';
+}
+
+function khideCursor() {
+ document.getElementById('kcursor').style.visibility = 'hidden';
+}
+
+function kshowCursor() {
+ document.getElementById('kcursor').style.visibility = 'visible';
+}
+ksetCursor(0, 0);
\ No newline at end of file
Modified: trunk/src/main/webapp/ws.html
===================================================================
--- trunk/src/main/webapp/ws.html 2011-11-10 01:10:27 UTC (rev 1598)
+++ trunk/src/main/webapp/ws.html 2011-11-10 21:22:37 UTC (rev 1599)
@@ -279,85 +279,14 @@
<![endif]-->
</head>
<body>
+ <!-- // This is only used for selenium tests (comment/remove in production) -->
<div id="kcursor"
style="visibility: hidden; position: absolute; z-Index: 100001; height: 0; width: 0">
<img src="/others/cursor-orange.png">
</div>
- <script type="text/javascript">
- <!-- // This is only used for tests (comment/remove in production)
- var newx;
- var newy;
- var k_cur_x;
- var k_cur_y;
- var xGreat;
- var x_inc;
- var y_inc;
- var diff_x;
- var diff_y;
- function kmove(x, y) {
- newx = x - 18 + 20;
- newy = y - 7 + 17;
- kmoveit();
- }
+ <script src="others/js/fake-selenium-pointer.js"></script>
+ <!-- // End : This is only used for selenium tests (comment/remove in production) -->
- function recheck() {
- if (newx >= k_cur_x) {
- x_inc = 1;
- } else {
- x_inc = -1;
- }
- if (newy >= k_cur_y) {
- y_inc = 1;
- } else {
- y_inc = -1;
- }
- diff_x = newx - k_cur_x * x_inc;
- diff_y = newy - k_cur_y * y_inc;
- xGreat = diff_x > diff_y;
- }
-
- function kmoveit() {
- recheck();
- if (k_cur_x != newx)
- if (xGreat) {
- k_cur_x = k_cur_x + 3 * x_inc;
- } else {
- k_cur_x = Math.round(k_cur_y * newx / newy);
- }
- if (k_cur_y != newy)
- if (xGreat) {
- k_cur_y = Math.round(k_cur_x * newy / newx);
- } else {
- k_cur_y = k_cur_y + 3 * y_inc;
- }
-
- ksetCursorPos(k_cur_x, k_cur_y);
-
- if ((diff_x > 3) || (diff_y > 3)) {
- window.setTimeout('kmoveit()', 1);
- }
- }
-
- function ksetCursorPos(x, y) {
- document.getElementById('kcursor').style.top = k_cur_y + 'px';
- document.getElementById('kcursor').style.left = k_cur_x + 'px';
- }
- function ksetCursor(x, y) {
- k_cur_x = x;
- k_cur_y = y;
- ksetCursorPos(x, y);
- }
-
- function khideCursor() {
- document.getElementById('kcursor').style.visibility = 'hidden';
- }
-
- function kshowCursor() {
- document.getElementById('kcursor').style.visibility = 'visible';
- }
- ksetCursor(0, 0);
- //-->
- </script>
<!-- Banner for wave errors -->
<div class="banner" id="banner"></div>
<!-- Autocomplete user/pass -->
@@ -419,7 +348,7 @@
<div id="k-home-summary-right">
<div id="k-home-ini">
Welcome! This site is a Kune node. Kune, which means
- "together" in esperanto, it's a network of interconnected
+ "together" in esperanto, is a network of interconnected
sites like this one, where you can <strong>communicate,
share, collaborate with others and create your web
spaces easily</strong>. <a href="#signin">Join!</a>
More information about the kune-commits
mailing list