kune-commits
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
September 2008
- 2 participants
- 54 discussions
r857 - in trunk/src/main/java/org/ourproject/kune/workspace/client: i18n i18n/ui socialnet
by vjrj 08 Sep '08
by vjrj 08 Sep '08
08 Sep '08
Author: vjrj
Date: 2008-09-08 03:03:41 +0200 (Mon, 08 Sep 2008)
New Revision: 857
Modified:
trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/ui/I18nTranslatorPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
Log:
Refactorization
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java 2008-09-08 01:03:15 UTC (rev 856)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java 2008-09-08 01:03:41 UTC (rev 857)
@@ -23,7 +23,7 @@
import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
import org.ourproject.kune.platf.client.rpc.I18nServiceAsync;
import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.workspace.client.sitebar.Site;
+import org.ourproject.kune.workspace.client.site.Site;
import com.calclab.suco.client.signal.Slot0;
import com.google.gwt.user.client.rpc.AsyncCallback;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/ui/I18nTranslatorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/ui/I18nTranslatorPanel.java 2008-09-08 01:03:15 UTC (rev 856)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/ui/I18nTranslatorPanel.java 2008-09-08 01:03:41 UTC (rev 857)
@@ -29,8 +29,8 @@
import org.ourproject.kune.workspace.client.i18n.I18nTranslatorView;
import org.ourproject.kune.workspace.client.i18n.LanguageSelector;
import org.ourproject.kune.workspace.client.search.SiteBottomTrayButton;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.site.Site;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.HorizontalPanel;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2008-09-08 01:03:15 UTC (rev 856)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2008-09-08 01:03:41 UTC (rev 857)
@@ -9,9 +9,9 @@
import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuPanel;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.EntitySummary;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
+import org.ourproject.kune.workspace.client.skel.EntitySummary;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.themes.WsTheme;
import com.calclab.emiteuimodule.client.users.UserGridPanel;
import com.calclab.suco.client.signal.Slot;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2008-09-08 01:03:15 UTC (rev 856)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2008-09-08 01:03:41 UTC (rev 857)
@@ -20,9 +20,9 @@
import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
import org.ourproject.kune.workspace.client.search.GroupLiveSearcher;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.site.Site;
+import org.ourproject.kune.workspace.client.themes.WsTheme;
+import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
import com.calclab.suco.client.provider.Provider;
import com.calclab.suco.client.signal.Slot;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java 2008-09-08 01:03:15 UTC (rev 856)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java 2008-09-08 01:03:41 UTC (rev 857)
@@ -3,7 +3,7 @@
import org.ourproject.kune.platf.client.dto.GroupDTO;
import org.ourproject.kune.platf.client.ui.gridmenu.GridButton;
import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
+import org.ourproject.kune.workspace.client.themes.WsTheme;
public interface GroupMembersSummaryView {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java 2008-09-08 01:03:15 UTC (rev 856)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java 2008-09-08 01:03:41 UTC (rev 857)
@@ -24,8 +24,8 @@
import org.ourproject.kune.platf.client.ui.DropDownPanel;
import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuPanel;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.EntitySummary;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.skel.EntitySummary;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.gwtext.client.widgets.BoxComponent;
import com.gwtext.client.widgets.event.ContainerListenerAdapter;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2008-09-08 01:03:15 UTC (rev 856)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2008-09-08 01:03:41 UTC (rev 857)
@@ -31,8 +31,8 @@
import org.ourproject.kune.platf.client.state.StateManager;
import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsTheme;
+import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
import com.calclab.suco.client.provider.Provider;
import com.calclab.suco.client.signal.Slot;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java 2008-09-08 01:03:15 UTC (rev 856)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java 2008-09-08 01:03:41 UTC (rev 857)
@@ -22,7 +22,7 @@
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.dto.GroupDTO;
import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
+import org.ourproject.kune.workspace.client.themes.WsTheme;
public interface ParticipationSummaryView extends View {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java 2008-09-08 01:03:15 UTC (rev 856)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java 2008-09-08 01:03:41 UTC (rev 857)
@@ -18,7 +18,7 @@
import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup;
import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.sitebar.Site;
+import org.ourproject.kune.workspace.client.site.Site;
import com.calclab.suco.client.provider.Provider;
import com.calclab.suco.client.signal.Slot;
1
0
r856 - in trunk/src/main/java/org/ourproject/kune/workspace/client: component editor newgroup search
by vjrj 08 Sep '08
by vjrj 08 Sep '08
08 Sep '08
Author: vjrj
Date: 2008-09-08 03:03:15 +0200 (Mon, 08 Sep 2008)
New Revision: 856
Modified:
trunk/src/main/java/org/ourproject/kune/workspace/client/component/WorkspaceDeckPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorToolbar.java
trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteBottomTrayButton.java
trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPresenter.java
Log:
Refactorization
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/component/WorkspaceDeckPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/component/WorkspaceDeckPanel.java 2008-09-08 01:03:00 UTC (rev 855)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/component/WorkspaceDeckPanel.java 2008-09-08 01:03:15 UTC (rev 856)
@@ -29,6 +29,7 @@
public class WorkspaceDeckPanel extends SimplePanel implements WorkspaceDeckView {
Widget current;
+ @Deprecated
public WorkspaceDeckPanel() {
current = new Label("Nothing");
add(current);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPanel.java 2008-09-08 01:03:00 UTC (rev 855)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPanel.java 2008-09-08 01:03:15 UTC (rev 856)
@@ -22,7 +22,7 @@
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Timer;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorToolbar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorToolbar.java 2008-09-08 01:03:00 UTC (rev 855)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorToolbar.java 2008-09-08 01:03:15 UTC (rev 856)
@@ -30,7 +30,7 @@
import org.ourproject.kune.platf.client.ui.palette.ColorSelectListener;
import org.ourproject.kune.platf.client.ui.palette.WebSafePalettePanel;
import org.ourproject.kune.platf.client.ui.palette.WebSafePalettePresenter;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Command;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java 2008-09-08 01:03:00 UTC (rev 855)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java 2008-09-08 01:03:15 UTC (rev 856)
@@ -28,7 +28,7 @@
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
import org.ourproject.kune.workspace.client.licensechoose.LicenseChoose;
import org.ourproject.kune.workspace.client.licensechoose.LicenseChoosePanel;
-import org.ourproject.kune.workspace.client.sitebar.msg.SiteMessagePanel;
+import org.ourproject.kune.workspace.client.site.msg.SiteMessagePanel;
import com.calclab.suco.client.provider.Provider;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java 2008-09-08 01:03:00 UTC (rev 855)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java 2008-09-08 01:03:15 UTC (rev 856)
@@ -30,8 +30,8 @@
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.sitebar.SiteToken;
+import org.ourproject.kune.workspace.client.site.Site;
+import org.ourproject.kune.workspace.client.site.SiteToken;
import com.calclab.suco.client.provider.Provider;
import com.calclab.suco.client.signal.Slot;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteBottomTrayButton.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteBottomTrayButton.java 2008-09-08 01:03:00 UTC (rev 855)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteBottomTrayButton.java 2008-09-08 01:03:15 UTC (rev 856)
@@ -1,6 +1,6 @@
package org.ourproject.kune.workspace.client.search;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.widgets.Button;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java 2008-09-08 01:03:00 UTC (rev 855)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java 2008-09-08 01:03:15 UTC (rev 856)
@@ -22,7 +22,7 @@
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.platf.client.ui.AbstractSearcherPanel;
import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.ui.HorizontalPanel;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPresenter.java 2008-09-08 01:03:00 UTC (rev 855)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPresenter.java 2008-09-08 01:03:15 UTC (rev 856)
@@ -24,7 +24,7 @@
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.sitebar.Site;
+import org.ourproject.kune.workspace.client.site.Site;
import com.calclab.suco.client.provider.Provider;
1
0
08 Sep '08
Author: vjrj
Date: 2008-09-08 03:03:00 +0200 (Mon, 08 Sep 2008)
New Revision: 855
Modified:
trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryView.java
Log:
Refactorization
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPanel.java 2008-09-08 01:02:23 UTC (rev 854)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPanel.java 2008-09-08 01:03:00 UTC (rev 855)
@@ -21,8 +21,8 @@
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.platf.client.ui.DropDownPanel;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.site.Site;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java 2008-09-08 01:02:23 UTC (rev 854)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java 2008-09-08 01:03:00 UTC (rev 855)
@@ -22,8 +22,8 @@
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.dto.StateDTO;
import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsTheme;
+import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
import com.calclab.suco.client.signal.Slot;
import com.calclab.suco.client.signal.Slot2;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryView.java 2008-09-08 01:02:23 UTC (rev 854)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryView.java 2008-09-08 01:03:00 UTC (rev 855)
@@ -20,7 +20,7 @@
package org.ourproject.kune.workspace.client.summary;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
+import org.ourproject.kune.workspace.client.themes.WsTheme;
public interface GroupSummaryView extends View {
1
0
Author: vjrj
Date: 2008-09-08 03:02:23 +0200 (Mon, 08 Sep 2008)
New Revision: 854
Modified:
trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java
Log:
Refactorization
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java 2008-09-08 01:02:03 UTC (rev 853)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java 2008-09-08 01:02:23 UTC (rev 854)
@@ -27,7 +27,7 @@
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.platf.client.ui.DropDownPanel;
import org.ourproject.kune.platf.client.ui.KuneUiUtils;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DeferredCommand;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java 2008-09-08 01:02:03 UTC (rev 853)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java 2008-09-08 01:02:23 UTC (rev 854)
@@ -29,8 +29,8 @@
import org.ourproject.kune.platf.client.state.StateManager;
import org.ourproject.kune.workspace.client.search.SiteSearcher;
import org.ourproject.kune.workspace.client.search.SiteSearcherType;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsTheme;
+import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
import com.calclab.suco.client.provider.Provider;
import com.calclab.suco.client.signal.Slot;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java 2008-09-08 01:02:03 UTC (rev 853)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java 2008-09-08 01:02:23 UTC (rev 854)
@@ -24,7 +24,7 @@
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.dto.TagResultDTO;
-import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
+import org.ourproject.kune.workspace.client.themes.WsTheme;
public interface TagsSummaryView extends View {
1
0
r853 - in trunk/src/main/java/org/ourproject/kune/workspace/client: . licensefoot
by vjrj 08 Sep '08
by vjrj 08 Sep '08
08 Sep '08
Author: vjrj
Date: 2008-09-08 03:02:03 +0200 (Mon, 08 Sep 2008)
New Revision: 853
Added:
trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/
Modified:
trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicenseView.java
Log:
Refactorization
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot (from rev 841, trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/licensefoot)
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/licensefoot/EntityLicensePanel.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java 2008-09-08 01:02:03 UTC (rev 853)
@@ -17,12 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.ui.newtmp.licensefoot;
+package org.ourproject.kune.workspace.client.licensefoot;
import org.ourproject.kune.platf.client.dto.LicenseDTO;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.TitleBar;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.skel.TitleBar;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.ClickListener;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/licensefoot/EntityLicensePresenter.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePresenter.java 2008-09-08 01:02:03 UTC (rev 853)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.ui.newtmp.licensefoot;
+package org.ourproject.kune.workspace.client.licensefoot;
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.dto.LicenseDTO;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicenseView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/licensefoot/EntityLicenseView.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicenseView.java 2008-09-08 01:02:03 UTC (rev 853)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.ui.newtmp.licensefoot;
+package org.ourproject.kune.workspace.client.licensefoot;
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.dto.LicenseDTO;
1
0
r852 - in trunk/src/main/java/org/ourproject/kune/workspace/client: . site site/bar site/login site/msg site/rpc
by vjrj 08 Sep '08
by vjrj 08 Sep '08
08 Sep '08
Author: vjrj
Date: 2008-09-08 02:57:22 +0200 (Mon, 08 Sep 2008)
New Revision: 852
Added:
trunk/src/main/java/org/ourproject/kune/workspace/client/site/
trunk/src/main/java/org/ourproject/kune/workspace/client/site/Site.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/SiteToken.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/
trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/
trunk/src/main/java/org/ourproject/kune/workspace/client/site/rpc/
Removed:
trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBar.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarExtensionListener.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarListener.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/RegisterForm.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignIn.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInForm.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/rpc/SiteBarServiceMocked.java
Modified:
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/MessagePresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SimpleMessagePanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessage.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessagePanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessagePresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessageView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/rpc/UserService.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/rpc/UserServiceAsync.java
Log:
Refactorization
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/site/Site.java (from rev 842, trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/Site.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/Site.java 2008-08-30 14:57:17 UTC (rev 842)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/Site.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -0,0 +1,88 @@
+/*
+ *
+ * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.site;
+
+import org.ourproject.kune.platf.client.services.I18nTranslationService;
+import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
+import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
+import org.ourproject.kune.workspace.client.site.msg.SiteMessage;
+import org.ourproject.kune.workspace.client.ui.newtmp.sitebar.siteprogress.SiteProgress;
+
+import com.calclab.suco.client.provider.Provider;
+
+public class Site {
+ public static final String USERHASH = "userHash";
+ public static final String IN_DEVELOPMENT = " (in development)";
+ private static I18nTranslationService i18n;
+ private static SiteProgress progress;
+ private static Provider<SiteMessage> siteMessageProvider;
+
+ public static void error(final String value) {
+ getSiteMessage().setMessage(value, SiteErrorType.error);
+ }
+
+ public static void hideProgress() {
+ progress.hideProgress();
+ }
+
+ public static void important(final String value) {
+ getSiteMessage().setMessage(value, SiteErrorType.imp);
+ }
+
+ public static void info(final String value) {
+ getSiteMessage().setMessage(value, SiteErrorType.info);
+ }
+
+ public static void showProgress(final String text) {
+ progress.showProgress(text);
+ }
+
+ public static void showProgressLoading() {
+ progress.showProgress(i18n.t("Loading"));
+ }
+
+ public static void showProgressProcessing() {
+ progress.showProgress(i18n.t("Processing"));
+ }
+
+ public static void showProgressSaving() {
+ progress.showProgress(i18n.t("Saving"));
+ }
+
+ public static void showProgressStarting() {
+ progress.showProgress(i18n.t("Starting"));
+ }
+
+ public static void veryImportant(final String value) {
+ getSiteMessage().setMessage(value, SiteErrorType.veryimp);
+ }
+
+ private static SiteMessage getSiteMessage() {
+ return siteMessageProvider.get();
+ }
+
+ public Site(final I18nUITranslationService i18n, final SiteProgress progress,
+ final Provider<SiteMessage> siteMessageProvider) {
+ Site.i18n = i18n;
+ Site.progress = progress;
+ Site.siteMessageProvider = siteMessageProvider;
+ }
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/site/SiteToken.java (from rev 841, trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/SiteToken.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/SiteToken.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/SiteToken.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -0,0 +1,5 @@
+package org.ourproject.kune.workspace.client.site;
+
+public enum SiteToken {
+ signin, newgroup, translate
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar (from rev 841, trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBar.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBar.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,54 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.sitebar.bar;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.dto.StateDTO;
-import org.ourproject.kune.platf.client.dto.UserInfoDTO;
-
-public interface SiteBar {
-
- void showProgress(String text);
-
- void hideProgress();
-
- View getView();
-
- void showLoggedUser(UserInfoDTO user);
-
- void reloadUserInfo(String userHash);
-
- void doNewGroup(String returnToken);
-
- void doLogin(String returnToken);
-
- void showAlertMessage(String message);
-
- void doLogout();
-
- void mask();
-
- void unMask();
-
- void mask(String message);
-
- void setState(StateDTO state);
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarExtensionListener.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarExtensionListener.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarExtensionListener.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,28 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.sitebar.bar;
-
-import org.ourproject.kune.platf.client.dto.UserInfoDTO;
-
-public interface SiteBarExtensionListener {
- public void onUserLoggedIn(UserInfoDTO user);
-
- public void onUserLoggedOut();
-}
\ No newline at end of file
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarListener.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarListener.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarListener.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,30 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.sitebar.bar;
-
-import org.ourproject.kune.platf.client.dto.StateToken;
-
-public interface SiteBarListener {
-
- public void onUserLoggedOut();
-
- public void onChangeState(StateToken token);
-
-}
\ No newline at end of file
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPanel.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarPanel.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,421 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.sitebar.bar;
-
-import java.util.List;
-
-import org.ourproject.kune.platf.client.dto.LinkDTO;
-import org.ourproject.kune.platf.client.dto.StateToken;
-import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.platf.client.services.Images;
-import org.ourproject.kune.platf.client.ui.IconLabel;
-import org.ourproject.kune.platf.client.ui.RoundedBorderDecorator;
-import org.ourproject.kune.workspace.client.newgroup.NewGroupPanel;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.sitebar.SiteToken;
-import org.ourproject.kune.workspace.client.sitebar.login.SignInPanel;
-
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.FocusListener;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Hyperlink;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.KeyboardListener;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.MenuBar;
-import com.google.gwt.user.client.ui.MenuItem;
-import com.google.gwt.user.client.ui.PushButton;
-import com.google.gwt.user.client.ui.RootPanel;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.user.client.ui.Widget;
-import com.gwtext.client.core.ExtElement;
-import com.gwtext.client.widgets.MessageBox;
-
-public class SiteBarPanel extends Composite implements SiteBarView {
-
- private static final int MAX_TIME_PROGRESS_BAR = 20000;
- private static final String SEARCH_TEXT_WIDTH_SMALL = "120";
- private static final String SEARCH_TEXT_WIDTH_BIG = "180";
- private final SiteBarPresenter presenter;
- private final Image logoImage;
-
- private final HorizontalPanel siteBarHP;
-
- private final IconLabel gotoPublic;
- private final Hyperlink loginHyperlink;
- private final Hyperlink loggedUserHyperlink;
- private final Hyperlink newGroupHyperlink;
- private final HTML pipeSeparatorHtml2;
- private PushButton searchButton;
- private TextBox searchTextBox;
-
- private final Label logoutLabel;
- private SignInPanel signInPanel;
- private final Images img;
- private final MenuBar optionsSubmenu;
- private MenuItem linkHelpInTrans;
- private MenuItem linkKuneBugs;
- private final MenuBar yourGroupsSubmenu;
- private NewGroupPanel newGroupPanel;
- private final IconLabel contentNoPublic;
- private final Widget progressPanel;
- private final Widget progressText;
- private final HorizontalPanel publicHP;
- private final ExtElement extRootBody;
- private String publicUrl;
- private Timer timeProgressMaxTime;
- private final I18nTranslationService i18n;
-
- public SiteBarPanel(final SiteBarPresenter initPresenter, final I18nTranslationService i18n) {
- this.i18n = i18n;
- img = Images.App.getInstance();
-
- // Initialize
- siteBarHP = new HorizontalPanel();
-
- initWidget(siteBarHP);
- this.presenter = initPresenter;
-
- progressPanel = RootPanel.get("kuneprogresspanel");
- progressText = RootPanel.get("kuneprogresstext");
-
- publicHP = new HorizontalPanel();
- gotoPublic = new IconLabel(img.anybody(), i18n.t("Go to Public Space"), false);
- contentNoPublic = new IconLabel(img.anybody(), i18n.t("This content is not public"));
-
- final Label expandLabel = new Label("");
- newGroupHyperlink = new Hyperlink();
- final HTML pipeSeparatorHtml = new HTML();
- pipeSeparatorHtml2 = new HTML();
- loginHyperlink = new Hyperlink();
- loggedUserHyperlink = new Hyperlink();
- logoutLabel = new Label();
- final HTML spaceSeparator1 = new HTML("<b></b>");
- final MenuBar options = new MenuBar();
- optionsSubmenu = new MenuBar(true);
- yourGroupsSubmenu = new MenuBar(true);
- final RoundedBorderDecorator optionsButton = new RoundedBorderDecorator(options, RoundedBorderDecorator.ALL,
- RoundedBorderDecorator.SIMPLE);
- final HTML spaceSeparator2 = new HTML("<b></b>");
- logoImage = new Image();
-
- // Layout
- siteBarHP.add(publicHP);
- publicHP.add(gotoPublic);
- publicHP.add(contentNoPublic);
- siteBarHP.add(expandLabel);
- siteBarHP.add(loginHyperlink);
- siteBarHP.add(loggedUserHyperlink);
- siteBarHP.add(pipeSeparatorHtml);
- siteBarHP.add(logoutLabel);
- siteBarHP.add(pipeSeparatorHtml2);
- siteBarHP.add(newGroupHyperlink);
- siteBarHP.add(spaceSeparator1);
- siteBarHP.add(optionsButton);
- siteBarHP.add(spaceSeparator2);
- createSearchBox();
- siteBarHP.add(logoImage);
-
- // Set properties
- siteBarHP.addStyleName("kune-SiteBarPanel");
- siteBarHP.setCellWidth(expandLabel, "100%");
- showProgress(i18n.t("Processing"));
- gotoPublic.addStyleName("kune-Margin-Medium-r");
- setContentPublic(true);
- gotoPublic.addClickListener(new ClickListener() {
- public void onClick(final Widget sender) {
- gotoPublic();
- }
- });
- gotoPublic.setTitle(i18n.t("Leave the workspace and go to the public space of this group")
- + Site.IN_DEVELOPMENT);
- gotoPublic.addStyleName("kune-SiteBarPanel-LabelLink");
- contentNoPublic.addStyleName("kune-Margin-Medium-r");
- newGroupHyperlink.setText(i18n.t("Create New Group"));
- newGroupHyperlink.setTargetHistoryToken(SiteToken.newgroup.toString());
- loggedUserHyperlink.setVisible(false);
- pipeSeparatorHtml.setHTML("|");
- pipeSeparatorHtml.setStyleName("kune-SiteBarPanel-Separator");
- pipeSeparatorHtml2.setHTML("|");
- pipeSeparatorHtml2.setStyleName("kune-SiteBarPanel-Separator");
- loginHyperlink.setText(i18n.t("Sign in to collaborate"));
- loginHyperlink.setTargetHistoryToken(SiteToken.signin.toString());
- logoutLabel.setText(i18n.t("Sign out"));
- logoutLabel.addStyleName("kune-SiteBarPanel-LabelLink");
- options.addItem(i18n.t("Options"), true, optionsSubmenu);
- options.setStyleName("kune-MenuBar");
- optionsButton.setColor("AAA");
- optionsButton.setHeight("16px");
- createOptionsSubmenu();
- addDefaultItemsToOptions();
-
- spaceSeparator1.setStyleName("kune-SiteBarPanel-SpaceSeparator");
- spaceSeparator2.setStyleName("kune-SiteBarPanel-SpaceSeparator");
-
- createListeners();
-
- // TODO: externalize this
- img.kuneLogo16px().applyTo(logoImage);
- this.hideProgress();
- extRootBody = new ExtElement(RootPanel.getBodyElement());
- }
-
- public void centerLoginDialog() {
- signInPanel.center();
- }
-
- public void centerNewGroupDialog() {
- newGroupPanel.center();
- }
-
- public void clearSearchText() {
- searchTextBox.setText("");
- }
-
- public void clearUserName() {
- loginHyperlink.setText(i18n.t("Sign in to collaborate"));
- }
-
- public void gotoPublic() {
- Window.open(publicUrl, "_blank", "");
- }
-
- public void hideLoginDialog() {
- signInPanel.hide();
- }
-
- public void hideNewGroupDialog() {
- newGroupPanel.hide();
- }
-
- public void hideProgress() {
- timeProgressMaxTime.cancel();
- progressPanel.setVisible(false);
- publicHP.setVisible(true);
- }
-
- public void mask() {
- extRootBody.mask();
- }
-
- public void mask(final String message) {
- extRootBody.mask(message, "x-mask-loading");
- }
-
- public void resetOptionsSubmenu() {
- optionsSubmenu.clearItems();
- addDefaultItemsToOptions();
- }
-
- public void restoreLoginLink() {
- loginHyperlink.setVisible(true);
- loggedUserHyperlink.setVisible(false);
- loginHyperlink.setTargetHistoryToken(SiteToken.signin.toString());
- }
-
- public void setContentGotoPublicUrl(final String publicUrl) {
- this.publicUrl = publicUrl;
- }
-
- public void setContentPublic(boolean visible) {
- gotoPublic.setVisible(visible);
- contentNoPublic.setVisible(!visible);
- }
-
- public void setDefaultTextSearch() {
- searchTextBox.setText(i18n.t("Search"));
- }
-
- public void setGroupsIsMember(final List<LinkDTO> groupsIsAdmin, final List<LinkDTO> groupsIsCollab) {
- optionsSubmenu.clearItems();
- yourGroupsSubmenu.clearItems();
-
- final int isAdminCount = groupsIsAdmin.size();
- final int isCollabCount = groupsIsCollab.size();
- if (isAdminCount > 0 || isCollabCount > 0) {
- optionsSubmenu.addItem(i18n.t("My Groups") + " »", yourGroupsSubmenu);
- for (int i = 0; i < isAdminCount; i++) {
- final LinkDTO link = groupsIsAdmin.get(i);
- addItemToYourGroupSubmenu(link);
- }
- for (int i = 0; i < isCollabCount; i++) {
- final LinkDTO link = groupsIsCollab.get(i);
- addItemToYourGroupSubmenu(link);
- }
- }
- addDefaultItemsToOptions();
- }
-
- public void setLogo(final Image logo) {
- // TODO
- }
-
- public void setLogoutLinkVisible(final boolean visible) {
- logoutLabel.setVisible(visible);
- pipeSeparatorHtml2.setVisible(visible);
- }
-
- public void setSearchText(final String text) {
- searchTextBox.setText(text);
- }
-
- public void setTextSearchBig() {
- searchTextBox.setWidth(SEARCH_TEXT_WIDTH_BIG);
- }
-
- public void setTextSearchSmall() {
- searchTextBox.setWidth(SEARCH_TEXT_WIDTH_SMALL);
- }
-
- public void showAlertMessage(final String message) {
- MessageBox.alert(i18n.t("Alert"), message, new MessageBox.AlertCallback() {
- public void execute() {
- // Do nothing
- }
- });
- }
-
- public void showLoggedUserName(final String name, final String homePage) {
- loginHyperlink.setVisible(false);
- loggedUserHyperlink.setVisible(true);
- loggedUserHyperlink.setText(name);
- loggedUserHyperlink.setTargetHistoryToken(homePage);
- }
-
- public void showLoginDialog() {
- // final SignIn login = SiteBarFactory.getLoginForm(presenter);
- // signInPanel = (SignInPanel) login.getView();
- // signInPanel.show();
-
- }
-
- public void showNewGroupDialog() {
- }
-
- public void showProgress(final String text) {
- if (timeProgressMaxTime == null) {
- timeProgressMaxTime = new Timer() {
- public void run() {
- hideProgress();
- }
- };
- }
- timeProgressMaxTime.schedule(MAX_TIME_PROGRESS_BAR);
- publicHP.setVisible(false);
- progressPanel.setVisible(true);
- DOM.setInnerText(progressText.getElement(), text);
- }
-
- public void unMask() {
- extRootBody.unmask();
- }
-
- private void addDefaultItemsToOptions() {
- optionsSubmenu.addItem(linkHelpInTrans);
- optionsSubmenu.addItem(linkKuneBugs);
- }
-
- private void addItemToYourGroupSubmenu(final LinkDTO link) {
- yourGroupsSubmenu.addItem(link.getShortName(), true, new Command() {
- public void execute() {
- presenter.changeState(new StateToken(link.getLink()));
- }
- });
- }
-
- private void createListeners() {
- searchButton.addClickListener(new ClickListener() {
- public void onClick(final Widget arg0) {
- Site.showProgressProcessing();
- presenter.doSearch(searchTextBox.getText());
- }
- });
- logoutLabel.addClickListener(new ClickListener() {
- public void onClick(final Widget arg0) {
- Site.showProgressProcessing();
- presenter.doLogout();
- }
- });
- searchTextBox.addKeyboardListener(new KeyboardListener() {
- public void onKeyDown(final Widget arg0, final char arg1, final int arg2) {
- }
-
- public void onKeyPress(final Widget arg0, final char arg1, final int arg2) {
- }
-
- public void onKeyUp(final Widget widget, final char key, final int mod) {
- if (key == KEY_ENTER) {
- if (searchTextBox.getText().length() > 0) {
- Site.showProgressProcessing();
- presenter.doSearch(searchTextBox.getText());
- }
- }
- }
- });
- }
-
- private void createOptionsSubmenu() {
- linkHelpInTrans = new MenuItem(img.language().getHTML() + i18n.t("Help with the translation"), true,
- new Command() {
- public void execute() {
- presenter.onHelpInTranslation();
- }
- });
- linkKuneBugs = new MenuItem(img.kuneIcon16().getHTML() + i18n.t("Report kune bugs"), true, new Command() {
- public void execute() {
- Window.open("http://code.google.com/p/kune/issues/list", "_blank", null);
- }
- });
- // linkHelp = new MenuItem(img.kuneIcon16().getHTML() +
- // i18n.t("Help"), true, new Command() {
- // public void execute() {
- // presenter.changeState(new StateToken("site.docs"));
- // }
- // });
- }
-
- private void createSearchBox() {
- searchButton = new PushButton(img.kuneSearchIco().createImage(), img.kuneSearchIcoPush().createImage());
- searchTextBox = new TextBox();
-
- siteBarHP.add(searchButton);
- siteBarHP.add(searchTextBox);
-
- setTextSearchSmall();
- setDefaultTextSearch();
- searchTextBox.addFocusListener(new FocusListener() {
-
- public void onFocus(final Widget arg0) {
- presenter.onSearchFocus();
- }
-
- public void onLostFocus(final Widget arg0) {
- presenter.onSearchLostFocus(searchTextBox.getText());
- }
- });
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPresenter.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarPresenter.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,228 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.sitebar.bar;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.dto.GroupListDTO;
-import org.ourproject.kune.platf.client.dto.StateDTO;
-import org.ourproject.kune.platf.client.dto.StateToken;
-import org.ourproject.kune.platf.client.dto.UserInfoDTO;
-import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-
-public class SiteBarPresenter implements SiteBar {
-
- private SiteBarView view;
- private final SiteBarListener listener;
- private String previousToken;
- private final Session session;
-
- public SiteBarPresenter(final SiteBarListener listener, final Session session, final I18nTranslationService i18n) {
- this.listener = listener;
- this.session = session;
- }
-
- public void changeState(final StateToken token) {
- listener.onChangeState(token);
- }
-
- public void doLogin(final String previousToken) {
- this.previousToken = previousToken;
- Site.showProgressProcessing();
- view.showLoginDialog();
- view.centerLoginDialog();
- Site.hideProgress();
- }
-
- public void doLogout() {
- // final AsyncCallback<Object> callback = new AsyncCallback<Object>() {
- // public void onFailure(final Throwable caught) {
- // Site.hideProgress();
- // try {
- // throw caught;
- // } catch (final SessionExpiredException e) {
- // clientUILogout();
- // } catch (final UserMustBeLoggedException e) {
- // clientUILogout();
- // } catch (final Throwable e) {
- // GWT.log("Other kind of exception in doLogout", null);
- // throw new RuntimeException();
- // }
- // }
- //
- // public void onSuccess(final Object arg0) {
- // Site.hideProgress();
- // clientUILogout();
- // }
- //
- // private void clientUILogout() {
- // view.restoreLoginLink();
- // view.resetOptionsSubmenu();
- // view.setLogoutLinkVisible(false);
- // listener.onUserLoggedOut();
- // }
- // };
- // UserService.App.getInstance().logout(session.getUserHash(),
- // callback);
- }
-
- public void doNewGroup(final String previousTokenOrig) {
- // DefaultDispatcher.getInstance().fire(WorkspaceEvents.ONLY_CHECK_USER_SESSION,
- // new AsyncCallbackSimple<Object>() {
- // public void onSuccess(final Object result) {
- // previousToken = previousTokenOrig;
- // if (session.isLogged()) {
- // Site.showProgressProcessing();
- // view.showNewGroupDialog();
- // view.centerNewGroupDialog();
- // } else {
- // returnToPreviousState();
- // Site.info(i18n.t("Sign in or register to create a group"));
- // }
- // }
- // });
- }
-
- public void doSearch(final String termToSearch) {
- // view.showSearchPanel(termToSearch);
- }
-
- public View getView() {
- return view;
- }
-
- public void hideProgress() {
- view.hideProgress();
- }
-
- public void init(final SiteBarView view) {
- this.view = view;
- view.setLogoutLinkVisible(false);
- }
-
- public void mask() {
- view.mask();
- }
-
- public void mask(final String message) {
- view.mask(message);
- }
-
- public void onHelpInTranslation() {
- }
-
- public void onLoginCancelled() {
- view.hideLoginDialog();
- returnToPreviousState();
- }
-
- public void onLoginClose() {
- if (!session.isLogged()) {
- returnToPreviousState();
- }
- }
-
- public void onNewGroupCancel() {
- view.hideNewGroupDialog();
- returnToPreviousState();
- }
-
- public void onNewGroupClose() {
- returnToPreviousState();
- }
-
- public void onNewGroupCreated(final StateToken homePage) {
- view.hideNewGroupDialog();
- changeState(homePage);
- }
-
- public void reloadUserInfo(final String userHash) {
- // //final UserServiceAsync siteBarService =
- // UserService.App.getInstance();
- // siteBarService.reloadUserInfo(userHash, new
- // AsyncCallback<UserInfoDTO>() {
- // public void onFailure(final Throwable arg0) {
- // Site.hideProgress();
- // }
- //
- // public void onSuccess(final UserInfoDTO response) {
- // showLoggedUser(response);
- // Site.hideProgress();
- // }
- // });
- }
-
- public void setState(final StateDTO state) {
- final StateToken token = state.getStateToken();
- if (state.getAccessLists().getViewers().getMode().equals(GroupListDTO.EVERYONE)) {
- final String publicUrl = token.getPublicUrl();
- view.setContentGotoPublicUrl(publicUrl);
- view.setContentPublic(true);
- } else {
- view.setContentPublic(false);
- }
-
- }
-
- public void showAlertMessage(final String message) {
- view.showAlertMessage(message);
- }
-
- public void showLoggedUser(final UserInfoDTO user) {
- if (user == null) {
- view.restoreLoginLink();
- view.setLogoutLinkVisible(false);
- } else {
- view.showLoggedUserName(user.getShortName(), user.getHomePage());
- view.setLogoutLinkVisible(true);
- // view.setGroupsIsMember(user.getGroupsIsAdmin(),
- // user.getGroupsIsCollab());
- }
- }
-
- public void showProgress(final String text) {
- view.showProgress(text);
- }
-
- public void unMask() {
- view.unMask();
- }
-
- protected void onSearchFocus() {
- view.setTextSearchBig();
- view.clearSearchText();
- }
-
- protected void onSearchLostFocus(final String search) {
- if (search.length() == 0) {
- view.setDefaultTextSearch();
- view.setTextSearchSmall();
- }
- }
-
- private void returnToPreviousState() {
- if (this.previousToken != null) {
- listener.onChangeState(new StateToken(this.previousToken));
- this.previousToken = null;
- }
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarView.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/bar/SiteBarView.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,83 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.sitebar.bar;
-
-import java.util.List;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.dto.LinkDTO;
-
-import com.google.gwt.user.client.ui.Image;
-
-public interface SiteBarView extends View {
-
- public void hideLoginDialog();
-
- void centerLoginDialog();
-
- void centerNewGroupDialog();
-
- void clearSearchText();
-
- void clearUserName();
-
- void hideNewGroupDialog();
-
- void hideProgress();
-
- void mask();
-
- void mask(String message);
-
- void resetOptionsSubmenu();
-
- void restoreLoginLink();
-
- void setContentGotoPublicUrl(String publicUrl);
-
- void setContentPublic(boolean visible);
-
- void setDefaultTextSearch();
-
- void setGroupsIsMember(List<LinkDTO> groupsIsAdmin, List<LinkDTO> groupsIsCollab);
-
- void setLogo(Image logo);
-
- void setLogoutLinkVisible(boolean visible);
-
- void setSearchText(String text);
-
- void setTextSearchBig();
-
- void setTextSearchSmall();
-
- void showAlertMessage(String message);
-
- void showLoggedUserName(String name, String homePage);
-
- void showLoginDialog();
-
- void showNewGroupDialog();
-
- void showProgress(String text);
-
- void unMask();
-
-}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/site/login (from rev 841, trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/RegisterForm.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/RegisterForm.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/RegisterForm.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,206 +0,0 @@
-package org.ourproject.kune.workspace.client.sitebar.login;
-
-import org.ourproject.kune.platf.client.ui.dialogs.DefaultForm;
-import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-
-import com.gwtext.client.data.SimpleStore;
-import com.gwtext.client.data.Store;
-import com.gwtext.client.widgets.form.ComboBox;
-import com.gwtext.client.widgets.form.TextField;
-import com.gwtext.client.widgets.form.VType;
-import com.gwtext.client.widgets.form.ValidationException;
-import com.gwtext.client.widgets.form.Validator;
-
-public class RegisterForm extends DefaultForm {
-
- private static final String MUST_BE_BETWEEN_3_AND_15 = "Must be between 3 and 15 lowercase characters. Can only contain characters, numbers, and dashes";
-
- private static final String NICK_FIELD = "nick";
- private static final String EMAIL_FIELD = "email";
- private static final String LONGNAME_FIELD = "long_name";
- private static final String PASSWORD_FIELD = "password";
- private static final String PASSWORD_FIELD_DUP = "passwordDup";
- private static final String LANG_FIELD = "lang";
- private static final String COUNTRY_FIELD = "country";
- private static final String TIMEZONE_FIELD = "timezone";
-
- private final TextField shortNameRegField;
- private final TextField longNameRegField;
- private final TextField passwdRegField;
- private final TextField passwdRegFieldDup;
- private final TextField emailRegField;
- private final ComboBox languageCombo;
- private final ComboBox countryCombo;
- private final ComboBox timezoneCombo;
-
- public RegisterForm(final SignInPresenter presenter, final I18nUITranslationService i18n) {
- super.addStyleName("kune-Margin-Large-l");
-
- shortNameRegField = new TextField();
- shortNameRegField.setFieldLabel(i18n.t("Nickname"));
- shortNameRegField.setName(NICK_FIELD);
- shortNameRegField.setWidth(DEF_FIELD_WIDTH);
- shortNameRegField.setAllowBlank(false);
- shortNameRegField.setMinLength(3);
- shortNameRegField.setMaxLength(15);
- shortNameRegField.setRegex("^[a-z0-9_\\-]+$");
- shortNameRegField.setMinLengthText(i18n.t(MUST_BE_BETWEEN_3_AND_15));
- shortNameRegField.setMaxLengthText(i18n.t(MUST_BE_BETWEEN_3_AND_15));
- shortNameRegField.setRegexText(i18n.t(MUST_BE_BETWEEN_3_AND_15));
- shortNameRegField.setValidationEvent(false);
- add(shortNameRegField);
-
- longNameRegField = new TextField();
- longNameRegField.setFieldLabel(i18n.t("Full Name"));
- longNameRegField.setName(LONGNAME_FIELD);
- longNameRegField.setWidth(DEF_FIELD_WIDTH);
- longNameRegField.setAllowBlank(false);
- longNameRegField.setMinLength(3);
- longNameRegField.setMaxLength(50);
- longNameRegField.setValidationEvent(false);
- add(longNameRegField);
-
- passwdRegField = new TextField();
- passwdRegField.setFieldLabel(i18n.t("Password"));
- passwdRegField.setName(PASSWORD_FIELD);
- passwdRegField.setPassword(true);
- passwdRegField.setAllowBlank(false);
- passwdRegField.setMaxLength(40);
- passwdRegField.setWidth(DEF_FIELD_WIDTH);
- passwdRegField.setValidationEvent(false);
- add(passwdRegField);
-
- passwdRegFieldDup = new TextField();
- passwdRegFieldDup.setFieldLabel(i18n.t("Retype password"));
- passwdRegFieldDup.setName(PASSWORD_FIELD_DUP);
- passwdRegFieldDup.setPassword(true);
- passwdRegFieldDup.setAllowBlank(false);
- passwdRegFieldDup.setMinLength(6);
- passwdRegFieldDup.setMaxLength(40);
- passwdRegFieldDup.setWidth(DEF_FIELD_WIDTH);
- passwdRegFieldDup.setInvalidText(i18n.t("Passwords do not match"));
- passwdRegFieldDup.setValidator(new Validator() {
- public boolean validate(final String value) throws ValidationException {
- return passwdRegField.getValueAsString().equals(passwdRegFieldDup.getValueAsString());
- }
- });
- passwdRegFieldDup.setValidationEvent(false);
- add(passwdRegFieldDup);
-
- emailRegField = new TextField();
- emailRegField.setFieldLabel(i18n.t("Email"));
- emailRegField.setName(EMAIL_FIELD);
- emailRegField.setVtype(VType.EMAIL);
- emailRegField.setWidth(DEF_FIELD_WIDTH);
- emailRegField.setAllowBlank(false);
- emailRegField.setValidationEvent(false);
-
- add(emailRegField);
-
- final Store langStore = new SimpleStore(new String[] { "abbr", "language" }, presenter.getLanguages());
- langStore.load();
-
- languageCombo = new ComboBox();
- languageCombo.setName(LANG_FIELD);
- languageCombo.setMinChars(1);
- languageCombo.setFieldLabel(i18n.t("Language"));
- languageCombo.setStore(langStore);
- languageCombo.setDisplayField("language");
- languageCombo.setMode(ComboBox.LOCAL);
- languageCombo.setTriggerAction(ComboBox.ALL);
- languageCombo.setEmptyText(i18n.t("Enter language"));
- languageCombo.setLoadingText(i18n.t("Searching..."));
- languageCombo.setTypeAhead(true);
- languageCombo.setTypeAheadDelay(1000);
- languageCombo.setSelectOnFocus(false);
- languageCombo.setWidth(186);
- languageCombo.setAllowBlank(false);
- languageCombo.setValueField("abbr");
- languageCombo.setValue(presenter.getCurrentLanguage().getCode());
- languageCombo.setPageSize(7);
- languageCombo.setForceSelection(true);
- languageCombo.setValidationEvent(false);
- add(languageCombo);
-
- final Store countryStore = new SimpleStore(new String[] { "abbr", "country" }, presenter.getCountries());
- countryStore.load();
-
- countryCombo = new ComboBox();
- countryCombo.setName(COUNTRY_FIELD);
- countryCombo.setMinChars(1);
- countryCombo.setFieldLabel(i18n.t("Country"));
- countryCombo.setStore(countryStore);
- countryCombo.setDisplayField("country");
- countryCombo.setMode(ComboBox.LOCAL);
- countryCombo.setTriggerAction(ComboBox.ALL);
- countryCombo.setEmptyText(i18n.t("Enter your country"));
- countryCombo.setLoadingText(i18n.t("Searching..."));
- countryCombo.setTypeAhead(true);
- countryCombo.setTypeAheadDelay(1000);
- countryCombo.setSelectOnFocus(false);
- countryCombo.setWidth(186);
- countryCombo.setAllowBlank(false);
- countryCombo.setValueField("abbr");
- countryCombo.setPageSize(7);
- countryCombo.setForceSelection(true);
- countryCombo.setValidationEvent(false);
- add(countryCombo);
-
- final Store timezoneStore = new SimpleStore(new String[] { "id" }, presenter.getTimezones());
- timezoneStore.load();
-
- timezoneCombo = new ComboBox();
- timezoneCombo.setName(TIMEZONE_FIELD);
- timezoneCombo.setMinChars(1);
- timezoneCombo.setFieldLabel(i18n.t("Timezone"));
- timezoneCombo.setStore(timezoneStore);
- timezoneCombo.setDisplayField("id");
- timezoneCombo.setMode(ComboBox.LOCAL);
- timezoneCombo.setTriggerAction(ComboBox.ALL);
- timezoneCombo.setEmptyText(i18n.t("Enter your timezone"));
- timezoneCombo.setLoadingText(i18n.t("Searching..."));
- timezoneCombo.setTypeAhead(true);
- timezoneCombo.setTypeAheadDelay(1000);
- timezoneCombo.setSelectOnFocus(false);
- timezoneCombo.setWidth(186);
- timezoneCombo.setAllowBlank(false);
- timezoneCombo.setValueField("id");
- timezoneCombo.setPageSize(7);
- timezoneCombo.setForceSelection(true);
- timezoneCombo.setValidationEvent(false);
- add(timezoneCombo);
- }
-
- public String getCountry() {
- return countryCombo.getValueAsString();
- }
-
- public String getEmail() {
- return emailRegField.getValueAsString();
- }
-
- public String getLanguage() {
- return languageCombo.getValueAsString();
- }
-
- public String getLongName() {
- return longNameRegField.getValueAsString();
- }
-
- public String getRegisterPassword() {
- return passwdRegField.getValueAsString();
- }
-
- public String getRegisterPasswordDup() {
- return passwdRegFieldDup.getValueAsString();
- }
-
- public String getShortName() {
- return shortNameRegField.getValueAsString();
- }
-
- public String getTimezone() {
- return timezoneCombo.getValueAsString();
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignIn.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignIn.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignIn.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,28 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.sitebar.login;
-
-import org.ourproject.kune.platf.client.dto.StateToken;
-
-public interface SignIn {
-
- void doSignIn(StateToken previousStateToken);
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInForm.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInForm.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInForm.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,48 +0,0 @@
-package org.ourproject.kune.workspace.client.sitebar.login;
-
-import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.platf.client.ui.dialogs.DefaultForm;
-
-import com.gwtext.client.widgets.form.TextField;
-
-public class SignInForm extends DefaultForm {
- private static final String NICKOREMAIL_FIELD = "nickOrEmail";
- private static final String PASSWORD_FIELD = "password";
-
- private final TextField loginNickOrEmailField;
- private final TextField loginPassField;
-
- public SignInForm(final I18nTranslationService i18n) {
- super.addStyleName("kune-Margin-Large-trbl");
-
- loginNickOrEmailField = new TextField();
- loginNickOrEmailField.setFieldLabel(i18n.t("Nickname or email"));
- loginNickOrEmailField.setName(NICKOREMAIL_FIELD);
- loginNickOrEmailField.setWidth(DEF_FIELD_WIDTH);
- loginNickOrEmailField.setAllowBlank(false);
- loginNickOrEmailField.setValidationEvent(false);
- super.add(loginNickOrEmailField);
-
- loginPassField = new TextField();
- loginPassField.setFieldLabel(i18n.t("Password"));
- loginPassField.setName(PASSWORD_FIELD);
- loginPassField.setWidth(DEF_FIELD_WIDTH);
- loginPassField.setPassword(true);
- loginPassField.setAllowBlank(false);
- loginPassField.setValidationEvent(false);
- super.add(loginPassField);
- }
-
- public void focusLogin() {
- loginNickOrEmailField.focus();
- }
-
- public String getLoginPassword() {
- return loginPassField.getValueAsString();
- }
-
- public String getNickOrEmail() {
- return loginNickOrEmailField.getValueAsString();
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInPanel.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInPanel.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,344 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.sitebar.login;
-
-import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog;
-import org.ourproject.kune.platf.client.ui.dialogs.InfoDialog;
-import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.sitebar.msg.SimpleMessagePanel;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
-
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
-import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.Widget;
-import com.gwtext.client.core.EventObject;
-import com.gwtext.client.core.RegionPosition;
-import com.gwtext.client.widgets.Button;
-import com.gwtext.client.widgets.Component;
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.TabPanel;
-import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-import com.gwtext.client.widgets.event.PanelListenerAdapter;
-import com.gwtext.client.widgets.event.WindowListenerAdapter;
-import com.gwtext.client.widgets.form.Field;
-import com.gwtext.client.widgets.layout.BorderLayout;
-import com.gwtext.client.widgets.layout.BorderLayoutData;
-import com.gwtext.client.widgets.layout.FitLayout;
-
-public class SignInPanel implements SignInView {
- private class MessagePanel extends Panel {
- private final SimpleMessagePanel messagesPanel;
-
- public MessagePanel() {
- setPaddings(10);
- setBorder(false);
- setHeight(60);
- messagesPanel = new SimpleMessagePanel();
- messagesPanel.setMessage("", SiteErrorType.info, SiteErrorType.error);
- add(messagesPanel);
- }
-
- public void hide() {
- messagesPanel.hide();
- super.hide();
- }
-
- public void setMessage(final String message, final SiteErrorType lastMessageType, final SiteErrorType type) {
- messagesPanel.setMessage(message, lastMessageType, type);
- }
-
- public void show() {
- messagesPanel.show();
- super.show();
- }
- }
-
- private BasicDialog dialog;
- private final SignInPresenter presenter;
- private SignInForm signInForm;
- private RegisterForm registerForm;
- private MessagePanel messagesSignInPanel;
- private InfoDialog welcomeDialog;
- private TabPanel centerPanel;
- private MessagePanel messagesRegisterPanel;
- private final I18nUITranslationService i18n;
-
- public SignInPanel(final SignInPresenter presenter, final I18nUITranslationService i18n, final WorkspaceSkeleton ws) {
- this.i18n = i18n;
- Field.setMsgTarget("side");
- this.presenter = presenter;
- createPanel();
- }
-
- public void center() {
- dialog.center();
- }
-
- public String getCountry() {
- return registerForm.getCountry();
- }
-
- public String getEmail() {
- return registerForm.getEmail();
- }
-
- public String getLanguage() {
- return registerForm.getLanguage();
- }
-
- public String getLoginPassword() {
- return signInForm.getLoginPassword();
- }
-
- public String getLongName() {
- return registerForm.getLongName();
- }
-
- public String getNickOrEmail() {
- return signInForm.getNickOrEmail();
- }
-
- public String getRegisterPassword() {
- return registerForm.getRegisterPassword();
- }
-
- public String getRegisterPasswordDup() {
- return registerForm.getRegisterPasswordDup();
- }
-
- public String getShortName() {
- return registerForm.getShortName();
- }
-
- public String getTimezone() {
- return registerForm.getTimezone();
- }
-
- public void hide() {
- dialog.hide();
- }
-
- public void hideMessages() {
- messagesSignInPanel.hide();
- if (messagesRegisterPanel != null) {
- messagesRegisterPanel.hide();
- }
- renderDialogIfNeeded();
- }
-
- public boolean isRegisterFormValid() {
- return registerForm.isValid();
- }
-
- public boolean isSignInFormValid() {
- return signInForm.isValid();
- }
-
- public void mask(final String message) {
- dialog.getEl().mask(message, "x-mask-loading");
- }
-
- public void maskProcessing() {
- mask(i18n.t("Processing"));
- }
-
- public void reset() {
- DeferredCommand.addCommand(new Command() {
- public void execute() {
- signInForm.reset();
- if (registerForm != null) {
- registerForm.reset();
- }
- }
- });
- }
-
- public void setRegisterMessage(final String message, final SiteErrorType type) {
- messagesRegisterPanel.setMessage(message, type, type);
- messagesRegisterPanel.show();
- renderDialogIfNeeded();
- }
-
- public void setSignInMessage(final String message, final SiteErrorType type) {
- messagesSignInPanel.setMessage(message, type, type);
- messagesSignInPanel.show();
- renderDialogIfNeeded();
- }
-
- public void show() {
- centerPanel.activate(0);
- dialog.setVisible(true);
- dialog.show();
- Site.hideProgress();
- dialog.focus();
- signInForm.focusLogin();
- }
-
- public void showWelcolmeDialog() {
- if (welcomeDialog == null) {
- welcomeDialog = new InfoDialog(i18n.t("Welcome"), i18n.t("Thanks for registering"), i18n
- .t("Now you can participate more actively in this site with other people and groups. "
- + "You can also use your personal space to publish contents. "
- + "Your email is not verified, please follow the instructions you will receive by email."),
- i18n.t("Ok"), true, true, 400, 270);
- }
- welcomeDialog.show();
- }
-
- public void unMask() {
- dialog.getEl().unmask();
- }
-
- private void confPanel(final Panel panel) {
- // panel.setLayout(new FormLayout());
- // panel.setAutoWidth(true);
- // anel.setAutoHeight(true);
- }
-
- private Panel createNoAccountRegister() {
- final Panel noAccRegisterPanel = new Panel();
- noAccRegisterPanel.setBorder(false);
- noAccRegisterPanel.setMargins(0, 90, 0, 0);
- final Label dontHaveAccountLabel = new Label(i18n.t("Don't have an account?"));
- final Label registerLabel = new Label(i18n.t("Create one."));
- registerLabel.addClickListener(new ClickListener() {
- public void onClick(final Widget arg0) {
- centerPanel.activate(1);
- }
- });
- registerLabel.addStyleName("kune-Margin-Medium-l");
- registerLabel.addStyleName("kune-link");
- noAccRegisterPanel.add(dontHaveAccountLabel);
- noAccRegisterPanel.add(registerLabel);
- return noAccRegisterPanel;
- }
-
- private void createPanel() {
- dialog = new BasicDialog(i18n.t("Sign in"), true, false, 370, 400);
- dialog.setLayout(new FitLayout());
- final Panel dialogPanel = new Panel();
- dialogPanel.setLayout(new BorderLayout());
- // dialog.setAutoHeight(false);
- // dialog.setAutoWidth(false);
- // dialog.setAutoHeight(true);
- // dialog.setAutoWidth(true);
- dialogPanel.setHeight("100%");
- dialogPanel.setWidth("auto");
- // dialog.setCollapsible(false);
-
- centerPanel = new TabPanel();
- centerPanel.setActiveTab(0);
- // centerPanel.setAutoWidth(true);
- // centerPanel.setAutoHeight(true);
- centerPanel.setClosable(false);
-
- final Panel signInPanel = new Panel(i18n.t("Sign in"));
- confPanel(signInPanel);
- signInForm = new SignInForm(i18n);
- signInPanel.add(signInForm.getForm());
- signInPanel.add(createNoAccountRegister());
- messagesSignInPanel = new MessagePanel();
- signInPanel.add(messagesSignInPanel);
-
- final Panel registerPanel = new Panel(i18n.t("Register"));
- confPanel(registerPanel);
-
- centerPanel.add(signInPanel);
- centerPanel.add(registerPanel);
- dialogPanel.add(centerPanel, new BorderLayoutData(RegionPosition.CENTER));
- dialog.add(dialogPanel);
-
- final Button signInBtn = new Button(i18n.t("Sign in"));
- signInBtn.addListener(new ButtonListenerAdapter() {
- public void onClick(final Button button, final EventObject e) {
- signInForm.validate();
- if (signInForm.isValid()) {
- presenter.onFormSignIn();
- }
- }
- });
- dialog.addButton(signInBtn);
-
- final Button registerBtn = new Button(i18n.t("Register"));
- registerBtn.addListener(new ButtonListenerAdapter() {
- public void onClick(final Button button, final EventObject e) {
- registerForm.validate();
- if (registerForm.isValid()) {
- presenter.onFormRegister();
- }
- }
- });
- dialog.addButton(registerBtn);
- registerBtn.hide();
-
- final Button cancel = new Button();
- dialog.addButton(cancel);
- cancel.setText(i18n.tWithNT("Cancel", "used in button"));
- cancel.addListener(new ButtonListenerAdapter() {
- public void onClick(final Button button, final EventObject e) {
- presenter.onCancel();
- }
- });
-
- signInPanel.addListener(new PanelListenerAdapter() {
- public void onActivate(final Panel panel) {
- dialog.setTitle(i18n.t("Sign in"));
- registerBtn.hide();
- signInBtn.show();
- }
- });
-
- registerPanel.addListener(new PanelListenerAdapter() {
- public void onActivate(final Panel panel) {
- if (registerForm == null) {
- maskProcessing();
- registerForm = new RegisterForm(presenter, i18n);
- registerPanel.add(registerForm.getForm());
- messagesRegisterPanel = new MessagePanel();
- registerPanel.add(messagesRegisterPanel);
- messagesRegisterPanel.hide();
- renderDialogIfNeeded();
- unMask();
- }
- dialog.setTitle(i18n.t("Register"));
- signInBtn.hide();
- registerBtn.show();
- }
- });
-
- dialog.addListener(new WindowListenerAdapter() {
- public void onHide(final Component component) {
- presenter.onClose();
- }
- });
- hideMessages();
- renderDialogIfNeeded();
- }
-
- private void renderDialogIfNeeded() {
- if (dialog.isRendered()) {
- dialog.doLayout();
- }
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInPresenter.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInPresenter.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,218 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.sitebar.login;
-
-import java.util.Date;
-
-import org.ourproject.kune.platf.client.dto.I18nCountryDTO;
-import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
-import org.ourproject.kune.platf.client.dto.StateToken;
-import org.ourproject.kune.platf.client.dto.TimeZoneDTO;
-import org.ourproject.kune.platf.client.dto.UserDTO;
-import org.ourproject.kune.platf.client.dto.UserInfoDTO;
-import org.ourproject.kune.platf.client.errors.EmailAddressInUseException;
-import org.ourproject.kune.platf.client.errors.GroupNameInUseException;
-import org.ourproject.kune.platf.client.errors.UserAuthException;
-import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.sitebar.rpc.UserServiceAsync;
-
-import com.calclab.emite.client.im.roster.RosterManager.SubscriptionMode;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.Cookies;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-public class SignInPresenter implements SignIn {
-
- SignInView view;
- private final Session session;
- private final I18nUITranslationService i18n;
- private final UserServiceAsync userService;
- private final StateManager stateManager;
- private StateToken previousStateToken;
-
- public SignInPresenter(final Session session, final StateManager stateManager, final I18nUITranslationService i18n,
- final UserServiceAsync userService) {
- this.session = session;
- this.stateManager = stateManager;
- this.userService = userService;
- this.i18n = i18n;
- }
-
- public void doSignIn(final StateToken previousStateToken) {
- this.previousStateToken = previousStateToken;
- if (!session.isLogged()) {
- Site.showProgressProcessing();
- view.show();
- view.center();
- Site.hideProgress();
- } else {
- stateManager.setState(previousStateToken);
- }
- }
-
- public Object[][] getCountries() {
- return session.getCountriesArray();
- }
-
- public I18nLanguageDTO getCurrentLanguage() {
- return session.getCurrentLanguage();
- }
-
- public Object[][] getLanguages() {
- return session.getLanguagesArray();
- }
-
- public Object[][] getTimezones() {
- return session.getTimezones();
- }
-
- public void init(final SignInView loginview) {
- this.view = loginview;
- }
-
- public void onCancel() {
- resetMessages();
- reset();
- view.hide();
- stateManager.setState(previousStateToken);
- }
-
- public void onClose() {
- reset();
- view.hideMessages();
- if (!session.isLogged()) {
- stateManager.setState(previousStateToken);
- }
- }
-
- public void onFormRegister() {
- if (view.isRegisterFormValid()) {
- view.maskProcessing();
-
- final I18nLanguageDTO language = new I18nLanguageDTO();
- language.setCode(view.getLanguage());
-
- final I18nCountryDTO country = new I18nCountryDTO();
- country.setCode(view.getCountry());
-
- final TimeZoneDTO timezone = new TimeZoneDTO();
- timezone.setId(view.getTimezone());
-
- final UserDTO user = new UserDTO(view.getLongName(), view.getShortName(), view.getRegisterPassword(), view
- .getEmail(), language, country, timezone, null, true, SubscriptionMode.manual, "blue");
- final AsyncCallback<UserInfoDTO> callback = new AsyncCallback<UserInfoDTO>() {
- public void onFailure(final Throwable caught) {
- view.unMask();
- try {
- throw caught;
- } catch (final EmailAddressInUseException e) {
- view.setRegisterMessage(i18n.t("This email in in use by other person, try with another."),
- SiteErrorType.error);
- } catch (final GroupNameInUseException e) {
- view.setRegisterMessage(i18n.t("This name in already in use, try with a different name."),
- SiteErrorType.error);
- } catch (final Throwable e) {
- view.setRegisterMessage(i18n.t("Error during registration."), SiteErrorType.error);
- GWT.log("Other kind of exception in user registration" + e.getMessage() + ", "
- + e.getLocalizedMessage(), null);
- e.printStackTrace();
- throw new RuntimeException();
- }
- }
-
- public void onSuccess(final UserInfoDTO userInfoDTO) {
- stateManager.gotoToken(userInfoDTO.getHomePage());
- onSignIn(userInfoDTO);
- view.hide();
- view.unMask();
- view.showWelcolmeDialog();
- }
- };
- userService.createUser(user, callback);
- }
- }
-
- protected void onFormSignIn() {
- if (view.isSignInFormValid()) {
- view.maskProcessing();
-
- final String nickOrEmail = view.getNickOrEmail();
- final String passwd = view.getLoginPassword();
-
- final UserDTO user = new UserDTO();
- user.setShortName(nickOrEmail);
- user.setPassword(passwd);
-
- final AsyncCallback<UserInfoDTO> callback = new AsyncCallback<UserInfoDTO>() {
- public void onFailure(final Throwable caught) {
- view.unMask();
- Site.hideProgress();
- try {
- throw caught;
- } catch (final UserAuthException e) {
- view.setSignInMessage(i18n.t("Incorrect nickname/email or password"), SiteErrorType.error);
- } catch (final Throwable e) {
- view.setSignInMessage("Error in login", SiteErrorType.error);
- GWT.log("Other kind of exception in LoginFormPresenter/doLogin", null);
- throw new RuntimeException();
- }
- }
-
- public void onSuccess(final UserInfoDTO userInfoDTO) {
- stateManager.setState(previousStateToken);
- onSignIn(userInfoDTO);
- view.hide();
- view.unMask();
- }
- };
- userService.login(user.getShortName(), user.getPassword(), callback);
- }
- }
-
- private void onSignIn(final UserInfoDTO userInfoDTO) {
- setCookie(userInfoDTO);
- session.setUserHash(userInfoDTO.getUserHash());
- session.setCurrentUserInfo(userInfoDTO);
- final I18nLanguageDTO language = userInfoDTO.getLanguage();
- i18n.changeCurrentLanguage(language.getCode());
- session.setCurrentLanguage(language);
- }
-
- private void reset() {
- view.reset();
- }
-
- private void resetMessages() {
- view.hideMessages();
- }
-
- private void setCookie(final UserInfoDTO userInfoDTO) {
- // http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ
- final String sessionId = userInfoDTO.getUserHash();
- final long duration = Session.SESSION_DURATION;
- final Date expires = new Date(System.currentTimeMillis() + duration);
- Cookies.setCookie(Site.USERHASH, sessionId, expires, null, "/", false);
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInView.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/login/SignInView.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,71 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.sitebar.login;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
-
-public interface SignInView extends View {
-
- public void center();
-
- public String getCountry();
-
- public String getEmail();
-
- public String getLanguage();
-
- public String getLoginPassword();
-
- public String getLongName();
-
- public String getNickOrEmail();
-
- public String getRegisterPassword();
-
- public String getRegisterPasswordDup();
-
- public String getShortName();
-
- public String getTimezone();
-
- public void hide();
-
- public void hideMessages();
-
- public boolean isRegisterFormValid();
-
- public boolean isSignInFormValid();
-
- public void maskProcessing();
-
- public void reset();
-
- public void show();
-
- public void showWelcolmeDialog();
-
- public void unMask();
-
- void setRegisterMessage(String message, SiteErrorType type);
-
- void setSignInMessage(String message, SiteErrorType type);
-
-}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg (from rev 841, trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg)
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/MessagePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/MessagePresenter.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/MessagePresenter.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -18,7 +18,7 @@
*
*/
-package org.ourproject.kune.workspace.client.sitebar.msg;
+package org.ourproject.kune.workspace.client.site.msg;
import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SimpleMessagePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SimpleMessagePanel.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SimpleMessagePanel.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,4 +1,4 @@
-package org.ourproject.kune.workspace.client.sitebar.msg;
+package org.ourproject.kune.workspace.client.site.msg;
import org.ourproject.kune.platf.client.services.Images;
import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessage.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessage.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessage.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.sitebar.msg;
+package org.ourproject.kune.workspace.client.site.msg;
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessagePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessagePanel.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessagePanel.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.sitebar.msg;
+package org.ourproject.kune.workspace.client.site.msg;
import org.ourproject.kune.platf.client.services.Images;
import org.ourproject.kune.platf.client.ui.KuneUiUtils;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessagePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessagePresenter.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessagePresenter.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.sitebar.msg;
+package org.ourproject.kune.workspace.client.site.msg;
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessageView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessageView.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessageView.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.sitebar.msg;
+package org.ourproject.kune.workspace.client.site.msg;
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/site/rpc (from rev 841, trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/rpc)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/rpc/SiteBarServiceMocked.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/rpc/SiteBarServiceMocked.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/rpc/SiteBarServiceMocked.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -1,68 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.sitebar.rpc;
-
-import org.ourproject.kune.platf.client.dto.UserDTO;
-import org.ourproject.kune.platf.client.dto.UserInfoDTO;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-public class SiteBarServiceMocked implements UserServiceAsync {
-
- public void login(final String nick, final String pass, final AsyncCallback<UserInfoDTO> callback) {
- Site.showProgress("Login");
- Timer timer = new Timer() {
- public void run() {
- Site.hideProgress();
- callback.onSuccess(new UserInfoDTO());
- }
- };
- timer.schedule(1000);
- }
-
- public void logout(final String userHash, final AsyncCallback<?> callback) {
- timerAndSuccess(callback);
- }
-
- @SuppressWarnings("unchecked")
- private void timerAndSuccess(final AsyncCallback callback) {
- Timer timer = new Timer() {
- public void run() {
- callback.onSuccess(null);
- }
- };
- timer.schedule(1000);
- }
-
- public void createUser(final UserDTO user, final AsyncCallback<UserInfoDTO> asyncCallback) {
- timerAndSuccess(asyncCallback);
- }
-
- public void reloadUserInfo(final String userHash, final AsyncCallback<UserInfoDTO> asyncCallback) {
- timerAndSuccess(asyncCallback);
- }
-
- public void onlyCheckSession(final String userHash, final AsyncCallback<?> asyncCallback) {
- timerAndSuccess(asyncCallback);
- }
-}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/rpc/UserService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/rpc/UserService.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/rpc/UserService.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -18,7 +18,7 @@
*
*/
-package org.ourproject.kune.workspace.client.sitebar.rpc;
+package org.ourproject.kune.workspace.client.site.rpc;
import org.ourproject.kune.platf.client.dto.UserDTO;
import org.ourproject.kune.platf.client.dto.UserInfoDTO;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/rpc/UserServiceAsync.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/rpc/UserServiceAsync.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/rpc/UserServiceAsync.java 2008-09-08 00:57:22 UTC (rev 852)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.sitebar.rpc;
+package org.ourproject.kune.workspace.client.site.rpc;
import org.ourproject.kune.platf.client.dto.UserDTO;
import org.ourproject.kune.platf.client.dto.UserInfoDTO;
1
0
Author: vjrj
Date: 2008-09-08 02:57:02 +0200 (Mon, 08 Sep 2008)
New Revision: 851
Removed:
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/
Log:
Refactorization
1
0
Author: vjrj
Date: 2008-09-08 02:56:46 +0200 (Mon, 08 Sep 2008)
New Revision: 850
Added:
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigator.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorItem.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorView.java
Removed:
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItems.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsImages.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextTopBar.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ControlsPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ItemsPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/bullet_arrow_right.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/chat-blue.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/chat-green.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/folder-go-up-light.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/folder-go-up.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/folder.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/folder_add.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/folderpathmenu.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/go-up-light.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/go-up.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/page.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/page_add.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/page_white.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/page_white_add.png
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/licensefoot/
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/themes/
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/title/
Modified:
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitelogo/SiteLogoPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitenewgroup/SiteNewGroupLinkPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteoptions/SiteOptionsPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesearch/SiteSearchPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPanel.java
Log:
Refactorization
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav (from rev 841, trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItems.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItems.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItems.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,45 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.items;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.dto.AccessRightsDTO;
-import org.ourproject.kune.platf.client.dto.ContainerDTO;
-import org.ourproject.kune.platf.client.dto.StateToken;
-
-import com.calclab.suco.client.signal.Slot;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-
-public interface ContextItems {
-
- public void canCreate(String buttonTitle, String promptMessage, Slot<String> slot);
-
- public View getView();
-
- public void registerType(String typeName, AbstractImagePrototype pageWhite);
-
- public void setControlsVisible(boolean visible);
-
- public void setParentTreeVisible(boolean visible);
-
- public void showContainer(StateToken state, ContainerDTO container, AccessRightsDTO rights);
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsImages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsImages.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsImages.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,87 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.items;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-import com.google.gwt.user.client.ui.ImageBundle;
-
-/**
- *
- * http://code.google.com/p/google-web-toolkit/wiki/ImageBundleDesign
- *
- */
-public interface ContextItemsImages extends ImageBundle {
-
- public static class App {
- private static ContextItemsImages ourInstance = null;
-
- public static synchronized ContextItemsImages getInstance() {
- if (ourInstance == null) {
- ourInstance = (ContextItemsImages) GWT.create(ContextItemsImages.class);
- }
- return ourInstance;
- }
- }
-
- @Resource("bullet_arrow_right.png")
- AbstractImagePrototype bulletArrowRight();
-
- @Resource("chat-blue.png")
- AbstractImagePrototype chatBlue();
-
- @Resource("chat-green.png")
- AbstractImagePrototype chatGreen();
-
- @Resource("folder.png")
- AbstractImagePrototype folder();
-
- @Resource("folder_add.png")
- AbstractImagePrototype folderAdd();
-
- @Resource("folder-go-up.png")
- AbstractImagePrototype folderGoUp();
-
- @Resource("folder-go-up-light.png")
- AbstractImagePrototype folderGoUpLight();
-
- @Resource("folderpathmenu.png")
- AbstractImagePrototype folderpathmenu();
-
- @Resource("go-up.png")
- AbstractImagePrototype goUp();
-
- @Resource("go-up-light.png")
- AbstractImagePrototype goUpLight();
-
- @Resource("page.png")
- AbstractImagePrototype page();
-
- @Resource("page_add.png")
- AbstractImagePrototype pageAdd();
-
- @Resource("page_white.png")
- AbstractImagePrototype pageWhite();
-
- @Resource("page_white_add.png")
- AbstractImagePrototype pageWhiteAdd();
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsPanel.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,129 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.items;
-
-import org.ourproject.kune.platf.client.dto.ContainerSimpleDTO;
-import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.platf.client.services.Images;
-import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.platf.client.ui.HorizontalLine;
-import org.ourproject.kune.platf.client.ui.IconLabel;
-
-import com.calclab.suco.client.signal.Slot;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.DockPanel;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-import com.gwtext.client.widgets.MessageBox;
-
-public class ContextItemsPanel extends DockPanel implements ContextItemsView {
- private final VerticalPanel controls;
- private final ItemsPanel items;
- private final ContextTopBar topBar;
- private final I18nTranslationService i18n;
-
- public ContextItemsPanel(final ContextItemsPresenter presenter, final I18nTranslationService i18n,
- final StateManager stateManager) {
- this.i18n = i18n;
- topBar = new ContextTopBar(presenter, i18n, stateManager);
- addTopBar(topBar);
-
- items = new ItemsPanel(presenter);
- add(items, DockPanel.NORTH);
- final HTML expand = new HTML("<b></b>");
- add(expand, DockPanel.CENTER);
- controls = new VerticalPanel();
- add(controls, DockPanel.SOUTH);
- controls.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);
- final HorizontalLine horizontalLine = new HorizontalLine();
- controls.add(horizontalLine);
-
- // setHeight("100%");
- expand.setHeight("15px");
- setCellHeight(expand, "15px");
- addStyleName("kune-NavigationBar");
- controls.setWidth("100%");
- controls.setCellWidth(horizontalLine, "100%");
- horizontalLine.setWidth("100%");
- }
-
- public void addCommand(final String buttonText, final String promptMessage, final Slot<String> slot) {
- final IconLabel iconLabel = new IconLabel(Images.App.getInstance().addGreen(), buttonText);
- iconLabel.addClickListener(new ClickListener() {
- public void onClick(final Widget sender) {
- promptName(promptMessage, slot);
- }
- });
- iconLabel.addStyleName("kune-ContextItemsPanel-LabelLink");
- controls.add(iconLabel);
-
- }
-
- public void addItem(final String name, final String type, final String event, final boolean editable) {
- items.add(name, type, event, editable);
- }
-
- public void clear() {
- items.clear();
- }
-
- public void promptName(final String title, final Slot<String> slot) {
- MessageBox.prompt(title, i18n.t("Please enter a name:"), new MessageBox.PromptCallback() {
- public void execute(final String btnID, final String text) {
- slot.onEvent(text);
- }
- });
- }
-
- public void registerType(final String typeName, final AbstractImagePrototype image) {
- items.registerType(typeName, image);
- }
-
- public void selectItem(final int index) {
- }
-
- public void setAbsolutePath(final ContainerSimpleDTO[] absolutePath) {
- topBar.setAbsolutePath(absolutePath);
- }
-
- public void setControlsVisible(final boolean visible) {
- controls.setVisible(visible);
- }
-
- public void setCurrentName(final String name) {
- topBar.currentFolder.setText(name);
- }
-
- public void setParentButtonEnabled(final boolean isEnabled) {
- topBar.btnGoParent.setVisible(isEnabled);
- topBar.btnGoParentDisabled.setVisible(!isEnabled);
- }
-
- public void setParentTreeVisible(final boolean visible) {
- topBar.firstRow.setVisible(visible);
- }
-
- private void addTopBar(final Widget widget) {
- add(topBar, DockPanel.NORTH);
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsPresenter.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsPresenter.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,129 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.items;
-
-import java.util.List;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.dto.AccessRightsDTO;
-import org.ourproject.kune.platf.client.dto.ContainerDTO;
-import org.ourproject.kune.platf.client.dto.ContentDTO;
-import org.ourproject.kune.platf.client.dto.StateDTO;
-import org.ourproject.kune.platf.client.dto.StateToken;
-import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
-import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
-import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-
-import com.calclab.suco.client.container.Provider;
-import com.calclab.suco.client.signal.Slot;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-
-public class ContextItemsPresenter implements ContextItems {
- protected ContextItemsView view;
- private final I18nTranslationService i18n;
- private final StateManager stateManager;
- private final Session session;
- private final Provider<ContentServiceAsync> contentServiceProvider;
-
- public ContextItemsPresenter(final I18nTranslationService i18n, final StateManager stateManager,
- final Session session, final Provider<ContentServiceAsync> contentServiceProvider) {
- this.i18n = i18n;
- this.stateManager = stateManager;
- this.session = session;
- this.contentServiceProvider = contentServiceProvider;
- }
-
- public void canCreate(final String buttonText, final String promptMessage, final Slot<String> slot) {
- view.addCommand(buttonText, promptMessage, slot);
- }
-
- public View getView() {
- return view;
- }
-
- public void init(final ContextItemsView view) {
- this.view = view;
- }
-
- public void onGoUp() {
- final StateDTO state = session.getCurrentState();
- final StateToken token = state.getStateToken();
- token.setDocument(null);
- token.setFolder(state.getFolder().getParentFolderId().toString());
- stateManager.setState(token);
- }
-
- public void onTitleRename(final String newName, final String token) {
- Site.showProgressSaving();
- final StateDTO currentState = session.getCurrentState();
- contentServiceProvider.get().rename(session.getUserHash(), currentState.getGroup().getShortName(), token,
- newName, new AsyncCallbackSimple<String>() {
- public void onSuccess(final String result) {
- stateManager.reloadContextAndTitles();
- Site.hideProgress();
- }
- });
- }
-
- public void registerType(final String typeName, final AbstractImagePrototype image) {
- view.registerType(typeName, image);
- }
-
- public void setControlsVisible(final boolean visible) {
- view.setControlsVisible(visible);
- }
-
- public void setParentTreeVisible(final boolean visible) {
- view.setParentTreeVisible(visible);
- }
-
- public void showContainer(final StateToken state, final ContainerDTO container, final AccessRightsDTO rights) {
- state.setDocument(null);
- if (container.getParentFolderId() == null) {
- // We translate root folder names (documents, chat room,
- // etcetera)
- view.setCurrentName(i18n.t(container.getName()));
- } else {
- view.setCurrentName(container.getName());
- }
- view.clear();
- final List<ContainerDTO> folders = container.getChilds();
- for (int index = 0; index < folders.size(); index++) {
- final ContainerDTO child = folders.get(index);
- state.setFolder(child.getId().toString());
- view.addItem(child.getName(), child.getTypeId(), state.getEncoded(), rights.isEditable());
- }
-
- state.setFolder(container.getId().toString());
- final List<ContentDTO> contents = container.getContents();
- for (int index = 0; index < contents.size(); index++) {
- final ContentDTO dto = contents.get(index);
- state.setDocument(dto.getId().toString());
- view.addItem(dto.getTitle(), dto.getTypeId(), state.getEncoded(), rights.isEditable());
- }
- view.setParentButtonEnabled(container.getParentFolderId() != null);
- view.setControlsVisible(rights.isEditable());
- view.setAbsolutePath(container.getAbsolutePath());
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsView.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextItemsView.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,51 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.items;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.dto.ContainerSimpleDTO;
-
-import com.calclab.suco.client.signal.Slot;
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-
-public interface ContextItemsView extends View {
-
- void addCommand(String buttonTitle, String promptMessage, Slot<String> slot);
-
- void addItem(String name, String type, String event, boolean editable);
-
- void clear();
-
- void registerType(String typeName, AbstractImagePrototype image);
-
- void selectItem(int index);
-
- void setAbsolutePath(ContainerSimpleDTO[] absolutePath);
-
- void setControlsVisible(boolean isVisible);
-
- void setCurrentName(String name);
-
- void setParentButtonEnabled(boolean isEnabled);
-
- void setParentTreeVisible(boolean b);
-
-}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigator.java (from rev 845, trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextNavigator.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextNavigator.java 2008-09-08 00:11:31 UTC (rev 845)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigator.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -0,0 +1,46 @@
+/*
+ *
+ * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.nav;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.actions.ActionDescriptor;
+import org.ourproject.kune.platf.client.dto.StateDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
+
+public interface ContextNavigator {
+
+ void addAction(String contentTypeId, ActionDescriptor<StateToken> action);
+
+ void editItem(StateToken stateToken);
+
+ View getView();
+
+ void registerDraggableType(String typeId);
+
+ void registerDroppableType(String typeId);
+
+ void removeAction(String contentTypeId, ActionDescriptor<StateToken> action);
+
+ void selectItem(StateToken stateToken);
+
+ void setState(StateDTO state);
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorItem.java (from rev 845, trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextNavigatorItem.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextNavigatorItem.java 2008-09-08 00:11:31 UTC (rev 845)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorItem.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -0,0 +1,68 @@
+package org.ourproject.kune.workspace.client.ui.ctx.nav;
+
+import org.ourproject.kune.platf.client.actions.ActionCollection;
+import org.ourproject.kune.platf.client.dto.ContentStatusDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
+
+public class ContextNavigatorItem {
+ private final String id;
+ private final String parentId;
+ private final String iconUrl;
+ private final String text;
+ private final ContentStatusDTO contentStatusDTO;
+ private final StateToken token;
+ private final ActionCollection<StateToken> actionCollection;
+ private final boolean allowDrag;
+ private final boolean allowDrop;
+
+ public ContextNavigatorItem(final String id, final String parentId, final String iconUrl, final String text,
+ final ContentStatusDTO contentStatusDTO, final StateToken token, final boolean allowDrag,
+ final boolean allowDrop, final ActionCollection<StateToken> actionCollection) {
+ this.id = id;
+ this.parentId = parentId;
+ this.iconUrl = iconUrl;
+ this.text = text;
+ this.contentStatusDTO = contentStatusDTO;
+ this.token = token;
+ this.allowDrag = allowDrag;
+ this.allowDrop = allowDrop;
+ this.actionCollection = actionCollection;
+ }
+
+ public ActionCollection<StateToken> getActionCollection() {
+ return actionCollection;
+ }
+
+ public ContentStatusDTO getContentStatus() {
+ return contentStatusDTO;
+ }
+
+ public String getIconUrl() {
+ return iconUrl;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getParentId() {
+ return parentId;
+ }
+
+ public StateToken getStateToken() {
+ return token;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public boolean isDraggable() {
+ return allowDrag;
+ }
+
+ public boolean isDroppable() {
+ return allowDrop;
+ }
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorPanel.java (from rev 845, trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextNavigatorPanel.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextNavigatorPanel.java 2008-09-08 00:11:31 UTC (rev 845)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -0,0 +1,325 @@
+/*
+ *
+ * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.nav;
+
+import java.util.HashMap;
+
+import org.ourproject.kune.platf.client.actions.ActionCollection;
+import org.ourproject.kune.platf.client.actions.ActionDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionManager;
+import org.ourproject.kune.platf.client.dto.StateToken;
+import org.ourproject.kune.platf.client.services.I18nTranslationService;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.workspace.client.skel.Toolbar;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+
+import com.allen_sauer.gwt.log.client.Log;
+import com.calclab.suco.client.provider.Provider;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.DeferredCommand;
+import com.gwtext.client.core.EventObject;
+import com.gwtext.client.data.Node;
+import com.gwtext.client.widgets.Button;
+import com.gwtext.client.widgets.Editor;
+import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.ToolbarButton;
+import com.gwtext.client.widgets.event.ButtonListenerAdapter;
+import com.gwtext.client.widgets.event.EditorListenerAdapter;
+import com.gwtext.client.widgets.form.TextField;
+import com.gwtext.client.widgets.menu.BaseItem;
+import com.gwtext.client.widgets.menu.Item;
+import com.gwtext.client.widgets.menu.Menu;
+import com.gwtext.client.widgets.menu.MenuItem;
+import com.gwtext.client.widgets.menu.event.BaseItemListenerAdapter;
+import com.gwtext.client.widgets.tree.TreeEditor;
+import com.gwtext.client.widgets.tree.TreeNode;
+import com.gwtext.client.widgets.tree.TreePanel;
+import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
+import com.gwtext.client.widgets.tree.event.TreePanelListenerAdapter;
+
+public class ContextNavigatorPanel implements ContextNavigatorView {
+
+ private TreePanel treePanel;
+ private TreeEditor treeEditor;
+ private final HashMap<String, Menu> contextMenus;
+ private final HashMap<String, Menu> toolbarMenus;
+ private final WorkspaceSkeleton ws;
+ private final Provider<ActionManager> actionManagerProvider;
+ private final StateManager stateManager;
+
+ public ContextNavigatorPanel(final ContextNavigatorPresenter presenter, final I18nTranslationService i18n,
+ final StateManager stateManager, final WorkspaceSkeleton ws,
+ final Provider<ActionManager> actionManagerProvider) {
+ this.stateManager = stateManager;
+ this.ws = ws;
+ this.actionManagerProvider = actionManagerProvider;
+
+ contextMenus = new HashMap<String, Menu>();
+ toolbarMenus = new HashMap<String, Menu>();
+ }
+
+ public void addItem(final ContextNavigatorItem item) {
+ final String nodeId = item.getId();
+ if (treePanel.getNodeById(nodeId) == null) {
+ final TreeNode child = new TreeNode(item.getText());
+ child.setId(nodeId);
+ final String icon = item.getIconUrl();
+ if (icon != null) {
+ child.setIcon(icon);
+ }
+ child.setHref("#" + item.getStateToken().toString());
+ child.setAllowDrag(item.isDraggable());
+ child.setAllowDrop(item.isDroppable());
+ switch (item.getContentStatus()) {
+ case publicVisible:
+ child.enable();
+ break;
+ case markForDelection:
+ child.setCls("k-linethrough");
+ case nonPublicVisible:
+ child.disable();
+ break;
+ }
+ contextMenus.put(nodeId, createItemMenu(item.getActionCollection(), item.getStateToken()));
+ final TreeNode parent = treePanel.getNodeById(item.getParentId());
+ if (parent != null) {
+ Log.info("Adding child node: " + nodeId + " to folder: " + item.getParentId());
+ if (!item.getStateToken().hasAll()) {
+ child.setExpandable(true);
+ child.addListener(new TreeNodeListenerAdapter() {
+ public void onExpand(final Node node) {
+ treePanel.getNodeById(node.getId()).select();
+ stateManager.gotoToken(node.getAttribute("href").substring(1));
+ }
+ });
+ } else {
+ child.setLeaf(true);
+ }
+ parent.appendChild(child);
+ } else {
+ Log.error("Error building file tree, parent folder not found");
+ }
+ } else {
+ // the node already created
+ if (contextMenus.get(nodeId) == null && item.getActionCollection() != null) {
+ contextMenus.put(nodeId, createItemMenu(item.getActionCollection(), item.getStateToken()));
+ }
+ }
+
+ }
+
+ public void clear() {
+ if (treePanel != null) {
+ treePanel.clear();
+ }
+ contextMenus.clear();
+ toolbarMenus.clear();
+ }
+
+ public void editItem(final String id) {
+ treeEditor.startEdit(getNode(id));
+ }
+
+ public void selectItem(final String id) {
+ final TreeNode item = getNode(id);
+ if (item != null) {
+ item.select();
+ item.ensureVisible();
+ if (item.getChildNodes().length > 0) {
+ item.expand();
+ }
+ } else {
+ Log.error("Error building file tree, current token not found");
+ }
+ }
+
+ public void setBottomActions(final StateToken stateToken, final ActionCollection<StateToken> actions) {
+ final Toolbar toolBar = ws.getEntityWorkspace().getContextBottomBar();
+ setToolbarActions(toolBar, stateToken, actions);
+ }
+
+ public void setRootItem(final String id, final String text, final StateToken stateToken) {
+ if (treePanel == null || treePanel.getNodeById(id) == null) {
+ createTreePanel(id);
+ }
+ }
+
+ public void setTopActions(final StateToken stateToken, final ActionCollection<StateToken> actions) {
+ final Toolbar toolBar = ws.getEntityWorkspace().getContextTopBar();
+ setToolbarActions(toolBar, stateToken, actions);
+ }
+
+ private Menu createItemMenu(final ActionCollection<StateToken> actionCollection, final StateToken stateToken) {
+ if (actionCollection != null) {
+ final Menu menu = new Menu();
+ // Remove if when retrieved rights of siblings
+ for (final ActionDescriptor<StateToken> action : actionCollection) {
+ final Item item = new Item(action.getText());
+ item.setIcon(action.getIconUrl());
+ menu.addItem(item);
+ item.addListener(new BaseItemListenerAdapter() {
+ public void onClick(final BaseItem item, final EventObject e) {
+ DeferredCommand.addCommand(new Command() {
+ public void execute() {
+ actionManagerProvider.get().doAction(action, stateToken);
+ }
+ });
+ }
+ });
+ }
+ return menu;
+ }
+ return null;
+ }
+
+ private Menu createToolbarMenu(final Toolbar bar, final String iconUrl, final String menuTitle) {
+ final Menu menu = new Menu();
+ final ToolbarButton toolbarMenu = new ToolbarButton(menuTitle);
+ if (iconUrl != null) {
+ toolbarMenu.setIcon(iconUrl);
+ }
+ toolbarMenu.addListener(new ButtonListenerAdapter() {
+ @Override
+ public void onClick(final Button button, final EventObject e) {
+ menu.showAt(e.getXY());
+ }
+ });
+ toolbarMenus.put(menuTitle, menu);
+ bar.add(toolbarMenu);
+ return menu;
+ }
+
+ private void createTreePanel(final String rootId) {
+ if (treePanel != null) {
+ clear();
+ }
+ treePanel = new TreePanel();
+ treePanel.setAnimate(true);
+ treePanel.setBorder(false);
+ treePanel.setRootVisible(false);
+ treePanel.setUseArrows(true);
+ final TreeNode root = new TreeNode();
+ root.setAllowDrag(false);
+ root.setExpanded(true);
+ root.setId(rootId);
+ root.expand();
+ treePanel.addListener(new TreePanelListenerAdapter() {
+ public void onContextMenu(final TreeNode node, final EventObject e) {
+ final Menu menu = contextMenus.get(node.getId());
+ if (menu != null) {
+ menu.showAt(e.getXY());
+ } else {
+ Log.info("Empty item menu");
+ }
+ }
+ });
+ treePanel.setLines(false);
+ treePanel.setEnableDD(true);
+ treePanel.setRootNode(root);
+ final TextField field = new TextField();
+ treeEditor = new TreeEditor(treePanel, field);
+ treeEditor.addListener(new EditorListenerAdapter() {
+ // public boolean doBeforeComplete(final Editor source, final Object
+ // value, final Object startValue) {
+ // return false;
+ // }
+
+ public void onComplete(final Editor source, final Object value, final Object startValue) {
+ // TODO Auto-generated method stub
+ }
+ });
+ final Panel panel = new Panel();
+ panel.setBorder(false);
+ panel.add(treePanel);
+ ws.getEntityWorkspace().setContext(panel);
+ }
+
+ private void doAction(final ActionDescriptor<StateToken> action, final StateToken stateToken) {
+ actionManagerProvider.get().doAction(action, stateToken);
+ }
+
+ private TreeNode getNode(final String id) {
+ final TreeNode node = treePanel.getNodeById(id);
+ if (node == null) {
+ Log.error("Id: " + id + " not found in context navigator");
+ }
+ return node;
+ }
+
+ private void setToolbarActions(final Toolbar toolBar, final StateToken stateToken,
+ final ActionCollection<StateToken> actions) {
+ toolBar.removeAll();
+ for (final ActionDescriptor<StateToken> action : actions) {
+ Log.info("Procesing action: " + action.getText());
+ if (!action.isMenuAction()) {
+ final ToolbarButton button = new ToolbarButton();
+ final String text = action.getText();
+ if (text != null) {
+ button.setText(text);
+ }
+ button.addListener(new ButtonListenerAdapter() {
+ @Override
+ public void onClick(final Button button, final EventObject e) {
+ doAction(action, stateToken);
+ }
+ });
+ button.setIcon(action.getIconUrl());
+ button.setTooltip(action.getToolTip());
+ toolBar.add(button);
+ } else {
+ // Menu action
+ final Item item = new Item(action.getText(), new BaseItemListenerAdapter() {
+ @Override
+ public void onClick(BaseItem item, EventObject e) {
+ doAction(action, stateToken);
+ }
+ });
+ item.setIcon(action.getIconUrl());
+
+ final String menuTitle = action.getParentMenuTitle();
+ final String menuSubTitle = action.getParentSubMenuTitle();
+ final String subMenuKey = menuTitle + "-" + menuSubTitle;
+ Menu menu = toolbarMenus.get(menuTitle);
+ Menu subMenu = toolbarMenus.get(subMenuKey);
+ if (menuSubTitle != null) {
+ if (subMenu == null) {
+ subMenu = new Menu();
+ final MenuItem subMenuItem = new MenuItem(menuSubTitle, subMenu);
+ if (menu == null) {
+ menu = createToolbarMenu(toolBar, action.getParentMenuIconUrl(), menuTitle);
+ }
+ menu.addItem(subMenuItem);
+ toolBar.doLayoutIfNeeded();
+ toolbarMenus.put(subMenuKey, subMenu);
+ }
+ subMenu.addItem(item);
+ } else {
+ // Menu action without submenu
+ if (menu == null) {
+ menu = createToolbarMenu(toolBar, action.getParentMenuIconUrl(), menuTitle);
+ }
+ menu.addItem(item);
+ toolBar.doLayoutIfNeeded();
+ }
+ }
+ }
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorPresenter.java (from rev 845, trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextNavigatorPresenter.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextNavigatorPresenter.java 2008-09-08 00:11:31 UTC (rev 845)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorPresenter.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -0,0 +1,274 @@
+/*
+ *
+ * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.nav;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.actions.ActionCollection;
+import org.ourproject.kune.platf.client.actions.ActionDescriptor;
+import org.ourproject.kune.platf.client.dto.AccessRightsDTO;
+import org.ourproject.kune.platf.client.dto.ContainerDTO;
+import org.ourproject.kune.platf.client.dto.ContainerSimpleDTO;
+import org.ourproject.kune.platf.client.dto.ContentDTO;
+import org.ourproject.kune.platf.client.dto.ContentStatusDTO;
+import org.ourproject.kune.platf.client.dto.StateDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
+import org.ourproject.kune.platf.client.dto.UserInfoDTO;
+import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
+import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
+import org.ourproject.kune.workspace.client.site.Site;
+
+import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.signal.Slot2;
+
+public class ContextNavigatorPresenter implements ContextNavigator {
+
+ private ContextNavigatorView view;
+ private final StateManager stateManager;
+ private final Session session;
+ private final Provider<ContentServiceAsync> contentServiceProvider;
+ private final I18nUITranslationService i18n;
+ private final HashMap<String, ActionCollection<StateToken>> actions;
+ private final ArrayList<String> draggables;
+ private final ArrayList<String> droppables;
+
+ public ContextNavigatorPresenter(final StateManager stateManager, final Session session,
+ final Provider<ContentServiceAsync> contentServiceProvider, final I18nUITranslationService i18n) {
+ this.stateManager = stateManager;
+ this.session = session;
+ this.contentServiceProvider = contentServiceProvider;
+ this.i18n = i18n;
+ actions = new HashMap<String, ActionCollection<StateToken>>();
+ draggables = new ArrayList<String>();
+ droppables = new ArrayList<String>();
+ }
+
+ public void addAction(final String contentTypeId, final ActionDescriptor<StateToken> action) {
+ ActionCollection<StateToken> actionColl = actions.get(contentTypeId);
+ if (actionColl == null) {
+ actionColl = new ActionCollection<StateToken>();
+ actions.put(contentTypeId, actionColl);
+ }
+ actionColl.add(action);
+ }
+
+ public void editItem(final StateToken stateToken) {
+ view.editItem(genId(stateToken));
+ }
+
+ public View getView() {
+ return view;
+ }
+
+ public void init(final ContextNavigatorView view) {
+ this.view = view;
+ stateManager.onGroupChanged(new Slot2<String, String>() {
+ public void onEvent(final String oldGroup, final String newGroup) {
+ if (oldGroup != null) {
+ view.clear();
+ }
+ }
+ });
+ stateManager.onToolChanged(new Slot2<String, String>() {
+ public void onEvent(final String oldTool, final String newTool) {
+ if (oldTool != null) {
+ view.clear();
+ }
+ }
+ });
+ session.onUserSignIn(new Slot<UserInfoDTO>() {
+ public void onEvent(final UserInfoDTO parameter) {
+ view.clear();
+ }
+ });
+ session.onUserSignOut(new Slot0() {
+ public void onEvent() {
+ view.clear();
+ }
+ });
+ }
+
+ public void onTitleRename(final String newName, final String token) {
+ Site.showProgressSaving();
+ final StateDTO currentState = session.getCurrentState();
+ contentServiceProvider.get().rename(session.getUserHash(), currentState.getGroup().getShortName(), token,
+ newName, new AsyncCallbackSimple<String>() {
+ public void onSuccess(final String result) {
+ stateManager.reloadContextAndTitles();
+ Site.hideProgress();
+ }
+ });
+ }
+
+ public void registerDraggableType(final String type) {
+ draggables.add(type);
+ }
+
+ public void registerDroppableType(final String type) {
+ droppables.add(type);
+ }
+
+ public void removeAction(final String contentTypeId, final ActionDescriptor<StateToken> action) {
+ actions.get(contentTypeId).remove(action);
+ }
+
+ public void selectItem(final StateToken stateToken) {
+ view.selectItem(genId(stateToken));
+ }
+
+ public void setState(final StateDTO state) {
+ final StateToken stateToken = state.getStateToken().clone();
+ final String treeId = genId(stateToken);
+
+ final ContainerDTO container = state.getFolder();
+ createTreePath(stateToken, container.getAbsolutePath());
+
+ boolean visible = false;
+ AccessRightsDTO rights = null;
+
+ String containerTreeId;
+
+ if (state.hasDocument()) {
+ rights = state.getContentRights();
+ visible = rights.isVisible();
+ containerTreeId = genId(stateToken.clone().setDocument(null));
+ } else {
+ rights = state.getFolderRights();
+ visible = rights.isVisible();
+ final Long folderId = container.getParentFolderId();
+ containerTreeId = genId(stateToken.clone().setDocument(null).setFolder(
+ folderId == null ? null : folderId.toString()));
+ }
+
+ // here check deletion mark
+
+ final ActionCollection<StateToken> topActions = new ActionCollection<StateToken>();
+ final ActionCollection<StateToken> itemActions = new ActionCollection<StateToken>();
+ final ActionCollection<StateToken> bottomActions = new ActionCollection<StateToken>();
+
+ boolean add = false;
+ for (final ActionDescriptor<StateToken> action : actions.get(state.getTypeId())) {
+ switch (action.getAccessRol()) {
+ case Administrator:
+ add = rights.isAdministrable();
+ break;
+ case Editor:
+ add = rights.isEditable();
+ break;
+ case Viewer:
+ add = rights.isVisible();
+ break;
+ }
+ if (add) {
+ switch (action.getActionPosition()) {
+ case topbarAndItemMenu:
+ itemActions.add(action);
+ case topbar:
+ topActions.add(action);
+ break;
+ case bootombarAndItemMenu:
+ itemActions.add(action);
+ case bottombar:
+ bottomActions.add(action);
+ break;
+ case itemMenu:
+ itemActions.add(action);
+ break;
+ }
+ }
+ }
+
+ view.setTopActions(stateToken, topActions);
+ view.setBottomActions(stateToken, bottomActions);
+
+ final ContextNavigatorItem item = new ContextNavigatorItem(treeId, containerTreeId, "images/nav/page.png",
+ state.getTitle(), visible ? ContentStatusDTO.publicVisible : ContentStatusDTO.nonPublicVisible,
+ stateToken, isDraggable(state.getTypeId(), rights.isAdministrable()), isDroppable(state.getTypeId(),
+ rights.isAdministrable()), itemActions);
+ view.addItem(item);
+
+ for (final ContentDTO content : container.getContents()) {
+ final StateToken siblingToken = stateToken.clone().setDocument(content.getId().toString());
+ final StateToken siblingParentToken = stateToken.clone().setDocument(null);
+ // TODO: rights not correct
+ final ContextNavigatorItem sibling = new ContextNavigatorItem(genId(siblingToken),
+ genId(siblingParentToken), "images/nav/page.png", content.getTitle(),
+ ContentStatusDTO.publicVisible, siblingToken, isDraggable(content.getTypeId(), rights
+ .isAdministrable()), isDroppable(content.getTypeId(), rights.isAdministrable()), null);
+ view.addItem(sibling);
+
+ }
+
+ for (final ContainerDTO siblingFolder : container.getChilds()) {
+ final StateToken siblingToken = stateToken.clone().setDocument(null).setFolder(
+ siblingFolder.getId().toString());
+ final StateToken siblingParentToken = stateToken.clone().setDocument(null).setFolder(
+ siblingFolder.getParentFolderId().toString());
+ // TODO: rights not correct
+ final ContextNavigatorItem sibling = new ContextNavigatorItem(genId(siblingToken),
+ genId(siblingParentToken), "", siblingFolder.getName(), ContentStatusDTO.publicVisible,
+ siblingToken, isDraggable(container.getTypeId(), rights.isAdministrable()), isDroppable(container
+ .getTypeId(), rights.isAdministrable()), null);
+ view.addItem(sibling);
+ }
+ view.selectItem(treeId);
+ }
+
+ private void createTreePath(final StateToken state, final ContainerSimpleDTO[] absolutePath) {
+ for (int i = 0; i < absolutePath.length; i++) {
+ final ContainerSimpleDTO folder = absolutePath[i];
+ final String parentFolderId = folder.getParentFolderId() == null ? null : folder.getParentFolderId()
+ .toString();
+ final StateToken folderStateToken = state.clone().setDocument(null).setFolder(folder.getId().toString());
+ final StateToken parentStateToken = state.clone().setDocument(null).setFolder(parentFolderId);
+ if (folder.getParentFolderId() != null) {
+ // Bad rights, draggable/droppable
+ final ContextNavigatorItem parent = new ContextNavigatorItem(genId(folderStateToken),
+ genId(parentStateToken), "", folder.getName(), ContentStatusDTO.publicVisible,
+ folderStateToken, false, true, null);
+ view.addItem(parent);
+ } else {
+ // create root folder
+ view.setRootItem(genId(folderStateToken), i18n.t("contents"), folderStateToken);
+ }
+ }
+ }
+
+ private String genId(final StateToken token) {
+ return "k-" + token.toString().replace(StateToken.SEPARATOR, "-");
+ }
+
+ private boolean isDraggable(final String typeId, final boolean administrable) {
+ return administrable && draggables.contains(typeId);
+ }
+
+ private boolean isDroppable(final String typeId, final boolean administrable) {
+ return administrable && droppables.contains(typeId);
+ }
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorView.java (from rev 845, trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextNavigatorView.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextNavigatorView.java 2008-09-08 00:11:31 UTC (rev 845)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextNavigatorView.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -0,0 +1,43 @@
+/*
+ *
+ * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.nav;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.actions.ActionCollection;
+import org.ourproject.kune.platf.client.dto.StateToken;
+
+public interface ContextNavigatorView extends View {
+
+ void addItem(ContextNavigatorItem contextNavigatorItem);
+
+ void clear();
+
+ void editItem(String id);
+
+ void selectItem(String id);
+
+ void setBottomActions(StateToken stateToken, ActionCollection<StateToken> actions);
+
+ void setRootItem(String id, String text, StateToken stateToken);
+
+ void setTopActions(StateToken stateToken, ActionCollection<StateToken> actions);
+
+}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextTopBar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextTopBar.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ContextTopBar.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,123 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.items;
-
-import org.ourproject.kune.platf.client.dto.ContainerSimpleDTO;
-import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.platf.client.ui.KuneUiUtils;
-import org.ourproject.kune.platf.client.ui.RoundedBorderDecorator;
-
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.MenuBar;
-import com.google.gwt.user.client.ui.PushButton;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-
-class ContextTopBar extends VerticalPanel {
-
- public final Label currentFolder;
- public final PushButton btnGoParent;
- public final Image btnGoParentDisabled;
- public final HorizontalPanel firstRow;
- private final ContextItemsImages img;
- private final MenuBar pathSubmenu;
- private final I18nTranslationService i18n;
- private final StateManager stateManager;
-
- public ContextTopBar(final ContextItemsPresenter presenter, final I18nTranslationService i18n,
- final StateManager stateManager) {
- this.i18n = i18n;
- this.stateManager = stateManager;
- img = ContextItemsImages.App.getInstance();
- firstRow = new HorizontalPanel();
- final HorizontalPanel secondRow = new HorizontalPanel();
- final HorizontalPanel iconBarHP = new HorizontalPanel();
- final HorizontalPanel currentFolderHP = new HorizontalPanel();
- btnGoParent = new PushButton(img.folderGoUp().createImage(), img.folderGoUpLight().createImage());
- btnGoParent.addClickListener(new ClickListener() {
- public void onClick(final Widget sender) {
- presenter.onGoUp();
- }
- });
-
- KuneUiUtils.setQuickTip(btnGoParent, i18n.t("Go to parent folder"));
- btnGoParentDisabled = img.folderGoUpLight().createImage();
- final MenuBar pathMenu = new MenuBar();
- pathSubmenu = new MenuBar(true);
- // Layout
- add(firstRow);
- add(secondRow);
- firstRow.add(iconBarHP);
- secondRow.add(currentFolderHP);
- // iconBarHP.add(btnGoParent);
- final RoundedBorderDecorator buttonRounded = new RoundedBorderDecorator(pathMenu, RoundedBorderDecorator.ALL,
- RoundedBorderDecorator.SIMPLE);
- iconBarHP.add(buttonRounded);
- pathMenu.addItem(img.folderpathmenu().getHTML(), true, pathSubmenu);
- KuneUiUtils.setQuickTip(pathMenu, i18n.t("Navigation tree"));
- currentFolderHP.add(btnGoParent);
- currentFolderHP.add(btnGoParentDisabled);
- currentFolder = new Label("Current Container");
- currentFolderHP.add(currentFolder);
-
- // Set properties
- addStyleName("kune-NavigationBar");
- firstRow.addStyleName("topBar");
- firstRow.addStyleName("topBar-margin");
- secondRow.addStyleName("topBar");
- firstRow.setWidth("100%");
- secondRow.setWidth("100%");
- setCellWidth(firstRow, "100%");
- setCellWidth(secondRow, "100%");
- firstRow.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);
- iconBarHP.addStyleName("kune-topBar-iconBar");
- iconBarHP.setCellVerticalAlignment(btnGoParent, VerticalPanel.ALIGN_MIDDLE);
- iconBarHP.setCellVerticalAlignment(buttonRounded, VerticalPanel.ALIGN_MIDDLE);
- pathMenu.setStyleName("pathMenu");
- buttonRounded.setColor("AAA");
- btnGoParent.addStyleName("kune-pointer");
- }
-
- public void setAbsolutePath(final ContainerSimpleDTO[] absolutePath) {
- pathSubmenu.clearItems();
- String indent = "";
- for (int i = 0; i < absolutePath.length; i++) {
- final ContainerSimpleDTO folder = absolutePath[i];
- String folderName = folder.getName();
- if (i == 0) {
- // We translate root folders
- folderName = i18n.t(folderName);
- }
- pathSubmenu.addItem(indent + img.folder().getHTML() + " " + folderName, true, new Command() {
- public void execute() {
- stateManager.gotoContainer(folder.getId());
- }
- });
- indent = indent + "  ";
- }
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ControlsPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ControlsPanel.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ControlsPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,29 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.items;
-
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-class ControlsPanel extends VerticalPanel {
-
- public ControlsPanel() {
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ItemsPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ItemsPanel.java 2008-08-11 01:20:37 UTC (rev 841)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/ItemsPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,60 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 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 org.ourproject.kune.workspace.client.ui.ctx.items;
-
-import java.util.HashMap;
-
-import org.ourproject.kune.platf.client.ui.EditableClickListener;
-import org.ourproject.kune.platf.client.ui.EditableIconLabel;
-
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-class ItemsPanel extends VerticalPanel {
- private final HashMap<String, AbstractImagePrototype> fileIcons;
- private final ContextItemsPresenter presenter;
-
- public ItemsPanel(final ContextItemsPresenter presenter) {
- this.presenter = presenter;
- addStyleName("kune-NavigationBar");
- addStyleName("Items");
- fileIcons = new HashMap<String, AbstractImagePrototype>();
- }
-
- public void add(final String name, final String type, final String token, final boolean editable) {
- // IconHyperlink item = new IconHyperlink((AbstractImagePrototype)
- // fileIcons.get(type), name, event);
- EditableIconLabel item = new EditableIconLabel(fileIcons.get(type), name, token, true,
- new EditableClickListener() {
- public void onEdited(String text) {
- presenter.onTitleRename(text, token);
- }
- });
- item.setEditable(editable);
- item.addStyleName("Items");
- item.addStyleName("kune-floatleft");
- add(item);
- }
-
- public void registerType(final String typeName, final AbstractImagePrototype image) {
- fileIcons.put(typeName, image);
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/bullet_arrow_right.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/chat-blue.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/chat-green.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/folder-go-up-light.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/folder-go-up.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/folder.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/folder_add.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/folderpathmenu.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/go-up-light.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/go-up.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/page.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/page_add.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/page_white.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/nav/page_white_add.png
===================================================================
(Binary files differ)
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitelogo/SiteLogoPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitelogo/SiteLogoPanel.java 2008-09-08 00:56:38 UTC (rev 849)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitelogo/SiteLogoPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,7 +1,7 @@
package org.ourproject.kune.workspace.client.ui.newtmp.sitebar.sitelogo;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.SiteBar;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.skel.SiteBar;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.ui.Image;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitenewgroup/SiteNewGroupLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitenewgroup/SiteNewGroupLinkPanel.java 2008-09-08 00:56:38 UTC (rev 849)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitenewgroup/SiteNewGroupLinkPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,8 +1,8 @@
package org.ourproject.kune.workspace.client.ui.newtmp.sitebar.sitenewgroup;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.sitebar.SiteToken;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.site.SiteToken;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.ui.Hyperlink;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteoptions/SiteOptionsPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteoptions/SiteOptionsPanel.java 2008-09-08 00:56:38 UTC (rev 849)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteoptions/SiteOptionsPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -2,7 +2,7 @@
import org.ourproject.kune.workspace.client.i18n.I18nTranslator;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.calclab.suco.client.provider.Provider;
import com.google.gwt.user.client.Window;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitepublic/SitePublicSpaceLinkPanel.java 2008-09-08 00:56:38 UTC (rev 849)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitepublic/SitePublicSpaceLinkPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -3,9 +3,9 @@
import org.ourproject.kune.platf.client.services.Images;
import org.ourproject.kune.platf.client.ui.IconLabel;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.SiteBar;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.site.Site;
+import org.ourproject.kune.workspace.client.skel.SiteBar;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.ClickListener;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesearch/SiteSearchPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesearch/SiteSearchPanel.java 2008-09-08 00:56:38 UTC (rev 849)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesearch/SiteSearchPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -2,9 +2,9 @@
import org.ourproject.kune.platf.client.services.Images;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.SiteBar;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.site.Site;
+import org.ourproject.kune.workspace.client.skel.SiteBar;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.FocusListener;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java 2008-09-08 00:56:38 UTC (rev 849)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,8 +1,8 @@
package org.ourproject.kune.workspace.client.ui.newtmp.sitebar.sitesign;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.sitebar.SiteToken;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.site.SiteToken;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.ui.Hyperlink;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPanel.java 2008-09-08 00:56:38 UTC (rev 849)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -1,8 +1,8 @@
package org.ourproject.kune.workspace.client.ui.newtmp.sitebar.sitesign;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.site.Site;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Label;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPresenter.java 2008-09-08 00:56:38 UTC (rev 849)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignOutLinkPresenter.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -8,8 +8,8 @@
import org.ourproject.kune.platf.client.errors.UserMustBeLoggedException;
import org.ourproject.kune.platf.client.services.KuneErrorHandler;
import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.workspace.client.sitebar.Site;
-import org.ourproject.kune.workspace.client.sitebar.rpc.UserServiceAsync;
+import org.ourproject.kune.workspace.client.site.Site;
+import org.ourproject.kune.workspace.client.site.rpc.UserServiceAsync;
import com.calclab.suco.client.provider.Provider;
import com.calclab.suco.client.signal.Slot;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPanel.java 2008-09-08 00:56:38 UTC (rev 849)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/siteusermenu/SiteUserMenuPanel.java 2008-09-08 00:56:46 UTC (rev 850)
@@ -3,7 +3,7 @@
import org.ourproject.kune.platf.client.dto.GroupDTO;
import org.ourproject.kune.platf.client.ui.MenuItemCollection;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.PushButton;
1
0
Author: vjrj
Date: 2008-09-08 02:56:38 +0200 (Mon, 08 Sep 2008)
New Revision: 849
Removed:
trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/
Log:
Refactorization
1
0
Author: vjrj
Date: 2008-09-08 02:55:51 +0200 (Mon, 08 Sep 2008)
New Revision: 848
Modified:
trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java
Log:
Refactorization
Modified: trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java 2008-09-08 00:55:39 UTC (rev 847)
+++ trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java 2008-09-08 00:55:51 UTC (rev 848)
@@ -41,7 +41,7 @@
import org.ourproject.kune.rack.filters.LogFilter;
import org.ourproject.kune.rack.filters.RedirectFilter;
import org.ourproject.kune.rack.filters.rest.RESTServicesModule;
-import org.ourproject.kune.workspace.client.sitebar.rpc.UserService;
+import org.ourproject.kune.workspace.client.site.rpc.UserService;
import com.google.inject.AbstractModule;
import com.google.inject.Module;
1
0