[kune-commits] r952 - in trunk: doc img
src/main/java/org/ourproject/kune/app/public
src/main/java/org/ourproject/kune/app/public/css
src/main/java/org/ourproject/kune/app/public/images
src/main/java/org/ourproject/kune/chat/client
src/main/java/org/ourproject/kune/docs/client
src/main/java/org/ourproject/kune/docs/client/ctx/admin
src/main/java/org/ourproject/kune/platf/client/app
src/main/java/org/ourproject/kune/platf/client/dto
src/main/java/org/ourproject/kune/platf/client/registry
src/main/java/org/ourproject/kune/platf/client/services
src/main/java/org/ourproject/kune/platf/client/tool
src/main/java/org/ourproject/kune/platf/client/ui/rate
src/main/java/org/ourproject/kune/platf/server/state
src/main/java/org/ourproject/kune/workspace/client
src/main/java/org/ourproject/kune/workspace/client/ctxedit
src/main/java/org/ourproject/kune/workspace/client/cxt
src/test/java/org/ourproject/kune/platf/integration/content
vjrj
vjrj at ourproject.org
Mon Nov 17 11:14:36 CET 2008
Author: vjrj
Date: 2008-11-17 11:14:27 +0100 (Mon, 17 Nov 2008)
New Revision: 952
Added:
trunk/img/kune-anim.gif
trunk/img/kune-anim.xcf
trunk/src/main/java/org/ourproject/kune/app/public/images/kune-anim.gif
trunk/src/main/java/org/ourproject/kune/platf/client/registry/AclEditableRegistry.java
trunk/src/main/java/org/ourproject/kune/platf/client/registry/AuthorableRegistry.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ctxedit/
trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AccessListsPanel.java
Removed:
trunk/src/main/java/org/ourproject/kune/workspace/client/ctxadmin/
trunk/src/main/java/org/ourproject/kune/workspace/client/ctxedit/AccessListsPanel.java
Modified:
trunk/doc/kune-tools-and-functionality-summary.ods
trunk/src/main/java/org/ourproject/kune/app/public/Kune.html
trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
trunk/src/main/java/org/ourproject/kune/app/public/css/kune.css
trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java
trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java
trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java
trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorPanel.java
trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorPresenter.java
trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorView.java
trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java
trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateContentDTO.java
trunk/src/main/java/org/ourproject/kune/platf/client/registry/ContentCapabilitiesRegistry.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneRegistryModule.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneWorkspaceModule.java
trunk/src/main/java/org/ourproject/kune/platf/client/tool/FoldableAbstractClientTool.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RatePresenter.java
trunk/src/main/java/org/ourproject/kune/platf/server/state/StateContent.java
trunk/src/main/java/org/ourproject/kune/platf/server/state/StateServiceDefault.java
trunk/src/test/java/org/ourproject/kune/platf/integration/content/ContentServiceVariousTest.java
Log:
Incomplete - task New Register of type_id and capabilities
Modified: trunk/doc/kune-tools-and-functionality-summary.ods
===================================================================
(Binary files differ)
Added: trunk/img/kune-anim.gif
===================================================================
(Binary files differ)
Property changes on: trunk/img/kune-anim.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/kune-anim.xcf
===================================================================
(Binary files differ)
Property changes on: trunk/img/kune-anim.xcf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/org/ourproject/kune/app/public/Kune.html
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/Kune.html 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/app/public/Kune.html 2008-11-17 10:14:27 UTC (rev 952)
@@ -20,33 +20,67 @@
<link rel="shortcut icon" href="images/favicon.ico" />
<title>Kune</title>
<style type="text/css">
+#kuneinitialcurtain {
+ position: absolute;
+ left: 0px;
+ top: 0px;
+ width: 100%;
+ height: 100%;
+ background-color: #FFF;
+ z-index: 9999;
+}
#kuneprogresspanel {
- position: absolute;
- top: 2px;
- left: 2px;
- z-index: 30000;
+ position: absolute;
+ top: 2px;
+ left: 2px;
+ z-index: 9998;
}
.kune-Progress {
- background: #E5FF80;
- border: 1px solid #E5FF80;
- white-space: nowrap;
- height: 16px;
- padding: 0 3px;
+ background: #E5FF80;
+ border: 1px solid #E5FF80;
+ white-space: nowrap;
+ height: 16px;
+ padding: 0 3px;
}
#kuneprogresstext {
-font-family:arial,helvetica,clean,sans-serif;
-font-size-adjust:none;
-font-style:normal;
-font-variant:normal;
-font-weight:normal;
-line-height:1.22;
+ font-family: arial, helvetica, clean, sans-serif;
+ font-size-adjust: none;
+ font-style: normal;
+ font-variant: normal;
+ font-weight: normal;
+ line-height: 1.22;
}
+#kuneloading {
+ position: absolute;
+ left: 45%;
+ top: 40%;
+ padding: 0px;
+ z-index: 20001;
+ height: auto;
+ border: 1px solid #ccc;
+}
+
+#kuneloading a {
+ color: #225588;
+}
+
+#kuneloading .kuneloading-indicator {
+ background: white;
+ color: #444;
+ font: bold 13px tahoma, arial, helvetica;
+ padding: 5px;
+ margin: 0;
+ height: auto;
+}
+
+#kuneloading-msg {
+ font: normal 10px arial, tahoma, sans-serif;
+}
</style>
-
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="js/pngfix.js"></script>
<![endif]-->
@@ -56,7 +90,7 @@
<script type="text/javascript" language="javascript"
src="org.ourproject.kune.app.Kune.nocache.js"></script>
- <!-- Ext localization javascript -->
+<!-- Ext localization javascript -->
<script type="text/javascript" id="extlocale"></script>
<script type="text/javascript">
@@ -72,21 +106,43 @@
}
</script>
<iframe id="__gwt_historyFrame" style="width: 0; height: 0; border: 0"></iframe>
-<iframe src="" id="__download" style="width:0;height:0;border:0"></iframe>
-
+<iframe src="" id="__download" style="width: 0; height: 0; border: 0"></iframe>
+<div id="kuneinitialcurtain"></div>
<div class="" id="kuneprogresspanel" style="">
-<table cellspacing="0" cellpadding="0" border="0" style="height: 16px; margin-top: 5px; margin-left: 5px;" summary="Starting">
+<table cellspacing="0" cellpadding="0" border="0"
+ style="margin-top: 5px; margin-left: 5px;"
+ summary="Starting">
<tbody>
<tr>
- <td height="16" align="left" class="kune-Progress" style="vertical-align: top;"><img style="height: 16px; width: 16px;" src="images/spin-kune-thund-green.gif" alt="progress spin"/></td>
+ <td height="16" align="left" class="kune-Progress"
+ style="vertical-align: top;"><img
+ style="height: 16px; width: 16px;"
+ src="images/spin-kune-thund-green.gif" alt="progress spin" /></td>
<td align="left" class="kune-Progress" style="vertical-align: top;">
<div id="kuneprogresstext" class="gwt-Label">Loading</div>
</td>
- <td height="16" width="100%" align="left" style="vertical-align: top;"/>
+ <td height="16" width="100%" align="left"
+ style="vertical-align: top;" />
</tr>
</tbody>
</table>
</div>
-<div id="kuneinitialcurtain"></div>
+<div id="kuneloading">
+ <div class="kuneloading-indicator">
+ <img src="images/kune-anim.gif" width="35" height="35" alt="kune-loading"
+ style="margin-right:3px;float:left;vertical-align:top;"/>kune <br/>
+ <span id="kuneloading-msg">Starting...</span></div>
+</div>
+
+<!--include the Ext CSS, and use the gray theme-->
+
+<script type="text/javascript">document.getElementById('kuneloading-msg').innerHTML = 'Loading ...';</script>
+
+<!--include the application JS-->
+<script type="text/javascript">document.getElementById('kuneloading-msg').innerHTML = 'Starting...';</script>
+
+<!--hide loading message-->
+<!-- <script type="text/javascript">Ext.get('loading').fadeOut({remove: true, duration:4});</script> -->
+
</body>
</html>
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-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/all.css 2008-11-17 10:14:27 UTC (rev 952)
@@ -20,7 +20,7 @@
* licensing at extjs.com
*
* http://extjs.com/license
- */.x-panel{border-style:solid;border-color:#d0d0d0;}.x-panel-header{color:#333;border:1px solid #d0d0d0;background-image:url(../js/ext/resources/images/gray/panel/white-top-bottom.gif);}.x-panel-body{border-color:#d0d0d0;}.x-panel-bbar .x-toolbar{border-color:#d0d0d0;}.x-panel-tbar .x-toolbar{border-color:#d0d0d0;}.x-panel-tbar-noheader .x-toolbar,.x-panel-mc .x-panel-tbar .x-toolbar{border-color:#d0d0d0;}.x-panel-body-noheader,.x-panel-mc .x-panel-body{border-color:#d0d0d0;}.x-panel-tl .x-panel-header{color:#333;}.x-panel-tc{background-image:url(../js/ext/resources/images/gray/panel/top-bottom.gif);}.x-panel-tl{background-image:url(../js/ext/resources/images/gray/panel/corners-sprite.gif);border-color:#d0d0d0;}.x-panel-tr{background-image:url(../js/ext/resources/images/gray/panel/corners-sprite.gif);}.x-panel-bc{background-image:url(../js/ext/resources/images/gray/panel/top-bottom.gif);}.x-panel-bl{background-image:url(../js/ext/resources/images/gray/panel/corners-sprite.gif);}.x-panel-br{background-image:url(../js/ext/resources/images/gray/panel/corners-sprite.gif);}.x-panel-mc{background:#f1f1f1;}.x-panel-mc .x-panel-body{background:transparent;border:0 none;}.x-panel-ml{background-image:url(../js/ext/resources/images/gray/panel/left-right.gif);}.x-panel-mr{background-image:url(../js/ext/resources/images/gray/panel/left-right.gif);}/* Tools */.x-tool{background-image:url(../js/ext/resources/images/gray/panel/tool-sprites.gif);}/* Ghosting */.x-panel-ghost{background:#e0e0e0;}.x-panel-ghost ul{border-color:#b0b0b0;}.x-grid-panel .x-panel-mc .x-panel-body{border:1px solid #d0d0d0;}/* Buttons */.x-btn-left{background-image:url(../js/ext/resources/images/gray/button/btn-sprite.gif);}.x-btn-right{background-image:url(../js/ext/resources/images/gray/button/btn-sprite.gif);}.x-btn-center{background-image:url(../js/ext/resources/images/gray/button/btn-sprite.gif);}/* Layout classes */.x-border-layout-ct{background:#f0f0f0;}.x-accordion-hd{background-image:url(../js/ext/resources/images/gray/panel/light-hd.gif);}.x-layout-collapsed{background-color:#eee;border-color:#e0e0e0;}.x-layout-collapsed-over{background-color:#fbfbfb;}/* qtips */.x-tip .x-tip-top{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-top-left{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-top-right{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-ft{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-ft-left{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-ft-right{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-bd-left{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-bd-right{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}/* Toolbars */.x-toolbar{border-color:#d0d0d0;background:#f0f4f5 url(../js/ext/resources/images/gray/toolbar/bg.gif) repeat-x top left;}.x-toolbar button{color:#444;}.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button{background-image:url(../js/ext/resources/images/gray/toolbar/btn-arrow.gif);}.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button{background-image:url(../js/ext/resources/images/gray/toolbar/btn-arrow.gif);}.x-toolbar .x-btn-over .x-btn-left{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .x-btn-over .x-btn-right{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .x-btn-over .x-btn-center{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .x-btn-over button{color:#111;}.x-toolbar .x-btn-click .x-btn-left,.x-toolbar .x-btn-pressed .x-btn-left,.x-toolbar .x-btn-menu-active .x-btn-left{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .x-btn-click .x-btn-right,.x-toolbar .x-btn-pressed .x-btn-right,.x-toolbar .x-btn-menu-active .x-btn-right{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .x-btn-click .x-btn-center,.x-toolbar .x-btn-pressed .x-btn-center,.x-toolbar .x-btn-menu-active .x-btn-center{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .ytb-sep{background-image:url(../js/ext/resources/images/default/grid/grid-split.gif);}/* Tabs */.x-tab-panel-header,.x-tab-panel-footer{background:#EAEAEA;border-color:#d0d0d0;}.x-tab-panel-header{border-color:#d0d0d0;}.x-tab-panel-footer{border-color:#d0d0d0;}ul.x-tab-strip-top{background:#dbdbdb url(../js/ext/resources/images/gray/tabs/tab-strip-bg.gif) repeat-x left top;border-color:#d0d0d0;padding-top:2px;}ul.x-tab-strip-bottom{background-image:url(../js/ext/resources/images/gray/tabs/tab-strip-btm-bg.gif);border-color:#d0d0d0;}.x-tab-strip span.x-tab-strip-text{color:#333;}.x-tab-strip-over span.x-tab-strip-text{color:#111;}.x-tab-strip-active span.x-tab-strip-text{color:#333;}.x-tab-strip-disabled .x-tabs-text{color:#AAA;}.x-tab-strip-top .x-tab-right{background-image:url(../js/ext/resources/images/gray/tabs/tabs-sprite.gif);}.x-tab-strip-top .x-tab-left{background-image:url(../js/ext/resources/images/gray/tabs/tabs-sprite.gif);}.x-tab-strip-top .x-tab-strip-inner{background-image:url(../js/ext/resources/images/gray/tabs/tabs-sprite.gif);}.x-tab-strip-bottom .x-tab-right{background-image:url(../js/ext/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif);}.x-tab-strip-bottom .x-tab-left{background-image:url(../js/ext/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif);}.x-tab-strip-bottom .x-tab-strip-active .x-tab-right{background-image:url(../js/ext/resources/images/gray/tabs/tab-btm-right-bg.gif);}.x-tab-strip-bottom .x-tab-strip-active .x-tab-left{background-image:url(../js/ext/resources/images/gray/tabs/tab-btm-left-bg.gif);}.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close{background-image:url(../js/ext/resources/images/gray/tabs/tab-close.gif);}.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{background-image:url(../js/ext/resources/images/gray/tabs/tab-close.gif);}.x-tab-panel-body{border-color:#d0d0d0;background:#fff;}.x-tab-panel-bbar .x-toolbar{border-color:#d0d0d0;}.x-tab-panel-tbar .x-toolbar{border-color:#d0d0d0;}.x-tab-panel-header-plain .x-tab-strip-spacer{border-color:#d0d0d0;background:#eaeaea;}.x-tab-scroller-left{background-image:url(../js/ext/resources/images/gray/tabs/scroll-left.gif);border-color:#aeaeae;}.x-tab-scroller-right{background-image:url(../js/ext/resources/images/gray/tabs/scroll-right.gif);border-color:#aeaeae;}/* Window */.x-window-proxy{background:#e0e0e0;border-color:#b0b0b0;}.x-window-tl .x-window-header{color:#555;}.x-window-tc{background-image:url(../js/ext/resources/images/gray/window/top-bottom.png);}.x-window-tl{background-image:url(../js/ext/resources/images/gray/window/left-corners.png);}.x-window-tr{background-image:url(../js/ext/resources/images/gray/window/right-corners.png);}.x-window-bc{background-image:url(../js/ext/resources/images/gray/window/top-bottom.png);}.x-window-bl{background-image:url(../js/ext/resources/images/gray/window/left-corners.png);}.x-window-br{background-image:url(../js/ext/resources/images/gray/window/right-corners.png);}.x-window-mc{border:1px solid #d0d0d0;background:#e8e8e8;}.x-window-ml{background-image:url(../js/ext/resources/images/gray/window/left-right.png);}.x-window-mr{background-image:url(../js/ext/resources/images/gray/window/left-right.png);}.x-panel-ghost .x-window-tl{border-color:#d0d0d0;}.x-panel-collapsed .x-window-tl{border-color:#d0d0d0;}.x-window-plain .x-window-mc{background:#e8e8e8;border-right:1px solid #eee;border-bottom:1px solid #eee;border-top:1px solid #d0d0d0;border-left:1px solid #d0d0d0;}.x-window-plain .x-window-body{border-left:1px solid #eee;border-top:1px solid #eee;border-bottom:1px solid #d0d0d0;border-right:1px solid #d0d0d0;background:transparent!important;}body.x-body-masked .x-window-mc,body.x-body-masked .x-window-plain .x-window-mc{background-color:#e4e4e4;}/* misc */.x-html-editor-wrap{border-color:#d0d0d0;}/* Borders go last for specificity */.x-panel-noborder .x-panel-body-noborder{border-width:0;}.x-panel-noborder .x-panel-header-noborder{border-width:0;border-bottom:1px solid #d0d0d0;}.x-panel-noborder .x-panel-tbar-noborder .x-toolbar{border-width:0;border-bottom:1px solid #d0d0d0;}.x-panel-noborder .x-panel-bbar-noborder .x-toolbar{border-width:0;border-top:1px solid #d0d0d0;}.x-window-noborder .x-window-mc{border-width:0;}.x-window-plain .x-window-body-noborder{border-width:0;}.x-tab-panel-noborder .x-tab-panel-body-noborder{border-width:0;}.x-tab-panel-noborder .x-tab-panel-header-noborder{border-top-width:0;border-left-width:0;border-right-width:0;}.x-tab-panel-noborder .x-tab-panel-footer-noborder{border-bottom-width:0;border-left-width:0;border-right-width:0;}.x-tab-panel-bbar-noborder .x-toolbar{border-width:0;border-top:1px solid #d0d0d0;}.x-tab-panel-tbar-noborder .x-toolbar{border-width:0;border-bottom:1px solid #d0d0d0;}.kunebody{background-color:#FFF;color:#000;font-family:arial, sans;margin:5px;}#kuneinitialcurtain{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#FFF;z-index:9999;}/* Global styles */.gwt-HorizontalSplitPanel .hsplitter{cursor:e-resize;width:6px;}.gwt-DialogBox{border:8px solid #C3D9FF;border:2px outset;background-color:#FFF;}.gwt-DialogBox .Caption{background-color:#C3D9FF;font-size:85%;font-weight:700;padding:3px;margin:2px;cursor:default;}.gwt-MenuBar{background-color:#F2F2F2;border:1px solid #999;vertical-align:middle;padding:5px 0;}.gwt-MenuBar .gwt-MenuItem{cursor:pointer;padding:1px 10px;white-space:nowrap;}.gwt-MenuBar .gwt-MenuItem img{vertical-align:middle;margin-right:3px;}.gwt-MenuBar .gwt-MenuItem{background-color:#F2F2F2;}.gwt-MenuBar .gwt-MenuItem-selected{background-color:#FFB958;}.kune-MenuBar .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;cursor:hand;white-space:nowrap;padding:0 10px;}.kune-MenuBar .gwt-MenuItem-selected{background:transparent url(img/button-bg-soft.gif) repeat-x 0 0;color:#963;}.kune-expandHoriz{width:100%;}.kune-expandVert{height:100%;}.kune-floatleft{float:left;}.kune-floatright{float:right;}/* Deprecated */.kune-Default-Form{margin:10px;}.kune-valignmiddle{vertical-align:middle;}fieldset{border:1px solid #B5B8C8;/* margin-bottom:10px; */padding:10px 10px 5px;}legend{color:#15428B;font-size:85%;font-size-adjust:none;font-style:normal;font-variant:normal;font-weight:700;line-height:normal;}.gwt-RadioButton input{margin:0 3px;vertical-align:middle;}.gwt-RadioButton label{margin:0 3px;vertical-align:middle;}.kune-pointer{cursor:pointer;}.kuneLabelPre{white-space:pre!important;}/* Buttons */.kune-CustomPushButton-space{margin-top:3px;margin-bottom:3px;}.kune-CustomPushButton{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:0 12px;}.kune-CustomPushButton-up{color:#161616;}.kune-CustomPushButton-down{color:#000;}.kune-CustomPushButton-up-hovering{color:#161616;background:transparent url(img/button-bg-soft.gif) repeat-x 0 0;}.kune-CustomPushButton-down-hovering{color:#000;}.kune-CustomPushButton-up-disabled{background:transparent url(img/button-bg-soft.gif) repeat-x 0 0;color:#E0E0E0;cursor:default;}.kune-CustomPushButton-down-disabled{background:transparent url(img/button-bg-soft.gif) repeat-x 0 0;color:#E0E0E0;cursor:default;}.kune-Button-Large-lrSpace{margin-left:12px;margin-right:12px;}.kune-Button-Large-rSpace{margin-right:12px;}.kune-Button-Large-lSpace{margin-left:12px;}.kune-Button-Large-tbSpace{margin-top:12px;margin-bottom:12px;}.kune-Button-Small-lrSpace{margin-left:10px;margin-right:10px;}.kune-Button-Small-rSpace{margin-right:10px;}.kune-Button-Small-lSpace{margin-left:10px;}.kune-Button-Small-tbSpace{margin-top:10px;margin-bottom:10px;}.kune-Button-Mini-lSpace{margin-left:8px;}.kune-Button-Mini-lrSpace{margin-left:8px;margin-right:8px;}.kune-Button-Mini-rSpace{margin-right:8px;}.kune-Button-Mini-tbSpace{margin-top:8px;margin-bottom:8px;}.kune-IconHyperlink{}.kune-IconHyperlink a:link{/* text-decoration: underline; */color:green;}.kune-IconHyperlink a:hover{text-decoration:underline;}.kune-IconHyperlink a:visited{color:olive;}.kune-IconHyperlink img{margin-right:4px;vertical-align:middle;}.kune-IconLabel{}.kune-IconLabel img{margin-right:4px;vertical-align:middle;}.kune-link{text-decoration:underline;color:green;cursor:pointer;}/* DropDowns */.kune-DropDownOuter{background-color:green;}.kune-DropDownInner{margin:0 3px 1px;background:green;background-color:#FFF;padding:3px;}.kune-DropDownLabel{color:#FFF;cursor:pointer;}.kune-DropDownLabel .gwt-Label{margin:0 5px 0 0;width:100%;}.kune-DropDownLabel img{margin:0 3px 0 1px;}.kune-IconLabel{color:green;}.kune-IconLabel img{margin-right:4px;vertical-align:middle;}/* Used in multi chat panel status change */.x-menu-item img{margin-right:4px;vertical-align:middle;}/* Margins */.kune-Margin-40-trbl{margin:40px;}.kune-Margin-40-lr{margin-left:40px;margin-right:40px;}.kune-Margin-40-tl{margin-top:40px;margin-left:40px;}.kune-Margin-40-tb{margin-top:40px;margin-bottom:40px;}.kune-Margin-40-t{margin-top:40px;}.kune-Margin-40-r{margin-right:40px;}.kune-Margin-40-l{margin-left:40px;}.kune-Margin-20-trbl{margin:20px;}.kune-Margin-20-lr{margin-left:20px;margin-right:20px;}.kune-Margin-20-tl{margin-top:20px;margin-left:20px;}.kune-Margin-20-tb{margin-top:20px;margin-bottom:20px;}.kune-Margin-20-t{margin-top:20px;}.kune-Margin-20-r{margin-right:20px;}.kune-Margin-20-l{margin-left:20px;}.kune-Margin-Large-trbl{margin:10px;}.kune-Margin-Large-lr{margin-left:10px;margin-right:10px;}.kune-Margin-Large-tl{margin-top:10px;margin-left:10px;}.kune-Margin-Large-tb{margin-top:10px;margin-bottom:10px;}.kune-Margin-Large-t{margin-top:10px;}.kune-Margin-Large-r{margin-right:10px;}.kune-Margin-Large-l{margin-left:10px;}.kune-Margin-7-trbl{margin:7px;}.kune-Margin-7-lr{margin-left:7px;margin-right:7px;}.kune-Margin-7-tl{margin-top:7px;margin-left:7px;}.kune-Margin-7-tb{margin-top:7px;margin-bottom:7px;}.kune-Margin-7-t{margin-top:7px;}.kune-Margin-7-r{margin-right:7px;}.kune-Margin-7-b{margin-bottom:7px;}.kune-Margin-7-l{margin-left:7px;}.kune-Margin-Medium-trbl{margin:5px;}.kune-Margin-Medium-lr{margin-left:5px;margin-right:5px;}.kune-Margin-Medium-tl{margin-top:5px;margin-left:5px;}.kune-Margin-Medium-tb{margin-top:5px;margin-bottom:5px;}.kune-Margin-Medium-t{margin-top:5px;}.kune-Margin-Medium-r{margin-right:5px;}.kune-Margin-Medium-b{margin-bottom:5px;}.kune-Margin-Medium-l{margin-left:5px;}.kune-Margin-Small-trbl{margin:3px;}.kune-Margin-Small-lr{margin-left:3px;margin-right:3px;}.kune-Margin-Small-tl{margin-top:3px;margin-left:3px;}.kune-Margin-Small-tb{margin-top:3px;margin-bottom:3px;}.kune-Margin-Small-t{margin-top:3px;}.kune-Margin-Small-l{margin-left:3px;}.kune-Margin-Small-r{margin-right:3px;}.kune-Margin-Small-b{margin-bottom:3px;}.kune-Margin-Mini-trbl{margin:1px;}.kune-Margin-Mini-lr{margin-left:1px;margin-right:1px;}.kune-Margin-Mini-tl{margin-top:1px;margin-left:1px;}.kune-Margin-Mini-tb{margin-top:1px;margin-bottom:1px;}.kune-Margin-Mini-t{margin-top:1px;}.kune-Margin-Mini-r{margin-right:1px;}.kune-Margin-Mini-b{margin-bottom:1px;}.kune-Margin-Mini-l{margin-left:1px;}/* Fonts
+ */.x-panel{border-style:solid;border-color:#d0d0d0;}.x-panel-header{color:#333;border:1px solid #d0d0d0;background-image:url(../js/ext/resources/images/gray/panel/white-top-bottom.gif);}.x-panel-body{border-color:#d0d0d0;}.x-panel-bbar .x-toolbar{border-color:#d0d0d0;}.x-panel-tbar .x-toolbar{border-color:#d0d0d0;}.x-panel-tbar-noheader .x-toolbar,.x-panel-mc .x-panel-tbar .x-toolbar{border-color:#d0d0d0;}.x-panel-body-noheader,.x-panel-mc .x-panel-body{border-color:#d0d0d0;}.x-panel-tl .x-panel-header{color:#333;}.x-panel-tc{background-image:url(../js/ext/resources/images/gray/panel/top-bottom.gif);}.x-panel-tl{background-image:url(../js/ext/resources/images/gray/panel/corners-sprite.gif);border-color:#d0d0d0;}.x-panel-tr{background-image:url(../js/ext/resources/images/gray/panel/corners-sprite.gif);}.x-panel-bc{background-image:url(../js/ext/resources/images/gray/panel/top-bottom.gif);}.x-panel-bl{background-image:url(../js/ext/resources/images/gray/panel/corners-sprite.gif);}.x-panel-br{background-image:url(../js/ext/resources/images/gray/panel/corners-sprite.gif);}.x-panel-mc{background:#f1f1f1;}.x-panel-mc .x-panel-body{background:transparent;border:0 none;}.x-panel-ml{background-image:url(../js/ext/resources/images/gray/panel/left-right.gif);}.x-panel-mr{background-image:url(../js/ext/resources/images/gray/panel/left-right.gif);}/* Tools */.x-tool{background-image:url(../js/ext/resources/images/gray/panel/tool-sprites.gif);}/* Ghosting */.x-panel-ghost{background:#e0e0e0;}.x-panel-ghost ul{border-color:#b0b0b0;}.x-grid-panel .x-panel-mc .x-panel-body{border:1px solid #d0d0d0;}/* Buttons */.x-btn-left{background-image:url(../js/ext/resources/images/gray/button/btn-sprite.gif);}.x-btn-right{background-image:url(../js/ext/resources/images/gray/button/btn-sprite.gif);}.x-btn-center{background-image:url(../js/ext/resources/images/gray/button/btn-sprite.gif);}/* Layout classes */.x-border-layout-ct{background:#f0f0f0;}.x-accordion-hd{background-image:url(../js/ext/resources/images/gray/panel/light-hd.gif);}.x-layout-collapsed{background-color:#eee;border-color:#e0e0e0;}.x-layout-collapsed-over{background-color:#fbfbfb;}/* qtips */.x-tip .x-tip-top{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-top-left{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-top-right{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-ft{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-ft-left{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-ft-right{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-bd-left{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}.x-tip .x-tip-bd-right{background-image:url(../js/ext/resources/images/gray/qtip/tip-sprite.gif);}/* Toolbars */.x-toolbar{border-color:#d0d0d0;background:#f0f4f5 url(../js/ext/resources/images/gray/toolbar/bg.gif) repeat-x top left;}.x-toolbar button{color:#444;}.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button{background-image:url(../js/ext/resources/images/gray/toolbar/btn-arrow.gif);}.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button{background-image:url(../js/ext/resources/images/gray/toolbar/btn-arrow.gif);}.x-toolbar .x-btn-over .x-btn-left{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .x-btn-over .x-btn-right{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .x-btn-over .x-btn-center{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .x-btn-over button{color:#111;}.x-toolbar .x-btn-click .x-btn-left,.x-toolbar .x-btn-pressed .x-btn-left,.x-toolbar .x-btn-menu-active .x-btn-left{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .x-btn-click .x-btn-right,.x-toolbar .x-btn-pressed .x-btn-right,.x-toolbar .x-btn-menu-active .x-btn-right{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .x-btn-click .x-btn-center,.x-toolbar .x-btn-pressed .x-btn-center,.x-toolbar .x-btn-menu-active .x-btn-center{background-image:url(../js/ext/resources/images/gray/toolbar/tb-btn-sprite.gif);}.x-toolbar .ytb-sep{background-image:url(../js/ext/resources/images/default/grid/grid-split.gif);}/* Tabs */.x-tab-panel-header,.x-tab-panel-footer{background:#EAEAEA;border-color:#d0d0d0;}.x-tab-panel-header{border-color:#d0d0d0;}.x-tab-panel-footer{border-color:#d0d0d0;}ul.x-tab-strip-top{background:#dbdbdb url(../js/ext/resources/images/gray/tabs/tab-strip-bg.gif) repeat-x left top;border-color:#d0d0d0;padding-top:2px;}ul.x-tab-strip-bottom{background-image:url(../js/ext/resources/images/gray/tabs/tab-strip-btm-bg.gif);border-color:#d0d0d0;}.x-tab-strip span.x-tab-strip-text{color:#333;}.x-tab-strip-over span.x-tab-strip-text{color:#111;}.x-tab-strip-active span.x-tab-strip-text{color:#333;}.x-tab-strip-disabled .x-tabs-text{color:#AAA;}.x-tab-strip-top .x-tab-right{background-image:url(../js/ext/resources/images/gray/tabs/tabs-sprite.gif);}.x-tab-strip-top .x-tab-left{background-image:url(../js/ext/resources/images/gray/tabs/tabs-sprite.gif);}.x-tab-strip-top .x-tab-strip-inner{background-image:url(../js/ext/resources/images/gray/tabs/tabs-sprite.gif);}.x-tab-strip-bottom .x-tab-right{background-image:url(../js/ext/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif);}.x-tab-strip-bottom .x-tab-left{background-image:url(../js/ext/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif);}.x-tab-strip-bottom .x-tab-strip-active .x-tab-right{background-image:url(../js/ext/resources/images/gray/tabs/tab-btm-right-bg.gif);}.x-tab-strip-bottom .x-tab-strip-active .x-tab-left{background-image:url(../js/ext/resources/images/gray/tabs/tab-btm-left-bg.gif);}.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close{background-image:url(../js/ext/resources/images/gray/tabs/tab-close.gif);}.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{background-image:url(../js/ext/resources/images/gray/tabs/tab-close.gif);}.x-tab-panel-body{border-color:#d0d0d0;background:#fff;}.x-tab-panel-bbar .x-toolbar{border-color:#d0d0d0;}.x-tab-panel-tbar .x-toolbar{border-color:#d0d0d0;}.x-tab-panel-header-plain .x-tab-strip-spacer{border-color:#d0d0d0;background:#eaeaea;}.x-tab-scroller-left{background-image:url(../js/ext/resources/images/gray/tabs/scroll-left.gif);border-color:#aeaeae;}.x-tab-scroller-right{background-image:url(../js/ext/resources/images/gray/tabs/scroll-right.gif);border-color:#aeaeae;}/* Window */.x-window-proxy{background:#e0e0e0;border-color:#b0b0b0;}.x-window-tl .x-window-header{color:#555;}.x-window-tc{background-image:url(../js/ext/resources/images/gray/window/top-bottom.png);}.x-window-tl{background-image:url(../js/ext/resources/images/gray/window/left-corners.png);}.x-window-tr{background-image:url(../js/ext/resources/images/gray/window/right-corners.png);}.x-window-bc{background-image:url(../js/ext/resources/images/gray/window/top-bottom.png);}.x-window-bl{background-image:url(../js/ext/resources/images/gray/window/left-corners.png);}.x-window-br{background-image:url(../js/ext/resources/images/gray/window/right-corners.png);}.x-window-mc{border:1px solid #d0d0d0;background:#e8e8e8;}.x-window-ml{background-image:url(../js/ext/resources/images/gray/window/left-right.png);}.x-window-mr{background-image:url(../js/ext/resources/images/gray/window/left-right.png);}.x-panel-ghost .x-window-tl{border-color:#d0d0d0;}.x-panel-collapsed .x-window-tl{border-color:#d0d0d0;}.x-window-plain .x-window-mc{background:#e8e8e8;border-right:1px solid #eee;border-bottom:1px solid #eee;border-top:1px solid #d0d0d0;border-left:1px solid #d0d0d0;}.x-window-plain .x-window-body{border-left:1px solid #eee;border-top:1px solid #eee;border-bottom:1px solid #d0d0d0;border-right:1px solid #d0d0d0;background:transparent!important;}body.x-body-masked .x-window-mc,body.x-body-masked .x-window-plain .x-window-mc{background-color:#e4e4e4;}/* misc */.x-html-editor-wrap{border-color:#d0d0d0;}/* Borders go last for specificity */.x-panel-noborder .x-panel-body-noborder{border-width:0;}.x-panel-noborder .x-panel-header-noborder{border-width:0;border-bottom:1px solid #d0d0d0;}.x-panel-noborder .x-panel-tbar-noborder .x-toolbar{border-width:0;border-bottom:1px solid #d0d0d0;}.x-panel-noborder .x-panel-bbar-noborder .x-toolbar{border-width:0;border-top:1px solid #d0d0d0;}.x-window-noborder .x-window-mc{border-width:0;}.x-window-plain .x-window-body-noborder{border-width:0;}.x-tab-panel-noborder .x-tab-panel-body-noborder{border-width:0;}.x-tab-panel-noborder .x-tab-panel-header-noborder{border-top-width:0;border-left-width:0;border-right-width:0;}.x-tab-panel-noborder .x-tab-panel-footer-noborder{border-bottom-width:0;border-left-width:0;border-right-width:0;}.x-tab-panel-bbar-noborder .x-toolbar{border-width:0;border-top:1px solid #d0d0d0;}.x-tab-panel-tbar-noborder .x-toolbar{border-width:0;border-bottom:1px solid #d0d0d0;}.kunebody{background-color:#FFF;color:#000;font-family:arial, sans;margin:5px;}/* Global styles */.gwt-HorizontalSplitPanel .hsplitter{cursor:e-resize;width:6px;}.gwt-DialogBox{border:8px solid #C3D9FF;border:2px outset;background-color:#FFF;}.gwt-DialogBox .Caption{background-color:#C3D9FF;font-size:85%;font-weight:700;padding:3px;margin:2px;cursor:default;}.gwt-MenuBar{background-color:#F2F2F2;border:1px solid #999;vertical-align:middle;padding:5px 0;}.gwt-MenuBar .gwt-MenuItem{cursor:pointer;padding:1px 10px;white-space:nowrap;}.gwt-MenuBar .gwt-MenuItem img{vertical-align:middle;margin-right:3px;}.gwt-MenuBar .gwt-MenuItem{background-color:#F2F2F2;}.gwt-MenuBar .gwt-MenuItem-selected{background-color:#FFB958;}.kune-MenuBar .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;cursor:hand;white-space:nowrap;padding:0 10px;}.kune-MenuBar .gwt-MenuItem-selected{background:transparent url(img/button-bg-soft.gif) repeat-x 0 0;color:#963;}.kune-expandHoriz{width:100%;}.kune-expandVert{height:100%;}.kune-floatleft{float:left;}.kune-floatright{float:right;}/* Deprecated */.kune-Default-Form{margin:10px;}.kune-valignmiddle{vertical-align:middle;}fieldset{border:1px solid #B5B8C8;/* margin-bottom:10px; */padding:10px 10px 5px;}legend{color:#15428B;font-size:85%;font-size-adjust:none;font-style:normal;font-variant:normal;font-weight:700;line-height:normal;}.gwt-RadioButton input{margin:0 3px;vertical-align:middle;}.gwt-RadioButton label{margin:0 3px;vertical-align:middle;}.kune-pointer{cursor:pointer;}.kuneLabelPre{white-space:pre!important;}/* Buttons */.kune-CustomPushButton-space{margin-top:3px;margin-bottom:3px;}.kune-CustomPushButton{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:0 12px;}.kune-CustomPushButton-up{color:#161616;}.kune-CustomPushButton-down{color:#000;}.kune-CustomPushButton-up-hovering{color:#161616;background:transparent url(img/button-bg-soft.gif) repeat-x 0 0;}.kune-CustomPushButton-down-hovering{color:#000;}.kune-CustomPushButton-up-disabled{background:transparent url(img/button-bg-soft.gif) repeat-x 0 0;color:#E0E0E0;cursor:default;}.kune-CustomPushButton-down-disabled{background:transparent url(img/button-bg-soft.gif) repeat-x 0 0;color:#E0E0E0;cursor:default;}.kune-Button-Large-lrSpace{margin-left:12px;margin-right:12px;}.kune-Button-Large-rSpace{margin-right:12px;}.kune-Button-Large-lSpace{margin-left:12px;}.kune-Button-Large-tbSpace{margin-top:12px;margin-bottom:12px;}.kune-Button-Small-lrSpace{margin-left:10px;margin-right:10px;}.kune-Button-Small-rSpace{margin-right:10px;}.kune-Button-Small-lSpace{margin-left:10px;}.kune-Button-Small-tbSpace{margin-top:10px;margin-bottom:10px;}.kune-Button-Mini-lSpace{margin-left:8px;}.kune-Button-Mini-lrSpace{margin-left:8px;margin-right:8px;}.kune-Button-Mini-rSpace{margin-right:8px;}.kune-Button-Mini-tbSpace{margin-top:8px;margin-bottom:8px;}.kune-IconHyperlink{}.kune-IconHyperlink a:link{/* text-decoration: underline; */color:green;}.kune-IconHyperlink a:hover{text-decoration:underline;}.kune-IconHyperlink a:visited{color:olive;}.kune-IconHyperlink img{margin-right:4px;vertical-align:middle;}.kune-IconLabel{}.kune-IconLabel img{margin-right:4px;vertical-align:middle;}.kune-link{text-decoration:underline;color:green;cursor:pointer;}/* DropDowns */.kune-DropDownOuter{background-color:green;}.kune-DropDownInner{margin:0 3px 1px;background:green;background-color:#FFF;padding:3px;}.kune-DropDownLabel{color:#FFF;cursor:pointer;}.kune-DropDownLabel .gwt-Label{margin:0 5px 0 0;width:100%;}.kune-DropDownLabel img{margin:0 3px 0 1px;}.kune-IconLabel{color:green;}.kune-IconLabel img{margin-right:4px;vertical-align:middle;}/* Used in multi chat panel status change */.x-menu-item img{margin-right:4px;vertical-align:middle;}/* Margins */.kune-Margin-40-trbl{margin:40px;}.kune-Margin-40-lr{margin-left:40px;margin-right:40px;}.kune-Margin-40-tl{margin-top:40px;margin-left:40px;}.kune-Margin-40-tb{margin-top:40px;margin-bottom:40px;}.kune-Margin-40-t{margin-top:40px;}.kune-Margin-40-r{margin-right:40px;}.kune-Margin-40-l{margin-left:40px;}.kune-Margin-20-trbl{margin:20px;}.kune-Margin-20-lr{margin-left:20px;margin-right:20px;}.kune-Margin-20-tl{margin-top:20px;margin-left:20px;}.kune-Margin-20-tb{margin-top:20px;margin-bottom:20px;}.kune-Margin-20-t{margin-top:20px;}.kune-Margin-20-r{margin-right:20px;}.kune-Margin-20-l{margin-left:20px;}.kune-Margin-Large-trbl{margin:10px;}.kune-Margin-Large-lr{margin-left:10px;margin-right:10px;}.kune-Margin-Large-tl{margin-top:10px;margin-left:10px;}.kune-Margin-Large-tb{margin-top:10px;margin-bottom:10px;}.kune-Margin-Large-t{margin-top:10px;}.kune-Margin-Large-r{margin-right:10px;}.kune-Margin-Large-l{margin-left:10px;}.kune-Margin-7-trbl{margin:7px;}.kune-Margin-7-lr{margin-left:7px;margin-right:7px;}.kune-Margin-7-tl{margin-top:7px;margin-left:7px;}.kune-Margin-7-tb{margin-top:7px;margin-bottom:7px;}.kune-Margin-7-t{margin-top:7px;}.kune-Margin-7-r{margin-right:7px;}.kune-Margin-7-b{margin-bottom:7px;}.kune-Margin-7-l{margin-left:7px;}.kune-Margin-Medium-trbl{margin:5px;}.kune-Margin-Medium-lr{margin-left:5px;margin-right:5px;}.kune-Margin-Medium-tl{margin-top:5px;margin-left:5px;}.kune-Margin-Medium-tb{margin-top:5px;margin-bottom:5px;}.kune-Margin-Medium-t{margin-top:5px;}.kune-Margin-Medium-r{margin-right:5px;}.kune-Margin-Medium-b{margin-bottom:5px;}.kune-Margin-Medium-l{margin-left:5px;}.kune-Margin-Small-trbl{margin:3px;}.kune-Margin-Small-lr{margin-left:3px;margin-right:3px;}.kune-Margin-Small-tl{margin-top:3px;margin-left:3px;}.kune-Margin-Small-tb{margin-top:3px;margin-bottom:3px;}.kune-Margin-Small-t{margin-top:3px;}.kune-Margin-Small-l{margin-left:3px;}.kune-Margin-Small-r{margin-right:3px;}.kune-Margin-Small-b{margin-bottom:3px;}.kune-Margin-Mini-trbl{margin:1px;}.kune-Margin-Mini-lr{margin-left:1px;margin-right:1px;}.kune-Margin-Mini-tl{margin-top:1px;margin-left:1px;}.kune-Margin-Mini-tb{margin-top:1px;margin-bottom:1px;}.kune-Margin-Mini-t{margin-top:1px;}.kune-Margin-Mini-r{margin-right:1px;}.kune-Margin-Mini-b{margin-bottom:1px;}.kune-Margin-Mini-l{margin-left:1px;}/* Fonts
see: http://developer.yahoo.com/yui/fonts/ */.kune-ft10px{font-size:77%;}.kune-ft11px{font-size:85%;}.kune-ft12px{font-size:93%;}.kune-ft13px{font-size:100%;}.kune-ft14px{font-size:108%;}.kune-ft15px{font-size:116%;}.kune-ft16px{font-size:123.099998%;}.kune-ft17px{font-size:131%;}.kune-ft18px{font-size:138.5%;}.kune-ft19px{font-size:146.5%;}.kune-ft20px{font-size:153.899994%;}.kune-ft21px{font-size:161.600006%;}.kune-ft22px{font-size:167%;}.kune-ft23px{font-size:174%;}.kune-ft24px{font-size:182%;}.kune-ft25px{font-size:189%;}.kune-ft26px{font-size:197%;}/* Sitebar */.kune-SiteBarPanel .kune-IconHyperlink{white-space:nowrap;}.kune-SiteBarPanel .kune-IconHyperlink a:link{cursor:pointer;text-decoration:underline;color:#B3B3B3;}.kune-SiteBarPanel .kune-IconHyperlink a:hover{text-decoration:underline;}.kune-SiteBarPanel .kune-IconHyperlink a:visited{color:#B3B3B3;}.kune-SiteBarPanel{margin-right:10px;height:16px;}.kune-SiteBarPanel .gwt-TextBox{border:1px solid #E4A374;margin:0 15px 0 3px;padding-left:3px;color:#B3B3B3;}.kune-SiteBarPanel .gwt-Hyperlink a{white-space:nowrap;color:#B3B3B3;text-decoration:underline;cursor:pointer;}.kune-SiteBarPanel .gwt-PushButton{cursor:pointer;}.kune-SiteBarPanel-Separator{color:#E4A374;margin:0 5px;}.kune-SiteBarPanel-SpaceSeparator{width:10px;}.kune-SiteMessagePanel{color:#250;position:absolute;z-index:10000;vertical-align:middle;}.kune-SiteMessagePanel .gwt-HTML{margin:15px 5px 15px 2px;}.kune-SiteMessagePanel .gwt-Image{margin:5px;}.kune-SiteMessagePanel-error{background-color:#FFB380;border:1px solid #F06;}.kune-SiteMessagePanel-veryimp{background-color:#FFD4AA;border:1px solid #F59;}.kune-SiteMessagePanel-imp{background-color:#FFE6D5;border:1px solid #DE87AA;}.kune-SiteMessagePanel-info{background-color:#E5FF80;border:1px solid #87DE87;}/* Workspace styles */.kune-WorkspacePanel{width:100%;background-color:#FFF;}.kune-WokspacePanel .Tab{}.kune-WorkspacePanel .GeneralHP{}.kune-WorkspacePanel .ContextPanel{width:100%;border-right:3px solid #DD8A3D;}.kune-GroupSummaryPanel{margin:5px 0 0 5px;width:100%;}.kune-GroupToolsBar{width:150px;}.kune-GroupToolsBar-itemSelected{margin-bottom:5px;}.kune-GroupToolsBar-itemSelected .gwt-Hyperlink a{color:#FFF;padding:0 9px;text-decoration:none;}.kune-GroupToolsBar-itemSelected .gwt-Hyperlink a:hover{text-decoration:none;}.kune-GroupToolsBar-itemNotSelected{margin-bottom:5px;}.kune-GroupToolsBar-itemNotSelected .gwt-Hyperlink a{color:green;padding:0 9px;text-decoration:none;}.kune-GroupToolsBar-itemNotSelected .gwt-Hyperlink a:hover{text-decoration:none;}/* Content titles */.kune-ContentToolBarPanel{background-color:#F2F2F2;padding:2px;height:24px;vertical-align:middle;}.kune-ContentBottomBar{vertical-align:middle;height:24px;}.kune-ContentBottomBar .gwt-Image{margin-left:5px;cursor:pointer;float:left;}.kune-ContentBottomBar .gwt-Label a{}/* Main Content & Context */.kune-WorkspacePanel-Content{background-color:#FCFCFC;width:100%;height:100%;}.kune-WorkspacePanel-Content .main-content{margin:7px 5px 5px 10px;}.kune-WorkspacePanel-Context{background-color:#CFA;width:100%;height:100%;}.kune-NavigationBar{width:100%;}.kune-NavigationBar .topBar{background-color:#ececec;background:#ececec;border-bottom:1px solid #e3dbdb;vertical-align:middle;}.kune-NavigationBar .topBar .gwt-PushButton{margin:1px 3px 1px 0;}.kune-NavigationBar .topBar .gwt-Label{vertical-align:middle;}.kune-NavigationBar .kune-topBar-iconBar{margin:2px 0 2px 5px;}.kune-NavigationBar .kune-ContextItemsPanel-LabelLink{/* text-decoration: underline; */color:green;cursor:pointer;margin-left:3px;}/*
.topBar .gwt-PushButton-up-disabled {
filter: alpha(opacity = 20);
Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/kune.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/kune.css 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/kune.css 2008-11-17 10:14:27 UTC (rev 952)
@@ -5,16 +5,6 @@
margin: 5px 5px 5px 5px;
}
-#kuneinitialcurtain {
- position: absolute;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
- background-color: #FFF;
- z-index: 9999;
-}
-
/* Global styles */
.gwt-HorizontalSplitPanel .hsplitter {
Added: trunk/src/main/java/org/ourproject/kune/app/public/images/kune-anim.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/org/ourproject/kune/app/public/images/kune-anim.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -27,7 +27,6 @@
import org.ourproject.kune.chat.client.ctx.room.AddRoomPanel;
import org.ourproject.kune.chat.client.ctx.room.AddRoomPresenter;
import org.ourproject.kune.platf.client.actions.ContentActionRegistry;
-import org.ourproject.kune.platf.client.actions.ContentIconsRegistry;
import org.ourproject.kune.platf.client.actions.ContextActionRegistry;
import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar;
import org.ourproject.kune.platf.client.app.Application;
@@ -66,8 +65,7 @@
@Override
public ChatClientTool create() {
return new ChatClientTool($(I18nUITranslationService.class), $(WorkspaceSkeleton.class),
- $(ToolSelector.class), $(WsThemePresenter.class), $(ContentIconsRegistry.class),
- $(ContentCapabilitiesRegistry.class));
+ $(ToolSelector.class), $(WsThemePresenter.class), $(ContentCapabilitiesRegistry.class));
}
});
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -19,7 +19,6 @@
*/
package org.ourproject.kune.chat.client;
-import org.ourproject.kune.platf.client.actions.ContentIconsRegistry;
import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.platf.client.tool.FoldableAbstractClientTool;
@@ -35,18 +34,12 @@
public ChatClientTool(final I18nTranslationService i18n, final WorkspaceSkeleton ws,
final ToolSelector toolSelector, final WsThemePresenter wsThemePresenter,
- final ContentIconsRegistry contentIconsRegistry, ContentCapabilitiesRegistry contentCapabilitiesRegistry) {
- super(NAME, i18n.t("chat rooms"), toolSelector, wsThemePresenter, ws, contentIconsRegistry,
- contentCapabilitiesRegistry);
+ ContentCapabilitiesRegistry contentCapabilitiesRegistry) {
+ super(NAME, i18n.t("chat rooms"), toolSelector, wsThemePresenter, ws, contentCapabilitiesRegistry);
+ registerContentTypeIcon(TYPE_ROOM, "images/emite-room.png");
}
public String getName() {
return NAME;
}
-
- @Override
- protected void registerIcons() {
- contentIconsRegistry.registerContentTypeIcon(TYPE_ROOM, "images/emite-room.png");
- }
-
}
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -33,7 +33,6 @@
import org.ourproject.kune.docs.client.ctx.admin.DocContextPropEditorPresenter;
import org.ourproject.kune.docs.client.ctx.admin.DocContextPropEditorView;
import org.ourproject.kune.platf.client.actions.ContentActionRegistry;
-import org.ourproject.kune.platf.client.actions.ContentIconsRegistry;
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;
@@ -41,6 +40,7 @@
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.Images;
import org.ourproject.kune.platf.client.services.KuneErrorHandler;
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.platf.client.state.StateManager;
@@ -72,8 +72,7 @@
public DocumentClientTool create() {
$(DocumentClientActions.class);
return new DocumentClientTool($(I18nUITranslationService.class), $(ToolSelector.class),
- $(WsThemePresenter.class), $(WorkspaceSkeleton.class), $(ContentIconsRegistry.class),
- $(ContentCapabilitiesRegistry.class));
+ $(WsThemePresenter.class), $(WorkspaceSkeleton.class), $(ContentCapabilitiesRegistry.class));
}
});
@@ -93,10 +92,11 @@
@Override
public DocContextPropEditor create() {
final DocContextPropEditorPresenter presenter = new DocContextPropEditorPresenter($(Session.class),
- $(StateManager.class), $$(TagsSummary.class), $$(ContentServiceAsync.class),
- $(EntityTitle.class), $(EntitySubTitle.class));
+ $(StateManager.class), $(ContentCapabilitiesRegistry.class), $$(TagsSummary.class),
+ $$(ContentServiceAsync.class), $(EntityTitle.class), $(EntitySubTitle.class));
final DocContextPropEditorView view = new DocContextPropEditorPanel(presenter,
- $(I18nUITranslationService.class), $(WorkspaceSkeleton.class), $$(LanguageSelector.class));
+ $(I18nUITranslationService.class), $(WorkspaceSkeleton.class), $$(LanguageSelector.class),
+ $(Images.class));
presenter.init(view);
return presenter;
}
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-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -19,7 +19,6 @@
*/
package org.ourproject.kune.docs.client;
-import org.ourproject.kune.platf.client.actions.ContentIconsRegistry;
import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO;
import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.tool.FoldableAbstractClientTool;
@@ -42,54 +41,51 @@
public DocumentClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
final WsThemePresenter wsThemePresenter, final WorkspaceSkeleton ws,
- final ContentIconsRegistry contentIconsRegistry, ContentCapabilitiesRegistry contentCapabilitiesRegistry) {
- super(NAME, i18n.t("documents"), toolSelector, wsThemePresenter, ws, contentIconsRegistry,
- contentCapabilitiesRegistry);
+ ContentCapabilitiesRegistry contentCapabilitiesRegistry) {
+ super(NAME, i18n.t("documents"), toolSelector, wsThemePresenter, ws, contentCapabilitiesRegistry);
+
+ // registerAclEditableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE);
+ registerAuthorableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE);
+ 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, TYPE_POST);
+ registerRenamableTypes(TYPE_DOCUMENT, TYPE_FOLDER, TYPE_BLOG, TYPE_GALLERY, TYPE_POST, TYPE_UPLOADEDFILE,
+ TYPE_WIKI, TYPE_WIKIPAGE);
+ registerTageableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE, TYPE_WIKIPAGE, TYPE_POST);
+ registerTranslatableTypes(TYPE_DOCUMENT, TYPE_FOLDER, TYPE_UPLOADEDFILE, TYPE_WIKIPAGE);
+
+ registerIcons();
}
public String getName() {
return NAME;
}
- @Override
- protected void registerDragDropTypes() {
- contentCapabilitiesRegistry.getDragable().register(TYPE_DOCUMENT, TYPE_FOLDER, TYPE_UPLOADEDFILE);
- contentCapabilitiesRegistry.getDropable().register(TYPE_ROOT, TYPE_FOLDER, TYPE_GALLERY);
- }
-
- @Override
protected void registerIcons() {
- contentIconsRegistry.registerContentTypeIcon(TYPE_FOLDER, "images/nav/folder.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_BLOG, "images/nav/blog.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_GALLERY, "images/nav/gallery.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_DOCUMENT, "images/nav/page.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_POST, "images/nav/post.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_WIKI, "images/nav/wiki.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_WIKIPAGE, "images/nav/wikipage.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("image"),
- "images/nav/picture.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("video"),
- "images/nav/film.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "pdf"),
+ registerContentTypeIcon(TYPE_FOLDER, "images/nav/folder.png");
+ registerContentTypeIcon(TYPE_BLOG, "images/nav/blog.png");
+ registerContentTypeIcon(TYPE_GALLERY, "images/nav/gallery.png");
+ registerContentTypeIcon(TYPE_DOCUMENT, "images/nav/page.png");
+ registerContentTypeIcon(TYPE_POST, "images/nav/post.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");
- contentIconsRegistry.registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "zip"),
+ registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "zip"),
"images/nav/page_zip.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "zip"),
+ registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "zip"),
"images/nav/page_zip.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("text"),
- "images/nav/page_text.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "msword"),
+ registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("text"), "images/nav/page_text.png");
+ registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "msword"),
"images/nav/page_word.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "excel"),
+ registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "excel"),
"images/nav/page_excel.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application",
- "mspowerpoint"), "images/nav/page_pps.png");
- contentIconsRegistry.registerContentTypeIcon(TYPE_UPLOADEDFILE, "images/nav/page.png");
+ registerContentTypeIcon(TYPE_UPLOADEDFILE, new BasicMimeTypeDTO("application", "mspowerpoint"),
+ "images/nav/page_pps.png");
+ registerContentTypeIcon(TYPE_UPLOADEDFILE, "images/nav/page.png");
}
- @Override
- protected void registerRenamableTypes() {
- contentCapabilitiesRegistry.getRenamableContent().register(TYPE_DOCUMENT, TYPE_FOLDER, TYPE_BLOG, TYPE_GALLERY,
- TYPE_POST, TYPE_UPLOADEDFILE, TYPE_WIKI, TYPE_WIKIPAGE);
- }
}
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorPanel.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorPanel.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -19,230 +19,19 @@
*/
package org.ourproject.kune.docs.client.ctx.admin;
-import java.util.Date;
-import java.util.List;
-
-import org.ourproject.kune.platf.client.dto.AccessListsDTO;
-import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
-import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.platf.client.ui.ContextPropertyPanel;
+import org.ourproject.kune.platf.client.services.Images;
+import org.ourproject.kune.workspace.client.cxt.AbstractContextPropEditorPanel;
import org.ourproject.kune.workspace.client.i18n.LanguageSelector;
-import org.ourproject.kune.workspace.client.i18n.LanguageSelectorPanel;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.calclab.suco.client.ioc.Provider;
-import com.google.gwt.user.client.ui.ScrollPanel;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.gwtext.client.data.Record;
-import com.gwtext.client.widgets.form.ComboBox;
-import com.gwtext.client.widgets.form.DateField;
-import com.gwtext.client.widgets.form.Field;
-import com.gwtext.client.widgets.form.FormPanel;
-import com.gwtext.client.widgets.form.TextArea;
-import com.gwtext.client.widgets.form.event.ComboBoxListenerAdapter;
-import com.gwtext.client.widgets.form.event.FieldListenerAdapter;
-public class DocContextPropEditorPanel extends ScrollPanel implements DocContextPropEditorView {
+public class DocContextPropEditorPanel extends AbstractContextPropEditorPanel implements DocContextPropEditorView {
- private static final int FORMS_WIDTH = 150;
- public static final String TAGS_PROP = "k-dcpep-tagsp-dis";
- public static final String LANG_PROP = "k-dcpep-langsp-dis";
- public static final String PUBLI_PROP = "k-dcpep-publisp-dis";
-
- private final DocContextPropEditorPresenter presenter;
- private final WorkspaceSkeleton ws;
- private final I18nTranslationService i18n;
- private final Provider<LanguageSelector> langSelectorProv;
- private final VerticalPanel vp;
- private ContextPropertyPanel tagsComponent;
- private ContextPropertyPanel langComponent;
- private ContextPropertyPanel publishedOnComponent;
- private TextArea tagsField;
- private DateField publishedOnField;
-
public DocContextPropEditorPanel(final DocContextPropEditorPresenter presenter, final I18nTranslationService i18n,
- WorkspaceSkeleton ws, Provider<LanguageSelector> langSelectorProv) {
- this.i18n = i18n;
- this.ws = ws;
- this.presenter = presenter;
- this.langSelectorProv = langSelectorProv;
- super.addStyleName("kune-Margin-Medium-trbl");
- vp = new VerticalPanel();
- super.add(vp);
- // authors_item = i18n.t("Authors");
- // perms_item = i18n.t("Permissions");
+ WorkspaceSkeleton ws, Provider<LanguageSelector> langSelectorProv, Images images) {
+ super(presenter, i18n, ws, langSelectorProv, images);
}
- public void attach() {
- if (!super.isAttached()) {
- ws.getEntityWorkspace().setContext(this);
- }
- }
-
- public void detach() {
- if (super.isAttached()) {
- super.removeFromParent();
- }
- }
-
- public void removeAccessListComponent() {
- // if (options.containsItem(perms_item)) {
- // removeComponent(perms_item);
- // }
- }
-
- public void removeAuthorsComponent() {
- // if (options.containsItem(authors_item)) {
- // removeComponent(authors_item);
- // }
- }
-
- public void removeLangComponent() {
- if (langComponent != null) {
- langComponent.removeFromParent();
- }
- }
-
- public void removePublishedOnComponent() {
- if (publishedOnComponent != null) {
- publishedOnComponent.removeFromParent();
- }
- }
-
- public void removeTagsComponent() {
- if (tagsComponent != null) {
- tagsComponent.removeFromParent();
- }
- }
-
- public void reset() {
- tagsField.reset();
- }
-
- public void setAccessLists(final AccessListsDTO accessLists) {
- // if (accessListsPanel == null) {
- // accessListsPanel = new AccessListsPanel(i18n);
- // }
- // if (!options.containsItem(perms_item)) {
- // addComponent(perms_item, i18n.t("Who can admin/edit/view this work"),
- // accessListsPanel);
- // }
- // accessListsPanel.setAccessLists(accessLists);
- }
-
- public void setAuthors(final List<UserSimpleDTO> authors) {
- // if (authorsComponent == null) {
- // authorsComponent = new VerticalPanel();
- // addAuthorLabel = new IconLabel(IMG.addGreen(), i18n.t("Add author"));
- // addAuthorLabel.addClickListener(new ClickListener() {
- // public void onClick(final Widget sender) {
- // presenter.doAction(DocsEvents.ADD_AUTHOR, null);
- // }
- // });
- // } else {
- // if (options.containsItem(authors_item)) {
- // options.removeStackItem(authors_item);
- // }
- // authorsComponent.clear();
- // }
- // if (!options.containsItem(authors_item)) {
- // addComponent(authors_item, i18n.t("Authors of this work"),
- // authorsComponent);
- // }
- // for (final Iterator<UserSimpleDTO> iterator = authors.iterator();
- // iterator.hasNext();) {
- // final UserSimpleDTO author = iterator.next();
- // final StackSubItemAction[] authorActions = { new
- // StackSubItemAction(IMG.del(), i18n.t("Remove author"),
- // DocsEvents.REMOVE_AUTHOR) };
- // options.addStackSubItem(authors_item, IMG.personDef(),
- // author.getShortName(), author.getName(),
- // authorActions, presenter);
- // }
- // authorsComponent.add(addAuthorLabel);
- }
-
- public void setLanguage(final I18nLanguageDTO language) {
- if (langComponent == null) {
- final LanguageSelectorPanel view = (LanguageSelectorPanel) langSelectorProv.get().getView();
- view.setWidth(FORMS_WIDTH);
- langComponent = new ContextPropertyPanel(i18n.t("What language is this in?"), null, true, LANG_PROP, view);
- view.addChangeListener(new ComboBoxListenerAdapter() {
- @Override
- public void onSelect(final ComboBox comboBox, final Record record, final int index) {
- presenter.doChangeLanguage(record.getAsString(LanguageSelectorPanel.LANG_ID));
- }
- });
- // angComponent.addStyleName("kune-Margin-Medium-t");
- addComponent(langComponent);
- }
- langSelectorProv.get().setLanguage(language);
- }
-
- public void setPublishedOn(final Date publishedOn, String dateFormat) {
- if (publishedOnField == null) {
- publishedOnComponent = createPublicationComponent();
- }
- addComponent(publishedOnComponent);
- publishedOnField.setValue(publishedOn);
- publishedOnField.setFormat(dateFormat);
- }
-
- public void setTags(final String tags) {
- if (tagsComponent == null) {
- tagsComponent = createTagsComponent();
- addComponent(tagsComponent);
- }
- tagsField.setValue(tags);
- }
-
- private void addComponent(ContextPropertyPanel prop) {
- vp.add(prop);
- }
-
- private FormPanel createDefaultForm() {
- final FormPanel form = new FormPanel();
- form.setHideLabels(true);
- form.setWidth(FORMS_WIDTH);
- form.setBorder(false);
- return form;
- }
-
- private ContextPropertyPanel createPublicationComponent() {
- final FormPanel form = createDefaultForm();
-
- publishedOnField = new DateField();
- publishedOnField.setWidth("140");
-
- publishedOnField.addListener(new FieldListenerAdapter() {
- @Override
- public void onChange(final Field field, final Object newVal, final Object oldVal) {
- presenter.setPublishedOn((Date) newVal);
- }
- });
- form.add(publishedOnField);
- return new ContextPropertyPanel(i18n.t("Publication"), i18n.t("Date of publication"), true, PUBLI_PROP, form);
- }
-
- private ContextPropertyPanel createTagsComponent() {
- final FormPanel form = createDefaultForm();
- tagsField = new TextArea();
- tagsField.setWidth(FORMS_WIDTH - 10);
- tagsField.setHeight("3em");
- tagsField.addListener(new FieldListenerAdapter() {
- @Override
- public void onChange(final Field field, final Object newVal, final Object oldVal) {
- presenter.setTags((String) newVal);
- }
- });
- form.add(tagsField);
- return new ContextPropertyPanel(i18n.t("Tags"), i18n.t("Keywords or terms associated with this work"), true,
- TAGS_PROP, form);
- }
-
- // private void removeComponent(final String header) {
- // options.removeStackItem(header);
- // }
-
}
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorPresenter.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorPresenter.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -19,170 +19,24 @@
*/
package org.ourproject.kune.docs.client.ctx.admin;
-import java.util.Date;
-import java.util.List;
-
-import org.ourproject.kune.platf.client.dto.AccessListsDTO;
-import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
-import org.ourproject.kune.platf.client.dto.StateContainerDTO;
-import org.ourproject.kune.platf.client.dto.StateContentDTO;
-import org.ourproject.kune.platf.client.dto.TagResultDTO;
-import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
-import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
+import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.site.Site;
+import org.ourproject.kune.workspace.client.cxt.AbstractContextPropEditorPresenter;
import org.ourproject.kune.workspace.client.tags.TagsSummary;
import org.ourproject.kune.workspace.client.title.EntitySubTitle;
import org.ourproject.kune.workspace.client.title.EntityTitle;
import com.calclab.suco.client.ioc.Provider;
-public class DocContextPropEditorPresenter implements DocContextPropEditor {
+public class DocContextPropEditorPresenter extends AbstractContextPropEditorPresenter implements DocContextPropEditor {
- private DocContextPropEditorView view;
- private final Session session;
- private final Provider<TagsSummary> tagsSummaryProvider;
- private final Provider<ContentServiceAsync> contentServiceProvider;
- private final EntitySubTitle entitySubTitle;
- private final EntityTitle entityTitle;
- private final StateManager stateManager;
-
public DocContextPropEditorPresenter(final Session session, final StateManager stateManager,
- final Provider<TagsSummary> tagsSummaryProvider,
+ ContentCapabilitiesRegistry capabilitiesRegistry, final Provider<TagsSummary> tagsSummaryProvider,
final Provider<ContentServiceAsync> contentServiceProvider, final EntityTitle entityTitle,
final EntitySubTitle entitySubTitle) {
- this.session = session;
- this.stateManager = stateManager;
- this.tagsSummaryProvider = tagsSummaryProvider;
- this.contentServiceProvider = contentServiceProvider;
- this.entityTitle = entityTitle;
- this.entitySubTitle = entitySubTitle;
+ super(session, stateManager, capabilitiesRegistry, tagsSummaryProvider, contentServiceProvider, entityTitle,
+ entitySubTitle);
}
-
- public void addAuthor(final String authorShortName) {
- Site.showProgressProcessing();
- final StateContainerDTO currentState = session.getContentState();
- contentServiceProvider.get().addAuthor(session.getUserHash(), currentState.getStateToken(), authorShortName,
- new AsyncCallbackSimple<Object>() {
- public void onSuccess(final Object result) {
- Site.hideProgress();
- stateManager.reload();
- }
- });
- }
-
- public void attach() {
- view.attach();
- }
-
- public void clear() {
- view.reset();
- }
-
- public void delAuthor(final String authorShortName) {
- Site.showProgressProcessing();
- final StateContainerDTO currentState = session.getContentState();
- contentServiceProvider.get().removeAuthor(session.getUserHash(), currentState.getStateToken(), authorShortName,
- new AsyncCallbackSimple<Object>() {
- public void onSuccess(final Object result) {
- Site.hideProgress();
- stateManager.reload();
- }
- });
- }
-
- public void detach() {
- view.detach();
- }
-
- public void doChangeLanguage(final String langCode) {
- Site.showProgressProcessing();
- final StateContainerDTO currentState = session.getContentState();
- contentServiceProvider.get().setLanguage(session.getUserHash(), currentState.getStateToken(), langCode,
- new AsyncCallbackSimple<I18nLanguageDTO>() {
- public void onSuccess(final I18nLanguageDTO lang) {
- Site.hideProgress();
- entitySubTitle.setContentLanguage(lang.getEnglishName());
- }
- });
- }
-
- public void init(final DocContextPropEditorView view) {
- this.view = view;
- }
-
- public void setPublishedOn(final Date publishedOn) {
- Site.showProgressProcessing();
- final StateContainerDTO currentState = session.getContentState();
- contentServiceProvider.get().setPublishedOn(session.getUserHash(), currentState.getStateToken(), publishedOn,
- new AsyncCallbackSimple<Object>() {
- public void onSuccess(final Object result) {
- Site.hideProgress();
- entityTitle.setContentDate(publishedOn);
- }
- });
-
- }
-
- public void setState(final StateContentDTO content) {
- // In the future check the use of these components by each tool
- final I18nLanguageDTO language = content.getLanguage();
- final AccessListsDTO accessLists = content.getAccessLists();
- final Date publishedOn = content.getPublishedOn();
- final String tags = content.getTags();
- final List<UserSimpleDTO> authors = content.getAuthors();
-
- if (language != null) {
- view.setLanguage(language);
- } else {
- view.removeLangComponent();
- }
- if (tags != null) {
- view.setTags(tags);
- } else {
- view.removeTagsComponent();
- }
- if (authors != null) {
- view.setAuthors(authors);
- } else {
- view.removeAuthorsComponent();
- }
- if (publishedOn != null) {
- String dateFormat = session.getCurrentLanguage().getDateFormatShort();
- if (dateFormat != null) {
- dateFormat = dateFormat.replace("yyyy", "Y");
- dateFormat = dateFormat.replace("yy", "y");
- dateFormat = dateFormat.replace("MM", "m");
- dateFormat = dateFormat.replace("M", "n");
- dateFormat = dateFormat.replace("dd", "xxx");
- dateFormat = dateFormat.replace("d", "j");
- dateFormat = dateFormat.replace("xxx", "d");
- view.setPublishedOn(publishedOn, dateFormat);
- } else {
- view.setPublishedOn(publishedOn, "M/d/yy def");
- }
- } else {
- view.removePublishedOnComponent();
- }
- if (accessLists != null) {
- view.setAccessLists(accessLists);
- } else {
- view.removeAccessListComponent();
- }
- }
-
- public void setTags(final String tagsString) {
- Site.showProgressProcessing();
- final StateContainerDTO currentState = session.getContentState();
- contentServiceProvider.get().setTags(session.getUserHash(), currentState.getStateToken(), tagsString,
- new AsyncCallbackSimple<List<TagResultDTO>>() {
- public void onSuccess(final List<TagResultDTO> result) {
- tagsSummaryProvider.get().setGroupTags(result);
- Site.hideProgress();
- }
- });
- }
-
}
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorView.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/DocContextPropEditorView.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -19,40 +19,8 @@
*/
package org.ourproject.kune.docs.client.ctx.admin;
-import java.util.Date;
-import java.util.List;
+import org.ourproject.kune.workspace.client.cxt.AbstractContextPropEditorView;
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.dto.AccessListsDTO;
-import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
-import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
-public interface DocContextPropEditorView extends View {
-
- void attach();
-
- void detach();
-
- void removeAccessListComponent();
-
- void removeAuthorsComponent();
-
- void removeLangComponent();
-
- void removePublishedOnComponent();
-
- void removeTagsComponent();
-
- void reset();
-
- void setAccessLists(AccessListsDTO accessLists);
-
- void setAuthors(List<UserSimpleDTO> authors);
-
- void setLanguage(I18nLanguageDTO language);
-
- void setPublishedOn(Date publishedOn, String dateFormat);
-
- void setTags(String tags);
-
+public interface DocContextPropEditorView extends AbstractContextPropEditorView {
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -83,6 +83,7 @@
server.getInitData(session.getUserHash(), new AsyncCallback<InitDataDTO>() {
public void onFailure(final Throwable error) {
RootPanel.get("kuneinitialcurtain").setVisible(false);
+ RootPanel.get("kuneloading").setVisible(false);
Site.error("Error fetching initial data");
Log.debug(error.getMessage());
}
@@ -93,6 +94,7 @@
DeferredCommand.addCommand(new Command() {
public void execute() {
RootPanel.get("kuneinitialcurtain").setVisible(false);
+ RootPanel.get("kuneloading").setVisible(false);
}
});
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateContentDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateContentDTO.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateContentDTO.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -31,7 +31,6 @@
private String content;
private AccessRightsDTO contentRights;
private ContentStatusDTO status;
- private boolean isRateable;
private Double rate;
private Integer rateByUsers;
private Double currentUserRate;
@@ -91,10 +90,6 @@
return version;
}
- public boolean isRateable() {
- return isRateable;
- }
-
public void setAuthors(List<UserSimpleDTO> authors) {
this.authors = authors;
}
@@ -133,10 +128,6 @@
setCurrentUserRate(result.getCurrentUserRate());
}
- public void setRateable(boolean isRateable) {
- this.isRateable = isRateable;
- }
-
public void setRateByUsers(Integer rateByUsers) {
this.rateByUsers = rateByUsers;
}
Added: trunk/src/main/java/org/ourproject/kune/platf/client/registry/AclEditableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/AclEditableRegistry.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/registry/AclEditableRegistry.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -0,0 +1,4 @@
+package org.ourproject.kune.platf.client.registry;
+
+public class AclEditableRegistry extends AbstractContentRegistry {
+}
Added: trunk/src/main/java/org/ourproject/kune/platf/client/registry/AuthorableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/AuthorableRegistry.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/registry/AuthorableRegistry.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -0,0 +1,4 @@
+package org.ourproject.kune.platf.client.registry;
+
+public class AuthorableRegistry extends AbstractContentRegistry {
+}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/registry/ContentCapabilitiesRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/ContentCapabilitiesRegistry.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/registry/ContentCapabilitiesRegistry.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -1,7 +1,11 @@
package org.ourproject.kune.platf.client.registry;
+import org.ourproject.kune.platf.client.actions.ContentIconsRegistry;
+
public class ContentCapabilitiesRegistry {
+ private final AclEditableRegistry aclEditable;
+ private final AuthorableRegistry authorable;
private final CanBeHomepageRegistry canBeHomepage;
private final ComentableRegistry comentable;
private final DragableRegistry dragable;
@@ -16,14 +20,19 @@
private final VersionableRegistry versionable;
private final XmppComentableRegistry xmppComentable;
private final XmppNotifyCapableRegistry xmppNotifyCapable;
+ private final ContentIconsRegistry iconsRegistry;
- public ContentCapabilitiesRegistry(final CanBeHomepageRegistry canBeHomepage, final ComentableRegistry comentable,
- final DragableRegistry dragable, final DropableRegistry dropable,
+ public ContentCapabilitiesRegistry(AuthorableRegistry authorableRegistry, AclEditableRegistry aclEditableRegistry,
+ ContentIconsRegistry iconsRegistry, final CanBeHomepageRegistry canBeHomepage,
+ final ComentableRegistry comentable, final DragableRegistry dragable, final DropableRegistry dropable,
final EmailSubscribeAbleRegistry emailSubscribeAble, final LicensableRegistry licensable,
final PublishModerableRegistry publishModerable, final RateableRegistry rateable,
final TageableRegistry tageable, final RenamableRegistry renamable,
final TranslatableRegistry translatable, final VersionableRegistry versionable,
final XmppComentableRegistry xmppComentable, final XmppNotifyCapableRegistry xmppNotifyCapable) {
+ this.authorable = authorableRegistry;
+ this.aclEditable = aclEditableRegistry;
+ this.iconsRegistry = iconsRegistry;
this.canBeHomepage = canBeHomepage;
this.comentable = comentable;
this.dragable = dragable;
@@ -44,6 +53,14 @@
return canBeHomepage.contains(typeId);
}
+ public AclEditableRegistry getAclEditable() {
+ return aclEditable;
+ }
+
+ public AuthorableRegistry getAuthorable() {
+ return authorable;
+ }
+
public CanBeHomepageRegistry getCanBeHomepage() {
return canBeHomepage;
}
@@ -64,6 +81,10 @@
return emailSubscribeAble;
}
+ public ContentIconsRegistry getIconsRegistry() {
+ return iconsRegistry;
+ }
+
public LicensableRegistry getLicensable() {
return licensable;
}
@@ -76,7 +97,7 @@
return rateable;
}
- public RenamableRegistry getRenamableContent() {
+ public RenamableRegistry getRenamable() {
return renamable;
}
@@ -100,6 +121,14 @@
return xmppNotifyCapable;
}
+ public boolean isAclEditable(String typeId) {
+ return aclEditable.contains(typeId);
+ }
+
+ public boolean isAuthorable(String typeId) {
+ return authorable.contains(typeId);
+ }
+
public boolean isComentable(String typeId) {
return comentable.contains(typeId);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneRegistryModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneRegistryModule.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneRegistryModule.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -1,6 +1,8 @@
package org.ourproject.kune.platf.client.services;
import org.ourproject.kune.platf.client.actions.ContentIconsRegistry;
+import org.ourproject.kune.platf.client.registry.AclEditableRegistry;
+import org.ourproject.kune.platf.client.registry.AuthorableRegistry;
import org.ourproject.kune.platf.client.registry.CanBeHomepageRegistry;
import org.ourproject.kune.platf.client.registry.ComentableRegistry;
import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
@@ -26,6 +28,18 @@
@Override
protected void onInstall() {
+ register(Singleton.class, new Factory<AclEditableRegistry>(AclEditableRegistry.class) {
+ @Override
+ public AclEditableRegistry create() {
+ return new AclEditableRegistry();
+ }
+ });
+ register(Singleton.class, new Factory<AuthorableRegistry>(AuthorableRegistry.class) {
+ @Override
+ public AuthorableRegistry create() {
+ return new AuthorableRegistry();
+ }
+ });
register(Singleton.class, new Factory<CanBeHomepageRegistry>(CanBeHomepageRegistry.class) {
@Override
public CanBeHomepageRegistry create() {
@@ -134,7 +148,8 @@
register(Singleton.class, new Factory<ContentCapabilitiesRegistry>(ContentCapabilitiesRegistry.class) {
@Override
public ContentCapabilitiesRegistry create() {
- return new ContentCapabilitiesRegistry($(CanBeHomepageRegistry.class), $(ComentableRegistry.class),
+ return new ContentCapabilitiesRegistry($(AuthorableRegistry.class), $(AclEditableRegistry.class),
+ $(ContentIconsRegistry.class), $(CanBeHomepageRegistry.class), $(ComentableRegistry.class),
$(DragableRegistry.class), $(DropableRegistry.class), $(EmailSubscribeAbleRegistry.class),
$(LicensableRegistry.class), $(PublishModerableRegistry.class), $(RateableRegistry.class),
$(TageableRegistry.class), $(RenamableRegistry.class), $(TranslatableRegistry.class),
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneWorkspaceModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneWorkspaceModule.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneWorkspaceModule.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -23,6 +23,7 @@
import org.ourproject.kune.platf.client.actions.ContentIconsRegistry;
import org.ourproject.kune.platf.client.actions.UserActionRegistry;
import org.ourproject.kune.platf.client.app.ApplicationComponentGroup;
+import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.registry.RenamableRegistry;
import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
import org.ourproject.kune.platf.client.rpc.GroupServiceAsync;
@@ -304,7 +305,8 @@
@Override
public RateIt create() {
final RateItPresenter presenter = new RateItPresenter($(I18nUITranslationService.class),
- $(Session.class), $$(ContentServiceAsync.class), $(StateManager.class), $$(RatePresenter.class));
+ $(Session.class), $$(ContentServiceAsync.class), $(StateManager.class),
+ $$(RatePresenter.class), $(ContentCapabilitiesRegistry.class));
final RateItPanel panel = new RateItPanel(presenter, $(I18nUITranslationService.class),
$(WorkspaceSkeleton.class), $(Images.class));
presenter.init(panel);
@@ -315,7 +317,8 @@
register(ApplicationComponentGroup.class, new Factory<RatePresenter>(RatePresenter.class) {
@Override
public RatePresenter create() {
- final RatePresenter presenter = new RatePresenter($(StateManager.class));
+ final RatePresenter presenter = new RatePresenter($(StateManager.class),
+ $(ContentCapabilitiesRegistry.class));
final RatePanel panel = new RatePanel(null, null, $(I18nUITranslationService.class),
$(WorkspaceSkeleton.class));
presenter.init(panel);
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-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/tool/FoldableAbstractClientTool.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -1,31 +1,85 @@
package org.ourproject.kune.platf.client.tool;
-import org.ourproject.kune.platf.client.actions.ContentIconsRegistry;
+import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO;
import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
public abstract class FoldableAbstractClientTool extends AbstractClientTool {
- protected final ContentIconsRegistry contentIconsRegistry;
protected final ContentCapabilitiesRegistry contentCapabilitiesRegistry;
public FoldableAbstractClientTool(String shortName, String longName, ToolSelector toolSelector,
- WsThemePresenter wsThemePresenter, WorkspaceSkeleton ws, final ContentIconsRegistry contentIconsRegistry,
+ WsThemePresenter wsThemePresenter, WorkspaceSkeleton ws,
ContentCapabilitiesRegistry contentCapabilitiesRegistry) {
super(shortName, longName, toolSelector, wsThemePresenter, ws);
- this.contentIconsRegistry = contentIconsRegistry;
this.contentCapabilitiesRegistry = contentCapabilitiesRegistry;
- registerDragDropTypes();
- registerIcons();
- registerRenamableTypes();
}
- protected void registerDragDropTypes() {
+ public void registerContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType, final String iconUrl) {
+ contentCapabilitiesRegistry.getIconsRegistry().registerContentTypeIcon(typeId, mimeType, iconUrl);
}
- protected void registerIcons() {
+ public void registerContentTypeIcon(final String contentTypeId, final String iconUrl) {
+ contentCapabilitiesRegistry.getIconsRegistry().registerContentTypeIcon(contentTypeId, iconUrl);
}
- protected void registerRenamableTypes() {
+ protected void registerAclEditableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getAclEditable().register(typeIds);
}
+
+ protected void registerAuthorableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getAuthorable().register(typeIds);
+ }
+
+ protected void registerComentableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getComentable().register(typeIds);
+ }
+
+ protected void registerDragableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getDragable().register(typeIds);
+ }
+
+ protected void registerDropableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getDropable().register(typeIds);
+ }
+
+ protected void registerEmailSubscribeAbleTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getEmailSubscribeAble().register(typeIds);
+ }
+
+ protected void registerLicensableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getLicensable().register(typeIds);
+ }
+
+ protected void registerPublishModerableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getPublishModerable().register(typeIds);
+ }
+
+ protected void registerRateableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getRateable().register(typeIds);
+ }
+
+ protected void registerRenamableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getRenamable().register(typeIds);
+ }
+
+ protected void registerTageableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getTageable().register(typeIds);
+ }
+
+ protected void registerTranslatableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getTranslatable().register(typeIds);
+ }
+
+ protected void registerVersionableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getVersionable().register(typeIds);
+ }
+
+ protected void registerXmppComentableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getXmppComentable().register(typeIds);
+ }
+
+ protected void registerXmppNotifyCapableTypes(String... typeIds) {
+ contentCapabilitiesRegistry.getXmppNotificyCapable().register(typeIds);
+ }
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPresenter.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPresenter.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -22,6 +22,7 @@
import org.ourproject.kune.platf.client.dto.RateResultDTO;
import org.ourproject.kune.platf.client.dto.StateAbstractDTO;
import org.ourproject.kune.platf.client.dto.StateContentDTO;
+import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
import org.ourproject.kune.platf.client.services.I18nTranslationService;
@@ -45,7 +46,7 @@
public RateItPresenter(final I18nTranslationService i18n, final Session session,
final Provider<ContentServiceAsync> contentServiceProvider, final StateManager stateManager,
- Provider<RatePresenter> ratePresenterProvider) {
+ Provider<RatePresenter> ratePresenterProvider, final ContentCapabilitiesRegistry capabilitiesRegistry) {
this.i18n = i18n;
this.session = session;
this.contentServiceProvider = contentServiceProvider;
@@ -54,7 +55,8 @@
public void onEvent(final StateAbstractDTO state) {
if (state instanceof StateContentDTO) {
StateContentDTO stateContentDTO = (StateContentDTO) state;
- setState(stateContentDTO.isRateable(), stateContentDTO.getCurrentUserRate());
+ setState(capabilitiesRegistry.isRateable(stateContentDTO.getTypeId()),
+ stateContentDTO.getCurrentUserRate());
} else {
view.setVisible(false);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RatePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RatePresenter.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RatePresenter.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -21,6 +21,7 @@
import org.ourproject.kune.platf.client.dto.RateResultDTO;
import org.ourproject.kune.platf.client.dto.StateAbstractDTO;
import org.ourproject.kune.platf.client.dto.StateContentDTO;
+import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.state.StateManager;
import com.calclab.suco.client.listener.Listener;
@@ -28,8 +29,10 @@
public class RatePresenter {
private RateView view;
+ private final ContentCapabilitiesRegistry capabilitiesRegistry;
- public RatePresenter(final StateManager stateManager) {
+ public RatePresenter(final StateManager stateManager, ContentCapabilitiesRegistry capabilitiesRegistry) {
+ this.capabilitiesRegistry = capabilitiesRegistry;
stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
public void onEvent(final StateAbstractDTO state) {
if (state instanceof StateContentDTO) {
@@ -62,8 +65,10 @@
private void setState(final StateContentDTO state) {
Integer rateByUsers = state.getRateByUsers();
Double rate = state.getRate();
- if (state.isRateable()) {
+ if (capabilitiesRegistry.isRateable(state.getTypeId())) {
setRate(rateByUsers, rate);
+ } else {
+ view.setVisible(false);
}
}
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/state/StateContent.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/state/StateContent.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/state/StateContent.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -33,7 +33,6 @@
private String content;
private AccessRights contentRights;
private ContentStatus status;
- private boolean isRateable;
private Double rate;
private Integer rateByUsers;
private Double currentUserRate;
@@ -93,10 +92,6 @@
return version;
}
- public boolean isRateable() {
- return isRateable;
- }
-
public void setAuthors(List<User> authors) {
this.authors = authors;
}
@@ -129,10 +124,6 @@
this.rate = rate;
}
- public void setRateable(boolean isRateable) {
- this.isRateable = isRateable;
- }
-
public void setRateByUsers(Integer rateByUsers) {
this.rateByUsers = rateByUsers;
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/state/StateServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/state/StateServiceDefault.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/state/StateServiceDefault.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -80,7 +80,6 @@
state.setTypeId(content.getTypeId());
state.setMimeType(content.getMimeType());
state.setDocumentId(content.getId().toString());
- state.setRateable(true);
state.setLanguage(content.getLanguage());
state.setPublishedOn(content.getPublishedOn());
state.setAuthors(content.getAuthors());
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxedit (from rev 949, trunk/src/main/java/org/ourproject/kune/workspace/client/ctxadmin)
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxedit
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxedit/AccessListsPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxadmin/AccessListsPanel.java 2008-11-11 13:33:36 UTC (rev 949)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxedit/AccessListsPanel.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -1,100 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.ctxadmin;
-
-import java.util.Iterator;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.dto.AccessListsDTO;
-import org.ourproject.kune.platf.client.dto.GroupDTO;
-import org.ourproject.kune.platf.client.dto.GroupListDTO;
-import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.platf.client.services.Images;
-import org.ourproject.kune.platf.client.ui.IconLabel;
-
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-public class AccessListsPanel extends VerticalPanel implements View {
-
- private final VerticalPanel adminsVP;
- private final VerticalPanel editorsVP;
- private final VerticalPanel viewersVP;
- private final I18nTranslationService i18n;
- private final Images img;
-
- public AccessListsPanel(final I18nTranslationService i18n, Images img) {
- this.i18n = i18n;
- this.img = img;
- final Label adminsLabel = new Label(i18n.t("Who can admin this:"));
- adminsVP = new VerticalPanel();
- final Label editorsLabel = new Label(i18n.t("Who more can edit:"));
- editorsVP = new VerticalPanel();
- final Label viewersLabel = new Label(i18n.t("Who more can view:"));
- viewersVP = new VerticalPanel();
-
- // Layout
- this.add(adminsLabel);
- this.add(adminsVP);
- this.add(editorsLabel);
- this.add(editorsVP);
- this.add(viewersLabel);
- this.add(viewersVP);
-
- // Set properties
- // FIXME: titledPanel.setTitle("Who can admin, edit or view this
- // content");
- // addStyleName("kune-AccessList");
- setWidth("100%");
- this.setWidth("100%");
- this.setCellWidth(adminsLabel, "100%");
- this.setCellWidth(editorsLabel, "100%");
- this.setCellWidth(viewersLabel, "100%");
- this.setCellWidth(adminsVP, "100%");
- this.setCellWidth(editorsVP, "100%");
- this.setCellWidth(viewersVP, "100%");
-
- adminsLabel.addStyleName("kune-AccessListSubLabel");
- editorsLabel.addStyleName("kune-AccessListSubLabel");
- viewersLabel.addStyleName("kune-AccessListSubLabel");
-
- }
-
- public void setAccessLists(final AccessListsDTO accessLists) {
- setGroupList(accessLists.getAdmins(), adminsVP);
- setGroupList(accessLists.getEditors(), editorsVP);
- setGroupList(accessLists.getViewers(), viewersVP);
- }
-
- private void setGroupList(final GroupListDTO groupList, final VerticalPanel groupVP) {
- groupVP.clear();
- if (groupList.getMode() == GroupListDTO.EVERYONE) {
- groupVP.add(new IconLabel(img.everybody(), i18n.t("Everybody")));
- } else if (groupList.getMode() == GroupListDTO.NOBODY) {
- groupVP.add(new IconLabel(img.nobody(), i18n.t("Nobody")));
- } else {
- final Iterator<GroupDTO> iter = groupList.getList().iterator();
- while (iter.hasNext()) {
- final GroupDTO next = iter.next();
- groupVP.add(new IconLabel(img.groupDefIcon(), next.getLongName()));
- }
- }
- }
-}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorPanel.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorPanel.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -0,0 +1,261 @@
+/*
+ *
+ * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.cxt;
+
+import java.util.Date;
+import java.util.List;
+
+import org.ourproject.kune.docs.client.ctx.admin.DocContextPropEditorPresenter;
+import org.ourproject.kune.docs.client.ctx.admin.DocContextPropEditorView;
+import org.ourproject.kune.platf.client.dto.AccessListsDTO;
+import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
+import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
+import org.ourproject.kune.platf.client.services.I18nTranslationService;
+import org.ourproject.kune.platf.client.services.Images;
+import org.ourproject.kune.platf.client.ui.ContextPropertyPanel;
+import org.ourproject.kune.workspace.client.i18n.LanguageSelector;
+import org.ourproject.kune.workspace.client.i18n.LanguageSelectorPanel;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+
+import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.gwtext.client.data.Record;
+import com.gwtext.client.widgets.form.ComboBox;
+import com.gwtext.client.widgets.form.DateField;
+import com.gwtext.client.widgets.form.Field;
+import com.gwtext.client.widgets.form.FormPanel;
+import com.gwtext.client.widgets.form.TextArea;
+import com.gwtext.client.widgets.form.event.ComboBoxListenerAdapter;
+import com.gwtext.client.widgets.form.event.FieldListenerAdapter;
+
+public abstract class AbstractContextPropEditorPanel extends ScrollPanel implements DocContextPropEditorView {
+
+ private static final int FORMS_WIDTH = 150;
+ public static final String TAGS_PROP = "k-dcpep-tagsp-dis";
+ public static final String LANG_PROP = "k-dcpep-langsp-dis";
+ public static final String PUBLI_PROP = "k-dcpep-publisp-dis";
+ private static final String ACL_PROP = "";
+
+ private final DocContextPropEditorPresenter presenter;
+ private final WorkspaceSkeleton ws;
+ private final I18nTranslationService i18n;
+ private final Provider<LanguageSelector> langSelectorProv;
+ private final VerticalPanel vp;
+ private ContextPropertyPanel tagsComponent;
+ private ContextPropertyPanel langComponent;
+ private ContextPropertyPanel publishedOnComponent;
+ private TextArea tagsField;
+ private DateField publishedOnField;
+ private final Images images;
+ private ContextPropertyPanel aclComponent;
+ private AccessListsPanel accessListsPanel;
+
+ public AbstractContextPropEditorPanel(final DocContextPropEditorPresenter presenter,
+ final I18nTranslationService i18n, WorkspaceSkeleton ws, Provider<LanguageSelector> langSelectorProv,
+ Images images) {
+ this.i18n = i18n;
+ this.ws = ws;
+ this.presenter = presenter;
+ this.langSelectorProv = langSelectorProv;
+ this.images = images;
+ super.addStyleName("kune-Margin-Medium-trbl");
+ vp = new VerticalPanel();
+ super.add(vp);
+ // authors_item = i18n.t("Authors");
+ }
+
+ public void attach() {
+ if (!super.isAttached()) {
+ ws.getEntityWorkspace().setContext(this);
+ }
+ }
+
+ public void detach() {
+ if (super.isAttached()) {
+ super.removeFromParent();
+ }
+ }
+
+ public void removeAccessListComponent() {
+ // if (options.containsItem(perms_item)) {
+ // removeComponent(perms_item);
+ // }
+ }
+
+ public void removeAclComponent() {
+ if (aclComponent != null) {
+ aclComponent.removeFromParent();
+ }
+ }
+
+ public void removeAuthorsComponent() {
+ // if (options.containsItem(authors_item)) {
+ // removeComponent(authors_item);
+ // }
+ }
+
+ public void removeLangComponent() {
+ if (langComponent != null) {
+ langComponent.removeFromParent();
+ }
+ }
+
+ public void removePublishedOnComponent() {
+ if (publishedOnComponent != null) {
+ publishedOnComponent.removeFromParent();
+ }
+ }
+
+ public void removeTagsComponent() {
+ if (tagsComponent != null) {
+ tagsComponent.removeFromParent();
+ }
+ }
+
+ public void reset() {
+ tagsField.reset();
+ }
+
+ public void setAccessLists(final AccessListsDTO accessLists) {
+ if (aclComponent == null) {
+ accessListsPanel = new AccessListsPanel(i18n, images);
+ aclComponent = new ContextPropertyPanel(i18n.t("Permissions"), i18n.t("Who can admin/edit/view this work"),
+ true, ACL_PROP, accessListsPanel);
+ addComponent(aclComponent);
+ }
+ accessListsPanel.setAccessLists(accessLists);
+ }
+
+ public void setAuthors(final List<UserSimpleDTO> authors) {
+ // if (authorsComponent == null) {
+ // authorsComponent = new VerticalPanel();
+ // addAuthorLabel = new IconLabel(IMG.addGreen(), i18n.t("Add author"));
+ // addAuthorLabel.addClickListener(new ClickListener() {
+ // public void onClick(final Widget sender) {
+ // presenter.doAction(DocsEvents.ADD_AUTHOR, null);
+ // }
+ // });
+ // } else {
+ // if (options.containsItem(authors_item)) {
+ // options.removeStackItem(authors_item);
+ // }
+ // authorsComponent.clear();
+ // }
+ // if (!options.containsItem(authors_item)) {
+ // addComponent(authors_item, i18n.t("Authors of this work"),
+ // authorsComponent);
+ // }
+ // for (final Iterator<UserSimpleDTO> iterator = authors.iterator();
+ // iterator.hasNext();) {
+ // final UserSimpleDTO author = iterator.next();
+ // final StackSubItemAction[] authorActions = { new
+ // StackSubItemAction(IMG.del(), i18n.t("Remove author"),
+ // DocsEvents.REMOVE_AUTHOR) };
+ // options.addStackSubItem(authors_item, IMG.personDef(),
+ // author.getShortName(), author.getName(),
+ // authorActions, presenter);
+ // }
+ // authorsComponent.add(addAuthorLabel);
+ }
+
+ public void setLanguage(final I18nLanguageDTO language) {
+ if (langComponent == null) {
+ final LanguageSelectorPanel view = (LanguageSelectorPanel) langSelectorProv.get().getView();
+ view.setWidth(FORMS_WIDTH);
+ langComponent = new ContextPropertyPanel(i18n.t("What language is this in?"), null, true, LANG_PROP, view);
+ view.addChangeListener(new ComboBoxListenerAdapter() {
+ @Override
+ public void onSelect(final ComboBox comboBox, final Record record, final int index) {
+ presenter.doChangeLanguage(record.getAsString(LanguageSelectorPanel.LANG_ID));
+ }
+ });
+ // angComponent.addStyleName("kune-Margin-Medium-t");
+ addComponent(langComponent);
+ }
+ langSelectorProv.get().setLanguage(language);
+ }
+
+ public void setPublishedOn(final Date publishedOn, String dateFormat) {
+ if (publishedOnField == null) {
+ publishedOnComponent = createPublicationComponent();
+ }
+ addComponent(publishedOnComponent);
+ publishedOnField.setValue(publishedOn);
+ publishedOnField.setFormat(dateFormat);
+ }
+
+ public void setTags(final String tags) {
+ if (tagsComponent == null) {
+ tagsComponent = createTagsComponent();
+ addComponent(tagsComponent);
+ }
+ tagsField.setValue(tags);
+ }
+
+ private void addComponent(ContextPropertyPanel prop) {
+ vp.add(prop);
+ }
+
+ private FormPanel createDefaultForm() {
+ final FormPanel form = new FormPanel();
+ form.setHideLabels(true);
+ form.setWidth(FORMS_WIDTH);
+ form.setBorder(false);
+ return form;
+ }
+
+ private ContextPropertyPanel createPublicationComponent() {
+ final FormPanel form = createDefaultForm();
+
+ publishedOnField = new DateField();
+ publishedOnField.setWidth("140");
+
+ publishedOnField.addListener(new FieldListenerAdapter() {
+ @Override
+ public void onChange(final Field field, final Object newVal, final Object oldVal) {
+ presenter.setPublishedOn((Date) newVal);
+ }
+ });
+ form.add(publishedOnField);
+ return new ContextPropertyPanel(i18n.t("Publication"), i18n.t("Date of publication"), true, PUBLI_PROP, form);
+ }
+
+ private ContextPropertyPanel createTagsComponent() {
+ final FormPanel form = createDefaultForm();
+ tagsField = new TextArea();
+ tagsField.setWidth(FORMS_WIDTH - 10);
+ tagsField.setHeight("3em");
+ tagsField.addListener(new FieldListenerAdapter() {
+ @Override
+ public void onChange(final Field field, final Object newVal, final Object oldVal) {
+ presenter.setTags((String) newVal);
+ }
+ });
+ form.add(tagsField);
+ return new ContextPropertyPanel(i18n.t("Tags"), i18n.t("Keywords or terms associated with this work"), true,
+ TAGS_PROP, form);
+ }
+
+ // private void removeComponent(final String header) {
+ // options.removeStackItem(header);
+ // }
+
+}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorPresenter.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorPresenter.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -0,0 +1,197 @@
+/*
+ *
+ * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.cxt;
+
+import java.util.Date;
+import java.util.List;
+
+import org.ourproject.kune.docs.client.ctx.admin.DocContextPropEditorView;
+import org.ourproject.kune.platf.client.dto.AccessListsDTO;
+import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
+import org.ourproject.kune.platf.client.dto.StateContainerDTO;
+import org.ourproject.kune.platf.client.dto.StateContentDTO;
+import org.ourproject.kune.platf.client.dto.TagResultDTO;
+import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
+import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
+import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
+import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.workspace.client.site.Site;
+import org.ourproject.kune.workspace.client.tags.TagsSummary;
+import org.ourproject.kune.workspace.client.title.EntitySubTitle;
+import org.ourproject.kune.workspace.client.title.EntityTitle;
+
+import com.calclab.suco.client.ioc.Provider;
+
+public abstract class AbstractContextPropEditorPresenter {
+
+ private DocContextPropEditorView view;
+ private final Session session;
+ private final Provider<TagsSummary> tagsSummaryProvider;
+ private final Provider<ContentServiceAsync> contentServiceProvider;
+ private final EntitySubTitle entitySubTitle;
+ private final EntityTitle entityTitle;
+ private final StateManager stateManager;
+ private final ContentCapabilitiesRegistry capabilitiesRegistry;
+
+ public AbstractContextPropEditorPresenter(final Session session, final StateManager stateManager,
+ ContentCapabilitiesRegistry capabilitiesRegistry, final Provider<TagsSummary> tagsSummaryProvider,
+ final Provider<ContentServiceAsync> contentServiceProvider, final EntityTitle entityTitle,
+ final EntitySubTitle entitySubTitle) {
+ this.session = session;
+ this.stateManager = stateManager;
+ this.capabilitiesRegistry = capabilitiesRegistry;
+ this.tagsSummaryProvider = tagsSummaryProvider;
+ this.contentServiceProvider = contentServiceProvider;
+ this.entityTitle = entityTitle;
+ this.entitySubTitle = entitySubTitle;
+ }
+
+ public void addAuthor(final String authorShortName) {
+ Site.showProgressProcessing();
+ final StateContainerDTO currentState = session.getContentState();
+ contentServiceProvider.get().addAuthor(session.getUserHash(), currentState.getStateToken(), authorShortName,
+ new AsyncCallbackSimple<Object>() {
+ public void onSuccess(final Object result) {
+ Site.hideProgress();
+ stateManager.reload();
+ }
+ });
+ }
+
+ public void attach() {
+ view.attach();
+ }
+
+ public void clear() {
+ view.reset();
+ }
+
+ public void delAuthor(final String authorShortName) {
+ Site.showProgressProcessing();
+ final StateContainerDTO currentState = session.getContentState();
+ contentServiceProvider.get().removeAuthor(session.getUserHash(), currentState.getStateToken(), authorShortName,
+ new AsyncCallbackSimple<Object>() {
+ public void onSuccess(final Object result) {
+ Site.hideProgress();
+ stateManager.reload();
+ }
+ });
+ }
+
+ public void detach() {
+ view.detach();
+ }
+
+ public void doChangeLanguage(final String langCode) {
+ Site.showProgressProcessing();
+ final StateContainerDTO currentState = session.getContentState();
+ contentServiceProvider.get().setLanguage(session.getUserHash(), currentState.getStateToken(), langCode,
+ new AsyncCallbackSimple<I18nLanguageDTO>() {
+ public void onSuccess(final I18nLanguageDTO lang) {
+ Site.hideProgress();
+ entitySubTitle.setContentLanguage(lang.getEnglishName());
+ }
+ });
+ }
+
+ public void init(final DocContextPropEditorView view) {
+ this.view = view;
+ }
+
+ public void setPublishedOn(final Date publishedOn) {
+ Site.showProgressProcessing();
+ final StateContainerDTO currentState = session.getContentState();
+ contentServiceProvider.get().setPublishedOn(session.getUserHash(), currentState.getStateToken(), publishedOn,
+ new AsyncCallbackSimple<Object>() {
+ public void onSuccess(final Object result) {
+ Site.hideProgress();
+ entityTitle.setContentDate(publishedOn);
+ }
+ });
+ }
+
+ public void setState(final StateContentDTO state) {
+ // In the future check the use of these components by each tool
+ final I18nLanguageDTO language = state.getLanguage();
+ final AccessListsDTO accessLists = state.getAccessLists();
+ final Date publishedOn = state.getPublishedOn();
+ final String tags = state.getTags();
+ final List<UserSimpleDTO> authors = state.getAuthors();
+
+ String typeId = state.getTypeId();
+ if (capabilitiesRegistry.isTranslatable(typeId)) {
+ assert (language != null);
+ view.setLanguage(language);
+ } else {
+ view.removeLangComponent();
+ }
+ if (capabilitiesRegistry.isTageable(typeId)) {
+ assert (tags != null);
+ view.setTags(tags);
+ } else {
+ view.removeTagsComponent();
+ }
+ if (capabilitiesRegistry.isAuthorable(typeId)) {
+ assert (authors != null);
+ view.setAuthors(authors);
+ } else {
+ view.removeAuthorsComponent();
+ }
+ if (capabilitiesRegistry.isPublishModerable(typeId)) {
+ assert (publishedOn != null);
+ String dateFormat = session.getCurrentLanguage().getDateFormatShort();
+ if (dateFormat != null) {
+ dateFormat = dateFormat.replace("yyyy", "Y");
+ dateFormat = dateFormat.replace("yy", "y");
+ dateFormat = dateFormat.replace("MM", "m");
+ dateFormat = dateFormat.replace("M", "n");
+ dateFormat = dateFormat.replace("dd", "xxx");
+ dateFormat = dateFormat.replace("d", "j");
+ dateFormat = dateFormat.replace("xxx", "d");
+ view.setPublishedOn(publishedOn, dateFormat);
+ } else {
+ view.setPublishedOn(publishedOn, "M/d/yy def");
+ }
+ } else {
+ view.removePublishedOnComponent();
+ }
+ if (capabilitiesRegistry.isAclEditable(typeId)) {
+ assert (accessLists != null);
+ view.setAccessLists(accessLists);
+ } else {
+ view.removeAccessListComponent();
+ }
+ }
+
+ public void setTags(final String tagsString) {
+ Site.showProgressProcessing();
+ final StateContainerDTO currentState = session.getContentState();
+ contentServiceProvider.get().setTags(session.getUserHash(), currentState.getStateToken(), tagsString,
+ new AsyncCallbackSimple<List<TagResultDTO>>() {
+ public void onSuccess(final List<TagResultDTO> result) {
+ tagsSummaryProvider.get().setGroupTags(result);
+ Site.hideProgress();
+ }
+ });
+ }
+
+}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorView.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AbstractContextPropEditorView.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.cxt;
+
+import java.util.Date;
+import java.util.List;
+
+import org.ourproject.kune.platf.client.dto.AccessListsDTO;
+import org.ourproject.kune.platf.client.dto.I18nLanguageDTO;
+import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
+
+public interface AbstractContextPropEditorView {
+
+ void attach();
+
+ void detach();
+
+ void removeAccessListComponent();
+
+ void removeAuthorsComponent();
+
+ void removeLangComponent();
+
+ void removePublishedOnComponent();
+
+ void removeTagsComponent();
+
+ void reset();
+
+ void setAccessLists(AccessListsDTO accessLists);
+
+ void setAuthors(List<UserSimpleDTO> authors);
+
+ void setLanguage(I18nLanguageDTO language);
+
+ void setPublishedOn(Date publishedOn, String dateFormat);
+
+ void setTags(String tags);
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AccessListsPanel.java (from rev 949, trunk/src/main/java/org/ourproject/kune/workspace/client/ctxadmin/AccessListsPanel.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxadmin/AccessListsPanel.java 2008-11-11 13:33:36 UTC (rev 949)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AccessListsPanel.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -0,0 +1,99 @@
+/*
+ *
+ * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.cxt;
+
+import java.util.Iterator;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.dto.AccessListsDTO;
+import org.ourproject.kune.platf.client.dto.GroupDTO;
+import org.ourproject.kune.platf.client.dto.GroupListDTO;
+import org.ourproject.kune.platf.client.services.I18nTranslationService;
+import org.ourproject.kune.platf.client.services.Images;
+import org.ourproject.kune.platf.client.ui.IconLabel;
+
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.VerticalPanel;
+
+public class AccessListsPanel extends VerticalPanel implements View {
+
+ private final VerticalPanel adminsVP;
+ private final VerticalPanel editorsVP;
+ private final VerticalPanel viewersVP;
+ private final I18nTranslationService i18n;
+ private final Images img;
+
+ public AccessListsPanel(final I18nTranslationService i18n, Images img) {
+ this.i18n = i18n;
+ this.img = img;
+ final Label adminsLabel = new Label(i18n.t("Who can admin this:"));
+ adminsVP = new VerticalPanel();
+ final Label editorsLabel = new Label(i18n.t("Who more can edit:"));
+ editorsVP = new VerticalPanel();
+ final Label viewersLabel = new Label(i18n.t("Who more can view:"));
+ viewersVP = new VerticalPanel();
+
+ // Layout
+ this.add(adminsLabel);
+ this.add(adminsVP);
+ this.add(editorsLabel);
+ this.add(editorsVP);
+ this.add(viewersLabel);
+ this.add(viewersVP);
+
+ // Set properties
+ // FIXME: titledPanel.setTitle("Who can admin, edit or view this
+ // content");
+ // addStyleName("kune-AccessList");
+ setWidth("100%");
+ this.setWidth("100%");
+ this.setCellWidth(adminsLabel, "100%");
+ this.setCellWidth(editorsLabel, "100%");
+ this.setCellWidth(viewersLabel, "100%");
+ this.setCellWidth(adminsVP, "100%");
+ this.setCellWidth(editorsVP, "100%");
+ this.setCellWidth(viewersVP, "100%");
+
+ adminsLabel.addStyleName("kune-AccessListSubLabel");
+ editorsLabel.addStyleName("kune-AccessListSubLabel");
+ viewersLabel.addStyleName("kune-AccessListSubLabel");
+ }
+
+ public void setAccessLists(final AccessListsDTO accessLists) {
+ setGroupList(accessLists.getAdmins(), adminsVP);
+ setGroupList(accessLists.getEditors(), editorsVP);
+ setGroupList(accessLists.getViewers(), viewersVP);
+ }
+
+ private void setGroupList(final GroupListDTO groupList, final VerticalPanel groupVP) {
+ groupVP.clear();
+ if (groupList.getMode() == GroupListDTO.EVERYONE) {
+ groupVP.add(new IconLabel(img.everybody(), i18n.t("Everybody")));
+ } else if (groupList.getMode() == GroupListDTO.NOBODY) {
+ groupVP.add(new IconLabel(img.nobody(), i18n.t("Nobody")));
+ } else {
+ final Iterator<GroupDTO> iter = groupList.getList().iterator();
+ while (iter.hasNext()) {
+ final GroupDTO next = iter.next();
+ groupVP.add(new IconLabel(img.groupDefIcon(), next.getLongName()));
+ }
+ }
+ }
+}
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/AccessListsPanel.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/content/ContentServiceVariousTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/content/ContentServiceVariousTest.java 2008-11-13 03:38:02 UTC (rev 951)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/content/ContentServiceVariousTest.java 2008-11-17 10:14:27 UTC (rev 952)
@@ -48,7 +48,6 @@
contentService.rateContent(getHash(), defaultContent.getStateToken(), 4.5);
final StateContentDTO again = (StateContentDTO) contentService.getContent(getHash(),
defaultContent.getStateToken());
- assertEquals(true, again.isRateable());
assertEquals(new Double(4.5), again.getCurrentUserRate());
assertEquals(new Double(4.5), again.getRate());
assertEquals(new Integer(1), again.getRateByUsers());
More information about the kune-commits
mailing list