[kune-commits] r926 - in trunk: .
src/main/java/org/ourproject/kune/app
src/main/java/org/ourproject/kune/app/public/css
src/main/java/org/ourproject/kune/app/public/css/img
src/main/java/org/ourproject/kune/docs/server
src/main/java/org/ourproject/kune/platf/client/services
src/main/java/org/ourproject/kune/platf/client/ui/dialogs
src/main/java/org/ourproject/kune/platf/public/images
src/main/java/org/ourproject/kune/platf/server/rpc
src/main/java/org/ourproject/kune/workspace/client/entitylogo
src/main/java/org/ourproject/kune/workspace/client/signin
src/main/java/org/ourproject/kune/workspace/client/site
src/main/java/org/ourproject/kune/workspace/client/site/msg
src/main/java/org/ourproject/kune/workspace/client/sitebar/siteprogress
src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic
src/main/java/org/ourproject/kune/workspace/client/title
vjrj
vjrj at ourproject.org
Sat Oct 25 00:34:41 CEST 2008
Author: vjrj
Date: 2008-10-25 00:34:35 +0200 (Sat, 25 Oct 2008)
New Revision: 926
Added:
trunk/src/main/java/org/ourproject/kune/app/public/css/img/alert.gif
trunk/src/main/java/org/ourproject/kune/app/public/css/img/error.gif
trunk/src/main/java/org/ourproject/kune/app/public/css/img/important.gif
trunk/src/main/java/org/ourproject/kune/app/public/css/img/info.gif
trunk/src/main/java/org/ourproject/kune/platf/public/images/alert.gif
trunk/src/main/java/org/ourproject/kune/platf/public/images/error.gif
trunk/src/main/java/org/ourproject/kune/platf/public/images/important.gif
trunk/src/main/java/org/ourproject/kune/platf/public/images/info.gif
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/Register.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInOld.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanelOld.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenterOld.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInViewOld.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessage.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessagePanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessagePresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessageView.java
Modified:
trunk/
trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml
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/docs/server/DocumentServerTool.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/I18nTranslationService.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/client/ui/dialogs/BasicDialog.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogExtended.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/DefaultForm.java
trunk/src/main/java/org/ourproject/kune/platf/server/rpc/I18nRPC.java
trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoSelectorPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignIn.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInForm.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInView.java
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/msg/SiteMessagePresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteprogress/SiteProgressPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePresenter.java
Log:
Incomplete - task SignIn and Register in separated dialog
some bug fixes and other improvements
Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
- client
public
target
Main-compile
bin
.settings
.gwt-cache
repository
derby.log
star-yellow-grey.png
run.sh
tomcat
.classpath
gwt-out
synccss.sh
.externalToolBuilders
.project
.wtpmodules
www
testRepository
kune-OLD-jcr
KuneApp.launch
KuneApp NOSERVER.launch
old_src
org.ourproject.kune.app.Kune
org.ourproject.kune.iml
org.ourproject.kune.ipr
org.ourproject.kune.iws
nbproject
hibernate.reveng.xml
.gwt-tmp
target-eclipse
.checkstyle
+ bin
client
public
target
Main-compile
bin
.settings
.gwt-cache
repository
derby.log
star-yellow-grey.png
run.sh
tomcat
.classpath
gwt-out
synccss.sh
.externalToolBuilders
.project
.wtpmodules
www
testRepository
kune-OLD-jcr
KuneApp.launch
KuneApp NOSERVER.launch
old_src
org.ourproject.kune.app.Kune
org.ourproject.kune.iml
org.ourproject.kune.ipr
org.ourproject.kune.iws
nbproject
hibernate.reveng.xml
.gwt-tmp
target-eclipse
.checkstyle
Modified: trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml 2008-10-24 22:34:35 UTC (rev 926)
@@ -22,6 +22,7 @@
<inherits name="com.gwtextux.GwtExtUx" />
<inherits name="com.gwtextux.UploadDialog"/>
+ <inherits name="com.gwtextux.ToastWindow"/>
<script src="js/UploadDialog/Ext.ux.UploadDialog.packed.js" />
<stylesheet src="js/UploadDialog/css/Ext.ux.UploadDialog.css" />
<script src="js/ext-ux-all-min.js" />
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-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/all.css 2008-10-24 22:34:35 UTC (rev 926)
@@ -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{border:2px solid #F2F2F2;}.k-entitytextlogo-no-border{border:none;}.k-entitytextlogo{height:60px;margin:0 0 4px;overflow:hidden;width:468px;}.k-entitytextlogo table{vertical-align:middle;}.k-elogo-l-l{font-size:272%;}.k-elogo-l-m{font-size:167%;}.k-elogo-l-s{font-size:108%;}.k-entitytextlogo .gwt-Label{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-elogop-expand{background-color:transparent;}.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;}.k-border-openbox{border-bottom:1px #D0D0D0 solid;border-right:1px #D0D0D0 solid;border-left:1px #D0D0D0 solid;}
\ 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{border:2px solid #F2F2F2;}.k-entitytextlogo-no-border{border:none;}.k-entitytextlogo{height:60px;margin:0 0 4px;overflow:hidden;width:468px;}.k-entitytextlogo table{vertical-align:middle;}.k-elogo-l-l{font-size:272%;}.k-elogo-l-m{font-size:167%;}.k-elogo-l-s{font-size:108%;}.k-entitytextlogo .gwt-Label{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-elogop-expand{background-color:transparent;}.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;}.k-border-openbox{border-bottom:1px #D0D0D0 solid;border-right:1px #D0D0D0 solid;border-left:1px #D0D0D0 solid;}/* SiteToastMessages */.k-stm-info-icon{background-image:url(img/info.gif)!important;}.k-stm-imp-icon{background-image:url(img/alert.gif)!important;}.k-stm-verimp-icon{background-image:url(img/important.gif)!important;}.k-stm-error-icon{background-image:url(img/error.gif)!important;}
\ No newline at end of file
Added: trunk/src/main/java/org/ourproject/kune/app/public/css/img/alert.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/org/ourproject/kune/app/public/css/img/alert.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/org/ourproject/kune/app/public/css/img/error.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/org/ourproject/kune/app/public/css/img/error.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/org/ourproject/kune/app/public/css/img/important.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/org/ourproject/kune/app/public/css/img/important.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/org/ourproject/kune/app/public/css/img/info.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/org/ourproject/kune/app/public/css/img/info.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
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-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2008-10-24 22:34:35 UTC (rev 926)
@@ -721,4 +721,22 @@
border-bottom: 1px #D0D0D0 solid;
border-right: 1px #D0D0D0 solid;
border-left: 1px #D0D0D0 solid;
+}
+
+/* SiteToastMessages */
+
+.k-stm-info-icon {
+ background-image: url(img/info.gif) !important;
+}
+
+.k-stm-imp-icon {
+ background-image: url(img/alert.gif) !important;
+}
+
+.k-stm-verimp-icon {
+ background-image: url(img/important.gif) !important;
+}
+
+.k-stm-error-icon {
+ background-image: url(img/error.gif) !important;
}
\ No newline at end of file
Modified: trunk/src/main/java/org/ourproject/kune/docs/server/DocumentServerTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/server/DocumentServerTool.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/docs/server/DocumentServerTool.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -119,5 +119,4 @@
throw new ContainerNotPermittedException();
}
}
-
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/I18nTranslationService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/I18nTranslationService.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/I18nTranslationService.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -28,6 +28,41 @@
// Also in I18nTranslation
protected static final String UNTRANSLATED_VALUE = null;
+ public String decodeHtml(final String textToDecode) {
+ String text = textToDecode;
+ // text = text.replaceAll("©", "©");
+ return text;
+ }
+
+ public String formatDate(final String format, final Date date) {
+ // TODO: 18n dates
+ return null;
+ // cc = c.sub(/^%[EO]?(.)$/o, '%\\1')
+ // case cc
+ // when '%A'; o << "#{::Date::DAYNAMES[wday]}
+ // [weekday]".t(::Date::DAYNAMES[wday])
+ // when '%a'; o << "#{::Date::ABBR_DAYNAMES[wday]} [abbreviated
+ // weekday]".t(::Date::ABBR_DAYNAMES[wday])
+ // when '%B'; o << "#{::Date::MONTHNAMES[mon]}
+ // [month]".t(::Date::MONTHNAMES[mon])
+ // when '%b'; o << "#{::Date::ABBR_MONTHNAMES[mon]} [abbreviated
+ // month]".t(::Date::ABBR_MONTHNAMES[mon])
+ // when '%c'; o << ((Locale.active? && !Locale.active.date_format.nil?)
+ // ?
+ // localize(Locale.active.date_format) : strftime('%Y-%m-%d'))
+ // when '%p'; o << if hour < 12 then 'AM [Ante Meridiem]'.t("am") else
+ // 'PM [Post
+ // Meridiem]'.t("am") end
+ // when '%P'; o << if hour < 12 then 'AM [Ante Meridiem]'.t("AM") else
+ // 'PM [Post
+ // Meridiem]'.t("PM") end
+ // else; o << c
+ }
+
+ public String removeNT(final String string) {
+ return string.replaceAll(TRANSLATION_NOTE_REGEXP, "");
+ }
+
/**
* In production, this method uses a hashmap. In development, if the text is
* not in the hashmap, it makes a server petition (that stores the text
@@ -44,32 +79,38 @@
}
/**
- * Use [%s] to reference the string parameter
+ * Use [%d] to reference the Integer parameters
*
*/
- public String t(final String text, final String arg) {
+ public String t(final String text, final Integer... args) {
String translation = t(text);
- translation = translation.replaceFirst("\\[%s\\]", arg);
+ for (Integer arg : args) {
+ translation = translation.replaceFirst("\\[%d\\]", arg.toString());
+ }
return decodeHtml(translation);
}
/**
- * Use [%d] to reference the Integer parameter
+ * Use [%d] to reference the Long parameter
*
*/
- public String t(final String text, final Integer arg) {
+ public String t(final String text, final Long... args) {
String translation = t(text);
- translation = translation.replaceFirst("\\[%d\\]", arg.toString());
+ for (Long arg : args) {
+ translation = translation.replaceFirst("\\[%d\\]", arg.toString());
+ }
return decodeHtml(translation);
}
/**
- * Use [%d] to reference the Long parameter
+ * Use [%s] to reference the string parameter
*
*/
- public String t(final String text, final Long arg) {
+ public String t(final String text, final String... args) {
String translation = t(text);
- translation = translation.replaceFirst("\\[%d\\]", arg.toString());
+ for (String arg : args) {
+ translation = translation.replaceFirst("\\[%s\\]", arg);
+ }
return decodeHtml(translation);
}
@@ -84,73 +125,38 @@
}
/**
- * Use [%s] to reference the String parameter.
+ * Use [%d] to reference the Integer parameter.
*
* Also adds [%NT noteForTranslators] at the end of text. This tag is later
* renderer in the translator panel to inform translator how to do this
* translation
*
*/
- public String tWithNT(final String text, final String noteForTranslators, final String arg) {
- return t(text + NOTE_FOR_TRANSLATOR_TAG_BEGIN + noteForTranslators + NOTE_FOR_TRANSLATOR_TAG_END, arg);
+ public String tWithNT(final String text, final String noteForTranslators, final Integer... args) {
+ return t(text + NOTE_FOR_TRANSLATOR_TAG_BEGIN + noteForTranslators + NOTE_FOR_TRANSLATOR_TAG_END, args);
}
/**
- * Use [%d] to reference the Integer parameter.
+ * Use [%d] to reference the Long parameter.
*
* Also adds [%NT noteForTranslators] at the end of text. This tag is later
* renderer in the translator panel to inform translator how to do this
* translation
*
*/
- public String tWithNT(final String text, final String noteForTranslators, final Integer arg) {
- return t(text + NOTE_FOR_TRANSLATOR_TAG_BEGIN + noteForTranslators + NOTE_FOR_TRANSLATOR_TAG_END, arg);
+ public String tWithNT(final String text, final String noteForTranslators, final Long... args) {
+ return t(text + NOTE_FOR_TRANSLATOR_TAG_BEGIN + noteForTranslators + NOTE_FOR_TRANSLATOR_TAG_END, args);
}
/**
- * Use [%d] to reference the Long parameter.
+ * Use [%s] to reference the String parameter.
*
* Also adds [%NT noteForTranslators] at the end of text. This tag is later
* renderer in the translator panel to inform translator how to do this
* translation
*
*/
- public String tWithNT(final String text, final String noteForTranslators, final Long arg) {
- return t(text + NOTE_FOR_TRANSLATOR_TAG_BEGIN + noteForTranslators + NOTE_FOR_TRANSLATOR_TAG_END, arg);
+ public String tWithNT(final String text, final String noteForTranslators, final String... args) {
+ return t(text + NOTE_FOR_TRANSLATOR_TAG_BEGIN + noteForTranslators + NOTE_FOR_TRANSLATOR_TAG_END, args);
}
-
- public String decodeHtml(final String textToDecode) {
- String text = textToDecode;
- // text = text.replaceAll("©", "©");
- return text;
- }
-
- public String removeNT(final String string) {
- return string.replaceAll(TRANSLATION_NOTE_REGEXP, "");
- }
-
- public String formatDate(final String format, final Date date) {
- // TODO: 18n dates
- return null;
- // cc = c.sub(/^%[EO]?(.)$/o, '%\\1')
- // case cc
- // when '%A'; o << "#{::Date::DAYNAMES[wday]}
- // [weekday]".t(::Date::DAYNAMES[wday])
- // when '%a'; o << "#{::Date::ABBR_DAYNAMES[wday]} [abbreviated
- // weekday]".t(::Date::ABBR_DAYNAMES[wday])
- // when '%B'; o << "#{::Date::MONTHNAMES[mon]}
- // [month]".t(::Date::MONTHNAMES[mon])
- // when '%b'; o << "#{::Date::ABBR_MONTHNAMES[mon]} [abbreviated
- // month]".t(::Date::ABBR_MONTHNAMES[mon])
- // when '%c'; o << ((Locale.active? && !Locale.active.date_format.nil?)
- // ?
- // localize(Locale.active.date_format) : strftime('%Y-%m-%d'))
- // when '%p'; o << if hour < 12 then 'AM [Ante Meridiem]'.t("am") else
- // 'PM [Post
- // Meridiem]'.t("am") end
- // when '%P'; o << if hour < 12 then 'AM [Ante Meridiem]'.t("AM") else
- // 'PM [Post
- // Meridiem]'.t("PM") end
- // else; o << c
- }
}
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-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -90,9 +90,14 @@
import org.ourproject.kune.workspace.client.search.UserLiveSearcher;
import org.ourproject.kune.workspace.client.search.UserLiveSearcherPanel;
import org.ourproject.kune.workspace.client.search.UserLiveSearcherPresenter;
+import org.ourproject.kune.workspace.client.signin.Register;
+import org.ourproject.kune.workspace.client.signin.RegisterPanel;
+import org.ourproject.kune.workspace.client.signin.RegisterPresenter;
+import org.ourproject.kune.workspace.client.signin.RegisterView;
import org.ourproject.kune.workspace.client.signin.SignIn;
import org.ourproject.kune.workspace.client.signin.SignInPanel;
import org.ourproject.kune.workspace.client.signin.SignInPresenter;
+import org.ourproject.kune.workspace.client.signin.SignInView;
import org.ourproject.kune.workspace.client.site.Site;
import org.ourproject.kune.workspace.client.site.SiteToken;
import org.ourproject.kune.workspace.client.site.rpc.UserService;
@@ -266,13 +271,25 @@
@Override
public SignIn create() {
final SignInPresenter presenter = new SignInPresenter($(Session.class), $(StateManager.class), i18n,
- $(UserServiceAsync.class));
- final SignInPanel view = new SignInPanel(presenter, i18n, $(WorkspaceSkeleton.class));
- presenter.init(view);
+ $$(UserServiceAsync.class), $$(Register.class));
+ final SignInView panel = new SignInPanel(presenter, i18n, $(WorkspaceSkeleton.class));
+ presenter.init(panel);
return presenter;
}
});
+ register(Singleton.class, new Factory<Register>(Register.class) {
+ @Override
+ public Register create() {
+ final RegisterPresenter presenter = new RegisterPresenter($(Session.class), $(StateManager.class),
+ i18n, $$(UserServiceAsync.class), $$(SignIn.class));
+ final RegisterView panel = new RegisterPanel(presenter, i18n, $(WorkspaceSkeleton.class),
+ $(Session.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
register(Singleton.class, new Factory<LicenseChoose>(LicenseChoose.class) {
@Override
public LicenseChoose create() {
@@ -432,6 +449,12 @@
}
});
+ $(StateManager.class).addSiteToken(SiteToken.register.toString(), new Listener<StateToken>() {
+ public void onEvent(final StateToken previousStateToken) {
+ $(Register.class).doRegister(previousStateToken);
+ }
+ });
+
$(StateManager.class).addSiteToken(SiteToken.newgroup.toString(), new Listener<StateToken>() {
public void onEvent(final StateToken previousStateToken) {
$(NewGroup.class).doNewGroup(previousStateToken);
@@ -459,6 +482,5 @@
$(ApplicationComponentGroup.class).createAll();
$(ToolGroup.class).createAll();
$(Application.class).start();
-
}
}
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-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneWorkspaceModule.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -50,10 +50,9 @@
import org.ourproject.kune.workspace.client.search.GroupLiveSearcher;
import org.ourproject.kune.workspace.client.search.SiteSearcher;
import org.ourproject.kune.workspace.client.site.Site;
-import org.ourproject.kune.workspace.client.site.msg.SiteMessage;
-import org.ourproject.kune.workspace.client.site.msg.SiteMessagePanel;
-import org.ourproject.kune.workspace.client.site.msg.SiteMessagePresenter;
-import org.ourproject.kune.workspace.client.site.msg.SiteMessageView;
+import org.ourproject.kune.workspace.client.site.msg.SiteToastMessage;
+import org.ourproject.kune.workspace.client.site.msg.SiteToastMessagePanel;
+import org.ourproject.kune.workspace.client.site.msg.SiteToastMessagePresenter;
import org.ourproject.kune.workspace.client.site.rpc.UserServiceAsync;
import org.ourproject.kune.workspace.client.sitebar.sitelogo.SiteLogo;
import org.ourproject.kune.workspace.client.sitebar.sitelogo.SiteLogoPanel;
@@ -144,7 +143,7 @@
register(ApplicationComponentGroup.class, new Factory<Site>(Site.class) {
@Override
public Site create() {
- return new Site($(I18nUITranslationService.class), $(SiteProgress.class), $$(SiteMessage.class));
+ return new Site($(I18nUITranslationService.class), $(SiteProgress.class), $$(SiteToastMessage.class));
}
});
@@ -159,14 +158,13 @@
}
});
- register(ApplicationComponentGroup.class, new Factory<SiteMessage>(SiteMessage.class) {
+ register(ApplicationComponentGroup.class, new Factory<SiteToastMessage>(SiteToastMessage.class) {
@Override
- public SiteMessage create() {
- final SiteMessagePresenter siteMessagePresenter = new SiteMessagePresenter();
- final SiteMessageView siteMessageView = new SiteMessagePanel(siteMessagePresenter, true,
- $(I18nUITranslationService.class));
- siteMessagePresenter.init(siteMessageView);
- return siteMessagePresenter;
+ public SiteToastMessage create() {
+ final SiteToastMessagePresenter presenter = new SiteToastMessagePresenter();
+ final SiteToastMessagePanel panel = new SiteToastMessagePanel();
+ presenter.init(panel);
+ return presenter;
}
});
@@ -396,7 +394,8 @@
register(ApplicationComponentGroup.class, new Factory<NoHomePage>(NoHomePage.class) {
@Override
public NoHomePage create() {
- final NoHomePagePresenter presenter = new NoHomePagePresenter($(StateManager.class), $$(EntityLogo.class));
+ final NoHomePagePresenter presenter = new NoHomePagePresenter($(StateManager.class),
+ $$(EntityLogo.class));
final NoHomePagePanel panel = new NoHomePagePanel(presenter, $(WorkspaceSkeleton.class),
$(I18nTranslationService.class));
presenter.init(panel);
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialog.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialog.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialog.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -24,7 +24,12 @@
public class BasicDialog extends Window {
+ public BasicDialog(final String caption, final boolean modal) {
+ this(caption, modal, false);
+ }
+
public BasicDialog(final String caption, final boolean modal, final boolean autoScroll) {
+ setBorder(false);
setAutoWidth(true);
// Param values
setTitle(caption);
@@ -40,8 +45,9 @@
setButtonAlign(Position.RIGHT);
}
- public BasicDialog(final String caption, final boolean modal) {
- this(caption, modal, false);
+ public BasicDialog(final String caption, final boolean modal, final boolean autoScroll, final int width,
+ final int height) {
+ this(caption, modal, autoScroll, width, height, width, height);
}
public BasicDialog(final String caption, final boolean modal, final boolean autoScroll, final int width,
@@ -55,9 +61,4 @@
setMinHeight(minHeight);
}
- public BasicDialog(final String caption, final boolean modal, final boolean autoScroll, final int width,
- final int height) {
- this(caption, modal, autoScroll, width, height, width, height);
- }
-
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogExtended.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogExtended.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogExtended.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.platf.client.ui.dialogs;
-import com.calclab.emiteuimodule.client.dialog.BasicDialogListener;
+import com.calclab.suco.client.listener.Listener0;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.core.Ext;
import com.gwtext.client.core.Position;
@@ -31,14 +31,15 @@
public BasicDialogExtended(final String title, final boolean modal, final boolean autoscroll, final int width,
final int heigth, final String icon, final String firstButtonTitle, final String cancelButtonTitle,
- final BasicDialogListener listener) {
+ final Listener0 onFirstButtonClick, Listener0 onCancelButtonClick) {
this(title, modal, autoscroll, width, heigth, icon, firstButtonTitle, Ext.generateId(), cancelButtonTitle,
- Ext.generateId(), listener);
+ Ext.generateId(), onFirstButtonClick, onCancelButtonClick);
}
public BasicDialogExtended(final String title, final boolean modal, final boolean autoscroll, final int width,
final int heigth, final String icon, final String firstButtonTitle, final String firstButtonId,
- final String cancelButtonTitle, final String cancelButtonId, final BasicDialogListener listener) {
+ final String cancelButtonTitle, final String cancelButtonId, final Listener0 onFirstButtonClick,
+ final Listener0 onCancelButtonClick) {
super(title, modal, autoscroll, width, heigth);
setLayout(new FitLayout());
setCollapsible(false);
@@ -49,7 +50,7 @@
firstButton.addListener(new ButtonListenerAdapter() {
@Override
public void onClick(final Button button, final EventObject e) {
- listener.onFirstButtonClick();
+ onFirstButtonClick.onEvent();
}
});
@@ -60,7 +61,7 @@
cancel.addListener(new ButtonListenerAdapter() {
@Override
public void onClick(final Button button, final EventObject e) {
- listener.onCancelButtonClick();
+ onCancelButtonClick.onEvent();
}
});
cancel.setTabIndex(4);
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/DefaultForm.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/DefaultForm.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/DefaultForm.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -28,12 +28,13 @@
protected static final int DEF_FIELD_WIDTH = 200;
protected static final int DEF_SMALL_FIELD_WIDTH = 100;
protected static final int DEF_MEDIUM_FIELD_WIDTH = 150;
- private static final int DEF_FIELD_LABEL_WITH = 75;
+ protected static final int DEF_FIELD_LABEL_WITH = 75;
private final FormPanel form;
public DefaultForm() {
form = new FormPanel();
+ form.setFrame(true);
form.setPaddings(10);
form.setBorder(false);
form.setLabelWidth(DEF_FIELD_LABEL_WITH);
@@ -78,6 +79,10 @@
form.setAutoWidth(autoWidth);
}
+ public void setWidth(int width) {
+ form.setWidth(width);
+ }
+
public void validate() {
final Field[] fields = form.getFields();
for (Field field : fields) {
Added: trunk/src/main/java/org/ourproject/kune/platf/public/images/alert.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/org/ourproject/kune/platf/public/images/alert.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/org/ourproject/kune/platf/public/images/error.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/org/ourproject/kune/platf/public/images/error.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/org/ourproject/kune/platf/public/images/important.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/org/ourproject/kune/platf/public/images/important.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/org/ourproject/kune/platf/public/images/info.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/org/ourproject/kune/platf/public/images/info.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/rpc/I18nRPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/I18nRPC.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/rpc/I18nRPC.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -26,6 +26,7 @@
import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
import org.ourproject.kune.platf.client.errors.DefaultException;
+import org.ourproject.kune.platf.client.errors.SessionExpiredException;
import org.ourproject.kune.platf.client.rpc.I18nService;
import org.ourproject.kune.platf.server.UserSession;
import org.ourproject.kune.platf.server.auth.Authenticated;
@@ -99,10 +100,14 @@
return i18nTranslationManager.getLexicon(language);
}
- @Authenticated(mandatory = false)
@Transactional(type = TransactionType.READ_WRITE)
public String getTranslation(final String userHash, final String language, final String text) {
- return i18nTranslationManager.getTranslation(language, text);
+ String translation = null;
+ try {
+ translation = getTranslationWrapper(language, text);
+ } catch (SessionExpiredException e) {
+ }
+ return translation;
}
@Authenticated
@@ -112,6 +117,11 @@
return i18nTranslationManager.setTranslation(id, translation);
}
+ @Authenticated(mandatory = false)
+ private String getTranslationWrapper(final String language, final String text) {
+ return i18nTranslationManager.getTranslation(language, text);
+ }
+
private UserSession getUserSession() {
return userSessionProvider.get();
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoPanel.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoPanel.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -19,6 +19,8 @@
*/
package org.ourproject.kune.workspace.client.entitylogo;
+import java.util.Date;
+
import org.ourproject.kune.platf.client.dto.GroupDTO;
import org.ourproject.kune.platf.client.dto.StateToken;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
@@ -158,7 +160,8 @@
}
public void reloadImage(GroupDTO group) {
- Image.prefetch(downloadProvider.get().getLogoImageUrl(group.getStateToken()));
+ entityTextLogo.setLogoImage(downloadProvider.get().getLogoImageUrl(group.getStateToken()) + "?nocache="
+ + new Date().getTime());
}
public void setChangeYourLogoText() {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoSelectorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoSelectorPanel.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoSelectorPanel.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -19,44 +19,57 @@
*/package org.ourproject.kune.workspace.client.entitylogo;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog;
+import org.ourproject.kune.platf.client.ui.dialogs.BasicDialogExtended;
import org.ourproject.kune.platf.client.ui.download.FileParams;
import org.ourproject.kune.workspace.client.site.Site;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import com.calclab.suco.client.listener.Listener0;
import com.gwtext.client.core.Connection;
-import com.gwtext.client.core.EventObject;
-import com.gwtext.client.widgets.Button;
-import com.gwtext.client.widgets.event.ButtonListenerAdapter;
import com.gwtext.client.widgets.form.Form;
import com.gwtext.client.widgets.form.FormPanel;
import com.gwtext.client.widgets.form.Hidden;
+import com.gwtext.client.widgets.form.Label;
import com.gwtext.client.widgets.form.TextField;
import com.gwtext.client.widgets.form.event.FormListener;
public class EntityLogoSelectorPanel implements EntityLogoSelectorView {
private static final String ICON_UPLOAD_SERVLET = "/kune/servlets/EntityLogoUploadManager";
- private final BasicDialog dialog;
- private final FormPanel form;
+ private static final String SUBID = "k-elogoselp-subb";
+ private static final String CANCELID = "k-elogoselp-canb";
+ private final BasicDialogExtended dialog;
+ private final FormPanel formPanel;
private final Hidden userhashField;
private final Hidden tokenField;
public EntityLogoSelectorPanel(final EntityLogoSelectorPresenter presenter, final WorkspaceSkeleton ws,
I18nTranslationService i18n) {
- dialog = new BasicDialog(i18n.t("Select an logo for your group"), true, true, 300, 120);
+ dialog = new BasicDialogExtended(i18n.t("Select an logo for your group"), true, true, 320, 180, "",
+ i18n.t("Select"), SUBID, i18n.tWithNT("Cancel", "used in button"), CANCELID, new Listener0() {
+ public void onEvent() {
+ formPanel.getForm().submit();
+ }
+ }, new Listener0() {
+ public void onEvent() {
+ presenter.onCancel();
+ }
+ });
dialog.setCollapsible(false);
+ dialog.setBorder(false);
- form = new FormPanel();
- form.setBorder(false);
- form.setFrame(false);
- form.setFileUpload(true);
- form.setMethod(Connection.POST);
- form.setUrl(ICON_UPLOAD_SERVLET);
- form.setWaitMsgTarget(true);
- form.setHideLabels(true);
- dialog.setMargins(10);
- form.addFormListener(new FormListener() {
+ formPanel = new FormPanel();
+ formPanel.setFrame(true);
+ formPanel.setAutoScroll(false);
+ formPanel.setBorder(false);
+ formPanel.setFileUpload(true);
+ formPanel.setWidth(320);
+ formPanel.setMethod(Connection.POST);
+ formPanel.setUrl(ICON_UPLOAD_SERVLET);
+ formPanel.setWaitMsgTarget(true);
+ formPanel.setHideLabels(true);
+ formPanel.setPaddings(10);
+ formPanel.addFormListener(new FormListener() {
public boolean doBeforeAction(Form form) {
return true;
}
@@ -72,36 +85,24 @@
}
});
+ Label label = new Label(i18n.t(
+ "Select an image in your computer as the logo for this group. Recomended size [%d]x[%d] pixels",
+ EntityLogoView.LOGO_ICON_DEFAULT_HEIGHT, EntityLogoView.LOGO_ICON_DEFAULT_HEIGHT));
+ formPanel.add(label);
final TextField file = new TextField("File", EntityLogoView.LOGO_FORM_FIELD);
+ file.setId(EntityLogoView.LOGO_FORM_FIELD);
file.setInputType("file");
userhashField = new Hidden(FileParams.HASH, FileParams.HASH);
tokenField = new Hidden(FileParams.TOKEN, FileParams.TOKEN);
- form.add(userhashField);
- form.add(tokenField);
- form.add(file);
-
- Button submit = new Button(i18n.t("Select"));
- submit.addListener(new ButtonListenerAdapter() {
- @Override
- public void onClick(Button button, EventObject e) {
- form.getForm().submit();
- }
- });
- Button cancel = new Button(i18n.t("Cancel"));
- cancel.addListener(new ButtonListenerAdapter() {
- @Override
- public void onClick(Button button, EventObject e) {
- presenter.onCancel();
- }
- });
- dialog.addButton(submit);
- dialog.addButton(cancel);
- dialog.add(form);
+ formPanel.add(userhashField);
+ formPanel.add(tokenField);
+ formPanel.add(file);
+ dialog.add(formPanel);
}
public void hide() {
dialog.hide();
- form.getForm().reset();
+ formPanel.getForm().reset();
}
public void setUploadParams(String userHash, String token) {
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/Register.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/Register.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/Register.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,11 @@
+package org.ourproject.kune.workspace.client.signin;
+
+import org.ourproject.kune.platf.client.dto.StateToken;
+
+public interface Register {
+
+ void doRegister(StateToken previousStateToken);
+
+ void hide();
+
+}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -18,6 +18,7 @@
*
*/package org.ourproject.kune.workspace.client.signin;
+import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.platf.client.ui.dialogs.DefaultForm;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
@@ -58,7 +59,7 @@
private final Radio noPersonalHomePage;
private final I18nUITranslationService i18n;
- public RegisterForm(final SignInPresenter presenter, final I18nUITranslationService i18n) {
+ public RegisterForm(final I18nUITranslationService i18n, Session session) {
this.i18n = i18n;
super.addStyleName("kune-Margin-Large-l");
@@ -126,7 +127,7 @@
emailRegField.setId(EMAIL_FIELD);
add(emailRegField);
- final Store langStore = new SimpleStore(new String[] { "abbr", "language" }, presenter.getLanguages());
+ final Store langStore = new SimpleStore(new String[] { "abbr", "language" }, session.getLanguagesArray());
langStore.load();
languageCombo = new ComboBox();
@@ -145,14 +146,14 @@
languageCombo.setWidth(DEF_MEDIUM_FIELD_WIDTH);
languageCombo.setAllowBlank(false);
languageCombo.setValueField("abbr");
- languageCombo.setValue(presenter.getCurrentLanguage().getCode());
+ languageCombo.setValue(session.getCurrentLanguage().getCode());
languageCombo.setPageSize(7);
languageCombo.setForceSelection(true);
languageCombo.setValidationEvent(false);
languageCombo.setId(LANG_FIELD);
add(languageCombo);
- final Store countryStore = new SimpleStore(new String[] { "abbr", "country" }, presenter.getCountries());
+ final Store countryStore = new SimpleStore(new String[] { "abbr", "country" }, session.getCountriesArray());
countryStore.load();
countryCombo = new ComboBox();
@@ -177,7 +178,7 @@
countryCombo.setId(COUNTRY_FIELD);
add(countryCombo);
- final Store timezoneStore = new SimpleStore(new String[] { "id" }, presenter.getTimezones());
+ final Store timezoneStore = new SimpleStore(new String[] { "id" }, session.getTimezones());
timezoneStore.load();
timezoneCombo = new ComboBox();
@@ -203,6 +204,7 @@
add(timezoneCombo);
final FieldSet personalSpaceFieldSet = new FieldSet(i18n.t("Do you want a personal homepage?"));
+ personalSpaceFieldSet.setWidth(DEF_FIELD_WIDTH + DEF_FIELD_LABEL_WITH);
wantPersonalHomePage = new Radio();
noPersonalHomePage = new Radio();
personalSpaceFieldSet.setCollapsible(false);
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,100 @@
+package org.ourproject.kune.workspace.client.signin;
+
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.ui.dialogs.InfoDialog;
+import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+
+import com.calclab.suco.client.listener.Listener0;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.DeferredCommand;
+import com.gwtext.client.widgets.Panel;
+
+public class RegisterPanel extends SignInAbstractPanel implements RegisterView {
+
+ static RegisterForm registerForm;
+
+ private static final String CANCEL_BUTTON_ID = "kune-regp-cb";
+ private static final String REGISTER_BUTTON_ID = "kune-regp-rb";
+
+ public RegisterPanel(final RegisterPresenter presenter, I18nUITranslationService i18n, final WorkspaceSkeleton ws,
+ Session session) {
+ super(i18n, i18n.t("Register"), true, true, 390, 450, "", i18n.t("Register"), REGISTER_BUTTON_ID, i18n.tWithNT(
+ "Cancel", "used in button"), CANCEL_BUTTON_ID, new Listener0() {
+ public void onEvent() {
+ registerForm.validate();
+ if (registerForm.isValid()) {
+ presenter.onFormRegister();
+ }
+ }
+ }, new Listener0() {
+ public void onEvent() {
+ presenter.onCancel();
+ }
+ });
+
+ Panel panel = new Panel();
+ panel.setBorder(false);
+ registerForm = new RegisterForm(i18n, session);
+ registerForm.setWidth(360);
+ panel.add(registerForm.getForm());
+ add(panel);
+ }
+
+ public String getCountry() {
+ return registerForm.getCountry();
+ }
+
+ public String getEmail() {
+ return registerForm.getEmail();
+ }
+
+ public String getLanguage() {
+ return registerForm.getLanguage();
+ }
+
+ public String getLongName() {
+ return registerForm.getLongName();
+ }
+
+ 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 boolean isRegisterFormValid() {
+ return registerForm.isValid();
+ }
+
+ public void reset() {
+ DeferredCommand.addCommand(new Command() {
+ public void execute() {
+ registerForm.reset();
+ }
+ });
+ }
+
+ public void showWelcolmeDialog() {
+ InfoDialog 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 boolean wantPersonalHomepage() {
+ return registerForm.wantPersonalHomepage();
+ }
+}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,107 @@
+package org.ourproject.kune.workspace.client.signin;
+
+import org.ourproject.kune.platf.client.View;
+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.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.site.Site;
+import org.ourproject.kune.workspace.client.site.rpc.UserServiceAsync;
+
+import com.calclab.emiteuimodule.client.SubscriptionMode;
+import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+public class RegisterPresenter extends SignInAbstractPresenter implements Register {
+
+ private RegisterView view;
+ private final Provider<UserServiceAsync> userServiceProvider;
+ private final Provider<SignIn> signInProvider;
+
+ public RegisterPresenter(Session session, StateManager stateManager, I18nUITranslationService i18n,
+ Provider<UserServiceAsync> userServiceProvider, Provider<SignIn> signInProvider) {
+ super(session, stateManager, i18n);
+ this.userServiceProvider = userServiceProvider;
+ this.signInProvider = signInProvider;
+ }
+
+ public void doRegister(StateToken previousStateToken) {
+ this.previousStateToken = previousStateToken;
+ signInProvider.get().hide();
+ if (!session.isLogged()) {
+ Site.showProgressProcessing();
+ view.show();
+ view.center();
+ Site.hideProgress();
+ } else {
+ stateManager.gotoToken(previousStateToken);
+ }
+ }
+
+ public View getView() {
+ return view;
+ }
+
+ public void init(RegisterView view) {
+ this.view = view;
+ super.view = view;
+ }
+
+ 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());
+
+ boolean wantPersonalHomepage = view.wantPersonalHomepage();
+
+ 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.setErrorMessage(i18n.t("This email in in use by other person, try with another."),
+ SiteErrorType.error);
+ } catch (final GroupNameInUseException e) {
+ view.setErrorMessage(i18n.t("This name in already in use, try with a different name."),
+ SiteErrorType.error);
+ } catch (final Throwable e) {
+ view.setErrorMessage(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();
+ }
+ };
+ userServiceProvider.get().createUser(user, wantPersonalHomepage, callback);
+ }
+ }
+}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterView.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterView.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,27 @@
+package org.ourproject.kune.workspace.client.signin;
+
+public interface RegisterView extends SignInAbstractView {
+
+ String getCountry();
+
+ String getEmail();
+
+ String getLanguage();
+
+ String getLongName();
+
+ String getRegisterPassword();
+
+ String getRegisterPasswordDup();
+
+ String getShortName();
+
+ String getTimezone();
+
+ boolean isRegisterFormValid();
+
+ void showWelcolmeDialog();
+
+ boolean wantPersonalHomepage();
+
+}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignIn.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignIn.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignIn.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -1,22 +1,3 @@
-/*
- *
- * 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.signin;
import org.ourproject.kune.platf.client.dto.StateToken;
@@ -25,4 +6,6 @@
void doSignIn(StateToken previousStateToken);
+ void hide();
+
}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,80 @@
+package org.ourproject.kune.workspace.client.signin;
+
+import java.util.Date;
+
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.ui.dialogs.BasicDialogExtended;
+import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
+import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
+import org.ourproject.kune.workspace.client.site.Site;
+
+import com.calclab.suco.client.listener.Listener0;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.Cookies;
+import com.google.gwt.user.client.ui.Label;
+import com.gwtext.client.core.Ext;
+import com.gwtext.client.widgets.Toolbar;
+
+public abstract class SignInAbstractPanel extends BasicDialogExtended {
+
+ protected final I18nUITranslationService i18n;
+ protected Label errorLabel;
+
+ public SignInAbstractPanel(I18nUITranslationService i18n, String title, boolean modal, boolean autoscroll,
+ int width, int heigth, String icon, String firstButtonTitle, String cancelButtonTitle,
+ Listener0 onFirstButtonClick, Listener0 onCancelButtonClick) {
+ this(i18n, title, modal, autoscroll, width, heigth, icon, firstButtonTitle, Ext.generateId(),
+ cancelButtonTitle, Ext.generateId(), onFirstButtonClick, onCancelButtonClick);
+ }
+
+ public SignInAbstractPanel(I18nUITranslationService i18n, final String title, final boolean modal,
+ final boolean autoscroll, final int width, final int heigth, final String icon,
+ final String firstButtonTitle, final String firstButtonId, final String cancelButtonTitle,
+ final String cancelButtonId, final Listener0 onFirstButtonClick, final Listener0 onCancelButtonClick) {
+ super(title, modal, autoscroll, width, heigth, icon, firstButtonTitle, firstButtonId, cancelButtonTitle,
+ cancelButtonId, onFirstButtonClick, onCancelButtonClick);
+ this.i18n = i18n;
+ errorLabel = new Label("");
+ Toolbar messageToolbar = new Toolbar();
+ messageToolbar.addElement(errorLabel.getElement());
+ super.setBottomToolbar(messageToolbar);
+ }
+
+ @Override
+ public void hide() {
+ if (super.isVisible()) {
+ super.hide();
+ }
+ }
+
+ public void hideMessages() {
+ errorLabel.setText("");
+ // renderDialogIfNeeded();
+ }
+
+ public void mask(final String message) {
+ getEl().mask(message, "x-mask-loading");
+ }
+
+ public void maskProcessing() {
+ mask(i18n.t("Processing"));
+ }
+
+ public void setCookie(final String userHash) {
+ // http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ
+ final long duration = Session.SESSION_DURATION;
+ final Date expires = new Date(System.currentTimeMillis() + duration);
+ Cookies.setCookie(Site.USERHASH, userHash, expires, null, "/", false);
+ GWT.log("Received hash: " + userHash, null);
+ }
+
+ public void setErrorMessage(final String message, final SiteErrorType type) {
+ errorLabel.setText(message);
+ // renderDialogIfNeeded();
+ }
+
+ public void unMask() {
+ getEl().unmask();
+ }
+
+}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPresenter.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPresenter.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,45 @@
+package org.ourproject.kune.workspace.client.signin;
+
+import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
+import org.ourproject.kune.platf.client.dto.UserInfoDTO;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
+
+public class SignInAbstractPresenter {
+
+ protected final Session session;
+ protected final StateManager stateManager;
+ protected final I18nUITranslationService i18n;
+ protected StateToken previousStateToken;
+ protected SignInAbstractView view;
+
+ public SignInAbstractPresenter(Session session, StateManager stateManager, I18nUITranslationService i18n) {
+ this.session = session;
+ this.stateManager = stateManager;
+ this.i18n = i18n;
+ }
+
+ public void hide() {
+ view.hide();
+ }
+
+ public void onCancel() {
+ view.reset();
+ view.hideMessages();
+ view.hide();
+ stateManager.gotoToken(previousStateToken);
+ }
+
+ protected void onSignIn(final UserInfoDTO userInfoDTO) {
+ final String userHash = userInfoDTO.getUserHash();
+ view.setCookie(userHash);
+ session.setUserHash(userHash);
+ session.setCurrentUserInfo(userInfoDTO);
+ final I18nLanguageDTO language = userInfoDTO.getLanguage();
+ i18n.changeCurrentLanguage(language.getCode());
+ session.setCurrentLanguage(language);
+ }
+
+}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractView.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractView.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,28 @@
+package org.ourproject.kune.workspace.client.signin;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
+
+public interface SignInAbstractView extends View {
+
+ void center();
+
+ void hide();
+
+ void hideMessages();
+
+ void mask(final String message);
+
+ void maskProcessing();
+
+ void reset();
+
+ void setCookie(String userHash);
+
+ void setErrorMessage(final String message, final SiteErrorType type);
+
+ void show();
+
+ void unMask();
+
+}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInForm.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInForm.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInForm.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -64,5 +64,4 @@
public String getNickOrEmail() {
return loginNickOrEmailField.getValueAsString();
}
-
}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInOld.java (from rev 925, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignIn.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignIn.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInOld.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,28 @@
+/*
+ *
+ * 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.signin;
+
+import org.ourproject.kune.platf.client.dto.StateToken;
+
+public interface SignInOld {
+
+ void doSignIn(StateToken previousStateToken);
+
+}
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInOld.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -1,251 +1,69 @@
-/*
- *
- * 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.signin;
-import java.util.Date;
-
-import org.ourproject.kune.platf.client.state.Session;
-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.site.Site;
-import org.ourproject.kune.workspace.client.site.msg.SimpleMessagePanel;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import com.google.gwt.core.client.GWT;
+import com.calclab.suco.client.listener.Listener0;
import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.HorizontalPanel;
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.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.Toolbar;
-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.FitLayout;
-public class SignInPanel implements SignInView {
- private class MessagePanel extends Panel {
- private static final String SIGNIN_MESSAGE_PANEL = "kune-sip-mp";
- private final SimpleMessagePanel messagesPanel;
+public class SignInPanel extends SignInAbstractPanel implements SignInView {
- public MessagePanel() {
- setPaddings(10);
- setBorder(false);
- setHeight(60);
- messagesPanel = new SimpleMessagePanel();
- messagesPanel.ensureDebugId(SIGNIN_MESSAGE_PANEL);
- messagesPanel.setMessage("", SiteErrorType.info, SiteErrorType.error);
- add(messagesPanel);
- }
-
- @Override
- public void hide() {
- messagesPanel.hide();
- super.hide();
- }
-
- public void setMessage(final String message, final SiteErrorType lastMessageType, final SiteErrorType type) {
- messagesPanel.setMessage(message, lastMessageType, type);
- }
-
- @Override
- public void show() {
- messagesPanel.show();
- super.show();
- }
- }
-
- private static final String USER_SIGN_IN_PANEL = "kune-sip-usp";
- private static final String USER_REGISTER_PANEL = "kune-sip-rp";
- private static final String CANCEL_BUTTON_ID = "kune-sip-cb";
- private static final String REGISTER_BUTTON_ID = "kune-sip-rb";
- private static final String SIGN_IN_BUTTON_ID = "kune-sip-sib";
-
- private BasicDialog dialog;
+ private static final String CANCEL_BUTTON_ID = "kune-signinp-cb";
+ private static final String SIGN_IN_BUTTON_ID = "kune-signinp-sib";
+ static SignInForm signInForm;
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;
- private Label errorLabel;
- public SignInPanel(final SignInPresenter presenter, final I18nUITranslationService i18n, final WorkspaceSkeleton ws) {
- this.i18n = i18n;
- Field.setMsgTarget("side");
+ public SignInPanel(final SignInPresenter presenter, I18nUITranslationService i18n, final WorkspaceSkeleton ws) {
+ super(i18n, i18n.t("Sign in"), true, true, 330, 240, "", i18n.t("Sign in"), SIGN_IN_BUTTON_ID, i18n.tWithNT(
+ "Cancel", "used in button"), CANCEL_BUTTON_ID, new Listener0() {
+ public void onEvent() {
+ signInForm.validate();
+ if (signInForm.isValid()) {
+ presenter.onFormSignIn();
+ }
+ }
+ }, new Listener0() {
+ public void onEvent() {
+ presenter.onCancel();
+ }
+ });
this.presenter = presenter;
- createPanel();
- }
- public void center() {
- dialog.center();
+ Panel panel = new Panel();
+ panel.setBorder(false);
+ signInForm = new SignInForm(i18n);
+ signInForm.setWidth(300);
+ panel.add(signInForm.getForm());
+ panel.add(createNoAccountRegister());
+ add(panel);
}
- 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() {
- errorLabel.setText("");
- 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 setCookie(final String userHash) {
- // http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ
- final long duration = Session.SESSION_DURATION;
- final Date expires = new Date(System.currentTimeMillis() + duration);
- Cookies.setCookie(Site.USERHASH, userHash, expires, null, "/", false);
- GWT.log("Received hash: " + userHash, null);
- }
-
- 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) {
- errorLabel.setText(message);
- 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();
- }
-
- public boolean wantPersonalHomepage() {
- return registerForm.wantPersonalHomepage();
- }
-
- private void confPanel(final Panel panel) {
- // panel.setLayout(new FormLayout());
- // panel.setAutoWidth(true);
- // anel.setAutoHeight(true);
- panel.setAutoScroll(true);
- }
-
private Panel createNoAccountRegister() {
final Panel noAccRegisterPanel = new Panel();
noAccRegisterPanel.setBorder(false);
@@ -255,7 +73,7 @@
final Label registerLabel = new Label(i18n.t("Create one."));
registerLabel.addClickListener(new ClickListener() {
public void onClick(final Widget arg0) {
- centerPanel.activate(1);
+ presenter.onAccountRegister();
}
});
registerLabel.addStyleName("kune-Margin-Medium-l");
@@ -266,131 +84,4 @@
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 FitLayout());
- dialogPanel.setBorder(false);
- // 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.setBorder(false);
- centerPanel.setActiveTab(0);
- // centerPanel.setAutoWidth(true);
- // centerPanel.setAutoHeight(true);
- centerPanel.setClosable(false);
-
- final Panel signInPanel = new Panel(i18n.t("Sign in"));
- signInPanel.setBorder(false);
- signInPanel.setMargins(20);
- confPanel(signInPanel);
- signInForm = new SignInForm(i18n);
- signInPanel.add(signInForm.getForm());
- signInPanel.setCls(USER_SIGN_IN_PANEL);
- signInPanel.add(createNoAccountRegister());
- messagesSignInPanel = new MessagePanel();
- signInPanel.add(messagesSignInPanel);
-
- final Panel registerPanel = new Panel(i18n.t("Register"));
- signInPanel.setBorder(false);
- registerPanel.setCls(USER_REGISTER_PANEL);
- confPanel(registerPanel);
-
- centerPanel.add(signInPanel);
- centerPanel.add(registerPanel);
- dialogPanel.add(centerPanel);
- errorLabel = new Label("");
- Toolbar messageToolbar = new Toolbar();
- messageToolbar.addElement(errorLabel.getElement());
- dialog.setBottomToolbar(messageToolbar);
- dialog.add(dialogPanel);
-
- final Button signInBtn = new Button(i18n.t("Sign in"));
- signInBtn.addListener(new ButtonListenerAdapter() {
- @Override
- public void onClick(final Button button, final EventObject e) {
- signInForm.validate();
- if (signInForm.isValid()) {
- presenter.onFormSignIn();
- }
- }
- });
- signInBtn.setId(SIGN_IN_BUTTON_ID);
- dialog.addButton(signInBtn);
-
- final Button registerBtn = new Button(i18n.t("Register"));
- registerBtn.addListener(new ButtonListenerAdapter() {
- @Override
- public void onClick(final Button button, final EventObject e) {
- registerForm.validate();
- if (registerForm.isValid()) {
- presenter.onFormRegister();
- }
- }
- });
- dialog.addButton(registerBtn);
- registerBtn.setId(REGISTER_BUTTON_ID);
- registerBtn.hide();
-
- final Button cancel = new Button();
- cancel.setId(CANCEL_BUTTON_ID);
- dialog.addButton(cancel);
- cancel.setText(i18n.tWithNT("Cancel", "used in button"));
- cancel.addListener(new ButtonListenerAdapter() {
- @Override
- public void onClick(final Button button, final EventObject e) {
- presenter.onCancel();
- }
- });
-
- signInPanel.addListener(new PanelListenerAdapter() {
- @Override
- public void onActivate(final Panel panel) {
- dialog.setTitle(i18n.t("Sign in"));
- registerBtn.hide();
- signInBtn.show();
- }
- });
-
- registerPanel.addListener(new PanelListenerAdapter() {
- @Override
- 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() {
- @Override
- public void onHide(final Component component) {
- presenter.onClose();
- }
- });
- hideMessages();
- renderDialogIfNeeded();
- }
-
- private void renderDialogIfNeeded() {
- if (dialog.isRendered()) {
- dialog.doLayout();
- }
- }
}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanelOld.java (from rev 925, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanelOld.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,397 @@
+/*
+ *
+ * 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.signin;
+
+import java.util.Date;
+
+import org.ourproject.kune.platf.client.state.Session;
+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.site.Site;
+import org.ourproject.kune.workspace.client.site.msg.SimpleMessagePanel;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.Cookies;
+import com.google.gwt.user.client.DeferredCommand;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+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.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.Toolbar;
+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.FitLayout;
+
+public class SignInPanelOld implements SignInViewOld {
+ private class MessagePanel extends Panel {
+ private static final String SIGNIN_MESSAGE_PANEL = "kune-sip-mp";
+ private final SimpleMessagePanel messagesPanel;
+
+ public MessagePanel() {
+ setPaddings(10);
+ setBorder(false);
+ setHeight(60);
+ messagesPanel = new SimpleMessagePanel();
+ messagesPanel.ensureDebugId(SIGNIN_MESSAGE_PANEL);
+ messagesPanel.setMessage("", SiteErrorType.info, SiteErrorType.error);
+ add(messagesPanel);
+ }
+
+ @Override
+ public void hide() {
+ messagesPanel.hide();
+ super.hide();
+ }
+
+ public void setMessage(final String message, final SiteErrorType lastMessageType, final SiteErrorType type) {
+ messagesPanel.setMessage(message, lastMessageType, type);
+ }
+
+ @Override
+ public void show() {
+ messagesPanel.show();
+ super.show();
+ }
+ }
+
+ private static final String USER_SIGN_IN_PANEL = "kune-sip-usp";
+ private static final String USER_REGISTER_PANEL = "kune-sip-rp";
+ private static final String CANCEL_BUTTON_ID = "kune-sip-cb";
+ private static final String REGISTER_BUTTON_ID = "kune-sip-rb";
+ private static final String SIGN_IN_BUTTON_ID = "kune-sip-sib";
+
+ private BasicDialog dialog;
+ private final SignInPresenterOld presenter;
+ private SignInForm signInForm;
+ private RegisterForm registerForm;
+ private MessagePanel messagesSignInPanel;
+ private InfoDialog welcomeDialog;
+ private TabPanel centerPanel;
+ private MessagePanel messagesRegisterPanel;
+ private final I18nUITranslationService i18n;
+ private Label errorLabel;
+
+ public SignInPanelOld(final SignInPresenterOld 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() {
+ errorLabel.setText("");
+ 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 setCookie(final String userHash) {
+ // http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ
+ final long duration = Session.SESSION_DURATION;
+ final Date expires = new Date(System.currentTimeMillis() + duration);
+ Cookies.setCookie(Site.USERHASH, userHash, expires, null, "/", false);
+ GWT.log("Received hash: " + userHash, null);
+ }
+
+ 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) {
+ errorLabel.setText(message);
+ 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();
+ }
+
+ public boolean wantPersonalHomepage() {
+ return registerForm.wantPersonalHomepage();
+ }
+
+ private void confPanel(final Panel panel) {
+ // panel.setLayout(new FormLayout());
+ // panel.setAutoWidth(true);
+ // anel.setAutoHeight(true);
+ panel.setAutoScroll(true);
+ }
+
+ private Panel createNoAccountRegister() {
+ final Panel noAccRegisterPanel = new Panel();
+ noAccRegisterPanel.setBorder(false);
+ noAccRegisterPanel.setMargins(0, 20, 0, 0);
+ HorizontalPanel hp = new HorizontalPanel();
+ 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");
+ hp.add(dontHaveAccountLabel);
+ hp.add(registerLabel);
+ noAccRegisterPanel.add(hp);
+ 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 FitLayout());
+ dialogPanel.setBorder(false);
+ // 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.setBorder(false);
+ centerPanel.setActiveTab(0);
+ // centerPanel.setAutoWidth(true);
+ // centerPanel.setAutoHeight(true);
+ centerPanel.setClosable(false);
+
+ final Panel signInPanel = new Panel(i18n.t("Sign in"));
+ signInPanel.setBorder(false);
+ signInPanel.setMargins(20);
+ confPanel(signInPanel);
+ signInForm = new SignInForm(i18n);
+ signInPanel.add(signInForm.getForm());
+ signInPanel.setCls(USER_SIGN_IN_PANEL);
+ signInPanel.add(createNoAccountRegister());
+ messagesSignInPanel = new MessagePanel();
+ signInPanel.add(messagesSignInPanel);
+
+ final Panel registerPanel = new Panel(i18n.t("Register"));
+ signInPanel.setBorder(false);
+ registerPanel.setCls(USER_REGISTER_PANEL);
+ confPanel(registerPanel);
+
+ centerPanel.add(signInPanel);
+ centerPanel.add(registerPanel);
+ dialogPanel.add(centerPanel);
+ errorLabel = new Label("");
+ Toolbar messageToolbar = new Toolbar();
+ messageToolbar.addElement(errorLabel.getElement());
+ dialog.setBottomToolbar(messageToolbar);
+ dialog.add(dialogPanel);
+
+ final Button signInBtn = new Button(i18n.t("Sign in"));
+ signInBtn.addListener(new ButtonListenerAdapter() {
+ @Override
+ public void onClick(final Button button, final EventObject e) {
+ signInForm.validate();
+ if (signInForm.isValid()) {
+ presenter.onFormSignIn();
+ }
+ }
+ });
+ signInBtn.setId(SIGN_IN_BUTTON_ID);
+ dialog.addButton(signInBtn);
+
+ final Button registerBtn = new Button(i18n.t("Register"));
+ registerBtn.addListener(new ButtonListenerAdapter() {
+ @Override
+ public void onClick(final Button button, final EventObject e) {
+ registerForm.validate();
+ if (registerForm.isValid()) {
+ presenter.onFormRegister();
+ }
+ }
+ });
+ dialog.addButton(registerBtn);
+ registerBtn.setId(REGISTER_BUTTON_ID);
+ registerBtn.hide();
+
+ final Button cancel = new Button();
+ cancel.setId(CANCEL_BUTTON_ID);
+ dialog.addButton(cancel);
+ cancel.setText(i18n.tWithNT("Cancel", "used in button"));
+ cancel.addListener(new ButtonListenerAdapter() {
+ @Override
+ public void onClick(final Button button, final EventObject e) {
+ presenter.onCancel();
+ }
+ });
+
+ signInPanel.addListener(new PanelListenerAdapter() {
+ @Override
+ public void onActivate(final Panel panel) {
+ dialog.setTitle(i18n.t("Sign in"));
+ registerBtn.hide();
+ signInBtn.show();
+ }
+ });
+
+ registerPanel.addListener(new PanelListenerAdapter() {
+ @Override
+ 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() {
+ @Override
+ public void onHide(final Component component) {
+ presenter.onClose();
+ }
+ });
+ hideMessages();
+ renderDialogIfNeeded();
+ }
+
+ private void renderDialogIfNeeded() {
+ if (dialog.isRendered()) {
+ dialog.doLayout();
+ }
+ }
+}
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanelOld.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -1,64 +1,38 @@
-/*
- *
- * 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.signin;
-import org.ourproject.kune.platf.client.dto.I18nCountryDTO;
-import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
+import org.ourproject.kune.platf.client.View;
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.site.Site;
+import org.ourproject.kune.workspace.client.site.SiteToken;
import org.ourproject.kune.workspace.client.site.rpc.UserServiceAsync;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.emiteuimodule.client.SubscriptionMode;
-import com.google.gwt.core.client.GWT;
+import com.calclab.suco.client.ioc.Provider;
import com.google.gwt.user.client.rpc.AsyncCallback;
-public class SignInPresenter implements SignIn {
+public class SignInPresenter extends SignInAbstractPresenter implements SignIn {
SignInView view;
- private final Session session;
- private final I18nUITranslationService i18n;
- private final UserServiceAsync userService;
- private final StateManager stateManager;
- private StateToken previousStateToken;
+ private final Provider<UserServiceAsync> userServiceProvider;
+ private final Provider<Register> registerProvider;
- 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 SignInPresenter(Session session, StateManager stateManager, I18nUITranslationService i18n,
+ Provider<UserServiceAsync> userServiceProvider, Provider<Register> registerProvider) {
+ super(session, stateManager, i18n);
+ this.userServiceProvider = userServiceProvider;
+ this.registerProvider = registerProvider;
}
- public void doSignIn(final StateToken previousStateToken) {
+ public void doSignIn(StateToken previousStateToken) {
this.previousStateToken = previousStateToken;
+ registerProvider.get().hide();
if (!session.isLogged()) {
Site.showProgressProcessing();
view.show();
@@ -69,91 +43,23 @@
}
}
- public Object[][] getCountries() {
- return session.getCountriesArray();
+ public View getView() {
+ return view;
}
- public I18nLanguageDTO getCurrentLanguage() {
- return session.getCurrentLanguage();
+ public void init(SignInView view) {
+ this.view = view;
+ super.view = view;
}
- 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();
+ public void onAccountRegister() {
+ view.reset();
+ view.hideMessages();
view.hide();
- stateManager.gotoToken(previousStateToken);
+ stateManager.gotoToken(SiteToken.register.toString());
}
- public void onClose() {
- reset();
- view.hideMessages();
- if (!session.isLogged()) {
- stateManager.gotoToken(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());
-
- boolean wantPersonalHomepage = view.wantPersonalHomepage();
-
- 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, wantPersonalHomepage, callback);
- }
- }
-
- protected void onFormSignIn() {
+ public void onFormSignIn() {
if (view.isSignInFormValid()) {
view.maskProcessing();
@@ -171,9 +77,9 @@
try {
throw caught;
} catch (final UserAuthException e) {
- view.setSignInMessage(i18n.t("Incorrect nickname/email or password"), SiteErrorType.error);
+ view.setErrorMessage(i18n.t("Incorrect nickname/email or password"), SiteErrorType.error);
} catch (final Throwable e) {
- view.setSignInMessage("Error in login", SiteErrorType.error);
+ view.setErrorMessage("Error in login", SiteErrorType.error);
Log.error("Other kind of exception in LoginFormPresenter/doLogin");
}
}
@@ -185,26 +91,7 @@
view.unMask();
}
};
- userService.login(user.getShortName(), user.getPassword(), callback);
+ userServiceProvider.get().login(user.getShortName(), user.getPassword(), callback);
}
}
-
- private void onSignIn(final UserInfoDTO userInfoDTO) {
- final String userHash = userInfoDTO.getUserHash();
- view.setCookie(userHash);
- session.setUserHash(userHash);
- 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();
- }
-
}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenterOld.java (from rev 925, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenterOld.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,210 @@
+/*
+ *
+ * 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.signin;
+
+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.site.Site;
+import org.ourproject.kune.workspace.client.site.rpc.UserServiceAsync;
+
+import com.allen_sauer.gwt.log.client.Log;
+import com.calclab.emiteuimodule.client.SubscriptionMode;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+public class SignInPresenterOld implements SignInOld {
+
+ SignInViewOld view;
+ private final Session session;
+ private final I18nUITranslationService i18n;
+ private final UserServiceAsync userService;
+ private final StateManager stateManager;
+ private StateToken previousStateToken;
+
+ public SignInPresenterOld(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.gotoToken(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 SignInViewOld loginview) {
+ this.view = loginview;
+ }
+
+ public void onCancel() {
+ resetMessages();
+ reset();
+ view.hide();
+ stateManager.gotoToken(previousStateToken);
+ }
+
+ public void onClose() {
+ reset();
+ view.hideMessages();
+ if (!session.isLogged()) {
+ stateManager.gotoToken(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());
+
+ boolean wantPersonalHomepage = view.wantPersonalHomepage();
+
+ 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, wantPersonalHomepage, 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);
+ Log.error("Other kind of exception in LoginFormPresenter/doLogin");
+ }
+ }
+
+ public void onSuccess(final UserInfoDTO userInfoDTO) {
+ onSignIn(userInfoDTO);
+ stateManager.gotoToken(previousStateToken);
+ view.hide();
+ view.unMask();
+ }
+ };
+ userService.login(user.getShortName(), user.getPassword(), callback);
+ }
+ }
+
+ private void onSignIn(final UserInfoDTO userInfoDTO) {
+ final String userHash = userInfoDTO.getUserHash();
+ view.setCookie(userHash);
+ session.setUserHash(userHash);
+ 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();
+ }
+
+}
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenterOld.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInView.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInView.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -1,75 +1,33 @@
-/*
- *
- * 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.signin;
-import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
-public interface SignInView extends View {
+public interface SignInView extends SignInAbstractView {
void center();
- String getCountry();
-
- String getEmail();
-
- String getLanguage();
-
String getLoginPassword();
- String getLongName();
-
String getNickOrEmail();
- String getRegisterPassword();
-
- String getRegisterPasswordDup();
-
- String getShortName();
-
- String getTimezone();
-
void hide();
void hideMessages();
- boolean isRegisterFormValid();
-
boolean isSignInFormValid();
+ void mask(final String message);
+
void maskProcessing();
void reset();
- void setCookie(String userHash);
+ void setCookie(final String userHash);
- void setRegisterMessage(String message, SiteErrorType type);
+ void setErrorMessage(final String message, final SiteErrorType type);
- void setSignInMessage(String message, SiteErrorType type);
-
void show();
- void showWelcolmeDialog();
-
void unMask();
- boolean wantPersonalHomepage();
-
}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInViewOld.java (from rev 925, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInView.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInView.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInViewOld.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,75 @@
+/*
+ *
+ * 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.signin;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
+
+public interface SignInViewOld extends View {
+
+ void center();
+
+ String getCountry();
+
+ String getEmail();
+
+ String getLanguage();
+
+ String getLoginPassword();
+
+ String getLongName();
+
+ String getNickOrEmail();
+
+ String getRegisterPassword();
+
+ String getRegisterPasswordDup();
+
+ String getShortName();
+
+ String getTimezone();
+
+ void hide();
+
+ void hideMessages();
+
+ boolean isRegisterFormValid();
+
+ boolean isSignInFormValid();
+
+ void maskProcessing();
+
+ void reset();
+
+ void setCookie(String userHash);
+
+ void setRegisterMessage(String message, SiteErrorType type);
+
+ void setSignInMessage(String message, SiteErrorType type);
+
+ void show();
+
+ void showWelcolmeDialog();
+
+ void unMask();
+
+ boolean wantPersonalHomepage();
+
+}
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInViewOld.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/Site.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/site/Site.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/Site.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -22,7 +22,7 @@
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.site.msg.SiteToastMessage;
import org.ourproject.kune.workspace.client.sitebar.siteprogress.SiteProgress;
import com.calclab.suco.client.ioc.Provider;
@@ -32,10 +32,10 @@
public static final String IN_DEVELOPMENT = " (in development)";
private static I18nTranslationService i18n;
private static SiteProgress progress;
- private static Provider<SiteMessage> siteMessageProvider;
+ private static Provider<SiteToastMessage> siteMessageProvider;
public static void error(final String value) {
- getSiteMessage().setMessage(value, SiteErrorType.error);
+ getSiteMessage().showMessage(i18n.t("Error"), value, SiteErrorType.error);
}
public static void hideProgress() {
@@ -43,11 +43,11 @@
}
public static void important(final String value) {
- getSiteMessage().setMessage(value, SiteErrorType.imp);
+ getSiteMessage().showMessage(i18n.t("Important"), value, SiteErrorType.imp);
}
public static void info(final String value) {
- getSiteMessage().setMessage(value, SiteErrorType.info);
+ getSiteMessage().showMessage(i18n.t("Info"), value, SiteErrorType.info);
}
public static void showProgress(final String text) {
@@ -71,15 +71,15 @@
}
public static void veryImportant(final String value) {
- getSiteMessage().setMessage(value, SiteErrorType.veryimp);
+ getSiteMessage().showMessage(i18n.t("Alert"), value, SiteErrorType.veryimp);
}
- private static SiteMessage getSiteMessage() {
+ private static SiteToastMessage getSiteMessage() {
return siteMessageProvider.get();
}
public Site(final I18nUITranslationService i18n, final SiteProgress progress,
- final Provider<SiteMessage> siteMessageProvider) {
+ final Provider<SiteToastMessage> siteMessageProvider) {
Site.i18n = i18n;
Site.progress = progress;
Site.siteMessageProvider = siteMessageProvider;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/SiteToken.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/site/SiteToken.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/SiteToken.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -19,5 +19,5 @@
*/package org.ourproject.kune.workspace.client.site;
public enum SiteToken {
- signin, newgroup, translate
+ signin, newgroup, translate, register
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessagePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessagePresenter.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteMessagePresenter.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -31,11 +31,6 @@
public SiteMessagePresenter() {
}
- @Deprecated
- public void adjustWidth(final int windowWidth) {
- view.adjustWidth(windowWidth);
- }
-
public View getView() {
return view;
}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessage.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessage.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessage.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,9 @@
+package org.ourproject.kune.workspace.client.site.msg;
+
+import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
+
+public interface SiteToastMessage {
+
+ void showMessage(String title, String message, SiteErrorType type);
+
+}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessagePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessagePanel.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessagePanel.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,32 @@
+package org.ourproject.kune.workspace.client.site.msg;
+
+import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
+
+import com.gwtextux.client.widgets.window.ToastWindow;
+
+public class SiteToastMessagePanel implements SiteToastMessageView {
+
+ public SiteToastMessagePanel() {
+ }
+
+ public void showMessage(String title, String message, SiteErrorType type) {
+ ToastWindow toastWindow = new ToastWindow(title, message);
+ String iconCls = "";
+ switch (type) {
+ case info:
+ iconCls = "k-stm-info-icon";
+ break;
+ case imp:
+ iconCls = "k-stm-imp-icon";
+ break;
+ case veryimp:
+ iconCls = "k-stm-verimp-icon";
+ break;
+ case error:
+ iconCls = "k-stm-error-icon";
+ break;
+ }
+ toastWindow.setIconCls(iconCls);
+ toastWindow.show();
+ }
+}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessagePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessagePresenter.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessagePresenter.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,24 @@
+package org.ourproject.kune.workspace.client.site.msg;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
+
+public class SiteToastMessagePresenter implements SiteToastMessage {
+
+ private SiteToastMessageView view;
+
+ public SiteToastMessagePresenter() {
+ }
+
+ public View getView() {
+ return view;
+ }
+
+ public void init(SiteToastMessageView view) {
+ this.view = view;
+ }
+
+ public void showMessage(String title, final String message, final SiteErrorType type) {
+ view.showMessage(title, message, type);
+ }
+}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessageView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessageView.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/SiteToastMessageView.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -0,0 +1,10 @@
+package org.ourproject.kune.workspace.client.site.msg;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.workspace.client.newgroup.SiteErrorType;
+
+public interface SiteToastMessageView extends View {
+
+ void showMessage(String title, String message, SiteErrorType type);
+
+}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteprogress/SiteProgressPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteprogress/SiteProgressPanel.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteprogress/SiteProgressPanel.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -21,7 +21,9 @@
import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
@@ -45,12 +47,17 @@
public void hideProgress() {
timeProgressMaxTime.cancel();
progressPanel.setVisible(false);
- publicLinkProvider.get().setVisible(true);
+ DeferredCommand.addCommand(new Command() {
+ public void execute() {
+ publicLinkProvider.get().setVisible(true);
+ }
+ });
}
public void showProgress(final String text) {
if (timeProgressMaxTime == null) {
timeProgressMaxTime = new Timer() {
+ @Override
public void run() {
hideProgress();
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -66,6 +66,16 @@
contentNoPublic.addStyleName("k-sitebar-labellink");
}
+ public void attach() {
+ publicHP.add(gotoPublic);
+ publicHP.add(contentNoPublic);
+ }
+
+ public void detach() {
+ publicHP.remove(gotoPublic);
+ publicHP.remove(contentNoPublic);
+ }
+
public void setContentGotoPublicUrl(final String publicUrl) {
this.publicUrl = publicUrl;
}
@@ -77,6 +87,7 @@
public void setVisible(final boolean visible) {
publicHP.setVisible(visible);
+
}
private void gotoPublic() {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -37,7 +37,7 @@
if (state instanceof StateContainerDTO) {
setState((StateContainerDTO) state);
} else {
- view.setVisible(false);
+ view.detach();
}
}
});
@@ -64,6 +64,7 @@
} else {
view.setContentPublic(false);
}
+ view.attach();
view.setVisible(true);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkView.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkView.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -22,6 +22,10 @@
public interface SitePublicSpaceLinkView extends View {
+ void attach();
+
+ void detach();
+
void setContentGotoPublicUrl(String publicUrl);
void setContentPublic(boolean visible);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePresenter.java 2008-10-24 17:46:08 UTC (rev 925)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePresenter.java 2008-10-24 22:34:35 UTC (rev 926)
@@ -40,10 +40,10 @@
this.showLanguage = showLanguage;
stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
public void onEvent(final StateAbstractDTO state) {
- if (state instanceof StateContainerDTO) {
+ if (state instanceof StateContentDTO) {
+ setState((StateContentDTO) state);
+ } else if (state instanceof StateContainerDTO) {
setState((StateContainerDTO) state);
- } else if (state instanceof StateContentDTO) {
- setState((StateContentDTO) state);
}
}
});
More information about the kune-commits
mailing list