r1350 - in trunk: script src/main/java/cc/kune/core/client/sn src/main/java/cc/kune/gspace/client src/main/java/cc/kune/gspace/client/resources src/main/java/cc/kune/gspace/public src/main/java/cc/kune/gspace/public/images
Author: vjrj_ Date: 2011-05-06 03:13:41 +0200 (Fri, 06 May 2011) New Revision: 1350 Added: trunk/src/main/java/cc/kune/gspace/public/images/ trunk/src/main/java/cc/kune/gspace/public/images/styles/ Removed: trunk/src/main/java/cc/kune/gspace/public/styles/ Modified: trunk/script/mvn-vars.sh trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java trunk/src/main/java/cc/kune/core/client/sn/GroupSNPanel.java trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css Log: Armor changes Modified: trunk/script/mvn-vars.sh =================================================================== --- trunk/script/mvn-vars.sh 2011-05-05 23:52:34 UTC (rev 1349) +++ trunk/script/mvn-vars.sh 2011-05-06 01:13:41 UTC (rev 1350) @@ -1,3 +1,3 @@ -if [[ $M2_REPO -eq "" ]] ; then +if [[ -n $M2_REPO ]] ; then M2_REPO=~/.m2/repository fi Modified: trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java 2011-05-05 23:52:34 UTC (rev 1349) +++ trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java 2011-05-06 01:13:41 UTC (rev 1350) @@ -28,120 +28,123 @@ public class AbstractSNPanel extends ViewImpl { - interface AbstractSNPanelUiBinder extends UiBinder<Widget, AbstractSNPanel> { - } + interface AbstractSNPanelUiBinder extends UiBinder<Widget, AbstractSNPanel> { + } - private final static int AVATARLABELMAXSIZE = 4; - private final static int AVATARSIZE = 22; - private final static String CATEG_HEIGHT = "80px"; - private static AbstractSNPanelUiBinder uiBinder = GWT.create(AbstractSNPanelUiBinder.class); + private final static int AVATARLABELMAXSIZE = 4; + private final static int AVATARSIZE = 22; + private final static String CATEG_HEIGHT = "80px"; + private static AbstractSNPanelUiBinder uiBinder = GWT.create(AbstractSNPanelUiBinder.class); - protected final ActionSimplePanel actions; - ActionFlowPanel bottomActionsToolbar; - @UiField - FlowPanel bottomPanel; - @UiField - FlowPanel categoriesFlow; - @UiField - DeckPanel deck; - @UiField - Label firstCategoryCount; - @UiField - FlowPanel firstCategoryFlow; - @UiField - Label firstCategoryLabel; - @UiField - DockLayoutPanel firstCategoryPanel; - @UiField - Label firstDeckLabel; - @UiField - FlowPanel mainPanel; - @UiField - Label mainTitle; - @UiField - Label sndCategoryCount; - @UiField - FlowPanel sndCategoryFlow; - @UiField - Label sndCategoryLabel; - @UiField - DockLayoutPanel sndCategoryPanel; - @UiField - ScrollPanel sndCategoryScroll; - @UiField - Label sndDeckLabel; - @UiField - Label trdCategoryCount; - @UiField - FlowPanel trdCategoryFlow; - @UiField - Label trdCategoryLabel; - @UiField - DockLayoutPanel trdCategoryPanel; - @UiField - ScrollPanel trdCategoryScroll; - protected final Widget widget; + protected final ActionSimplePanel actions; + protected final GSpaceArmor armor; + ActionFlowPanel bottomActionsToolbar; + @UiField + FlowPanel bottomPanel; + @UiField + FlowPanel categoriesFlow; + @UiField + DeckPanel deck; + @UiField + Label firstCategoryCount; + @UiField + FlowPanel firstCategoryFlow; + @UiField + Label firstCategoryLabel; + @UiField + DockLayoutPanel firstCategoryPanel; + @UiField + Label firstDeckLabel; + @UiField + FlowPanel mainPanel; + @UiField + Label mainTitle; + @UiField + Label sndCategoryCount; + @UiField + FlowPanel sndCategoryFlow; + @UiField + Label sndCategoryLabel; + @UiField + DockLayoutPanel sndCategoryPanel; + @UiField + ScrollPanel sndCategoryScroll; + @UiField + Label sndDeckLabel; + @UiField + Label trdCategoryCount; + @UiField + FlowPanel trdCategoryFlow; + @UiField + Label trdCategoryLabel; + @UiField + DockLayoutPanel trdCategoryPanel; + @UiField + ScrollPanel trdCategoryScroll; + protected final Widget widget; - public AbstractSNPanel(final I18nTranslationService i18n, final GuiProvider guiProvider, final GSpaceArmor armor) { - widget = uiBinder.createAndBindUi(this); - actions = new ActionSimplePanel(guiProvider); - } + public AbstractSNPanel(final I18nTranslationService i18n, final GuiProvider guiProvider, + final GSpaceArmor armor) { + this.armor = armor; + widget = uiBinder.createAndBindUi(this); + actions = new ActionSimplePanel(guiProvider); + } - @Override - public Widget asWidget() { - return widget; - } + @Override + public Widget asWidget() { + return widget; + } - public void clear() { - trdCategoryFlow.clear(); - firstCategoryFlow.clear(); - sndCategoryFlow.clear(); - actions.clear(); - } + public void clear() { + trdCategoryFlow.clear(); + firstCategoryFlow.clear(); + sndCategoryFlow.clear(); + actions.clear(); + } - public BasicThumb createThumb(final String text, final String avatarUrl, final String tooltip, - final String tooltipTitle, final GuiActionDescCollection menuitems) { - final BasicThumb thumb = new BasicThumb(avatarUrl, AVATARSIZE, text, AVATARLABELMAXSIZE, false); - final MenuDescriptor menu = new MenuDescriptor(); - menu.setStandalone(true); - menu.putValue(AbstractGxtMenuGui.MENU_POSITION, AbstractGxtMenuGui.MenuPosition.bl); - for (final GuiActionDescrip item : menuitems) { - item.setParent(menu); - } - final ClickHandler clickHand = new ClickHandler() { - @Override - public void onClick(final ClickEvent event) { - menu.show(thumb); - } - }; - thumb.addClickHandler(clickHand); - actions.add(menu); - actions.add(menuitems); - thumb.setTooltip(tooltipTitle, tooltip); - thumb.setLabelVisible(false); - return thumb; + public BasicThumb createThumb(final String text, final String avatarUrl, final String tooltip, + final String tooltipTitle, final GuiActionDescCollection menuitems) { + final BasicThumb thumb = new BasicThumb(avatarUrl, AVATARSIZE, text, AVATARLABELMAXSIZE, false); + final MenuDescriptor menu = new MenuDescriptor(); + menu.setStandalone(true); + menu.putValue(AbstractGxtMenuGui.MENU_POSITION, AbstractGxtMenuGui.MenuPosition.bl); + for (final GuiActionDescrip item : menuitems) { + item.setParent(menu); } + final ClickHandler clickHand = new ClickHandler() { + @Override + public void onClick(final ClickEvent event) { + menu.show(thumb); + } + }; + thumb.addClickHandler(clickHand); + actions.add(menu); + actions.add(menuitems); + thumb.setTooltip(tooltipTitle, tooltip); + thumb.setLabelVisible(false); + return thumb; + } - public IsActionExtensible getBottomToolbar() { - return bottomActionsToolbar; - } + public IsActionExtensible getBottomToolbar() { + return bottomActionsToolbar; + } - public void setFirstCategoryVisible(final boolean visible) { - firstCategoryPanel.setVisible(visible); - firstCategoryPanel.setHeight(visible ? CATEG_HEIGHT : "0px"); - } + public void setFirstCategoryVisible(final boolean visible) { + firstCategoryPanel.setVisible(visible); + firstCategoryPanel.setHeight(visible ? CATEG_HEIGHT : "0px"); + } - public void setSndCategoryVisible(final boolean visible) { - sndCategoryPanel.setVisible(visible); - sndCategoryPanel.setHeight(visible ? CATEG_HEIGHT : "0px"); - } + public void setSndCategoryVisible(final boolean visible) { + sndCategoryPanel.setVisible(visible); + sndCategoryPanel.setHeight(visible ? CATEG_HEIGHT : "0px"); + } - protected void setTooltip(final Widget widget, final String title) { - Tooltip.to(widget, title); - } + protected void setTooltip(final Widget widget, final String title) { + Tooltip.to(widget, title); + } - public void setTrdCategoryVisible(final boolean visible) { - trdCategoryPanel.setVisible(visible); - trdCategoryPanel.setHeight(visible ? CATEG_HEIGHT : "0px"); - } + public void setTrdCategoryVisible(final boolean visible) { + trdCategoryPanel.setVisible(visible); + trdCategoryPanel.setHeight(visible ? CATEG_HEIGHT : "0px"); + } } Modified: trunk/src/main/java/cc/kune/core/client/sn/GroupSNPanel.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/sn/GroupSNPanel.java 2011-05-05 23:52:34 UTC (rev 1349) +++ trunk/src/main/java/cc/kune/core/client/sn/GroupSNPanel.java 2011-05-06 01:13:41 UTC (rev 1350) @@ -14,95 +14,98 @@ public class GroupSNPanel extends AbstractSNPanel implements GroupSNView { - @Inject - public GroupSNPanel(final I18nTranslationService i18n, final GuiProvider guiProvider, final GSpaceArmor armor) { - super(i18n, guiProvider, armor); - setVisibleImpl(false); - mainTitle.setText(i18n.t("Group members")); - Tooltip.to(mainTitle, i18n.t("People and groups collaborating in this group")); - firstCategoryLabel.setText(i18n.t("Admins")); - setTooltip(firstCategoryLabel, i18n.t("People that can admin this group")); - sndCategoryLabel.setText(i18n.t("Collaborators")); - setTooltip(sndCategoryLabel, i18n.t("Other people that collaborate with this group")); - trdCategoryLabel.setText(i18n.t("Pending")); - setTooltip(trdCategoryLabel, i18n.t("People pending to be accepted in this group by the admins")); - sndDeckLabel.setText(i18n.t("This is an orphaned project, if you are interested please request to join to work on it")); - firstDeckLabel.setText(i18n.t("The members of this group are not public")); - bottomActionsToolbar = new ActionFlowPanel(guiProvider); - bottomPanel.add(bottomActionsToolbar); - bottomActionsToolbar.setStyleName("k-sn-bottomPanel-actions"); - armor.getEntityToolsNorth().add(widget); - deck.showWidget(2); - } + @Inject + public GroupSNPanel(final I18nTranslationService i18n, final GuiProvider guiProvider, + final GSpaceArmor armor) { + super(i18n, guiProvider, armor); + setVisibleImpl(false); + mainTitle.setText(i18n.t("Group members")); + Tooltip.to(mainTitle, i18n.t("People and groups collaborating in this group")); + firstCategoryLabel.setText(i18n.t("Admins")); + setTooltip(firstCategoryLabel, i18n.t("People that can admin this group")); + sndCategoryLabel.setText(i18n.t("Collaborators")); + setTooltip(sndCategoryLabel, i18n.t("Other people that collaborate with this group")); + trdCategoryLabel.setText(i18n.t("Pending")); + setTooltip(trdCategoryLabel, i18n.t("People pending to be accepted in this group by the admins")); + sndDeckLabel.setText(i18n.t("This is an orphaned project, if you are interested please request to join to work on it")); + firstDeckLabel.setText(i18n.t("The members of this group are not public")); + bottomActionsToolbar = new ActionFlowPanel(guiProvider); + bottomPanel.add(bottomActionsToolbar); + bottomActionsToolbar.setStyleName("k-sn-bottomPanel-actions"); + armor.getEntityToolsNorth().add(widget); + deck.showWidget(2); + } - @Override - public void addAdmin(final GroupDTO group, final String avatarUrl, final String tooltip, final String tooltipTitle, - final GuiActionDescCollection menu) { - final BasicThumb thumb = createThumb(group.getShortName(), avatarUrl, tooltip, tooltipTitle, menu); - firstCategoryFlow.add(thumb); - } + @Override + public void addAdmin(final GroupDTO group, final String avatarUrl, final String tooltip, + final String tooltipTitle, final GuiActionDescCollection menu) { + final BasicThumb thumb = createThumb(group.getShortName(), avatarUrl, tooltip, tooltipTitle, menu); + firstCategoryFlow.add(thumb); + } - @Override - public void addCollab(final GroupDTO group, final String avatarUrl, final String tooltip, - final String tooltipTitle, final GuiActionDescCollection menu) { - final BasicThumb thumb = createThumb(group.getShortName(), avatarUrl, tooltip, tooltipTitle, menu); - sndCategoryFlow.add(thumb); - } + @Override + public void addCollab(final GroupDTO group, final String avatarUrl, final String tooltip, + final String tooltipTitle, final GuiActionDescCollection menu) { + final BasicThumb thumb = createThumb(group.getShortName(), avatarUrl, tooltip, tooltipTitle, menu); + sndCategoryFlow.add(thumb); + } - @Override - public void addPending(final GroupDTO group, final String avatarUrl, final String tooltip, - final String tooltipTitle, final GuiActionDescCollection menu) { - final BasicThumb thumb = createThumb(group.getShortName(), avatarUrl, tooltip, tooltipTitle, menu); - trdCategoryFlow.add(thumb); - } + @Override + public void addPending(final GroupDTO group, final String avatarUrl, final String tooltip, + final String tooltipTitle, final GuiActionDescCollection menu) { + final BasicThumb thumb = createThumb(group.getShortName(), avatarUrl, tooltip, tooltipTitle, menu); + trdCategoryFlow.add(thumb); + } - @Override - public void setAdminsCount(final int count) { - firstCategoryCount.setText(new StringBuffer("(").append(count).append(")").toString()); - } + @Override + public void setAdminsCount(final int count) { + armor.getEntityToolsNorth(); + firstCategoryCount.setText(new StringBuffer("(").append(count).append(")").toString()); + } - @Override - public void setCollabsCount(final int count) { - sndCategoryCount.setText(new StringBuffer("(").append(count).append(")").toString()); - } + @Override + public void setCollabsCount(final int count) { + sndCategoryCount.setText(new StringBuffer("(").append(count).append(")").toString()); + } - @Override - public void setCollabsVisible(final boolean visible) { - super.setSndCategoryVisible(visible); - } + @Override + public void setCollabsVisible(final boolean visible) { + super.setSndCategoryVisible(visible); + } - @Override - public void setPendingsCount(final int count) { - trdCategoryCount.setText(new StringBuffer("(").append(count).append(")").toString()); - } + @Override + public void setPendingsCount(final int count) { + trdCategoryCount.setText(new StringBuffer("(").append(count).append(")").toString()); + } - @Override - public void setPendingVisible(final boolean visible) { - super.setTrdCategoryVisible(visible); - } + @Override + public void setPendingVisible(final boolean visible) { + super.setTrdCategoryVisible(visible); + } - @Override - public void setVisible(final boolean visible) { - setVisibleImpl(visible); - } + @Override + public void setVisible(final boolean visible) { + setVisibleImpl(visible); + } - private void setVisibleImpl(final boolean visible) { - mainPanel.setVisible(visible); - } + private void setVisibleImpl(final boolean visible) { + mainPanel.setVisible(visible); + armor.recalculeNorthWidth(); + } - @Override - public void showMemberNotPublic() { - deck.showWidget(0); - } + @Override + public void showMemberNotPublic() { + deck.showWidget(0); + } - @Override - public void showMembers() { - deck.showWidget(2); - } + @Override + public void showMembers() { + deck.showWidget(2); + } - @Override - public void showOrphan() { - deck.showWidget(1); - } + @Override + public void showOrphan() { + deck.showWidget(1); + } } Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java =================================================================== --- trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java 2011-05-05 23:52:34 UTC (rev 1349) +++ trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java 2011-05-06 01:13:41 UTC (rev 1350) @@ -26,41 +26,43 @@ public interface GSpaceArmor { - ForIsWidget getDocContainer(); + ForIsWidget getDocContainer(); - ForIsWidget getDocFooter(); + ForIsWidget getDocFooter(); - ForIsWidget getDocHeader(); + ForIsWidget getDocHeader(); - ForIsWidget getDocSubheader(); + ForIsWidget getDocSubheader(); - ForIsWidget getEntityFooter(); + ForIsWidget getEntityFooter(); - ForIsWidget getEntityHeader(); + ForIsWidget getEntityHeader(); - ForIsWidget getEntityToolsCenter(); + ForIsWidget getEntityToolsCenter(); - ForIsWidget getEntityToolsNorth(); + ForIsWidget getEntityToolsNorth(); - ForIsWidget getEntityToolsSouth(); + ForIsWidget getEntityToolsSouth(); - IsActionExtensible getFooterToolbar(); + IsActionExtensible getFooterToolbar(); - IsActionExtensible getHeaderToolbar(); + IsActionExtensible getHeaderToolbar(); - SimplePanel getPublicSpace(); + SimplePanel getPublicSpace(); - ForIsWidget getSitebar(); + ForIsWidget getSitebar(); - IsActionExtensible getSubheaderToolbar(); + IsActionExtensible getSubheaderToolbar(); - ForIsWidget getUserSpace(); + ForIsWidget getUserSpace(); - void selectGroupSpace(); + void recalculeNorthWidth(); - void selectHomeSpace(); + void selectGroupSpace(); - void selectPublicSpace(); + void selectHomeSpace(); - void selectUserSpace(); + void selectPublicSpace(); + + void selectUserSpace(); } \ No newline at end of file Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java =================================================================== --- trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java 2011-05-05 23:52:34 UTC (rev 1349) +++ trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java 2011-05-06 01:13:41 UTC (rev 1350) @@ -23,6 +23,7 @@ import cc.kune.common.client.actions.ui.IsActionExtensible; import com.google.gwt.core.client.GWT; +import com.google.gwt.dom.client.Style.Position; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.DOM; @@ -62,7 +63,7 @@ @UiField VerticalPanel entityToolsCenter; @UiField - VerticalPanel entityToolsNorth; + FlowPanel entityToolsNorth; @UiField VerticalPanel entityToolsSouth; private final ActionFlowPanel footerToolbar; @@ -103,6 +104,7 @@ getDocHeader().add(headerToolbar); getDocSubheader().add(subheaderToolbar); getDocFooter().add(footerToolbar); + entityToolsNorth.getElement().getStyle().setPosition(Position.RELATIVE); } @Override @@ -181,6 +183,21 @@ } @Override + public void recalculeNorthWidth() { + // NotifyUser.info(entityToolsNorth.getElement().getOffsetHeight() + ""); + // final int size = entityToolsNorth.getElement().getOffsetHeight() + 100; + // ((Element) + // splitEast.getWidgetContainerElement(entityToolsNorth)).getStyle().setHeight(size, + // Unit.PX); + // ((Element) + // splitEast.getWidgetContainerElement(entityToolsCenter)).setPropertyString("top", + // size + // + "px"); + // ((Element) + // splitEast.getWidgetContainerElement(entityToolsCenter)).getStyle().setHeight(size,Unit.PX); + } + + @Override public void selectGroupSpace() { tabs.selectTab(groupSpace); } Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml =================================================================== --- trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml 2011-05-05 23:52:34 UTC (rev 1349) +++ trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml 2011-05-06 01:13:41 UTC (rev 1350) @@ -1,13 +1,13 @@ <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" -xmlns:co="urn:import:cc.kune.core.client" - xmlns:kp="urn:import:cc.kune.pspace.client" xmlns:g="urn:import:com.google.gwt.user.client.ui"> + xmlns:co="urn:import:cc.kune.core.client" xmlns:kp="urn:import:cc.kune.pspace.client" + xmlns:g="urn:import:com.google.gwt.user.client.ui"> <ui:with field='res' type='cc.kune.gspace.client.resources.WsArmorResources' /> <ui:style> .frame { - border: 0px; - margin: 0px; + border: 0px; + margin: 0px; } </ui:style> <g:DockLayoutPanel ui:field="mainpanel" styleName='{res.style.mainPanel}' @@ -29,8 +29,8 @@ <g:header size='0' /> <g:FlowPanel ui:field="userSpace" width="100%" height="100%"> -<!-- <g:Frame url="/" styleName="{style.frame}"--> -<!-- ui:field="frame" width="100%" height="100%" />--> + <!-- <g:Frame url="/" styleName="{style.frame}" --> + <!-- ui:field="frame" width="100%" height="100%" /> --> </g:FlowPanel> </g:tab> <g:tab> @@ -48,9 +48,10 @@ <g:FlowPanel width="100%" height="38px" styleName="{res.style.docHeader}" ui:field="docHeader"> </g:FlowPanel> + <g:HTMLPanel ui:field="arrow" + styleName="{res.style.docSubheaderArrow}" /> <g:FlowPanel width="100%" height="60px" styleName="{res.style.docSubheader}" ui:field="docSubheader"> - <g:HTMLPanel ui:field="arrow" styleName="{res.style.docSubheaderArrow}" /> </g:FlowPanel> </g:VerticalPanel> </g:north> @@ -90,8 +91,8 @@ <g:DockLayoutPanel unit="PX" styleName="{res.style.entityTools}" ui:field="splitEast"> <g:north size="305"> - <g:VerticalPanel width="100%" - ui:field="entityToolsNorth" styleName="{res.style.entityToolsNorth}"></g:VerticalPanel> + <g:FlowPanel width="100%" ui:field="entityToolsNorth" + styleName="{res.style.entityToolsNorth}"></g:FlowPanel> </g:north> <g:center> <g:VerticalPanel width="100%" Modified: trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css =================================================================== --- trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css 2011-05-05 23:52:34 UTC (rev 1349) +++ trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css 2011-05-06 01:13:41 UTC (rev 1350) @@ -86,9 +86,10 @@ .docSubheader { background-color: #f7ebe3; - padding: 15px 0 0 0; overflow: hidden; border-collapse: separate; + margin: -14px 0 0; + padding: 15px 0 0; } .docSubheader button.k-fr { @@ -208,7 +209,7 @@ height: 0; width: 0; position: relative; - bottom: 16px; + bottom: 0px; left: 36px; } Copied: trunk/src/main/java/cc/kune/gspace/public/images/styles (from rev 1345, trunk/src/main/java/cc/kune/gspace/public/styles)
participants (1)
-
Vicente J. Ruiz Jurado