This commit is contained in:
Francesco Mangiacrapa 2013-05-29 12:09:11 +00:00
parent 8584bc4647
commit 6829d71cc1
5 changed files with 23 additions and 10 deletions

View File

@ -740,6 +740,10 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
else
com.google.gwt.user.client.Window.open(ConstantsExplorer.DOWNLOAD_WORKSPACE_SERVICE+"?id="+fileDownloadEvent.getItemIdentifier(), "_self", "");
FileModel file = explorerPanel.getAsycTreePanel().getFileModelByIdentifier(fileDownloadEvent.getItemIdentifier());
file.setMarkAsRead(true);
notifySubscriber(fileDownloadEvent);
}
@ -775,9 +779,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
@Override
public void onCompletedFileUploadEvent(CompletedFileUploadEvent completedFileUploadEvent) {
doCompletedFileUploadEvent(completedFileUploadEvent);
doCompletedFileUploadEvent(completedFileUploadEvent);
}
private void doCompletedFileUploadEvent(CompletedFileUploadEvent completedFileUploadEvent) {

View File

@ -18,7 +18,6 @@ public class RefreshFolderEvent extends GwtEvent<RefreshItemEventHandler> implem
@Override
public Type<RefreshItemEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}

View File

@ -107,7 +107,7 @@ public class DialogShareFolder extends Dialog {
textAreaDescription.setHeight(heightTextArea);
textAreaDescription.setWidth(380);
textAreaDescription.setValue(folder.getDescription());
textAreaDescription.setReadOnly(true);
// textAreaDescription.setReadOnly(true);
final LayoutContainer lc = new LayoutContainer();
lc.setStyleAttribute("margin-top", "10px");

View File

@ -637,11 +637,15 @@ public class ContextMenuTree {
contextMenu.getItemByItemId(WorkspaceOperation.UNSHARE.getId()).setVisible(false); //UNSHARE
//ACCOUNTINGS
if(selectedItem.isMarkAsRead())
if(selectedItem.isMarkAsRead()){
contextMenu.getItemByItemId(WorkspaceOperation.ACCREAD.getId()).setVisible(true); //ACCAUNTING READ
mnRead.setIcon(Resources.getIconRead());
else
}
else{
contextMenu.getItemByItemId(WorkspaceOperation.ACCREAD.getId()).setVisible(false); //ACCAUNTING READ
mnRead.setIcon(Resources.getIconNotRead());
}
if(selectedItem.isDirectory()){
contextMenu.getItemByItemId(WorkspaceOperation.SHARE.getId()).setVisible(true); //SHARE
contextMenu.getItemByItemId(WorkspaceOperation.SHOW.getId()).setVisible(false); //show

View File

@ -1597,8 +1597,10 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
if(listLogin.size()>0){
if(!isNewFolder)
if(!isNewFolder){
sharedFolder = workspace.shareFolder(listLogin, folder.getIdentifier());
sharedFolder.setDescription(folder.getDescription()); //SET NEW DESCRIPTION
}
else
sharedFolder = workspace.createSharedFolder(folder.getName(), folder.getDescription(), listLogin, folder.getParentFileModel().getIdentifier());
}
@ -1730,6 +1732,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
workspaceLogger.trace("unSharedFolderByFolderSharedId "+ folderSharedId);
try {
Workspace workspace = getWorkspace();
WorkspaceItem wsItem = workspace.getItem(folderSharedId);
@ -1748,8 +1751,11 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
workspaceLogger.trace("unShared is "+ unShared);
/* INTERNAL POLICY, UN SHARE NOT SHOULD PRODUCE NOTIFICATIONS
if(unShared){
NotificationsProducer np = getNotificationProducer();
List<InfoContactModel> contacts = getListUserSharedByFolderSharedId(folderSharedId);
// if(isTestMode()){
@ -1761,12 +1767,14 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
np.notifyFolderUnSharing(contacts, unSharedFolder);
}
*/
}
else
workspaceLogger.trace("the item with id: "+folderSharedId+ "is not "+WorkspaceItemType.SHARED_FOLDER);
} catch (InsufficientPrivilegesException e) {
} catch (InternalErrorException e) {
workspaceLogger.error("Error in unSharedFolderByFolderSharedId ", e);
String error = "An error occerred on unsharing folder. "+ e.getMessage();
throw new Exception(error);