Author: vjrj Date: 2008-11-25 17:52:11 +0100 (Tue, 25 Nov 2008) New Revision: 969 Added: trunk/src/main/java/org/ourproject/kune/wiki/ trunk/src/main/java/org/ourproject/kune/wiki/Kune-Wiki.gwt.xml trunk/src/main/java/org/ourproject/kune/wiki/client/ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContent.java trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPanel.java trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPresenter.java trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentView.java trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewer.java trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPanel.java trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPresenter.java trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerView.java trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/ trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContext.java trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContextPresenter.java trunk/src/main/java/org/ourproject/kune/wiki/public/ trunk/src/main/java/org/ourproject/kune/wiki/server/ trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerModule.java trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerTool.java Modified: trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java 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/app/server/KuneRackModule.java trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java trunk/src/main/java/org/ourproject/kune/platf/client/tool/FoldableAbstractClientTool.java trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/AbstractContentView.java trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java trunk/src/main/java/org/ourproject/kune/workspace/client/skel/SimpleToolbar.java Log: New wiki tool. Complete - task License onOver hide/show Incomplete - task UI tools & workspace refactorization Modified: trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml =================================================================== --- trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml 2008-11-25 16:52:11 UTC (rev 969) @@ -14,6 +14,7 @@ <inherits name='org.ourproject.kune.platf.Kune-Platform' /> <inherits name='org.ourproject.kune.docs.Kune-Docs' /> <inherits name='org.ourproject.kune.blogs.Kune-Blogs' /> + <inherits name='org.ourproject.kune.wiki.Kune-Wiki' /> <inherits name='org.ourproject.kune.chat.Kune-Chat' /> <!-- gwt-ext --> Modified: trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java 2008-11-25 16:52:11 UTC (rev 969) @@ -27,6 +27,7 @@ import org.ourproject.kune.platf.client.services.KunePlatformModule; import org.ourproject.kune.platf.client.services.KuneRegistryModule; import org.ourproject.kune.platf.client.services.KuneWorkspaceModule; +import org.ourproject.kune.wiki.client.WikiClientModule; import com.allen_sauer.gwt.log.client.Log; import com.calclab.emiteuimodule.client.EmiteUIModule; @@ -56,6 +57,6 @@ public void onModuleLoadCont() { Suco.install(new KuneCoreModule(), new KuneRegistryModule(), new KunePlatformModule(), new KuneWorkspaceModule(), new EmiteUIModule(), new DocumentClientModule(), new BlogClientModule(), - new ChatClientModule(), new KuneModule()); + new WikiClientModule(), new ChatClientModule(), new KuneModule()); } } 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-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/app/public/css/all.css 2008-11-25 16:52:11 UTC (rev 969) @@ -35,10 +35,10 @@ } */.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;}.k-tp-tag{float:left;margin-right:5px;cursor:pointer;color:#00F;}.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-bottom-color:#FFF;border-bottom-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-elogo-plink{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:24px;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 *//* + 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-bottom-color:#FFF;border-bottom-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-elogo-plink{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: 24px; */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 *//* .x-tree-node a span, .x-dd-drag-ghost a span { color:#000000; padding: 1px 0px 1px 1px; text-decoration:none; } -*/.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;}.k-error-tb{background:#FFB380 none repeat scroll 0 50%;color:#250;}.k-infod-head{font-size:108%;margin-bottom:10px;}.gwt-DisclosurePanel{}.gwt-DisclosurePanel-open{}.gwt-DisclosurePanel-closed{}.gwt-DisclosurePanel .header,.gwt-DisclosurePanel .header a,.gwt-DisclosurePanel .header td{text-decoration:none;/* Remove underline from header */color:#000;cursor:pointer;cursor:hand;}.gwt-DisclosurePanel .content{border-left:3px solid #e8eef7;padding:4px 0 4px 8px;margin-left:6px;}.k-bsp-buddie{background:#FAFAFA none repeat scroll 0 50%;border:1px solid #EBEBEB;padding:3px;margin:3px;}.k-bsp-buddie td{padding:2px 3px;}.k-text-gray{color:gray;}.k-elp-limg{margin-top:4px;margin-left:5px;} \ No newline at end of file +*/.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;}.k-error-tb{background:#FFB380 none repeat scroll 0 50%;color:#250;}.k-infod-head{font-size:108%;margin-bottom:10px;}.gwt-DisclosurePanel{}.gwt-DisclosurePanel-open{}.gwt-DisclosurePanel-closed{}.gwt-DisclosurePanel .header,.gwt-DisclosurePanel .header a,.gwt-DisclosurePanel .header td{text-decoration:none;/* Remove underline from header */color:#000;cursor:pointer;cursor:hand;}.gwt-DisclosurePanel .content{border-left:3px solid #e8eef7;padding:4px 0 4px 8px;margin-left:6px;}.k-bsp-buddie{background:#FAFAFA none repeat scroll 0 50%;border:1px solid #EBEBEB;padding:3px;margin:3px;}.k-bsp-buddie td{padding:2px 3px;}.k-text-gray{color:gray;}.k-elp-limg{margin-top:4px;margin-left:5px;cursor:pointer;} \ No newline at end of file Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css =================================================================== --- trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2008-11-25 16:52:11 UTC (rev 969) @@ -377,12 +377,6 @@ 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%; @@ -417,7 +411,7 @@ } .k-entity-bottom div { - line-height: 24px; + /* line-height: 24px; */ color: #FFF; } @@ -802,4 +796,5 @@ .k-elp-limg { margin-top: 4px; margin-left: 5px; + cursor: pointer; } Modified: trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java 2008-11-25 16:52:11 UTC (rev 969) @@ -46,6 +46,7 @@ import org.ourproject.kune.rack.filters.LogFilter; import org.ourproject.kune.rack.filters.RedirectFilter; import org.ourproject.kune.rack.filters.rest.RESTServicesModule; +import org.ourproject.kune.wiki.server.WikiServerModule; import org.ourproject.kune.workspace.client.site.rpc.UserService; import com.google.inject.AbstractModule; @@ -111,6 +112,7 @@ builder.use(new PlatformServerModule()); builder.use(new DocumentServerModule()); builder.use(new BlogServerModule()); + builder.use(new WikiServerModule()); builder.use(new ChatServerModule()); builder.use(new RESTServicesModule()); builder.use(configModule); Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java 2008-11-25 16:52:11 UTC (rev 969) @@ -58,5 +58,6 @@ protected void registerIcons() { registerContentTypeIcon(TYPE_BLOG, "images/nav/blog.png"); registerContentTypeIcon(TYPE_POST, "images/nav/post.png"); + registerUploadTypesAndMimes(TYPE_UPLOADEDFILE); } } Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java 2008-11-25 16:52:11 UTC (rev 969) @@ -29,6 +29,7 @@ import org.ourproject.kune.platf.client.dto.AccessRolDTO; import org.ourproject.kune.platf.client.dto.StateToken; import org.ourproject.kune.platf.client.state.Session; +import org.ourproject.kune.wiki.client.WikiClientTool; import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; import com.calclab.suco.client.ioc.Provider; @@ -94,7 +95,7 @@ contentActionRegistry.addAction(chatAbout, DocumentClientTool.TYPE_DOCUMENT); contentActionRegistry.addAction(chatAbout, DocumentClientTool.TYPE_GALLERY); - contentActionRegistry.addAction(chatAbout, DocumentClientTool.TYPE_WIKIPAGE); + contentActionRegistry.addAction(chatAbout, WikiClientTool.TYPE_WIKIPAGE); contentActionRegistry.addAction(chatAbout, BlogClientTool.TYPE_POST); contentActionRegistry.addAction(chatAbout, DocumentClientTool.TYPE_UPLOADEDFILE); Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java 2008-11-25 16:52:11 UTC (rev 969) @@ -23,8 +23,6 @@ import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_GALLERY; import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_ROOT; import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_UPLOADEDFILE; -import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_WIKI; -import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_WIKIPAGE; import org.ourproject.kune.docs.client.cnt.DocumentViewer; import org.ourproject.kune.platf.client.actions.ContentActionRegistry; @@ -64,12 +62,11 @@ @Override protected void createActions() { - final String[] all = { TYPE_ROOT, TYPE_FOLDER, TYPE_DOCUMENT, TYPE_GALLERY, TYPE_WIKI, TYPE_WIKIPAGE, - TYPE_UPLOADEDFILE }; - final String[] containers = { TYPE_ROOT, TYPE_FOLDER, TYPE_GALLERY, TYPE_WIKI }; + final String[] all = { TYPE_ROOT, TYPE_FOLDER, TYPE_DOCUMENT, TYPE_GALLERY, TYPE_UPLOADEDFILE }; + final String[] containers = { TYPE_ROOT, TYPE_FOLDER, TYPE_GALLERY }; final String[] contentsModerated = { TYPE_DOCUMENT, TYPE_UPLOADEDFILE }; - final String[] containersNoRoot = { TYPE_FOLDER, TYPE_GALLERY, TYPE_WIKI }; - final String[] contents = { TYPE_DOCUMENT, TYPE_WIKIPAGE, TYPE_UPLOADEDFILE }; + final String[] containersNoRoot = { TYPE_FOLDER, TYPE_GALLERY }; + final String[] contents = { TYPE_DOCUMENT, TYPE_UPLOADEDFILE }; String parentMenuTitle = i18n.t("File"); String parentMenuTitleCtx = i18n.t("Folder"); @@ -78,13 +75,9 @@ i18n.t("New"), i18n.t("New folder"), Position.ctx, TYPE_ROOT, TYPE_FOLDER); createNewContainerAction(TYPE_GALLERY, "images/nav/gallery_add.png", i18n.t("New gallery"), parentMenuTitleCtx, i18n.t("New"), i18n.t("New gallery"), Position.ctx, TYPE_ROOT); - createNewContainerAction(TYPE_WIKI, "images/nav/wiki_add.png", i18n.t("New wiki"), parentMenuTitleCtx, - i18n.t("New"), i18n.t("wiki"), Position.ctx, TYPE_ROOT); createNewContentAction(TYPE_DOCUMENT, "images/nav/page_add.png", i18n.t("New document"), parentMenuTitleCtx, Position.ctx, TYPE_ROOT, TYPE_FOLDER); - createNewContentAction(TYPE_WIKIPAGE, "images/nav/wikipage_add.png", parentMenuTitleCtx, - i18n.t("New wikipage"), Position.ctx, TYPE_WIKI); createContentModeratedActions(parentMenuTitle, contentsModerated); @@ -105,10 +98,13 @@ createDownloadActions(TYPE_UPLOADEDFILE); createGoAction(all); + createGoHomeAction(containers); - createEditAction(TYPE_DOCUMENT, TYPE_WIKIPAGE); - createTranslateAction(TYPE_DOCUMENT, TYPE_FOLDER, TYPE_GALLERY, TYPE_UPLOADEDFILE, TYPE_WIKI, TYPE_WIKIPAGE); + createEditAction(TYPE_DOCUMENT); + + createTranslateAction(TYPE_DOCUMENT, TYPE_FOLDER, TYPE_GALLERY, TYPE_UPLOADEDFILE); + createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot); createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents); } Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java 2008-11-25 16:52:11 UTC (rev 969) @@ -19,7 +19,6 @@ */ package org.ourproject.kune.docs.client; -import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO; import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry; import org.ourproject.kune.platf.client.tool.FoldableAbstractClientTool; import org.ourproject.kune.platf.client.tool.ToolSelector; @@ -32,8 +31,6 @@ public static final String TYPE_FOLDER = "docs.folder"; public static final String TYPE_DOCUMENT = "docs.doc"; public static final String TYPE_GALLERY = "docs.gallery"; - public static final String TYPE_WIKI = "docs.wiki"; - public static final String TYPE_WIKIPAGE = "docs.wikipage"; public static final String TYPE_UPLOADEDFILE = "docs.uploaded"; public static final String NAME = "docs"; @@ -47,10 +44,10 @@ registerDragableTypes(TYPE_DOCUMENT, TYPE_FOLDER, TYPE_UPLOADEDFILE); registerDropableTypes(TYPE_ROOT, TYPE_FOLDER, TYPE_GALLERY); registerPublishModerableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE); - registerRateableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE, TYPE_WIKIPAGE); - registerRenamableTypes(TYPE_DOCUMENT, TYPE_FOLDER, TYPE_GALLERY, TYPE_UPLOADEDFILE, TYPE_WIKI, TYPE_WIKIPAGE); - registerTageableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE, TYPE_WIKIPAGE); - registerTranslatableTypes(TYPE_DOCUMENT, TYPE_FOLDER, TYPE_UPLOADEDFILE, TYPE_WIKIPAGE); + registerRateableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE); + registerRenamableTypes(TYPE_DOCUMENT, TYPE_FOLDER, TYPE_GALLERY, TYPE_UPLOADEDFILE); + registerTageableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE); + registerTranslatableTypes(TYPE_DOCUMENT, TYPE_FOLDER, TYPE_UPLOADEDFILE); registerIcons(); } @@ -63,24 +60,7 @@ registerContentTypeIcon(TYPE_FOLDER, "images/nav/folder.png"); registerContentTypeIcon(TYPE_GALLERY, "images/nav/gallery.png"); registerContentTypeIcon(TYPE_DOCUMENT, "images/nav/page.png"); - registerContentTypeIcon(TYPE_WIKI, "images/nav/wiki.png"); - registerContentTypeIcon(TYPE_WIKIPAGE, "images/nav/wikipage.png"); - registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("image"), "images/nav/picture.png"); - registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("video"), "images/nav/film.png"); - registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "pdf"), - "images/nav/page_pdf.png"); - registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "zip"), - "images/nav/page_zip.png"); - registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "zip"), - "images/nav/page_zip.png"); - registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("text"), "images/nav/page_text.png"); - registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "msword"), - "images/nav/page_word.png"); - registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "excel"), - "images/nav/page_excel.png"); - registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "mspowerpoint"), - "images/nav/page_pps.png"); - registerContentTypeIcon(TYPE_UPLOADEDFILE, "images/nav/page.png"); + registerUploadTypesAndMimes(TYPE_UPLOADEDFILE); } } Modified: trunk/src/main/java/org/ourproject/kune/platf/client/tool/FoldableAbstractClientTool.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/tool/FoldableAbstractClientTool.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/platf/client/tool/FoldableAbstractClientTool.java 2008-11-25 16:52:11 UTC (rev 969) @@ -82,4 +82,20 @@ protected void registerXmppNotifyCapableTypes(String... typeIds) { contentCapabilitiesRegistry.getXmppNotificyCapable().register(typeIds); } + + protected void registerUploadTypesAndMimes(String typeUploadedfile) { + registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("image"), "images/nav/picture.png"); + registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("video"), "images/nav/film.png"); + registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "pdf"), "images/nav/page_pdf.png"); + registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "zip"), "images/nav/page_zip.png"); + registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "zip"), "images/nav/page_zip.png"); + registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("text"), "images/nav/page_text.png"); + registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "msword"), + "images/nav/page_word.png"); + registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "excel"), + "images/nav/page_excel.png"); + registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "mspowerpoint"), + "images/nav/page_pps.png"); + registerContentTypeIcon(typeUploadedfile, "images/nav/page.png"); + } } Added: trunk/src/main/java/org/ourproject/kune/wiki/Kune-Wiki.gwt.xml =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/Kune-Wiki.gwt.xml 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/Kune-Wiki.gwt.xml 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,5 @@ +<!DOCTYPE document SYSTEM "src/main/java/gwt-module.dtd"> +<module> + <inherits name='org.ourproject.kune.platf.Kune-Platform' /> + <inherits name='org.ourproject.kune.workspace.Kune-Workspace' /> +</module> Added: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,113 @@ +/* + * + * 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.wiki.client; + +import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_FOLDER; +import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_ROOT; +import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_UPLOADEDFILE; +import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_WIKIPAGE; + +import org.ourproject.kune.platf.client.actions.ContentActionRegistry; +import org.ourproject.kune.platf.client.actions.ContextActionRegistry; +import org.ourproject.kune.platf.client.rpc.ContentServiceAsync; +import org.ourproject.kune.platf.client.rpc.GroupServiceAsync; +import org.ourproject.kune.platf.client.services.KuneErrorHandler; +import org.ourproject.kune.platf.client.state.Session; +import org.ourproject.kune.platf.client.state.StateManager; +import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; +import org.ourproject.kune.platf.client.ui.upload.FileUploader; +import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; +import org.ourproject.kune.wiki.client.cnt.WikiViewer; +import org.ourproject.kune.workspace.client.AbstractFoldableContentActions; +import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator; +import org.ourproject.kune.workspace.client.cxt.ContextPropEditor; +import org.ourproject.kune.workspace.client.editor.TextEditor; +import org.ourproject.kune.workspace.client.entitylogo.EntityLogo; +import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; + +import com.calclab.suco.client.ioc.Provider; + +public class WikiClientActions extends AbstractFoldableContentActions { + public WikiClientActions(final I18nUITranslationService i18n, final ContextNavigator contextNavigator, + final Session session, final StateManager stateManager, + final DeferredCommandWrapper deferredCommandWrapper, + final Provider<ContentServiceAsync> contentServiceProvider, + final Provider<GroupServiceAsync> groupServiceProvider, final Provider<FileUploader> fileUploaderProvider, + final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry, + final Provider<FileDownloadUtils> fileDownloadProvider, final EntityLogo entityLogo, + final Provider<TextEditor> textEditorProvider, final KuneErrorHandler errorHandler, + final WikiViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider) { + super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider, + contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry, + contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider, + documentViewer, entityLogo); + } + + @Override + protected void createActions() { + final String[] all = { TYPE_ROOT, TYPE_FOLDER, TYPE_WIKIPAGE, TYPE_UPLOADEDFILE }; + final String[] containers = { TYPE_ROOT, TYPE_FOLDER }; + // final String[] contentsModerated = { }; + final String[] containersNoRoot = { TYPE_FOLDER }; + final String[] contents = { TYPE_WIKIPAGE, TYPE_UPLOADEDFILE }; + + String parentMenuTitle = i18n.t("Wikipage"); + String parentMenuTitleCtx = i18n.t("Wiki"); + + createNewContainerAction(TYPE_FOLDER, "images/nav/folder_add.png", i18n.t("New folder"), parentMenuTitleCtx, + i18n.t("New"), i18n.t("New folder"), Position.ctx, TYPE_ROOT, TYPE_FOLDER); + + createNewContentAction(TYPE_WIKIPAGE, "images/nav/wikipage_add.png", i18n.t("New wikipage"), + parentMenuTitleCtx, Position.ctx, TYPE_ROOT, TYPE_FOLDER); + + // createContentModeratedActions(parentMenuTitle, contentsModerated); + + createContentRenameAction(parentMenuTitle, i18n.t("Rename"), contents); + createRenameContentInCtxAction(parentMenuTitleCtx, i18n.t("Rename"), containersNoRoot); + + // final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupCxt = + // createSetAsDefContent(parentMenuTitleCtx); + + createRefreshCntAction(parentMenuTitle, contents); + createRefreshCxtAction(parentMenuTitleCtx, containers); + + createSetAsDefContent(parentMenuTitle, contents); + + createUploadAction(i18n.t("Upload file"), "images/nav/upload.png", + i18n.t("Upload some files (images, PDFs, ...)"), null, containers); + + createDownloadActions(TYPE_UPLOADEDFILE); + + createGoAction(all); + + createGoHomeAction(containers); + + createEditAction(TYPE_WIKIPAGE); + + createTranslateAction(TYPE_FOLDER, TYPE_UPLOADEDFILE, TYPE_WIKIPAGE); + + createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot); + createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents); + } + + @Override + protected void createPostSessionInitActions() { + // super.createUploadMediaAction(); + } +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,119 @@ +/* + * + * 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.wiki.client; + +import org.ourproject.kune.platf.client.actions.ContentActionRegistry; +import org.ourproject.kune.platf.client.actions.ContextActionRegistry; +import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; +import org.ourproject.kune.platf.client.app.ToolGroup; +import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry; +import org.ourproject.kune.platf.client.rpc.ContentServiceAsync; +import org.ourproject.kune.platf.client.rpc.GroupServiceAsync; +import org.ourproject.kune.platf.client.services.I18nTranslationService; +import org.ourproject.kune.platf.client.services.KuneErrorHandler; +import org.ourproject.kune.platf.client.state.Session; +import org.ourproject.kune.platf.client.state.StateManager; +import org.ourproject.kune.platf.client.tool.ToolSelector; +import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; +import org.ourproject.kune.platf.client.ui.upload.FileUploader; +import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; +import org.ourproject.kune.wiki.client.cnt.WikiFolderContent; +import org.ourproject.kune.wiki.client.cnt.WikiFolderContentPanel; +import org.ourproject.kune.wiki.client.cnt.WikiFolderContentPresenter; +import org.ourproject.kune.wiki.client.cnt.WikiFolderContentView; +import org.ourproject.kune.wiki.client.cnt.WikiViewer; +import org.ourproject.kune.wiki.client.cnt.WikiViewerPanel; +import org.ourproject.kune.wiki.client.cnt.WikiViewerPresenter; +import org.ourproject.kune.wiki.client.cnt.WikiViewerView; +import org.ourproject.kune.wiki.client.ctx.WikiContext; +import org.ourproject.kune.wiki.client.ctx.WikiContextPresenter; +import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator; +import org.ourproject.kune.workspace.client.cxt.ContextPropEditor; +import org.ourproject.kune.workspace.client.editor.TextEditor; +import org.ourproject.kune.workspace.client.entitylogo.EntityLogo; +import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; +import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; +import org.ourproject.kune.workspace.client.themes.WsThemePresenter; + +import com.calclab.suco.client.ioc.decorator.Singleton; +import com.calclab.suco.client.ioc.module.AbstractModule; +import com.calclab.suco.client.ioc.module.Factory; + +public class WikiClientModule extends AbstractModule { + + @Override + public void onInstall() { + + register(ToolGroup.class, new Factory<WikiClientTool>(WikiClientTool.class) { + @Override + public WikiClientTool create() { + $(WikiClientActions.class); + return new WikiClientTool($(I18nUITranslationService.class), $(ToolSelector.class), + $(WsThemePresenter.class), $(WorkspaceSkeleton.class), $(ContentCapabilitiesRegistry.class)); + } + }); + + register(ToolGroup.class, new Factory<WikiClientActions>(WikiClientActions.class) { + @Override + public WikiClientActions create() { + return new WikiClientActions($(I18nUITranslationService.class), $(ContextNavigator.class), + $(Session.class), $(StateManager.class), $(DeferredCommandWrapper.class), + $$(ContentServiceAsync.class), $$(GroupServiceAsync.class), $$(FileUploader.class), + $(ContentActionRegistry.class), $(ContextActionRegistry.class), $$(FileDownloadUtils.class), + $(EntityLogo.class), $$(TextEditor.class), $(KuneErrorHandler.class), $(WikiViewer.class), + $$(ContextPropEditor.class)); + } + }); + + register(ToolGroup.class, new Factory<WikiContext>(WikiContext.class) { + @Override + public WikiContext create() { + final WikiContextPresenter presenter = new WikiContextPresenter($(StateManager.class), + $$(ContextNavigator.class), $$(ContextPropEditor.class)); + return presenter; + } + }); + + register(Singleton.class, new Factory<WikiViewer>(WikiViewer.class) { + @Override + public WikiViewer create() { + final WikiViewerPresenter presenter = new WikiViewerPresenter($(StateManager.class), $(Session.class), + $(I18nUITranslationService.class), $(ActionContentToolbar.class), + $(ContentActionRegistry.class), $$(FileDownloadUtils.class)); + final WikiViewerView view = new WikiViewerPanel($(WorkspaceSkeleton.class), + $(I18nTranslationService.class)); + presenter.init(view); + return presenter; + } + }); + + register(ToolGroup.class, new Factory<WikiFolderContent>(WikiFolderContent.class) { + @Override + public WikiFolderContent create() { + final WikiFolderContentPresenter presenter = new WikiFolderContentPresenter($(StateManager.class), + $(Session.class), $(ActionContentToolbar.class), $(ContentActionRegistry.class), + $(I18nTranslationService.class)); + final WikiFolderContentView view = new WikiFolderContentPanel($(WorkspaceSkeleton.class), + $(I18nTranslationService.class)); + presenter.init(view); + return presenter; + } + }); + } +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,65 @@ +/* + * + * 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.wiki.client; + +import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry; +import org.ourproject.kune.platf.client.tool.FoldableAbstractClientTool; +import org.ourproject.kune.platf.client.tool.ToolSelector; +import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; +import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; +import org.ourproject.kune.workspace.client.themes.WsThemePresenter; + +public class WikiClientTool extends FoldableAbstractClientTool { + public static final String TYPE_ROOT = "wiki.root"; + public static final String TYPE_FOLDER = "wiki.folder"; + public static final String TYPE_WIKIPAGE = "wiki.wikipage"; + public static final String TYPE_UPLOADEDFILE = "wiki.uploaded"; + public static final String NAME = "wiki"; + + public WikiClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector, + final WsThemePresenter wsThemePresenter, final WorkspaceSkeleton ws, + ContentCapabilitiesRegistry contentCapabilitiesRegistry) { + super(NAME, i18n.t("wiki"), toolSelector, wsThemePresenter, ws, contentCapabilitiesRegistry); + + // registerAclEditableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE); + registerAuthorableTypes(TYPE_WIKIPAGE, TYPE_UPLOADEDFILE); + registerDragableTypes(TYPE_WIKIPAGE, TYPE_FOLDER, TYPE_UPLOADEDFILE); + registerDropableTypes(TYPE_ROOT, TYPE_FOLDER); + // registerPublishModerableTypes(); + registerRateableTypes(TYPE_UPLOADEDFILE, TYPE_WIKIPAGE); + registerRenamableTypes(TYPE_FOLDER, TYPE_UPLOADEDFILE, TYPE_WIKIPAGE); + registerTageableTypes(TYPE_UPLOADEDFILE, TYPE_WIKIPAGE); + registerTranslatableTypes(TYPE_FOLDER, TYPE_UPLOADEDFILE, TYPE_WIKIPAGE); + + registerIcons(); + } + + public String getName() { + return NAME; + } + + protected void registerIcons() { + registerContentTypeIcon(TYPE_FOLDER, "images/nav/folder.png"); + // registerContentTypeIcon(TYPE_FOLDER, "images/nav/wiki.png"); + registerContentTypeIcon(TYPE_WIKIPAGE, "images/nav/wikipage.png"); + registerUploadTypesAndMimes(TYPE_UPLOADEDFILE); + } + +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContent.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContent.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContent.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,23 @@ +/* + * + * 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.wiki.client.cnt; + +public interface WikiFolderContent { +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPanel.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPanel.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,32 @@ +/* + * + * 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.wiki.client.cnt; + +import org.ourproject.kune.platf.client.services.I18nTranslationService; +import org.ourproject.kune.workspace.client.cnt.FoldableContentPanel; +import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; + +public class WikiFolderContentPanel extends FoldableContentPanel implements WikiFolderContentView { + + public WikiFolderContentPanel(WorkspaceSkeleton ws, I18nTranslationService i18n) { + super(ws, i18n); + super.setLabel(""); + } +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPresenter.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPresenter.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,64 @@ +/* + * + * 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.wiki.client.cnt; + +import org.ourproject.kune.chat.client.ChatClientTool; +import org.ourproject.kune.platf.client.actions.ActionRegistry; +import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; +import org.ourproject.kune.platf.client.dto.ContainerDTO; +import org.ourproject.kune.platf.client.dto.StateContainerDTO; +import org.ourproject.kune.platf.client.dto.StateToken; +import org.ourproject.kune.platf.client.services.I18nTranslationService; +import org.ourproject.kune.platf.client.state.Session; +import org.ourproject.kune.platf.client.state.StateManager; +import org.ourproject.kune.wiki.client.WikiClientTool; +import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter; + +public class WikiFolderContentPresenter extends FoldableContentPresenter implements WikiFolderContent { + + private WikiFolderContentView view; + private final I18nTranslationService i18n; + + public WikiFolderContentPresenter(StateManager stateManager, Session session, ActionContentToolbar toolbar, + final ActionRegistry<StateToken> actionRegistry, I18nTranslationService i18n) { + super(WikiClientTool.NAME, stateManager, session, toolbar, actionRegistry); + this.i18n = i18n; + } + + public void init(final WikiFolderContentView view) { + super.init(view); + this.view = view; + } + + @Override + protected void setState(StateContainerDTO state) { + if (state.getTypeId().equals(ChatClientTool.TYPE_ROOT)) { + ContainerDTO rootContainer = state.getRootContainer(); + if (rootContainer.getChilds().size() == 0 && rootContainer.getContents().size() == 0) { + view.setInfo(i18n.t("This wiki has no pages.")); + } else { + view.setInfo(""); + } + } else { + view.setInfo(""); + } + super.setState(state); + } +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentView.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentView.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,25 @@ +/* + * + * 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.wiki.client.cnt; + +import org.ourproject.kune.workspace.client.cnt.AbstractContentView; + +public interface WikiFolderContentView extends AbstractContentView { +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewer.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewer.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewer.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,25 @@ +/* + * + * 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.wiki.client.cnt; + +import org.ourproject.kune.workspace.client.cnt.FoldableContent; + +public interface WikiViewer extends FoldableContent { +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPanel.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPanel.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,30 @@ +/* + * + * 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.wiki.client.cnt; + +import org.ourproject.kune.platf.client.services.I18nTranslationService; +import org.ourproject.kune.workspace.client.cnt.FoldableContentPanel; +import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; + +public class WikiViewerPanel extends FoldableContentPanel implements WikiViewerView { + public WikiViewerPanel(final WorkspaceSkeleton ws, I18nTranslationService i18n) { + super(ws, i18n); + } +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPresenter.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPresenter.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,83 @@ +/* + * + * 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.wiki.client.cnt; + +import org.ourproject.kune.wiki.client.WikiClientTool; +import org.ourproject.kune.platf.client.actions.ContentActionRegistry; +import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; +import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO; +import org.ourproject.kune.platf.client.dto.StateContentDTO; +import org.ourproject.kune.platf.client.dto.StateToken; +import org.ourproject.kune.platf.client.state.Session; +import org.ourproject.kune.platf.client.state.StateManager; +import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; +import org.ourproject.kune.platf.client.ui.download.ImageSize; +import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter; +import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; + +import com.calclab.suco.client.ioc.Provider; + +public class WikiViewerPresenter extends FoldableContentPresenter implements WikiViewer { + private WikiViewerView view; + private final Provider<FileDownloadUtils> downloadProvider; + + public WikiViewerPresenter(StateManager stateManager, Session session, I18nUITranslationService i18n, + ActionContentToolbar toolbar, ContentActionRegistry actionRegistry, + Provider<FileDownloadUtils> downloadProvider) { + super(WikiClientTool.NAME, stateManager, session, toolbar, actionRegistry); + this.downloadProvider = downloadProvider; + } + + public void init(WikiViewerView view) { + super.init(view); + this.view = view; + } + + @Override + protected void setState(StateContentDTO state) { + super.setState(state); + setContent(state, WikiClientTool.TYPE_UPLOADEDFILE); + } + + private void setContent(StateContentDTO state, String uploadedfileType) { + String typeId = state.getTypeId(); + String contentBody = state.getContent(); + StateToken token = state.getStateToken(); + BasicMimeTypeDTO mimeType = state.getMimeType(); + if (typeId.equals(uploadedfileType)) { + if (mimeType != null) { + FileDownloadUtils fileDownloadUtils = downloadProvider.get(); + if (mimeType.getType().equals("image")) { + view.showImage(fileDownloadUtils.getImageUrl(token), fileDownloadUtils.getImageResizedUrl(token, + ImageSize.sized)); + } else if (mimeType.toString().equals("text/plain") || mimeType.toString().equals("application/pdf")) { + view.setContent(contentBody); + } else { + view.setContent(""); + } + } else { + view.setContent(""); + } + } else { + view.setContent(contentBody); + } + view.attach(); + } +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerView.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerView.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,30 @@ +/* + * + * 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.wiki.client.cnt; + +import org.ourproject.kune.workspace.client.cnt.AbstractContentView; + +public interface WikiViewerView extends AbstractContentView { + + void setContent(String content); + + void showImage(String imageUrl, String imageResizedUrl); + +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContext.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContext.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContext.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,24 @@ +/* + * + * 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.wiki.client.ctx; + +public interface WikiContext { + +} Added: trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContextPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContextPresenter.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContextPresenter.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,36 @@ +/* + * + * 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.wiki.client.ctx; + +import org.ourproject.kune.wiki.client.WikiClientTool; +import org.ourproject.kune.platf.client.state.StateManager; +import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator; +import org.ourproject.kune.workspace.client.cxt.ContextPropEditor; +import org.ourproject.kune.workspace.client.cxt.FoldableContextPresenter; + +import com.calclab.suco.client.ioc.Provider; + +public class WikiContextPresenter extends FoldableContextPresenter implements WikiContext { + public WikiContextPresenter(final StateManager stateManager, + final Provider<ContextNavigator> contextNavigatorProvider, + final Provider<ContextPropEditor> contextPropEditorProvider) { + super(WikiClientTool.NAME, stateManager, contextNavigatorProvider, contextPropEditorProvider); + } +} Added: trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerModule.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerModule.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,29 @@ +/* + * + * 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.wiki.server; + +import com.google.inject.Binder; +import com.google.inject.Module; + +public class WikiServerModule implements Module { + public void configure(final Binder binder) { + binder.bind(WikiServerTool.class).asEagerSingleton(); + } +} Added: trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerTool.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerTool.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerTool.java 2008-11-25 16:52:11 UTC (rev 969) @@ -0,0 +1,148 @@ +/* + * + * 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.wiki.server; + +import org.ourproject.kune.platf.client.errors.ContainerNotPermittedException; +import org.ourproject.kune.platf.client.errors.ContentNotPermittedException; +import org.ourproject.kune.platf.client.services.I18nTranslationService; +import org.ourproject.kune.platf.server.content.ContainerManager; +import org.ourproject.kune.platf.server.content.ContentManager; +import org.ourproject.kune.platf.server.domain.AccessLists; +import org.ourproject.kune.platf.server.domain.Container; +import org.ourproject.kune.platf.server.domain.Content; +import org.ourproject.kune.platf.server.domain.ContentStatus; +import org.ourproject.kune.platf.server.domain.Group; +import org.ourproject.kune.platf.server.domain.GroupListMode; +import org.ourproject.kune.platf.server.domain.ToolConfiguration; +import org.ourproject.kune.platf.server.domain.User; +import org.ourproject.kune.platf.server.manager.ToolConfigurationManager; +import org.ourproject.kune.platf.server.tool.ServerTool; +import org.ourproject.kune.platf.server.tool.ServerToolRegistry; +import org.ourproject.kune.platf.server.tool.ServerToolTarget; + +import com.google.inject.Inject; + +public class WikiServerTool implements ServerTool { + public static final String TYPE_ROOT = "wiki.root"; + public static final String TYPE_FOLDER = "wiki.folder"; + public static final String TYPE_WIKIPAGE = "wiki.wikipage"; + public static final String TYPE_UPLOADEDFILE = "wiki.uploaded"; + + public static final String NAME = "wiki"; + public static final String ROOT_NAME = "wiki"; + + private final ContentManager contentManager; + private final ToolConfigurationManager configurationManager; + private final ContainerManager containerManager; + private final I18nTranslationService i18n; + + @Inject + public WikiServerTool(final ContentManager contentManager, final ContainerManager containerManager, + final ToolConfigurationManager configurationManager, final I18nTranslationService translationService) { + this.contentManager = contentManager; + this.containerManager = containerManager; + this.configurationManager = configurationManager; + this.i18n = translationService; + } + + public void checkTypesBeforeContainerCreation(String parentTypeId, String typeId) { + checkContainerTypeId(parentTypeId, typeId); + } + + public void checkTypesBeforeContentCreation(String parentTypeId, String typeId) { + checkContentTypeId(parentTypeId, typeId); + } + + public String getName() { + return NAME; + } + + public String getRootName() { + return ROOT_NAME; + } + + public ServerToolTarget getTarget() { + return ServerToolTarget.forBoth; + } + + public Group initGroup(final User user, final Group group) { + final ToolConfiguration config = new ToolConfiguration(); + final Container rootFolder = containerManager.createRootFolder(group, NAME, ROOT_NAME, TYPE_ROOT); + config.setRoot(rootFolder); + group.setToolConfig(NAME, config); + configurationManager.persist(config); + final Content descriptor = contentManager.createContent(i18n.t("Wiki page sample"), "", user, rootFolder, + WikiServerTool.TYPE_WIKIPAGE); + descriptor.addAuthor(user); + descriptor.setLanguage(user.getLanguage()); + descriptor.setTypeId(TYPE_WIKIPAGE); + descriptor.setStatus(ContentStatus.publishedOnline); + contentManager.save(user, descriptor, + i18n.t("This is only a wiki page sample. You can edit or rename it but also any other user.")); + return group; + } + + public void onCreateContainer(final Container container, final Container parent) { + if (container.getTypeId().equals(TYPE_FOLDER)) { + AccessLists wikiAcl = new AccessLists(); + wikiAcl.getAdmins().setMode(GroupListMode.NORMAL); + wikiAcl.getAdmins().add(container.getOwner()); + wikiAcl.getEditors().setMode(GroupListMode.EVERYONE); + wikiAcl.getViewers().setMode(GroupListMode.EVERYONE); + container.setAccessLists(wikiAcl); + } + } + + public void onCreateContent(final Content content, final Container parent) { + } + + @Inject + public void register(final ServerToolRegistry registry) { + registry.register(this); + } + + void checkContainerTypeId(final String parentTypeId, final String typeId) { + if (typeId.equals(TYPE_FOLDER)) { + // ok valid container + if ((typeId.equals(TYPE_FOLDER) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))) { + // ok + } else { + throw new ContainerNotPermittedException(); + } + } else { + throw new ContainerNotPermittedException(); + } + } + + void checkContentTypeId(final String parentTypeId, final String typeId) { + if (typeId.equals(TYPE_WIKIPAGE) || typeId.equals(TYPE_UPLOADEDFILE)) { + // ok valid content + boolean parentIsFolderOrRoot = parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER); + if ((typeId.equals(TYPE_UPLOADEDFILE) && parentIsFolderOrRoot) + || (typeId.equals(TYPE_WIKIPAGE) && parentIsFolderOrRoot)) { + // ok + } else { + throw new ContentNotPermittedException(); + } + } else { + throw new ContentNotPermittedException(); + } + } +} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java 2008-11-25 16:52:11 UTC (rev 969) @@ -327,8 +327,9 @@ register(addFolder, position, registerInTypes); } - protected void createNewContentAction(final String typeId, String iconUrl, final String description, - final String parentMenuTitle, Position position, String... registerInTypes) { + protected ActionToolbarMenuAndItemDescriptor<StateToken> createNewContentAction(final String typeId, + String iconUrl, final String description, final String parentMenuTitle, Position position, + String... registerInTypes) { final ActionToolbarMenuAndItemDescriptor<StateToken> addContent = new ActionToolbarMenuAndItemDescriptor<StateToken>( AccessRolDTO.Editor, ActionToolbarPosition.topbar, new Listener<StateToken>() { public void onEvent(final StateToken token) { @@ -348,6 +349,7 @@ addContent.setParentSubMenuTitle(i18n.t("New")); addContent.setIconUrl(iconUrl); register(addContent, position, registerInTypes); + return addContent; } protected void createPostSessionInitActions() { Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/AbstractContentView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/AbstractContentView.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/AbstractContentView.java 2008-11-25 16:52:11 UTC (rev 969) @@ -6,4 +6,6 @@ void detach(); + void setInfo(String info); + } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java 2008-11-25 16:52:11 UTC (rev 969) @@ -29,13 +29,13 @@ import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.MouseListenerAdapter; +import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; import com.gwtext.client.core.Ext; import com.gwtext.client.core.Function; import com.gwtext.client.core.FxConfig; public class EntityLicensePanel implements EntityLicenseView { - private final Label copyright; private final Image licenseImage; private final Label licenseLabel; private final I18nTranslationService i18n; @@ -46,14 +46,12 @@ final WorkspaceSkeleton ws) { this.i18n = i18n; this.ws = ws; - copyright = new Label(); licenseImage = new Image(); licenseLabel = new Label(); licenseBar = new SimpleToolbar(); licenseBar.addSpacer(); - licenseBar.add(licenseImage); - licenseBar.add(copyright); + licenseBar.add(licenseImage, VerticalPanel.ALIGN_TOP); licenseBar.add(licenseLabel); final ClickListener clickListener = new ClickListener() { @@ -64,7 +62,6 @@ licenseLabel.addClickListener(clickListener); licenseImage.addClickListener(clickListener); - copyright.setVisible(false); licenseLabel.setVisible(false); MouseListenerAdapter mouseListenerAdapter = new MouseListenerAdapter() { @@ -75,16 +72,15 @@ @Override public void onMouseLeave(Widget sender) { - fade(false); + // fade(false); } }; licenseImage.addMouseListener(mouseListenerAdapter); - copyright.addMouseListener(mouseListenerAdapter); licenseLabel.addMouseListener(mouseListenerAdapter); - copyright.addStyleName("kune-Margin-Large-l"); - licenseLabel.setStyleName("k-entitylicensepanel-licensetext"); + licenseLabel.addStyleName("kune-Margin-Large-l"); + licenseLabel.setStyleName("k-elp-limg"); licenseImage.setStyleName("k-elp-limg"); } @@ -105,33 +101,24 @@ } public void showLicense(final String groupName, final LicenseDTO licenseDTO) { - copyright.setText(i18n.t("© [%s], under license: ", groupName)); - licenseLabel.setText(licenseDTO.getLongName()); + licenseLabel.setText(i18n.t("© [%s], under license: [%s]", groupName, licenseDTO.getLongName())); licenseImage.setUrl(licenseDTO.getImageUrl()); fade(false); } private void fade(final boolean in) { - if (copyright.isVisible() != in) { - FxConfig fxConfig = new FxConfig(2); - FxConfig fxConfigVisible = new FxConfig(2); + if (licenseLabel.isVisible() != in) { + FxConfig fxConfigVisible = new FxConfig(1); fxConfigVisible.setAfterStyle(new Function() { public void execute() { - setVisible(in); + licenseLabel.setVisible(in); } }); if (in) { - Ext.get(copyright.getElement()).fadeIn(fxConfig); Ext.get(licenseLabel.getElement()).fadeIn(fxConfigVisible); } else { - Ext.get(copyright.getElement()).fadeOut(fxConfig); Ext.get(licenseLabel.getElement()).fadeOut(fxConfigVisible); } } } - - private void setVisible(boolean visible) { - copyright.setVisible(visible); - licenseLabel.setVisible(visible); - } } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java 2008-11-25 16:52:11 UTC (rev 969) @@ -80,7 +80,7 @@ anchorLayoutPanel.add(entityTools, new AnchorLayoutData("100%")); // height: is 25 * number of tools :-( finding a way to make this // automatic - anchorLayoutPanel.add(entitySummary, new AnchorLayoutData("100% -75")); + anchorLayoutPanel.add(entitySummary, new AnchorLayoutData("100% -" + 4 * 25)); mainFitPanel.add(anchorLayoutPanel); } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/skel/SimpleToolbar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/skel/SimpleToolbar.java 2008-11-25 13:33:20 UTC (rev 968) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/skel/SimpleToolbar.java 2008-11-25 16:52:11 UTC (rev 969) @@ -23,6 +23,7 @@ import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; +import com.google.gwt.user.client.ui.HasVerticalAlignment.VerticalAlignmentConstant; public class SimpleToolbar extends Composite { @@ -42,6 +43,11 @@ childPanel.setCellVerticalAlignment(widget, VerticalPanel.ALIGN_MIDDLE); } + public void add(final Widget widget, VerticalAlignmentConstant valign) { + childPanel.add(widget); + childPanel.setCellVerticalAlignment(widget, valign); + } + public Widget addFill() { final Label emptyLabel = new Label(""); this.add(emptyLabel);