bug fixed: download item on toolbar
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@77467 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5e5b88d473
commit
76a4bc614c
|
@ -102,7 +102,6 @@ public class AppController implements SubscriberInterface {
|
||||||
private String rootIdentifier = null;
|
private String rootIdentifier = null;
|
||||||
// public static boolean isSearchActive = false;
|
// public static boolean isSearchActive = false;
|
||||||
|
|
||||||
|
|
||||||
public AppController(AppControllerExplorer appControllerExplorer) {
|
public AppController(AppControllerExplorer appControllerExplorer) {
|
||||||
this.appContrExplorer = appControllerExplorer;
|
this.appContrExplorer = appControllerExplorer;
|
||||||
this.appContrExplorer.subscribe(this, new EventsTypeEnum[] {
|
this.appContrExplorer.subscribe(this, new EventsTypeEnum[] {
|
||||||
|
@ -258,7 +257,7 @@ public class AppController implements SubscriberInterface {
|
||||||
@Override
|
@Override
|
||||||
public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) {
|
public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) {
|
||||||
|
|
||||||
if(fileDownloadEvent!=null){
|
if(fileDownloadEvent!=null && fileDownloadEvent.getItemIdentifier()!=null){
|
||||||
// FileGridModel fileItem = getGridSelectedItem();
|
// FileGridModel fileItem = getGridSelectedItem();
|
||||||
//
|
//
|
||||||
// String id = fileDownloadEvent.getItemIdentifier()!=null? fileDownloadEvent.getItemIdentifier():"";
|
// String id = fileDownloadEvent.getItemIdentifier()!=null? fileDownloadEvent.getItemIdentifier():"";
|
||||||
|
@ -636,14 +635,14 @@ public class AppController implements SubscriberInterface {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
eventBus.addHandler(FileDownloadEvent.TYPE, new FileDownloadEventHandler() {
|
// eventBus.addHandler(FileDownloadEvent.TYPE, new FileDownloadEventHandler() {
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) {
|
// public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) {
|
||||||
AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(fileDownloadEvent.getItemIdentifier(), fileDownloadEvent.getItemName(), fileDownloadEvent.getDownloadType()));
|
// AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(fileDownloadEvent.getItemIdentifier(), fileDownloadEvent.getItemName(), fileDownloadEvent.getDownloadType()));
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
eventBus.addHandler(DeleteItemEvent.TYPE, new DeleteItemEventHandler() {
|
eventBus.addHandler(DeleteItemEvent.TYPE, new DeleteItemEventHandler() {
|
||||||
|
|
|
@ -54,6 +54,4 @@ public class ConstantsPortlet {
|
||||||
public static final int COOKIE_EXPIRE_DAYS = 30;
|
public static final int COOKIE_EXPIRE_DAYS = 30;
|
||||||
public static final long MILLISECS_PER_DAY = 1000L * 60L * 60L * 24L;
|
public static final long MILLISECS_PER_DAY = 1000L * 60L * 60L * 24L;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -304,10 +304,7 @@ public class GxtToolBarItemFunctionality {
|
||||||
|
|
||||||
final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
|
||||||
|
|
||||||
AppController.getEventBus().fireEvent(
|
AppController.getEventBus().fireEvent(new FileDownloadEvent(fileGridModel.getIdentifier(), fileGridModel.getName(), DownloadType.DOWNLOAD));
|
||||||
new FileDownloadEvent(fileGridModel
|
|
||||||
.getIdentifier(), fileGridModel
|
|
||||||
.getName(), DownloadType.DOWNLOAD));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue