added ACLDivInfo
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@91842 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d9841cda92
commit
6c453b15da
|
@ -1068,14 +1068,21 @@ public class AppController implements SubscriberInterface {
|
||||||
|
|
||||||
if(parent!=null && parent.isDirectory() && parent.isShared())
|
if(parent!=null && parent.isDirectory() && parent.isShared())
|
||||||
setACLInfo(parent.getIdentifier());
|
setACLInfo(parent.getIdentifier());
|
||||||
|
else
|
||||||
|
setACLInfo(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void setACLInfo(String parentId){
|
private void setACLInfo(final String parentId){
|
||||||
|
|
||||||
|
if(parentId==null){
|
||||||
|
wsPortlet.getToolBarItemDetails().updateACLInfo(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GWT.log("Updating ACL info for folder id: "+parentId);
|
GWT.log("Updating ACL info for folder id: "+parentId);
|
||||||
AppControllerExplorer.rpcWorkspaceService.getACLForFolderId(parentId, new AsyncCallback<List<WorkspaceACL>>() {
|
AppControllerExplorer.rpcWorkspaceService.getUserACLForFolderId(parentId, new AsyncCallback<List<WorkspaceACL>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable arg0) {
|
public void onFailure(Throwable arg0) {
|
||||||
|
@ -1085,9 +1092,15 @@ public class AppController implements SubscriberInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<WorkspaceACL> res) {
|
public void onSuccess(List<WorkspaceACL> res) {
|
||||||
|
|
||||||
|
FileModel parent = wsPortlet.getToolBarPath().getLastParent();
|
||||||
|
|
||||||
|
GWT.log("Validatating correct ACL id: "+parentId +" and "+parent.getIdentifier());
|
||||||
|
if(parentId.compareTo(parent.getIdentifier())==0){
|
||||||
if(res!=null && res.size()>0)
|
if(res!=null && res.size()>0)
|
||||||
wsPortlet.getToolBarItemDetails().updateACLInfo(res.get(0));
|
wsPortlet.getToolBarItemDetails().updateACLInfo(res.get(0));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class ACLDivInfo extends LayoutContainer {
|
||||||
public ACLDivInfo(String caption, AbstractImagePrototype img) {
|
public ACLDivInfo(String caption, AbstractImagePrototype img) {
|
||||||
super();
|
super();
|
||||||
super.setWidth(80);
|
super.setWidth(80);
|
||||||
text.setPixelSize(50, 30);
|
text.setPixelSize(50, 26);
|
||||||
hpPanel.setWidth("100%");
|
hpPanel.setWidth("100%");
|
||||||
|
|
||||||
updateInfo(caption,img);
|
updateInfo(caption,img);
|
||||||
|
@ -31,7 +31,7 @@ public class ACLDivInfo extends LayoutContainer {
|
||||||
|
|
||||||
public void updateInfo(String caption, AbstractImagePrototype img){
|
public void updateInfo(String caption, AbstractImagePrototype img){
|
||||||
|
|
||||||
String html = "<div style=\"width: 100%; height: 25px; text-align:left;\">";
|
String html = "<div style=\"width: 100%; height: 24px; text-align:left; padding-top: 2px; opacity: 0.9;\">";
|
||||||
|
|
||||||
if(img!=null)
|
if(img!=null)
|
||||||
html+=addImage(img);
|
html+=addImage(img);
|
||||||
|
|
|
@ -171,6 +171,10 @@ public class GxtBottomToolBarItem extends ToolBar{
|
||||||
|
|
||||||
public void updateACLInfo(WorkspaceACL acl){
|
public void updateACLInfo(WorkspaceACL acl){
|
||||||
|
|
||||||
|
if(acl==null){
|
||||||
|
aclDivInfo.updateInfo(null, null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
AbstractImagePrototype img = GetPermissionIconByACL.getImage(acl);
|
AbstractImagePrototype img = GetPermissionIconByACL.getImage(acl);
|
||||||
aclDivInfo.updateInfo(acl.getLabel(), img);
|
aclDivInfo.updateInfo(acl.getLabel(), img);
|
||||||
this.layout();
|
this.layout();
|
||||||
|
|
Loading…
Reference in New Issue