[kune-commits] r916 - in trunk/src/main/java/org/ourproject/kune:
app/public/css chat/client platf/client/actions
platf/client/dto platf/client/services platf/server/sn
workspace/client/ctxnav workspace/client/socialnet
vjrj
vjrj at ourproject.org
Fri Oct 17 04:27:48 CEST 2008
Author: vjrj
Date: 2008-10-17 04:27:46 +0200 (Fri, 17 Oct 2008)
New Revision: 916
Added:
trunk/src/main/java/org/ourproject/kune/platf/client/actions/GroupActionRegistry.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/MenuItemsContainer.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/UserActionRegistry.java
Modified:
trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngine.java
trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionRegistry.java
trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserBuddiesDataDTO.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneWorkspaceModule.java
trunk/src/main/java/org/ourproject/kune/platf/server/sn/UserBuddiesData.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryView.java
Log:
Complete - task User buddies SocialNetwork part
Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/all.css 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/all.css 2008-10-17 02:27:46 UTC (rev 916)
@@ -35,4 +35,4 @@
}
*/.kune-NavigationBar .topBar .gwt-Image{margin:0 2px 0 5px;}.kune-NavigationBar .Items{margin:2px 0;}.kune-NavigationBar .Items .gwt-Image{margin:2px 0;vertical-align:middle;}.kune-NavigationBar .Items .gwt-Hyperlink a{color:green;/* FIXME: other color */}.kune-NavigationBar .topBar .topBar-margin{margin-left:5px;}.kune-NavigationBar .pathMenu{vertical-align:middle;}.kune-NavigationBar .pathMenu .gwt-MenuItem{background:transparent url(img/button-bg-hard.gif) repeat-x 0 0;border-left:1px solid #AAA;border-right:1px solid #AAA;color:#999;cursor:pointer;white-space:nowrap;padding:3px 6px;}.kune-NavigationBar .pathMenu .gwt-MenuItem-selected{background:transparent url(img/button-bg-soft.gif) repeat-x 0 0;color:#000;}.kune-NavigationBar .kune-IconHyperlink{vertical-align:middle;margin-left:5px;}.kune-NavigationBar .kune-IconHyperlink a{color:green;text-decoration:none;}.kune-NavigationBar .kune-IconHyperlink .gwt-Image{margin-right:3px;vertical-align:middle;}/* Social Network */.kune-StackedDropDownPanel{}.kune-StackedDropDownPanel .gwt-StackPanelItem{border-top:1px solid #CCC;border-bottom:1px solid #CCC;background-color:#EFA;cursor:pointer;padding:1px 3px 0 6px;overflow:hidden;}.kune-StackedDropDownPanel .gwt-StackPanelItem img{margin:0 0 0 3px;vertical-align:middle;}.kune-StackedDropDownPanel .kune-DropDownInner table{width:100%;}.kune-StackedDropDownPanel .gwt-StackPanelItem-selected{}.kune-StackedDropDownPanelLink{background-color:#E6E6E6;border-top:1px solid #CCC;border-bottom:1px solid #F2F2F2;/* white-space: nowrap; */cursor:pointer;}.kune-StackedDropDownPanel .kune-DropDownInner{padding:0;}/* StackedDropDownPanel Members */.kune-StackSubItemLabel{overflow:hidden;}.kune-StackSubItemLabel .gwt-MenuItem{white-space:nowrap;cursor:pointer;border-bottom:1px solid #F2F2F2;}.kune-StackSubItemLabel table{width:100%;}.kune-StackSubItemLabel .gwt-MenuItem img{vertical-align:middle;margin-top:1px;margin-bottom:1px;margin-left:5px;margin-right:3px;}.kune-StackSubItemLabel .gwt-MenuItem-selected{background-color:#FFE6D5;}.kune-StackSubItemActions{background-color:#F2F2F2;border:1px solid #999;vertical-align:middle;padding:5px 0;margin-left:-120px;margin-top:-2px;}.kune-StackSubItemActions .gwt-MenuItem{cursor:pointer;padding:1px 10px;white-space:nowrap;}.kune-StackSubItemActions .gwt-MenuItem img{vertical-align:middle;margin-right:3px;}.kune-StackSubItemActions .gwt-MenuItem-selected{background-color:#FFB958;}/* AccessList */.kune-AccessListSubLabel{font-style:italic;}.kune-AccessList{margin:5px;width:100%;}.kune-AccessList .gwt-DisclosurePanel{margin:5px;width:100%;}.kune-AccessList .gwt-DisclosurePanel-open{width:100%;}.kune-AccessList .gwt-DisclosurePanel-closed{width:100%;}.kune-AccessList .header{margin:0 0 3px;text-decoration:none;width:100%;background-color:#8DD35F;}.kune-AccessList .header table{margin:0 5px 0 0;width:100%;color:#FFF;}.kune-AccessList .header img{margin:0 3px 0 0;}.kune-AccessList .content{margin:0 0 0 7px;width:100%;}.kune-AccessList .content table{margin-bottom:5px;width:100%;}/* Rate */.kune-RatePanel-Label{white-space:nowrap;vertical-align:middle;}.kune-RatePanel-Stars{margin-left:5px;vertical-align:middle;}.kune-RatePanel-Stars-RateIt{cursor:pointer;}/* Licenses */.kune-License-CC-Header{color:#15428B;font-weight:700;font-size:85%;margin-top:5px;}.kune-License-CC-Header .gwt-Label{color:#15428B;font-weight:700;font-size:85%;margin-top:5px;}/* Theme */.kune-IconBottomPanel .gwt-MenuItem{cursor:pointer;background-color:#FFF;margin:2px 2px 2px 5px;}.kune-IconBottomPanel .gwt-MenuItem-selected{background-color:#F2F2F2;}.gwt-MenuBar-bottomMenu{margin-left:-60px;margin-top:-120px;}/* i18n */.kune-I18nTranslatorCell{white-space:normal;}.kune-i18nTranslator-recommend{margin:10px;}.kune-i18nTranslator-recommend h1{font-size:131%;font-weight:700;}.kune-i18nTranslator-recommend h2{font-size:116%;font-weight:700;}.kune-i18nTranslator-recommend h3{font-size:108%;font-weight:700;font-style:italic;}.kune-i18nTranslator-recommend em{font-weight:700;}.kune-i18nTranslator-recommend strong{font-weight:700;}/* Admin Context */.kune-AdminContextPanel{margin:6px;width:100%;}.kune-AdminContextPanel .gwt-StackPanelItem{background:transparent url(img/arrow-right-white.gif) no-repeat scroll 3px 2px;cursor:pointer;padding:3px 10px 1px 20px;overflow:hidden;width:100%;}.kune-AdminContextPanel .gwt-StackPanelItem img{margin:0 0 0 3px;vertical-align:middle;}.kune-AdminContextPanel .gwt-StackPanelItem-selected{background:transparent url(img/arrow-down-white.gif) no-repeat scroll 3px 2px;background-color:#DEE3DB;}.kune-AdminContextPanelLink{background-color:#E6E6E6;border-top:1px solid #CCC;border-bottom:1px solid #F2F2F2;/* white-space: nowrap; */cursor:pointer;}.kune-AdminContextPanel-inner{background-color:#FFF;}.kune-AdminContextPanel-inner-wrap{margin:5px;}.kune-EditableLabel{}.kune-EditableLabel .kune-EditableLabel-editable{}.kune-EditableLabel-high{background-color:#FFFBC1;cursor:pointer;}.kune-EditableLabel-high span{background-color:#FFFBC1;}.kune-EditableLabel a{margin-left:5px;}.kune-EditableLabel a:link{color:green;}.kune-EditableLabel a:hover{text-decoration:underline;}.kune-EditableLabel a:visited{color:olive;}.kune-EditableLabel img{margin-right:4px;vertical-align:middle;}.kune-EditableLabel-editable img{margin-right:4px;vertical-align:middle;}.kune-EditableLabel-editable span{margin:3px;}.kune-EditableLabel span{margin:3px;}.kune-BottomIconsTrayPanel{width:165px;height:21px;vertical-align:middle;background-color:#EFEFEF;}.kune-TagsPanel-tag{float:left;margin-right:5px;cursor:pointer;}.kune-Content-Main{margin:5px;}/* Yahoo ui base.css */.kune-Content-Main h1{font-size:138.5%;}.kune-Content-Main h2{font-size:123.099998%;}.kune-Content-Main h3{font-size:108%;}.kune-Content-Main h1{margin:1em 0;}.kune-Content-Main h2{margin:1em 0;}.kune-Content-Main h3{margin:1em 0;}.kune-Content-Main h1{font-weight:700;}.kune-Content-Main h2{font-weight:700;}.kune-Content-Main h3{font-weight:700;}.kune-Content-Main h4{font-weight:700;}.kune-Content-Main h5{font-weight:700;}.kune-Content-Main h6{font-weight:700;}.kune-Content-Main strong{font-weight:700;}.kune-Content-Main abbr{border-bottom:1px dotted #000;cursor:help;}.kune-Content-Main acronym{border-bottom:1px dotted #000;cursor:help;}.kune-Content-Main em{font-style:italic;}.kune-Content-Main blockquote{margin:1em;}.kune-Content-Main ul{margin:1em;}.kune-Content-Main ol{margin:1em;}.kune-Content-Main dl{margin:1em;}.kune-Content-Main ol{margin-left:2em;}.kune-Content-Main ul{margin-left:2em;}.kune-Content-Main dl{margin-left:2em;}.kune-Content-Main ol{list-style:decimal outside;}.kune-Content-Main li{list-style:decimal outside;}.kune-Content-Main li{list-style:disc outside;}.kune-Content-Main ul{list-style:disc outside;}.kune-Content-Main dl{margin-left:1em;}.kune-Content-Main dd{margin-left:1em;}.kune-Content-Main th{border:1px solid #000;padding:.5em;font-weight:700;text-align:center;}.kune-Content-Main td{border:1px solid #000;padding:.5em;}.kune-Content-Main caption{margin-bottom:.5em;text-align:center;}.kune-Content-Main p{margin-bottom:1em;}.kune-Content-Main fieldset{margin-bottom:1em;}.kune-Content-Main table{margin-bottom:1em;}.kune-Content-Main pre{margin-bottom:1em;}.kune-Content-Main input[type=text]{width:12.25em;width:11.9em;}.kune-Content-Main input[type=password]{width:12.25em;width:11.9em;}.kune-Content-Main textarea{width:12.25em;width:11.9em;}.search-icon{background-image:url(img/search.gif)!important;}.i18n-icon{background-image:url(img/language.gif)!important;}/* RTE Text editor */.kune-TexEditorPanel-TextArea{margin:3px;}.gwt-RichTextArea{/* border: 1px solid #000;
background-color: #FFF; */border:1px solid #4D4D4D;background-color:#FFF;margin:5px 0 5px 10px;}.gwt-RichTextToolbar{/* background-color: #F2F2F2;
- padding: 5px; */height:24px;vertical-align:middle;}.gwt-RichTextToolbar table{vertical-align:middle;}.gwt-RichTextToolbar .gwt-ToggleButton{float:left;margin-top:2px;}.gwt-RichTextToolbar .gwt-PushButton{float:left;margin-top:2px;}.gwt-RichTextToolbar .gwt-PushButton-up{margin-right:2px;border:1px solid #F2F2F2;}.gwt-RichTextToolbar .gwt-PushButton-up-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#E8F1FF #9daecd #9daecd #e8f1ff;}.gwt-RichTextToolbar .gwt-PushButton-down{margin-right:2px;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-PushButton-down-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-ToggleButton-up{margin-right:2px;border:1px solid #F2F2F2;}.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#E8F1FF #9daecd #9daecd #e8f1ff;}.gwt-RichTextToolbar .gwt-ToggleButton-down{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .x-btn{float:left;}.gwt-RichTextToolbar .kune-Button-Large-lSpace{float:left;}.gwt-RichTextToolbar .kune-Button-Large-lrSpace{float:left;}.RichTextToolbar-menu{float:left;margin-top:2px;z-index:4;}.RichTextToolbar-menu table{border-collapse:collapse;border-spacing:0;margin:0;z-index:4;}.RichTextToolbar-menu .gwt-MenuItem{margin-right:2px;border:1px solid #F2F2F2;}.RichTextToolbar-menu .gwt-MenuItem-selected{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.RichTextToolbar-submenu{background-color:#FFFCD5;border:1px solid #D38D5F;cursor:default;z-index:4;}.RichTextToolbar-submenu .gwt-MenuItem{cursor:default;white-space:nowrap;border:1px solid #FFFCD5;padding:0 4px;}.RichTextToolbar-submenu .gwt-MenuItem-selected{background-color:#FFB958;border:1px solid #C83737;}.kune-WebSafePalette{background-color:#FFF;border:1px solid #AAA;margin:1px;}.kune-WebSafePalette td{width:12px;height:10px;}.k-site-traybar{background:#FFF none repeat scroll 0 50%;}.k-blank-toolbar{background:#FFF none repeat scroll 0 50%;}.k-sitebar .kune-IconHyperlink{white-space:nowrap;}.k-sitebar .kune-IconHyperlink a:link{cursor:pointer;text-decoration:underline;color:#B3B3B3;}.k-sitebar .kune-IconHyperlink a:hover{text-decoration:underline;}.k-sitebar .kune-IconHyperlink a:visited{color:#B3B3B3;}.k-sitebar-labellink{white-space:nowrap;color:#B3B3B3;cursor:pointer;text-decoration:underline;}.k-sitebar{margin-right:10px;height:16px;background:#FFF;}.k-sitebar .gwt-TextBox{border:1px solid #E4A374;margin:0 15px 0 3px;padding-left:3px;color:#B3B3B3;}.k-sitebar .gwt-Hyperlink a{white-space:nowrap;color:#B3B3B3;text-decoration:underline;cursor:pointer;}.k-sitebar .gwt-PushButton{cursor:pointer;}.k-sitebar-LabelLink{white-space:nowrap;color:#B3B3B3;cursor:pointer;text-decoration:underline;}.k-entity-summary{border-left-color:#FFF;border-left-width:5px;border-down-width:5px;}.k-entitytextlogo{border:2px solid #F2F2F2;height:60px;margin:0 0 4px -1px;overflow:hidden;width:468px;}.k-entitytextlogo .gwt-Label{font-size:167%;font-weight:700;margin:5px;height:27px;}.k-entitytextlogo-default .gwt-Label{color:#69312F;}.k-entitytextlogo-green .gwt-Label{color:#250;}.k-entitytextlogo-blue .gwt-Label{color:navy;}.k-entitytextlogo-grey .gwt-Label{color:#1A1A1A;}.k-entitytextlogo-purple .gwt-Label{color:#405;}.k-entitytextlogo-red .gwt-Label{color:maroon;}.k-entitytextlogo .gwt-Hyperlink a{color:#CCC;font-size:85%;margin:5px;text-decoration:underline;white-space:nowrap;background-color:#FFF;}.k-entity-default .x-layout-split{background:#DD8A3D none repeat scroll 0 50%;}.k-entity-green .x-layout-split{background:#5FD35F none repeat scroll 0 50%;}.k-entity-blue .x-layout-split{background:#06F none repeat scroll 0 50%;}.k-entity-grey .x-layout-split{background:#4D4D4D none repeat scroll 0 50%;}.k-entity-purple .x-layout-split{background:#660080 none repeat scroll 0 50%;}.k-entity-red .x-layout-split{background:#D40000 none repeat scroll 0 50%;}.k-entityworkspace .x-layout-split{background:transparent none repeat scroll 0 50%;}.k-entityworkspace-default .x-layout-split{background:#DEAA87 none repeat scroll 0 50%;}.k-entityworkspace-green .x-layout-split{background:#DCE8AB none repeat scroll 0 50%;}.k-entityworkspace-blue .x-layout-split{background:#D5D5FF none repeat scroll 0 50%;}.k-entityworkspace-grey .x-layout-split{background:#999 none repeat scroll 0 50%;}.k-entityworkspace-purple .x-layout-split{background:#A793AC none repeat scroll 0 50%;}.k-entityworkspace-red .x-layout-split{background:#F55 none repeat scroll 0 50%;}.k-entity-title{border-left-style:solid;border-left-width:2px;}.k-entity-title div{line-height:22px;white-space:nowrap;}.k-entity-subtitle{}.k-entity-subtitle div{line-height:22px;white-space:nowrap;}.k-entity-title-rd-default{background:#DD8A3D;}.k-entity-title-rd-green{background:#5FD35F;}.k-entity-title-rd-blue{background:#06F;}.k-entity-title-rd-grey{background:#4D4D4D;}.k-entity-title-rd-purple{background:#660080;}.k-entity-title-rd-red{background:#D40000;}.k-entity-title-default{background:#F1BB59 none repeat scroll 0 50%;border-left-color:#DD8A3D;}.k-entity-title-green{background:#AFA none repeat scroll 0 50%;border-left-color:#5FD35F;}.k-entity-title-blue{background:#AFDDE9 none repeat scroll 0 50%;border-left-color:#06F;}.k-entity-title-grey{background:#CCC none repeat scroll 0 50%;border-left-color:#4D4D4D;}.k-entity-title-purple{background:#DDAFE9 none repeat scroll 0 50%;border-left-color:#660080;}.k-entity-title-red{background:#FF8080 none repeat scroll 0 50%;border-left-color:#D40000;}.k-entity-title-default div{color:#69312F;}.k-entity-title-green div{color:#250;}.k-entity-title-blue div{color:navy;}.k-entity-title-grey div{color:#1A1A1A;}.k-entity-title-purple div{color:#405;}.k-entity-title-red div{color:maroon;}.k-entity-subtitle-default{background:#DD8A3D none repeat scroll 0 50%;}.k-entity-subtitle-green{background:#5FD35F none repeat scroll 0 50%;}.k-entity-subtitle-blue{background:#06F none repeat scroll 0 50%;}.k-entity-subtitle-grey{background:#4D4D4D none repeat scroll 0 50%;}.k-entity-subtitle-purple{background:#660080 none repeat scroll 0 50%;}.k-entity-subtitle-red{background:#D40000 none repeat scroll 0 50%;}.k-entity-subtitle-default div{color:#FFF;}.k-entity-subtitle-green div{color:#FFF;}.k-entity-subtitle-blue div{color:#FFF;}.k-entity-subtitle-grey div{color:#FFF;}.k-entity-subtitle-purple div{color:#FFF;}.k-entity-subtitle-red div{color:#FFF;}.k-entity-bottom-rd-default,.k-entity-bottom-default,.k-toolselectoritem-sel-default{background:#DD8A3D;}.k-entity-bottom-rd-green,.k-entity-bottom-green,.k-toolselectoritem-sel-green{background:#5FD35F;}.k-entity-bottom-rd-blue,.k-entity-bottom-blue,.k-toolselectoritem-sel-blue{background:#06F;}.k-entity-bottom-rd-grey,.k-entity-bottom-grey,.k-toolselectoritem-sel-grey{background:#4D4D4D;}.k-entity-bottom-rd-purple,.k-entity-bottom-purple,.k-toolselectoritem-sel-purple{background:#660080;}.k-entity-bottom-rd-red,.k-entity-bottom-red,.k-toolselectoritem-sel-red{background:#D40000;}.k-entitylicensepanel-licensetext{cursor:pointer;margin-left:5px;text-decoration:underline;}.k-entity-context-default div,.k-entity-context-default .x-tree .x-panel-body{background:#FFD09D none repeat scroll 0 50%;}.k-entity-context-green div,.k-entity-context-green .x-tree .x-panel-body{background:#CFA none repeat scroll 0 50%;}.k-entity-context-blue div,.k-entity-context-blue .x-tree .x-panel-body{background:#ACF none repeat scroll 0 50%;}.k-entity-context-grey div,.k-entity-context-grey .x-tree .x-panel-body{background:#B3B3B3 none repeat scroll 0 50%;}.k-entity-context-purple div,.k-entity-context-purple .x-tree .x-panel-body{background:#DDAFE9 none repeat scroll 0 50%;}.k-entity-context-red div,.k-entity-context-red .x-tree .x-panel-body{background:#FAA none repeat scroll 0 50%;}.k-entity-context-purple .x-tree .x-panel-body{background:#DDAFE9 none repeat scroll 0 50%;}.k-entity-bottom div{line-height:2em;color:#FFF;}.k-toolbar-top-line{border-top-color:#d0d0d0;border-top-style:solid;border-top-width:1px;}.k-toolbar-bottom-line{border-bottom-color:#d0d0d0;border-bottom-style:solid;border-bottom-width:1px;}.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{white-space:nowrap;font:normal 100% arial, sans;line-height:19px;}.k-toolbar-sep{padding-top:4px;padding-left:5px;}/* Custom gwt-ext styles */.ytb-sep{background-image:url(../js/ext/resources/images/default/grid/grid-split.gif);background-position:center;background-repeat:no-repeat;display:block;font-size:1px;height:16px;width:4px;overflow:hidden;cursor:default;margin:0 2px;border:0;}.ytb-spacer{width:2px;}.x-grid-group-hd{border-bottom:2px solid grey;cursor:pointer;padding-top:3px;}/* Drop down */.k-dropdownouter{background-color:grey;}.k-dropdownouter-members{}.k-dropdownouter-members-default{background-color:#DF5244;}.k-dropdownouter-members-green{background-color:green;}.k-dropdownouter-members-blue{background-color:#5500D4;}.k-dropdownouter-members-grey{background-color:#4D4D4D;}.k-dropdownouter-members-purple{background-color:#672178;}.k-dropdownouter-members-red{background-color:#A02C2C;}.k-dropdownouter-part{}.k-dropdownouter-part-default{background-color:#CA5842;}.k-dropdownouter-part-green{background-color:#0A0;}.k-dropdownouter-part-blue{background-color:#60F;}.k-dropdownouter-part-grey{background-color:#666;}.k-dropdownouter-part-purple{background-color:#892CA0;}.k-dropdownouter-part-red{background-color:#C83737;}.k-dropdownouter-tags{}.k-dropdownouter-tags-default{background-color:#87501E;}.k-dropdownouter-tags-green{background-color:#00D400;}.k-dropdownouter-tags-blue{background-color:#95F;}.k-dropdownouter-tags-grey{background-color:gray;}.k-dropdownouter-tags-purple{background-color:#AB37C8;}.k-dropdownouter-tags-red{background-color:#D35F5F;}.k-dropdownouter-summary{}.k-dropdownouter-summary-default{background-color:#9F734B;}.k-dropdownouter-summary-green{background-color:#4CE14C;}.k-dropdownouter-summary-blue{background-color:#69A5FF;}.k-dropdownouter-summary-grey{background-color:#A6A6A6;}.k-dropdownouter-summary-purple{background-color:#C473D8;}.k-dropdownouter-summary-red{background-color:#E08F8F;}.k-dropdowninner{margin:0 3px 1px;background:green;background-color:#FFF;/* padding: 3px; */}.k-dropdownlabel{color:#FFF;cursor:pointer;}.k-dropdownlabel .gwt-Label{margin:0 5px 0 0;width:100%;}.k-dropdownlabel img{margin:0 3px 0 1px;}/* WsTheme */.k-wstheme-icon-default{background:#FF8C00;}.k-wstheme-icon-green{background:green;}.k-wstheme-icon-blue{background:blue;}.k-wstheme-icon-grey{background:grey;}.k-wstheme-icon-purple{background:purple;}.k-wstheme-icon-red{background:red;}/* Tool selector items */.k-toolselectoritem{width:auto;margin-bottom:5px;cursor:pointer;}.k-toolselectoritem-sel{}.k-toolselectoritem-notsel-default{background:#FFE9A5;}.k-toolselectoritem-notsel-green{background:#D6F4D6;}.k-toolselectoritem-notsel-blue{background:#D7D7F4;}.k-toolselectoritem-notsel-grey{background:#E6E6E6;}.k-toolselectoritem-notsel-purple{background:#EED7F4;}.k-toolselectoritem-notsel-red{background:#FFD5D5;}.k-toolselectoritem-sel a{color:#FFF;padding:0 9px;text-decoration:none;}.k-toolselectoritem-sel a:hover{text-decoration:none;}.k-toolselectoritem-notsel{}.k-toolselectoritem-notsel a{color:#00F;padding:0 9px;text-decoration:none;}.k-toolselectoritem-notsel a:hover{text-decoration:underline;}/* others */.k-textlinethrough{text-decoration:line-through;color:red;}.k-textnormal{text-decoration:inherit;color:green;}.k-textunderline{text-decoration:underline;color:gray;}.x-tool-kmenu{background-position:0 -75px;}.x-tool-kmenu-over{background-position:-15px -75px;}
\ No newline at end of file
+ padding: 5px; */height:24px;vertical-align:middle;}.gwt-RichTextToolbar table{vertical-align:middle;}.gwt-RichTextToolbar .gwt-ToggleButton{float:left;margin-top:2px;}.gwt-RichTextToolbar .gwt-PushButton{float:left;margin-top:2px;}.gwt-RichTextToolbar .gwt-PushButton-up{margin-right:2px;border:1px solid #F2F2F2;}.gwt-RichTextToolbar .gwt-PushButton-up-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#E8F1FF #9daecd #9daecd #e8f1ff;}.gwt-RichTextToolbar .gwt-PushButton-down{margin-right:2px;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-PushButton-down-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-ToggleButton-up{margin-right:2px;border:1px solid #F2F2F2;}.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#E8F1FF #9daecd #9daecd #e8f1ff;}.gwt-RichTextToolbar .gwt-ToggleButton-down{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .x-btn{float:left;}.gwt-RichTextToolbar .kune-Button-Large-lSpace{float:left;}.gwt-RichTextToolbar .kune-Button-Large-lrSpace{float:left;}.RichTextToolbar-menu{float:left;margin-top:2px;z-index:4;}.RichTextToolbar-menu table{border-collapse:collapse;border-spacing:0;margin:0;z-index:4;}.RichTextToolbar-menu .gwt-MenuItem{margin-right:2px;border:1px solid #F2F2F2;}.RichTextToolbar-menu .gwt-MenuItem-selected{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.RichTextToolbar-submenu{background-color:#FFFCD5;border:1px solid #D38D5F;cursor:default;z-index:4;}.RichTextToolbar-submenu .gwt-MenuItem{cursor:default;white-space:nowrap;border:1px solid #FFFCD5;padding:0 4px;}.RichTextToolbar-submenu .gwt-MenuItem-selected{background-color:#FFB958;border:1px solid #C83737;}.kune-WebSafePalette{background-color:#FFF;border:1px solid #AAA;margin:1px;}.kune-WebSafePalette td{width:12px;height:10px;}.k-site-traybar{background:#FFF none repeat scroll 0 50%;}.k-blank-toolbar{background:#FFF none repeat scroll 0 50%;}.k-sitebar .kune-IconHyperlink{white-space:nowrap;}.k-sitebar .kune-IconHyperlink a:link{cursor:pointer;text-decoration:underline;color:#B3B3B3;}.k-sitebar .kune-IconHyperlink a:hover{text-decoration:underline;}.k-sitebar .kune-IconHyperlink a:visited{color:#B3B3B3;}.k-sitebar-labellink{white-space:nowrap;color:#B3B3B3;cursor:pointer;text-decoration:underline;}.k-sitebar{margin-right:10px;height:16px;background:#FFF;}.k-sitebar .gwt-TextBox{border:1px solid #E4A374;margin:0 15px 0 3px;padding-left:3px;color:#B3B3B3;}.k-sitebar .gwt-Hyperlink a{white-space:nowrap;color:#B3B3B3;text-decoration:underline;cursor:pointer;}.k-sitebar .gwt-PushButton{cursor:pointer;}.k-sitebar-LabelLink{white-space:nowrap;color:#B3B3B3;cursor:pointer;text-decoration:underline;}.k-entity-summary{border-left-color:#FFF;border-left-width:5px;border-down-width:5px;}.k-entitytextlogo{border:2px solid #F2F2F2;height:60px;margin:0 0 4px -1px;overflow:hidden;width:468px;}.k-entitytextlogo .gwt-Label{font-size:167%;font-weight:700;margin:5px;height:27px;}.k-entitytextlogo-default .gwt-Label{color:#69312F;}.k-entitytextlogo-green .gwt-Label{color:#250;}.k-entitytextlogo-blue .gwt-Label{color:navy;}.k-entitytextlogo-grey .gwt-Label{color:#1A1A1A;}.k-entitytextlogo-purple .gwt-Label{color:#405;}.k-entitytextlogo-red .gwt-Label{color:maroon;}.k-entitytextlogo .gwt-Hyperlink a{color:#CCC;font-size:85%;margin:5px;text-decoration:underline;white-space:nowrap;background-color:#FFF;}.k-entity-default .x-layout-split,.k-entity-default .x-layout-collapsed{background:#DD8A3D none repeat scroll 0 50%;}.k-entity-green .x-layout-split,.k-entity-green .x-layout-collapsed{background:#5FD35F none repeat scroll 0 50%;}.k-entity-blue .x-layout-split,.k-entity-blue .x-layout-collapsed{background:#06F none repeat scroll 0 50%;}.k-entity-grey .x-layout-split,.k-entity-grey .x-layout-collapsed{background:#4D4D4D none repeat scroll 0 50%;}.k-entity-purple .x-layout-split,.k-entity-purple .x-layout-collapsed{background:#660080 none repeat scroll 0 50%;}.k-entity-red .x-layout-split,.k-entity-red .x-layout-collapsed{background:#D40000 none repeat scroll 0 50%;}.k-entityworkspace .x-layout-split,.k-entityworkspace .x-layout-collapsed{background:transparent none repeat scroll 0 50%;}.k-entityworkspace-default .x-layout-split,.k-entityworkspace-default .x-layout-collapsed{background:#DEAA87 none repeat scroll 0 50%;}.k-entityworkspace-green .x-layout-split,.k-entityworkspace-green .x-layout-collapsed{background:#DCE8AB none repeat scroll 0 50%;}.k-entityworkspace-blue .x-layout-split,.k-entityworkspace-blue .x-layout-collapsed{background:#D5D5FF none repeat scroll 0 50%;}.k-entityworkspace-grey .x-layout-split,.k-entityworkspace-grey .x-layout-collapsed{background:#999 none repeat scroll 0 50%;}.k-entityworkspace-purple .x-layout-split,.k-entityworkspace-purple .x-layout-collapsed{background:#A793AC none repeat scroll 0 50%;}.k-entityworkspace-red .x-layout-split,.k-entityworkspace-red .x-layout-collapsed{background:#F55 none repeat scroll 0 50%;}.k-entity-title{border-left-style:solid;border-left-width:2px;}.k-entity-title div{line-height:22px;white-space:nowrap;}.k-entity-subtitle{}.k-entity-subtitle div{line-height:22px;white-space:nowrap;}.k-entity-title-rd-default{background:#DD8A3D;}.k-entity-title-rd-green{background:#5FD35F;}.k-entity-title-rd-blue{background:#06F;}.k-entity-title-rd-grey{background:#4D4D4D;}.k-entity-title-rd-purple{background:#660080;}.k-entity-title-rd-red{background:#D40000;}.k-entity-title-default{background:#F1BB59 none repeat scroll 0 50%;border-left-color:#DD8A3D;}.k-entity-title-green{background:#AFA none repeat scroll 0 50%;border-left-color:#5FD35F;}.k-entity-title-blue{background:#AFDDE9 none repeat scroll 0 50%;border-left-color:#06F;}.k-entity-title-grey{background:#CCC none repeat scroll 0 50%;border-left-color:#4D4D4D;}.k-entity-title-purple{background:#DDAFE9 none repeat scroll 0 50%;border-left-color:#660080;}.k-entity-title-red{background:#FF8080 none repeat scroll 0 50%;border-left-color:#D40000;}.k-entity-title-default div{color:#69312F;}.k-entity-title-green div{color:#250;}.k-entity-title-blue div{color:navy;}.k-entity-title-grey div{color:#1A1A1A;}.k-entity-title-purple div{color:#405;}.k-entity-title-red div{color:maroon;}.k-entity-subtitle-default{background:#DD8A3D none repeat scroll 0 50%;}.k-entity-subtitle-green{background:#5FD35F none repeat scroll 0 50%;}.k-entity-subtitle-blue{background:#06F none repeat scroll 0 50%;}.k-entity-subtitle-grey{background:#4D4D4D none repeat scroll 0 50%;}.k-entity-subtitle-purple{background:#660080 none repeat scroll 0 50%;}.k-entity-subtitle-red{background:#D40000 none repeat scroll 0 50%;}.k-entity-subtitle-default div{color:#FFF;}.k-entity-subtitle-green div{color:#FFF;}.k-entity-subtitle-blue div{color:#FFF;}.k-entity-subtitle-grey div{color:#FFF;}.k-entity-subtitle-purple div{color:#FFF;}.k-entity-subtitle-red div{color:#FFF;}.k-entity-bottom-rd-default,.k-entity-bottom-default,.k-toolselectoritem-sel-default{background:#DD8A3D;}.k-entity-bottom-rd-green,.k-entity-bottom-green,.k-toolselectoritem-sel-green{background:#5FD35F;}.k-entity-bottom-rd-blue,.k-entity-bottom-blue,.k-toolselectoritem-sel-blue{background:#06F;}.k-entity-bottom-rd-grey,.k-entity-bottom-grey,.k-toolselectoritem-sel-grey{background:#4D4D4D;}.k-entity-bottom-rd-purple,.k-entity-bottom-purple,.k-toolselectoritem-sel-purple{background:#660080;}.k-entity-bottom-rd-red,.k-entity-bottom-red,.k-toolselectoritem-sel-red{background:#D40000;}.k-entitylicensepanel-licensetext{cursor:pointer;margin-left:5px;text-decoration:underline;}.k-entity-context-default div,.k-entity-context-default .x-tree .x-panel-body{background:#FFD09D none repeat scroll 0 50%;}.k-entity-context-green div,.k-entity-context-green .x-tree .x-panel-body{background:#CFA none repeat scroll 0 50%;}.k-entity-context-blue div,.k-entity-context-blue .x-tree .x-panel-body{background:#ACF none repeat scroll 0 50%;}.k-entity-context-grey div,.k-entity-context-grey .x-tree .x-panel-body{background:#B3B3B3 none repeat scroll 0 50%;}.k-entity-context-purple div,.k-entity-context-purple .x-tree .x-panel-body{background:#DDAFE9 none repeat scroll 0 50%;}.k-entity-context-red div,.k-entity-context-red .x-tree .x-panel-body{background:#FAA none repeat scroll 0 50%;}.k-entity-context-purple .x-tree .x-panel-body{background:#DDAFE9 none repeat scroll 0 50%;}.k-entity-bottom div{line-height:2em;color:#FFF;}.k-toolbar-top-line{border-top-color:#d0d0d0;border-top-style:solid;border-top-width:1px;}.k-toolbar-bottom-line{border-bottom-color:#d0d0d0;border-bottom-style:solid;border-bottom-width:1px;}.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{white-space:nowrap;font:normal 100% arial, sans;line-height:19px;}.k-toolbar-sep{padding-top:4px;padding-left:5px;}/* Custom gwt-ext styles */.ytb-sep{background-image:url(../js/ext/resources/images/default/grid/grid-split.gif);background-position:center;background-repeat:no-repeat;display:block;font-size:1px;height:16px;width:4px;overflow:hidden;cursor:default;margin:0 2px;border:0;}.ytb-spacer{width:2px;}.x-grid-group-hd{border-bottom:2px solid grey;cursor:pointer;padding-top:3px;}/* Drop down */.k-dropdownouter{background-color:grey;}.k-dropdownouter-members{}.k-dropdownouter-members-default{background-color:#DF5244;}.k-dropdownouter-members-green{background-color:green;}.k-dropdownouter-members-blue{background-color:#5500D4;}.k-dropdownouter-members-grey{background-color:#4D4D4D;}.k-dropdownouter-members-purple{background-color:#672178;}.k-dropdownouter-members-red{background-color:#A02C2C;}.k-dropdownouter-part{}.k-dropdownouter-part-default{background-color:#CA5842;}.k-dropdownouter-part-green{background-color:#0A0;}.k-dropdownouter-part-blue{background-color:#60F;}.k-dropdownouter-part-grey{background-color:#666;}.k-dropdownouter-part-purple{background-color:#892CA0;}.k-dropdownouter-part-red{background-color:#C83737;}.k-dropdownouter-tags{}.k-dropdownouter-tags-default{background-color:#87501E;}.k-dropdownouter-tags-green{background-color:#00D400;}.k-dropdownouter-tags-blue{background-color:#95F;}.k-dropdownouter-tags-grey{background-color:gray;}.k-dropdownouter-tags-purple{background-color:#AB37C8;}.k-dropdownouter-tags-red{background-color:#D35F5F;}.k-dropdownouter-summary{}.k-dropdownouter-summary-default{background-color:#9F734B;}.k-dropdownouter-summary-green{background-color:#4CE14C;}.k-dropdownouter-summary-blue{background-color:#69A5FF;}.k-dropdownouter-summary-grey{background-color:#A6A6A6;}.k-dropdownouter-summary-purple{background-color:#C473D8;}.k-dropdownouter-summary-red{background-color:#E08F8F;}.k-dropdowninner{margin:0 3px 1px;background:green;background-color:#FFF;/* padding: 3px; */}.k-dropdownlabel{color:#FFF;cursor:pointer;}.k-dropdownlabel .gwt-Label{margin:0 5px 0 0;width:100%;}.k-dropdownlabel img{margin:0 3px 0 1px;}/* WsTheme */.k-wstheme-icon-default{background:#FF8C00;}.k-wstheme-icon-green{background:green;}.k-wstheme-icon-blue{background:blue;}.k-wstheme-icon-grey{background:grey;}.k-wstheme-icon-purple{background:purple;}.k-wstheme-icon-red{background:red;}/* Tool selector items */.k-toolselectoritem{width:auto;margin-bottom:5px;cursor:pointer;}.k-toolselectoritem-sel{}.k-toolselectoritem-notsel-default{background:#FFE9A5;}.k-toolselectoritem-notsel-green{background:#D6F4D6;}.k-toolselectoritem-notsel-blue{background:#D7D7F4;}.k-toolselectoritem-notsel-grey{background:#E6E6E6;}.k-toolselectoritem-notsel-purple{background:#EED7F4;}.k-toolselectoritem-notsel-red{background:#FFD5D5;}.k-toolselectoritem-sel a{color:#FFF;padding:0 9px;text-decoration:none;}.k-toolselectoritem-sel a:hover{text-decoration:none;}.k-toolselectoritem-notsel{}.k-toolselectoritem-notsel a{color:#00F;padding:0 9px;text-decoration:none;}.k-toolselectoritem-notsel a:hover{text-decoration:underline;}/* others */.k-textlinethrough{text-decoration:line-through;color:red;}.k-textnormal{text-decoration:inherit;color:green;}.k-textunderline{text-decoration:underline;color:gray;}.x-tool-kmenu{background-position:0 -75px;}.x-tool-kmenu-over{background-position:-15px -75px;}
\ No newline at end of file
Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2008-10-17 02:27:46 UTC (rev 916)
@@ -116,55 +116,55 @@
background-color: #FFF;
}
-.k-entity-default .x-layout-split {
+.k-entity-default .x-layout-split, .k-entity-default .x-layout-collapsed {
background: #DD8A3D none repeat scroll 0% 50%;
}
-.k-entity-green .x-layout-split {
+.k-entity-green .x-layout-split, .k-entity-green .x-layout-collapsed {
background: #5FD35F none repeat scroll 0% 50%;
}
-.k-entity-blue .x-layout-split {
+.k-entity-blue .x-layout-split, .k-entity-blue .x-layout-collapsed {
background: #0066FF none repeat scroll 0% 50%;
}
-.k-entity-grey .x-layout-split {
+.k-entity-grey .x-layout-split, .k-entity-grey .x-layout-collapsed {
background: #4D4D4D none repeat scroll 0% 50%;
}
-.k-entity-purple .x-layout-split {
+.k-entity-purple .x-layout-split, .k-entity-purple .x-layout-collapsed {
background: #660080 none repeat scroll 0% 50%;
}
-.k-entity-red .x-layout-split {
+.k-entity-red .x-layout-split, .k-entity-red .x-layout-collapsed {
background: #D40000 none repeat scroll 0% 50%;
}
-.k-entityworkspace .x-layout-split {
+.k-entityworkspace .x-layout-split, .k-entityworkspace .x-layout-collapsed {
background: transparent none repeat scroll 0% 50%;
}
-.k-entityworkspace-default .x-layout-split {
+.k-entityworkspace-default .x-layout-split, .k-entityworkspace-default .x-layout-collapsed {
background: #DEAA87 none repeat scroll 0% 50%;
}
-.k-entityworkspace-green .x-layout-split {
+.k-entityworkspace-green .x-layout-split, .k-entityworkspace-green .x-layout-collapsed {
background: #DCE8AB none repeat scroll 0% 50%;
}
-.k-entityworkspace-blue .x-layout-split {
+.k-entityworkspace-blue .x-layout-split, .k-entityworkspace-blue .x-layout-collapsed {
background: #D5D5FF none repeat scroll 0% 50%;
}
-.k-entityworkspace-grey .x-layout-split {
+.k-entityworkspace-grey .x-layout-split, .k-entityworkspace-grey .x-layout-collapsed {
background: #999999 none repeat scroll 0% 50%;
}
-.k-entityworkspace-purple .x-layout-split {
+.k-entityworkspace-purple .x-layout-split, .k-entityworkspace-purple .x-layout-collapsed {
background: #A793AC none repeat scroll 0% 50%;
}
-.k-entityworkspace-red .x-layout-split {
+.k-entityworkspace-red .x-layout-split, .k-entityworkspace-red .x-layout-collapsed {
background: #FF5555 none repeat scroll 0% 50%;
}
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngine.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngine.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngine.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -20,6 +20,8 @@
package org.ourproject.kune.chat.client;
public interface ChatEngine {
+ void addNewBuddie(String shortName);
+
ChatOptions getChatOptions();
void joinRoom(String roomName, String userAlias);
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -22,6 +22,7 @@
import java.util.Date;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
+import org.ourproject.kune.workspace.client.site.Site;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
@@ -52,6 +53,10 @@
this.ws = ws;
}
+ public void addNewBuddie(String shortName) {
+ Site.important("In development (emite)");
+ }
+
public ChatOptions getChatOptions() {
return chatOptions;
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionRegistry.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionRegistry.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -9,66 +9,66 @@
private final HashMap<String, ActionCollection<T>> actions;
public ActionRegistry() {
- actions = new HashMap<String, ActionCollection<T>>();
+ actions = new HashMap<String, ActionCollection<T>>();
}
- public void addAction(final ActionDescriptor<T> action, final String... contentTypeIds) {
- for (final String contentTypeId : contentTypeIds) {
- final ActionCollection<T> actionColl = getActions(contentTypeId);
- actionColl.add(action);
- }
+ public void addAction(final ActionDescriptor<T> action, final String... typeIds) {
+ for (final String contentTypeId : typeIds) {
+ final ActionCollection<T> actionColl = getActions(contentTypeId);
+ actionColl.add(action);
+ }
}
- public ActionItemCollection<T> getCurrentActions(final T item, final String contentTypeId, final boolean isLogged,
- final AccessRightsDTO rights, final boolean toolbarItems) {
- final ActionItemCollection<T> collection = new ActionItemCollection<T>();
+ public ActionItemCollection<T> getCurrentActions(final T item, final String typeId, final boolean isLogged,
+ final AccessRightsDTO rights, final boolean toolbarItems) {
+ final ActionItemCollection<T> collection = new ActionItemCollection<T>();
- for (final ActionDescriptor<T> action : getActions(contentTypeId)) {
- if (mustAdd(isLogged, rights, action)) {
- if (toolbarItems) {
- if (action instanceof ActionToolbarButtonDescriptor<?>
- || action instanceof ActionToolbarMenuDescriptor<?>) {
- collection.add(new ActionItem<T>(action, item));
- }
- } else {
- if (action instanceof ActionMenuItemDescriptor<?>
- || action instanceof ActionToolbarMenuAndItemDescriptor<?>
- || action instanceof ActionToolbarButtonAndItemDescriptor<?>) {
- collection.add(new ActionItem<T>(action, item));
- }
- }
- }
- }
- return collection;
+ for (final ActionDescriptor<T> action : getActions(typeId)) {
+ if (mustAdd(isLogged, rights, action)) {
+ if (toolbarItems) {
+ if (action instanceof ActionToolbarButtonDescriptor<?>
+ || action instanceof ActionToolbarMenuDescriptor<?>) {
+ collection.add(new ActionItem<T>(action, item));
+ }
+ } else {
+ if (action instanceof ActionMenuItemDescriptor<?>
+ || action instanceof ActionToolbarMenuAndItemDescriptor<?>
+ || action instanceof ActionToolbarButtonAndItemDescriptor<?>) {
+ collection.add(new ActionItem<T>(action, item));
+ }
+ }
+ }
+ }
+ return collection;
}
- public void removeAction(final String contentTypeId, final ActionDescriptor<T> action) {
- actions.get(contentTypeId).remove(action);
+ public void removeAction(final String typeId, final ActionDescriptor<T> action) {
+ actions.get(typeId).remove(action);
}
- private ActionCollection<T> getActions(final String contentTypeId) {
- ActionCollection<T> actionColl = actions.get(contentTypeId);
- if (actionColl == null) {
- actionColl = new ActionCollection<T>();
- actions.put(contentTypeId, actionColl);
- }
- return actionColl;
+ private ActionCollection<T> getActions(final String typeId) {
+ ActionCollection<T> actionColl = actions.get(typeId);
+ if (actionColl == null) {
+ actionColl = new ActionCollection<T>();
+ actions.put(typeId, actionColl);
+ }
+ return actionColl;
}
private boolean mustAdd(final boolean isLogged, final AccessRightsDTO rights, final ActionDescriptor<T> action) {
- if (action.mustBeAuthenticated()) {
- if (!isLogged) {
- return false;
- }
- }
- switch (action.getAccessRol()) {
- case Administrator:
- return rights.isAdministrable();
- case Editor:
- return rights.isEditable();
- case Viewer:
- default:
- return rights.isVisible();
- }
+ if (action.mustBeAuthenticated()) {
+ if (!isLogged) {
+ return false;
+ }
+ }
+ switch (action.getAccessRol()) {
+ case Administrator:
+ return rights.isAdministrable();
+ case Editor:
+ return rights.isEditable();
+ case Viewer:
+ default:
+ return rights.isVisible();
+ }
}
}
Added: trunk/src/main/java/org/ourproject/kune/platf/client/actions/GroupActionRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/GroupActionRegistry.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/GroupActionRegistry.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -0,0 +1,6 @@
+package org.ourproject.kune.platf.client.actions;
+
+import org.ourproject.kune.platf.client.dto.GroupDTO;
+
+public class GroupActionRegistry extends ActionRegistry<GroupDTO> {
+}
Added: trunk/src/main/java/org/ourproject/kune/platf/client/actions/MenuItemsContainer.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/MenuItemsContainer.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/MenuItemsContainer.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -0,0 +1,56 @@
+package org.ourproject.kune.platf.client.actions;
+
+import java.util.HashMap;
+
+import com.calclab.suco.client.listener.Listener;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.DeferredCommand;
+import com.gwtext.client.core.EventObject;
+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.event.BaseItemListenerAdapter;
+
+public class MenuItemsContainer<T> {
+ private final HashMap<String, Menu> contextMenus;
+
+ public MenuItemsContainer() {
+ contextMenus = new HashMap<String, Menu>();
+ }
+
+ public void clear() {
+ contextMenus.clear();
+ }
+
+ public void createItemMenu(final String id, final ActionItemCollection<T> actionCollection,
+ final Listener<ActionItem<T>> listener) {
+ DeferredCommand.addCommand(new Command() {
+ public void execute() {
+ Menu menu = null;
+ if (actionCollection != null) {
+ menu = new Menu();
+ // Remove if when retrieved rights of siblings
+ for (final ActionItem<T> actionItem : actionCollection) {
+ final ActionDescriptor<T> action = actionItem.getAction();
+ if (actionItem.checkEnabling()) {
+ final Item item = new Item(action.getText());
+ item.setIcon(action.getIconUrl());
+ menu.addItem(item);
+ item.addListener(new BaseItemListenerAdapter() {
+ @Override
+ public void onClick(final BaseItem item, final EventObject e) {
+ listener.onEvent(actionItem);
+ }
+ });
+ }
+ }
+ }
+ contextMenus.put(id, menu);
+ }
+ });
+ }
+
+ public Menu get(String id) {
+ return contextMenus.get(id);
+ }
+}
Added: trunk/src/main/java/org/ourproject/kune/platf/client/actions/UserActionRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/UserActionRegistry.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/UserActionRegistry.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -0,0 +1,9 @@
+package org.ourproject.kune.platf.client.actions;
+
+import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
+
+public class UserActionRegistry extends ActionRegistry<UserSimpleDTO> {
+
+ public static final String GENERAL = "genActions";
+
+}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserBuddiesDataDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserBuddiesDataDTO.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserBuddiesDataDTO.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -27,4 +27,9 @@
public void setOtherExternalBuddies(int otherExternalBuddies) {
this.otherExternalBuddies = otherExternalBuddies;
}
+
+ @Override
+ public String toString() {
+ return "UserBuddiesDataDTO[ext: " + otherExternalBuddies + " / int: " + buddies + "]";
+ }
}
\ No newline at end of file
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -5,6 +5,8 @@
import org.ourproject.kune.platf.client.actions.ContentIconsRegistry;
import org.ourproject.kune.platf.client.actions.ContextActionRegistry;
import org.ourproject.kune.platf.client.actions.DragDropContentRegistry;
+import org.ourproject.kune.platf.client.actions.GroupActionRegistry;
+import org.ourproject.kune.platf.client.actions.UserActionRegistry;
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter;
@@ -352,6 +354,20 @@
}
});
+ register(Singleton.class, new Factory<GroupActionRegistry>(GroupActionRegistry.class) {
+ @Override
+ public GroupActionRegistry create() {
+ return new GroupActionRegistry();
+ }
+ });
+
+ register(Singleton.class, new Factory<UserActionRegistry>(UserActionRegistry.class) {
+ @Override
+ public UserActionRegistry create() {
+ return new UserActionRegistry();
+ }
+ });
+
register(Singleton.class, new Factory<DragDropContentRegistry>(DragDropContentRegistry.class) {
@Override
public DragDropContentRegistry create() {
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneWorkspaceModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneWorkspaceModule.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneWorkspaceModule.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -1,6 +1,9 @@
package org.ourproject.kune.platf.client.services;
+import org.ourproject.kune.chat.client.ChatClientTool;
+import org.ourproject.kune.platf.client.actions.ActionManager;
import org.ourproject.kune.platf.client.actions.ContentIconsRegistry;
+import org.ourproject.kune.platf.client.actions.UserActionRegistry;
import org.ourproject.kune.platf.client.app.ApplicationComponentGroup;
import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
import org.ourproject.kune.platf.client.rpc.GroupServiceAsync;
@@ -334,9 +337,10 @@
@Override
public BuddiesSummary create() {
final BuddiesSummaryPresenter presenter = new BuddiesSummaryPresenter($(StateManager.class),
- $(Session.class));
+ $(Session.class), $(UserActionRegistry.class), $(I18nTranslationService.class),
+ $$(ChatClientTool.class));
final BuddiesSummaryPanel panel = new BuddiesSummaryPanel(presenter, $(WorkspaceSkeleton.class),
- $(I18nTranslationService.class));
+ $(I18nTranslationService.class), $(ActionManager.class));
presenter.init(panel);
return presenter;
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/sn/UserBuddiesData.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/sn/UserBuddiesData.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/sn/UserBuddiesData.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -30,4 +30,9 @@
public void setOtherExternalBuddies(int otherExternalBuddies) {
this.otherExternalBuddies = otherExternalBuddies;
}
+
+ @Override
+ public String toString() {
+ return "UserBuddiesData[ext: " + otherExternalBuddies + " / int: " + buddies + "]";
+ }
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -20,20 +20,16 @@
package org.ourproject.kune.workspace.client.ctxnav;
-import java.util.HashMap;
-
-import org.ourproject.kune.platf.client.actions.ActionDescriptor;
import org.ourproject.kune.platf.client.actions.ActionItem;
-import org.ourproject.kune.platf.client.actions.ActionItemCollection;
import org.ourproject.kune.platf.client.actions.ActionManager;
+import org.ourproject.kune.platf.client.actions.MenuItemsContainer;
import org.ourproject.kune.platf.client.dto.StateToken;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.workspace.client.site.Site;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.allen_sauer.gwt.log.client.Log;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
+import com.calclab.suco.client.listener.Listener;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.core.ExtElement;
import com.gwtext.client.data.Node;
@@ -44,10 +40,7 @@
import com.gwtext.client.widgets.event.ContainerListenerAdapter;
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.event.BaseItemListenerAdapter;
import com.gwtext.client.widgets.tree.DropNodeCallback;
import com.gwtext.client.widgets.tree.MultiSelectionModel;
import com.gwtext.client.widgets.tree.TreeEditor;
@@ -60,12 +53,12 @@
private TreePanel treePanel;
private TreeEditor treeEditor;
- private final HashMap<String, Menu> contextMenus;
private final WorkspaceSkeleton ws;
private boolean fireOnTextChange;
private boolean isEditable;
private final ActionManager actionManager;
private final ContextNavigatorPresenter presenter;
+ private final MenuItemsContainer<StateToken> menuItemsContainer;
public ContextNavigatorPanel(final ContextNavigatorPresenter presenter, final I18nTranslationService i18n,
final WorkspaceSkeleton ws, final ActionManager actionManager) {
@@ -73,9 +66,9 @@
this.ws = ws;
this.actionManager = actionManager;
- contextMenus = new HashMap<String, Menu>();
fireOnTextChange = true;
isEditable = false;
+ menuItemsContainer = new MenuItemsContainer<StateToken>();
}
public void addItem(final ContextNavigatorItem item) {
@@ -94,7 +87,12 @@
if (tooltip != null) {
child.setTooltip(tooltip);
}
- createItemMenu(nodeId, item.getActionCollection());
+ menuItemsContainer.createItemMenu(nodeId, item.getActionCollection(),
+ new Listener<ActionItem<StateToken>>() {
+ public void onEvent(ActionItem<StateToken> actionItem) {
+ doAction(actionItem);
+ }
+ });
final TreeNode parent = treePanel.getNodeById(item.getParentId());
if (parent != null) {
child.addListener(new TreeNodeListenerAdapter() {
@@ -154,7 +152,7 @@
treePanel.clear();
treePanel = null;
}
- contextMenus.clear();
+ menuItemsContainer.clear();
}
public void editItem(final String id) {
@@ -205,31 +203,6 @@
}
}
- private void createItemMenu(final String nodeId, final ActionItemCollection<StateToken> actionCollection) {
- DeferredCommand.addCommand(new Command() {
- public void execute() {
- Menu menu = null;
- if (actionCollection != null) {
- menu = new Menu();
- // Remove if when retrieved rights of siblings
- for (final ActionItem<StateToken> actionItem : actionCollection) {
- final ActionDescriptor<StateToken> action = actionItem.getAction();
- final Item item = new Item(action.getText());
- item.setIcon(action.getIconUrl());
- menu.addItem(item);
- item.addListener(new BaseItemListenerAdapter() {
- @Override
- public void onClick(final BaseItem item, final EventObject e) {
- doAction(actionItem);
- }
- });
- }
- }
- contextMenus.put(nodeId, menu);
- }
- });
- }
-
private void createTreePanel(final String rootId, final String text, final StateToken stateToken) {
if (treePanel != null) {
clear();
@@ -263,7 +236,7 @@
@Override
public void onContextMenu(final TreeNode node, final EventObject e) {
- final Menu menu = contextMenus.get(node.getId());
+ final Menu menu = menuItemsContainer.get(node.getId());
if (menu != null && menu.getItems().length > 0) {
menu.showAt(e.getXY());
} else {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -1,10 +1,15 @@
package org.ourproject.kune.workspace.client.socialnet;
+import org.ourproject.kune.platf.client.actions.ActionItem;
+import org.ourproject.kune.platf.client.actions.ActionItemCollection;
+import org.ourproject.kune.platf.client.actions.ActionManager;
+import org.ourproject.kune.platf.client.actions.MenuItemsContainer;
import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.workspace.client.skel.SummaryPanel;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import com.calclab.suco.client.listener.Listener;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
@@ -12,6 +17,7 @@
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
+import com.gwtext.client.widgets.menu.Menu;
public class BuddiesSummaryPanel extends SummaryPanel implements BuddiesSummaryView {
@@ -27,6 +33,7 @@
vp.add(nick);
vp.addStyleName("kune-Margin-Small-trbl");
vp.addStyleName("kune-pointer");
+ vp.addStyleName("kune-floatleft");
nick.addClickListener(clickListener);
icon.addClickListener(clickListener);
initWidget(vp);
@@ -40,19 +47,22 @@
nick.setText(nickName);
}
}
+ private final MenuItemsContainer<UserSimpleDTO> menuItemsContainer;
private final FlowPanel flowPanel;
private final Label otherBuddiesLabel;
private final I18nTranslationService i18n;
- private final BuddiesSummaryPresenter presenter;
+ private final ActionManager actionManager;
public BuddiesSummaryPanel(final BuddiesSummaryPresenter presenter, final WorkspaceSkeleton ws,
- I18nTranslationService i18n) {
+ I18nTranslationService i18n, ActionManager actionManager) {
super(i18n.t("Buddies"), i18n.t("Buddies of this user"), ws);
- this.presenter = presenter;
+ this.actionManager = actionManager;
+ menuItemsContainer = new MenuItemsContainer<UserSimpleDTO>();
this.i18n = i18n;
VerticalPanel vp = new VerticalPanel();
flowPanel = new FlowPanel();
otherBuddiesLabel = new Label();
+ otherBuddiesLabel.addStyleName("kune-Margin-Small-trbl");
vp.add(flowPanel);
vp.add(otherBuddiesLabel);
super.add(vp);
@@ -60,27 +70,45 @@
clear();
}
- public void addBuddie(final UserSimpleDTO user) {
+ public void addBuddie(final UserSimpleDTO user, ActionItemCollection<UserSimpleDTO> actionCollection) {
ClickListener listener = new ClickListener() {
public void onClick(Widget sender) {
- presenter.onClick(user);
+ Menu menu = menuItemsContainer.get(user.getShortName());
+ if (menu.getItems().length > 0) {
+ menu.showAt(sender.getAbsoluteLeft(), sender.getAbsoluteTop() + 5);
+ }
}
};
+ menuItemsContainer.createItemMenu(user.getShortName(), actionCollection,
+ new Listener<ActionItem<UserSimpleDTO>>() {
+ public void onEvent(ActionItem<UserSimpleDTO> actionItem) {
+ doAction(actionItem);
+ }
+ });
flowPanel.add(new BuddieWidget(user.getShortName(), listener));
}
@Override
public void clear() {
flowPanel.clear();
- otherBuddiesLabel.setText(i18n.t("This user has no buddies"));
+ clearOtherUsers();
+ menuItemsContainer.clear();
super.doLayoutIfNeeded();
}
- public void setOtherUsers(int otherExternalBuddies) {
- if (otherExternalBuddies > 0) {
- otherBuddiesLabel.setText(i18n.t("and [%d] external users", otherExternalBuddies));
- } else {
- otherBuddiesLabel.setText("");
- }
+ public void clearOtherUsers() {
+ otherBuddiesLabel.setText("");
}
+
+ public void setNoBuddies() {
+ otherBuddiesLabel.setText(i18n.t("This user has no buddies"));
+ }
+
+ public void setOtherUsers(String text) {
+ otherBuddiesLabel.setText(text);
+ }
+
+ private void doAction(final ActionItem<UserSimpleDTO> actionItem) {
+ actionManager.doAction(actionItem);
+ }
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -1,28 +1,49 @@
package org.ourproject.kune.workspace.client.socialnet;
+import java.util.List;
+
+import org.ourproject.kune.chat.client.ChatClientTool;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.dto.GroupDTO;
+import org.ourproject.kune.platf.client.actions.ActionEnableCondition;
+import org.ourproject.kune.platf.client.actions.ActionMenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarButtonAndItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarPosition;
+import org.ourproject.kune.platf.client.actions.UserActionRegistry;
+import org.ourproject.kune.platf.client.dto.AccessRightsDTO;
+import org.ourproject.kune.platf.client.dto.AccessRolDTO;
import org.ourproject.kune.platf.client.dto.GroupType;
import org.ourproject.kune.platf.client.dto.StateDTO;
import org.ourproject.kune.platf.client.dto.UserBuddiesDataDTO;
import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
+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 com.calclab.suco.client.listener.Listener2;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
public class BuddiesSummaryPresenter implements BuddiesSummary {
private BuddiesSummaryView view;
private final StateManager stateManager;
+ private final UserActionRegistry actionRegistry;
+ private final I18nTranslationService i18n;
+ private final Provider<ChatClientTool> chatClientToolProvider;
+ private final Session session;
- public BuddiesSummaryPresenter(StateManager stateManager, final Session session) {
+ public BuddiesSummaryPresenter(StateManager stateManager, final Session session, UserActionRegistry actionRegistry,
+ I18nTranslationService i18n, final Provider<ChatClientTool> chatClientToolProvider) {
this.stateManager = stateManager;
- stateManager.onGroupChanged(new Listener2<GroupDTO, GroupDTO>() {
- public void onEvent(GroupDTO param1, GroupDTO param2) {
- setState(session.getCurrentState());
+ this.session = session;
+ this.actionRegistry = actionRegistry;
+ this.i18n = i18n;
+ this.chatClientToolProvider = chatClientToolProvider;
+ stateManager.onStateChanged(new Listener<StateDTO>() {
+ public void onEvent(StateDTO state) {
+ setState(state);
}
});
+ registerActions();
}
public View getView() {
@@ -33,22 +54,66 @@
this.view = view;
}
- public void onClick(UserSimpleDTO user) {
- stateManager.gotoToken(user.getShortName());
- }
-
protected void setState(StateDTO state) {
if (state.getGroup().getType().equals(GroupType.PERSONAL)) {
view.clear();
UserBuddiesDataDTO userBuddies = state.getUserBuddies();
- for (UserSimpleDTO user : userBuddies.getBuddies()) {
- view.addBuddie(user);
+ List<UserSimpleDTO> buddies = userBuddies.getBuddies();
+ for (UserSimpleDTO user : buddies) {
+ view.addBuddie(user, actionRegistry.getCurrentActions(user, UserActionRegistry.GENERAL, session
+ .isLogged(), new AccessRightsDTO(true, true, true), false));
}
- view.setOtherUsers(userBuddies.getOtherExternalBuddies());
+ boolean hasLocalBuddies = buddies.size() > 0;
+ int numExtBuddies = userBuddies.getOtherExternalBuddies();
+ if (numExtBuddies > 0) {
+ if (hasLocalBuddies) {
+ // i18n: plural
+ view.setOtherUsers(i18n.t(
+ numExtBuddies == 1 ? "and [%d] external user" : "and [%d] external users", numExtBuddies));
+ } else {
+ view.setOtherUsers(i18n.t(numExtBuddies == 1 ? "[%d] external user" : "[%d] external users",
+ numExtBuddies));
+ }
+ } else {
+ if (hasLocalBuddies) {
+ view.clearOtherUsers();
+ } else {
+ view.setNoBuddies();
+ }
+ }
view.show();
} else {
view.hide();
}
}
+ private void registerActions() {
+ final ActionToolbarButtonAndItemDescriptor<UserSimpleDTO> addAsBuddie = new ActionToolbarButtonAndItemDescriptor<UserSimpleDTO>(
+ AccessRolDTO.Viewer, ActionToolbarPosition.bottombar, new Listener<UserSimpleDTO>() {
+ public void onEvent(final UserSimpleDTO group) {
+ chatClientToolProvider.get().getChat().addNewBuddie(group.getShortName());
+ }
+ });
+ addAsBuddie.setMustBeAuthenticated(true);
+ addAsBuddie.setTextDescription(i18n.t("Add as buddie"));
+ addAsBuddie.setIconUrl("images/add-green.png");
+ addAsBuddie.setEnableCondition(new ActionEnableCondition<UserSimpleDTO>() {
+ public boolean mustBeEnabled(UserSimpleDTO item) {
+ return !session.getCurrentUserInfo().getShortName().equals(item.getShortName());
+ }
+ });
+ actionRegistry.addAction(addAsBuddie, UserActionRegistry.GENERAL);
+
+ final ActionMenuItemDescriptor<UserSimpleDTO> go = new ActionMenuItemDescriptor<UserSimpleDTO>(
+ AccessRolDTO.Viewer, new Listener<UserSimpleDTO>() {
+ public void onEvent(final UserSimpleDTO user) {
+ stateManager.gotoToken(user.getShortName());
+ }
+ });
+ go.setMustBeAuthenticated(false);
+ go.setTextDescription(i18n.t("Visit this user homepage"));
+ go.setIconUrl("images/group-home.gif");
+ actionRegistry.addAction(go, UserActionRegistry.GENERAL);
+ }
+
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryView.java 2008-10-16 21:41:42 UTC (rev 915)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryView.java 2008-10-17 02:27:46 UTC (rev 916)
@@ -1,17 +1,22 @@
package org.ourproject.kune.workspace.client.socialnet;
import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.actions.ActionItemCollection;
import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
public interface BuddiesSummaryView extends View {
- void addBuddie(UserSimpleDTO user);
+ void addBuddie(UserSimpleDTO user, ActionItemCollection<UserSimpleDTO> actionCollection);
void clear();
+ void clearOtherUsers();
+
void hide();
- void setOtherUsers(int otherExternalBuddies);
+ void setNoBuddies();
+ void setOtherUsers(String text);
+
void show();
}
More information about the kune-commits
mailing list