updated accountings
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@75353 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
70153d12a8
commit
cd885a3fb3
|
@ -117,7 +117,8 @@ public class AppController implements SubscriberInterface {
|
|||
EventsTypeEnum.REFRESH_FOLDER,
|
||||
EventsTypeEnum.SELECTED_MESSAGE,
|
||||
EventsTypeEnum.CREATE_NEW_MESSAGE,
|
||||
EventsTypeEnum.REPLY_FORWARD_MESSAGE
|
||||
EventsTypeEnum.REPLY_FORWARD_MESSAGE,
|
||||
EventsTypeEnum.FILE_DOWNLAD_EVENT
|
||||
});
|
||||
bind();
|
||||
}
|
||||
|
@ -164,7 +165,7 @@ public class AppController implements SubscriberInterface {
|
|||
FileGridModel fileItem = getGridSelectedItem();
|
||||
|
||||
if(fileItem!=null){
|
||||
AppControllerExplorer.getEventBus().fireEvent(new AccountingHistoryEvent(fileItem.getIdentifier()));
|
||||
AppControllerExplorer.getEventBus().fireEvent(new AccountingHistoryEvent(fileItem));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -178,7 +179,7 @@ public class AppController implements SubscriberInterface {
|
|||
FileGridModel fileItem = getGridSelectedItem();
|
||||
|
||||
if(fileItem!=null){
|
||||
AppControllerExplorer.getEventBus().fireEvent(new AccountingReadersEvent(fileItem.getIdentifier()));
|
||||
AppControllerExplorer.getEventBus().fireEvent(new AccountingReadersEvent(fileItem));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -235,8 +236,21 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
@Override
|
||||
public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) {
|
||||
|
||||
if(fileDownloadEvent!=null){
|
||||
// FileGridModel fileItem = getGridSelectedItem();
|
||||
//
|
||||
// String id = fileDownloadEvent.getItemIdentifier()!=null? fileDownloadEvent.getItemIdentifier():"";
|
||||
//
|
||||
// if(fileItem!=null && id.compareTo(fileItem.getIdentifier())==0){
|
||||
// fileItem.setMarkAsRead(true);
|
||||
// accountingSetItemAsRead(true);
|
||||
// }
|
||||
|
||||
AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(fileDownloadEvent.getItemIdentifier(), fileDownloadEvent.getItemName(), fileDownloadEvent.getDownloadType()));
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
eventBus.addHandler(DeleteMessageEvent.TYPE, new DeleteMessageEventHandler() {
|
||||
|
@ -957,4 +971,19 @@ public class AppController implements SubscriberInterface {
|
|||
});
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface#fileDownloaded(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void fileDownloaded(String itemIdentifier) {
|
||||
|
||||
FileGridModel fileItem = wsPortlet.getGridGroupContainer().getFileGridModelByIdentifier(itemIdentifier);
|
||||
|
||||
if(fileItem!=null && itemIdentifier!= null && fileItem.getIdentifier().compareTo(itemIdentifier)==0){
|
||||
fileItem.setMarkAsRead(true);
|
||||
accountingSetItemAsRead(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ public class GxtSeachAndFilterPanel extends LayoutContainer {
|
|||
}
|
||||
|
||||
public void setSearchActive(boolean isSearchActive) {
|
||||
System.out.println("#################SET SEARCH ACTIVE in GRID " + isSearchActive);
|
||||
// System.out.println("#################SET SEARCH ACTIVE in GRID " + isSearchActive);
|
||||
this.isSearchActive = isSearchActive;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue