Updated css

Updated pom at version 6.12

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@128592 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2016-05-13 10:26:40 +00:00
parent daab415b6d
commit 3db5f2f2b4
5 changed files with 187 additions and 149 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/workspace-6.11.0-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/workspace-6.12.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
@ -26,5 +26,6 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/workspace-6.11.0-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry kind="output" path="target/workspace-6.12.0-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -5,10 +5,10 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="workspace-tree-widget-6.11.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-tree-widget-TRUNK/workspace-tree-widget-TRUNK"> <dependent-module archiveName="workspace-tree-widget-6.12.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-tree-widget-TRUNK/workspace-tree-widget-TRUNK">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="workspace-uploader-1.1.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-uploader-TRUNK/workspace-uploader-TRUNK"> <dependent-module archiveName="workspace-uploader-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-uploader-TRUNK/workspace-uploader-TRUNK">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>

16
pom.xml
View File

@ -61,11 +61,11 @@
<dependencies> <dependencies>
<!-- UNCOMMENT THIS TO RUN IN DEVO MODE --> <!-- UNCOMMENT THIS TO RUN IN DEVO MODE -->
<!-- <dependency> --> <dependency>
<!-- <groupId>xerces</groupId> --> <groupId>xerces</groupId>
<!-- <artifactId>xerces</artifactId> --> <artifactId>xerces</artifactId>
<!-- <version>2.4.0</version> --> <version>2.4.0</version>
<!-- </dependency> --> </dependency>
<!-- This dependency is needed and is need on TOP to use GWT UI BInder <!-- This dependency is needed and is need on TOP to use GWT UI BInder
without old Xerces version of gCore complaining --> without old Xerces version of gCore complaining -->
@ -151,6 +151,12 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslsocial</artifactId>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>workspace-tree-widget</artifactId> <artifactId>workspace-tree-widget</artifactId>

View File

@ -160,7 +160,7 @@ public class AppController implements SubscriberInterface {
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[] {
EventsTypeEnum.RENAME_ITEM_EVENT, EventsTypeEnum.RENAME_ITEM_EVENT,
EventsTypeEnum.SELECTED_ITEM_EVENT, EventsTypeEnum.SELECTED_ITEM_EVENT,
// EventsTypeEnum.EXPAND_FOLDER_EVENT, // EventsTypeEnum.EXPAND_FOLDER_EVENT,
EventsTypeEnum.ADDED_FOLDER_EVENT, EventsTypeEnum.ADDED_FOLDER_EVENT,
@ -204,19 +204,19 @@ public class AppController implements SubscriberInterface {
*/ */
private void bind() { private void bind() {
//double click on URLs //double click on URLs
eventBus.addHandler(OpenUrlEvent.TYPE, new OpenUrlEventHandler() { eventBus.addHandler(OpenUrlEvent.TYPE, new OpenUrlEventHandler() {
@Override @Override
public void onClickUrl(OpenUrlEvent openUrlEvent) { public void onClickUrl(OpenUrlEvent openUrlEvent) {
AppControllerExplorer.getInstance().doClickUrl(openUrlEvent); AppControllerExplorer.getInstance().doClickUrl(openUrlEvent);
} }
}); });
eventBus.addHandler(UpdateWorkspaceSizeEvent.TYPE, new UpdateWorkspaceSizeEventHandler() { eventBus.addHandler(UpdateWorkspaceSizeEvent.TYPE, new UpdateWorkspaceSizeEventHandler() {
@Override @Override
public void onUpdateWorkspaceSize(UpdateWorkspaceSizeEvent updateWorkspaceSizeEvent) { public void onUpdateWorkspaceSize(UpdateWorkspaceSizeEvent updateWorkspaceSizeEvent) {
updateWorksapaceSize(true); updateWorksapaceSize(true);
} }
}); });
eventBus.addHandler(StoreGridChangedEvent.TYPE, new StoreGridChangedEventHandler() { eventBus.addHandler(StoreGridChangedEvent.TYPE, new StoreGridChangedEventHandler() {
@ -391,7 +391,7 @@ public class AppController implements SubscriberInterface {
} }
} }
}); });
eventBus.addHandler(WebDavUrlEvent.TYPE, new WebDavUrlEventHandler() { eventBus.addHandler(WebDavUrlEvent.TYPE, new WebDavUrlEventHandler() {
@Override @Override
@ -450,7 +450,7 @@ public class AppController implements SubscriberInterface {
if(!event.isMultiSelection()){ //IS NOT MULTISELECTION if(!event.isMultiSelection()){ //IS NOT MULTISELECTION
doElementGridSelected(true, event.getSourceFile()); doElementGridSelected(true, event.getSourceFile());
}else{ //IS MULTISELECTION }else{ //IS MULTISELECTION
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activeButtonForMultiSelection(true); wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activeButtonForMultiSelection(true);
@ -578,7 +578,7 @@ public class AppController implements SubscriberInterface {
if(wsPortlet.getGxtCardLayoutResultPanel().getActivePanel() instanceof GxtItemsPanel){ //If active panel is panel with file items if(wsPortlet.getGxtCardLayoutResultPanel().getActivePanel() instanceof GxtItemsPanel){ //If active panel is panel with file items
wsPortlet.getSearchAndFilterContainer().setVisibleButtonSave(true); //ADDED 24/04/2012 wsPortlet.getSearchAndFilterContainer().setVisibleButtonSave(true); //ADDED 24/04/2012
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(true); wsPortlet.getGridGroupContainer().setBorderAsOnSearch(true);
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE); wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
@ -599,7 +599,7 @@ public class AppController implements SubscriberInterface {
wsPortlet.getGridGroupContainer().unmask(); wsPortlet.getGridGroupContainer().unmask();
} }
}); });
} }
} }
}); });
@ -658,7 +658,7 @@ public class AppController implements SubscriberInterface {
GWT.log("reloading breadcrumb by item including as last parent"); GWT.log("reloading breadcrumb by item including as last parent");
loadParentBreadcrumbByItemId(itemId, true); //RELOAD BREDCRUMB loadParentBreadcrumbByItemId(itemId, true); //RELOAD BREDCRUMB
} }
boolean selected =wsPortlet.getGridGroupContainer().selectItemByFileModelId(itemId); boolean selected =wsPortlet.getGridGroupContainer().selectItemByFileModelId(itemId);
if(selected) if(selected)
@ -711,7 +711,7 @@ public class AppController implements SubscriberInterface {
if(wsPortlet.getGxtCardLayoutResultPanel().getActivePanel() instanceof GxtItemsPanel){ //If active panel is panel with file items if(wsPortlet.getGxtCardLayoutResultPanel().getActivePanel() instanceof GxtItemsPanel){ //If active panel is panel with file items
AppController.getEventBus().fireEvent(new SearchTextEvent(null, null)); AppController.getEventBus().fireEvent(new SearchTextEvent(null, null));
} }
doPathElementSelected(event); doPathElementSelected(event);
} }
private void doPathElementSelected(PathElementSelectedEvent event) { private void doPathElementSelected(PathElementSelectedEvent event) {
@ -734,17 +734,17 @@ public class AppController implements SubscriberInterface {
@Override @Override
public void onAddItem(AddFolderEvent event) { public void onAddItem(AddFolderEvent event) {
FileModel folderToInsert = event.getFileSourceModel(); FileModel folderToInsert = event.getFileSourceModel();
GWT.log("Folder parent to create new folder not found, Loading from breadcrumb"); GWT.log("Folder parent to create new folder not found, Loading from breadcrumb");
if(folderToInsert==null){ if(folderToInsert==null){
folderToInsert = wsPortlet.getToolBarPath().getLastParent(); folderToInsert = wsPortlet.getToolBarPath().getLastParent();
GWT.log("Folder parent in breadcrumb: "+folderToInsert.getName()); GWT.log("Folder parent in breadcrumb: "+folderToInsert.getName());
} }
if(folderToInsert!=null) if(folderToInsert!=null)
AppControllerExplorer.getEventBus().fireEvent(new AddFolderEvent(folderToInsert,event.getParentFileModel())); AppControllerExplorer.getEventBus().fireEvent(new AddFolderEvent(folderToInsert,event.getParentFileModel()));
} }
}); });
@ -844,29 +844,29 @@ public class AppController implements SubscriberInterface {
final FileModel target = parent; final FileModel target = parent;
final int size = event.getListTarget().size(); final int size = event.getListTarget().size();
List<? extends FileModel> targets = event.getListTarget(); List<? extends FileModel> targets = event.getListTarget();
final List<FileModel> clearTargets = new ArrayList<FileModel>(targets); final List<FileModel> clearTargets = new ArrayList<FileModel>(targets);
//IGNORING SHARED FOLDER //IGNORING SHARED FOLDER
List<FileModel> ingnoreFile = new ArrayList<FileModel>(size); List<FileModel> ingnoreFile = new ArrayList<FileModel>(size);
for (FileModel file : targets) { for (FileModel file : targets) {
GWT.log("Checking file "+file); GWT.log("Checking file "+file);
if((file.getType()!=null && file.getType().equals(GXTFolderItemTypeEnum.SHARED_FOLDER.toString())) || file.isSpecialFolder()){ if(file.getType()!=null && file.getType().equals(GXTFolderItemTypeEnum.SHARED_FOLDER.toString()) || file.isSpecialFolder()){
ingnoreFile.add(file); ingnoreFile.add(file);
clearTargets.remove(file); clearTargets.remove(file);
} }
} }
final int diff = size-ingnoreFile.size(); final int diff = size-ingnoreFile.size();
if(diff==0){ if(diff==0){
MessageBox.alert("Alert", "Shared folders cannot be deleted through multiple selection", null); MessageBox.alert("Alert", "Shared folders cannot be deleted through multiple selection", null);
return; return;
} }
String msg = "Are you sure you want to delete "+diff+" items?<br/>"; String msg = "Are you sure you want to delete "+diff+" items?<br/>";
if(ingnoreFile.size()>0){ if(ingnoreFile.size()>0){
msg+="<br/>The shared "+(ingnoreFile.size()>1?"folders":"folder"); msg+="<br/>The shared "+(ingnoreFile.size()>1?"folders":"folder");
msg+= " following will not be removed:"; msg+= " following will not be removed:";
@ -874,12 +874,11 @@ public class AppController implements SubscriberInterface {
msg+="<br/>"+fileGridModel.getName(); msg+="<br/>"+fileGridModel.getName();
} }
} }
final DialogConfirm confirm = new DialogConfirm(null, ConstantsExplorer.MESSAGE_DELETE,msg); final DialogConfirm confirm = new DialogConfirm(null, ConstantsExplorer.MESSAGE_DELETE,msg);
confirm.setModal(true); confirm.setModal(true);
confirm.center(); confirm.center();
//CREATING LIST IDS //CREATING LIST IDS
final List<String> ids = new ArrayList<String>(); final List<String> ids = new ArrayList<String>();
for (FileModel file : clearTargets) { for (FileModel file : clearTargets) {
@ -892,8 +891,8 @@ public class AppController implements SubscriberInterface {
public void onClick(ClickEvent clickEvent) { public void onClick(ClickEvent clickEvent) {
confirm.loader("Deleting "+diff+ " items, please wait"); confirm.loader("Deleting "+diff+ " items, please wait");
// wsPortlet.getGridGroupContainer().mask("Deleting",ConstantsExplorer.LOADINGSTYLE); // wsPortlet.getGridGroupContainer().mask("Deleting",ConstantsExplorer.LOADINGSTYLE);
appContrExplorer.getRpcWorkspaceService().deleteListItemsForIds(ids, new AsyncCallback<List<GarbageItem>>() { appContrExplorer.getRpcWorkspaceService().deleteListItemsForIds(ids, new AsyncCallback<List<GarbageItem>>() {
@Override @Override
@ -907,33 +906,31 @@ public class AppController implements SubscriberInterface {
@Override @Override
public void onSuccess(List<GarbageItem> errors) { public void onSuccess(List<GarbageItem> errors) {
confirm.hide(); confirm.hide();
List<String> idErros = new ArrayList<String>(errors.size()); List<String> idErros = new ArrayList<String>(errors.size());
if(errors.size()>0){ if(errors.size()>0){
String msg = "Error during delete of following: "; String msg = "Error during delete of following: ";
for (GarbageItem gbi : errors) { for (GarbageItem gbi : errors) {
msg+=gbi.getOldItemName()+"; "; msg+=gbi.getOldItemName()+"; ";
idErros.add(gbi.getOldItemId()); idErros.add(gbi.getOldItemId());
} }
MessageBox.alert("Error", msg, null); MessageBox.alert("Error", msg, null);
int diff = ids.size()-errors.size(); int diff = ids.size()-errors.size();
if(diff>0){ if(diff>0){
List<String> deletable = new ArrayList<String>(diff); List<String> deletable = new ArrayList<String>(diff);
//Deleting item from grid //Deleting item from grid
for (String id : ids) { for (String id : ids) {
if(!idErros.contains(id)) //is not an error so is deletable if(!idErros.contains(id)) //is not an error so is deletable
deletable.add(id); deletable.add(id);
} }
deleteItems(deletable); deleteItems(deletable);
} }
}else }else
deleteItems(ids); //no error, delete all ids deleteItems(ids); //no error, delete all ids
GWT.log("target: "+target); GWT.log("target: "+target);
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){ if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){
@ -942,55 +939,10 @@ public class AppController implements SubscriberInterface {
AppControllerExplorer.getEventBus().fireEvent(new RefreshFolderEvent(target, true, false, true)); AppControllerExplorer.getEventBus().fireEvent(new RefreshFolderEvent(target, true, false, true));
} }
}); });
} }
}); });
/*
MessageBoxConfirm mbc = new MessageBoxConfirm(ConstantsExplorer.MESSAGE_DELETE, "Are you sure you want to delete "+size+" items?");
mbc.getMessageBoxConfirm().addCallback(new Listener<MessageBoxEvent>() {
public void handleEvent(MessageBoxEvent be) {
// eventBus.fireEvent(new DeleteItemEvent(sel));
//IF NOT CANCELLED
String clickedButton = be.getButtonClicked().getItemId();
if(clickedButton.equals(Dialog.YES)){
wsPortlet.getGridGroupContainer().mask("Deleting",ConstantsExplorer.LOADINGSTYLE);
appContrExplorer.getRpcWorkspaceService().deleteListItemsForIds(event.getListTarget(), new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable arg0) {
new MessageBoxAlert("Error", arg0.getMessage(),null);
wsPortlet.getGridGroupContainer().unmask();
appContrExplorer.refreshRoot(true);
}
@Override
public void onSuccess(Void arg0) {
//Deleting item from grid
for (String id : event.getListTarget()) {
deleteItem(id);
}
wsPortlet.getGridGroupContainer().unmask();
GWT.log("target: "+target);
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){
appContrExplorer.refreshRoot(false);
}else
AppControllerExplorer.getEventBus().fireEvent(new RefreshFolderEvent(target, true, false, true));
}
});
}
}
});*/
} }
} }
@ -1081,7 +1033,7 @@ public class AppController implements SubscriberInterface {
* *
* @return the grid selected item * @return the grid selected item
*/ */
private FileGridModel getGridSelectedItem(){ private FileGridModel getGridSelectedItem(){
return wsPortlet.getGridGroupContainer().getSelectedItem(); return wsPortlet.getGridGroupContainer().getSelectedItem();
} }
@ -1115,7 +1067,7 @@ public class AppController implements SubscriberInterface {
@Override @Override
public void onSuccess(List<FileModel> result) { public void onSuccess(List<FileModel> result) {
if(isLastParent && item.isDirectory()){ if(isLastParent && item.isDirectory()){
result.add(item); result.add(item);
} }
updateBreadcrumb(result); //Set file path in tab panel on current item selected updateBreadcrumb(result); //Set file path in tab panel on current item selected
@ -1163,14 +1115,14 @@ public class AppController implements SubscriberInterface {
if(parent!=null){ if(parent!=null){
wsPortlet.getBorderLayoutContainer().updateDnDParentId(parent.getIdentifier()); wsPortlet.getBorderLayoutContainer().updateDnDParentId(parent.getIdentifier());
if(parent.isDirectory() && parent.isShared()){ //IS SHARED FOLDER, ENABLING OPERATION FOR ACTIVE BREADCRUMB if(parent.isDirectory() && parent.isShared()){ //IS SHARED FOLDER, ENABLING OPERATION FOR ACTIVE BREADCRUMB
setACLInfo(parent.getIdentifier()); setACLInfo(parent.getIdentifier());
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().enableButtonForActiveBreadcrumb(parent); wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().enableButtonForActiveBreadcrumb(parent);
}else if(parent.isSpecialFolder()){ //IS SPECIAL FOLDER? DISABLING BUTTONS }else if(parent.isSpecialFolder()){ //IS SPECIAL FOLDER? DISABLING BUTTONS
GWT.log("Update Breadcrumb is special folder.. disabling special folder buttons"); GWT.log("Update Breadcrumb is special folder.. disabling special folder buttons");
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().disableButtonSpecialFolderSelected(); wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().disableButtonSpecialFolderSelected();
setACLInfo(null); setACLInfo(null);
}else{ //ENABLING OPERATION FOR ACTIVE BREADCRUMB }else{ //ENABLING OPERATION FOR ACTIVE BREADCRUMB
wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().enableButtonForActiveBreadcrumb(parent); wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().enableButtonForActiveBreadcrumb(parent);
setACLInfo(null); //IS NOT A SHARE FOLDER DOSN'T DISPLAY ACL INFO setACLInfo(null); //IS NOT A SHARE FOLDER DOSN'T DISPLAY ACL INFO
@ -1202,7 +1154,7 @@ public class AppController implements SubscriberInterface {
public void onFailure(Throwable arg0) { public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
} }
@Override @Override
public void onSuccess(List<ExtendedWorkspaceACL> res) { public void onSuccess(List<ExtendedWorkspaceACL> res) {
FileModel parent = wsPortlet.getToolBarPath().getLastParent(); FileModel parent = wsPortlet.getToolBarPath().getLastParent();
@ -1263,25 +1215,25 @@ public class AppController implements SubscriberInterface {
} }
this.wsPortlet = new WorskpacePortlet(this.appContrExplorer.getPanel(true, false, !isSearch), instanceWithGrouping); this.wsPortlet = new WorskpacePortlet(this.appContrExplorer.getPanel(true, false, !isSearch), instanceWithGrouping);
final MultipleDNDUpload dnd = this.wsPortlet.getDND(); final MultipleDNDUpload dnd = this.wsPortlet.getDND();
WorskpaceUploadNotificationListener listener = new WorskpaceUploadNotificationListener() { WorskpaceUploadNotificationListener listener = new WorskpaceUploadNotificationListener() {
@Override @Override
public void onUploadCompleted(String parentId, String itemId) { public void onUploadCompleted(String parentId, String itemId) {
GWT.log("Upload completed: [parentID: "+parentId+", itemId: "+itemId+", uploadType: "+dnd.getUploadType()+"]"); GWT.log("Upload completed: [parentID: "+parentId+", itemId: "+itemId+", uploadType: "+dnd.getUploadType()+"]");
AppControllerExplorer.getEventBus().fireEvent(new CompletedFileUploadEvent(parentId, itemId, WS_UPLOAD_TYPE.File, false)); AppControllerExplorer.getEventBus().fireEvent(new CompletedFileUploadEvent(parentId, itemId, WS_UPLOAD_TYPE.File, false));
} }
@Override @Override
public void onUploadAborted(String parentId, String itemId) { public void onUploadAborted(String parentId, String itemId) {
GWT.log("Upload Aborted: [parentID: "+parentId+", itemId: "+itemId+"]"); GWT.log("Upload Aborted: [parentID: "+parentId+", itemId: "+itemId+"]");
} }
@Override @Override
public void onError(String parentId, String itemId, Throwable throwable) { public void onError(String parentId, String itemId, Throwable throwable) {
GWT.log("Upload Error: [parentID: "+parentId+", itemId: "+itemId+"]"); GWT.log("Upload Error: [parentID: "+parentId+", itemId: "+itemId+"]");
} }
@Override @Override
@ -1292,7 +1244,7 @@ public class AppController implements SubscriberInterface {
}; };
dnd.addWorkspaceUploadNotificationListener(listener); dnd.addWorkspaceUploadNotificationListener(listener);
eventBus.fireEvent(new LoadAllScopeEvent()); //LOAD ALL SCOPE EVENT eventBus.fireEvent(new LoadAllScopeEvent()); //LOAD ALL SCOPE EVENT
} }
@ -1328,7 +1280,7 @@ public class AppController implements SubscriberInterface {
initPortlet(rootPanel, instanceWithGrouping, searchingForItemId, searchParameter, itemIdParameter, operationParameter); initPortlet(rootPanel, instanceWithGrouping, searchingForItemId, searchParameter, itemIdParameter, operationParameter);
//CheckSession if you do not need to something when the session expire //CheckSession if you do not need to something when the session expire
CheckSession.getInstance().startPolling(); // CheckSession.getInstance().startPolling();
} }
/** /**
@ -1342,14 +1294,14 @@ public class AppController implements SubscriberInterface {
* @param operationParameter the operation parameter * @param operationParameter the operation parameter
*/ */
private void initPortlet(final HasWidgets rootPanel, final boolean instanceWithGrouping, boolean isSearchForItemId, final String searchParameter, final String itemIdParameter, final String operationParameter){ private void initPortlet(final HasWidgets rootPanel, final boolean instanceWithGrouping, boolean isSearchForItemId, final String searchParameter, final String itemIdParameter, final String operationParameter){
boolean displayFeatures = readCookieWorkspaceAvailableFeatures(); boolean displayFeatures = readCookieWorkspaceAvailableFeatures();
GWT.log("Display features? "+displayFeatures); GWT.log("Display features? "+displayFeatures);
if(displayFeatures) if(displayFeatures)
rootPanel.add(workspaceFeatures); rootPanel.add(workspaceFeatures);
rootPanel.add(wsPortlet.getBorderLayoutContainer()); rootPanel.add(wsPortlet.getBorderLayoutContainer());
//SET TOGGLE BUTTON GRID VIEW //SET TOGGLE BUTTON GRID VIEW
@ -1386,10 +1338,10 @@ public class AppController implements SubscriberInterface {
Scheduler.get().scheduleDeferred(new ScheduledCommand() { Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override @Override
public void execute() { public void execute() {
executeTrashOperation(WorkspaceTrashOperation.REFRESH, null); executeTrashOperation(WorkspaceTrashOperation.REFRESH, null);
} }
}); });
Scheduler.get().scheduleDeferred(new ScheduledCommand() { Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override @Override
public void execute() { public void execute() {
@ -1398,7 +1350,7 @@ public class AppController implements SubscriberInterface {
}); });
rootPanel.add(wsQuotesView); rootPanel.add(wsQuotesView);
} }
/** /**
* Sets the workspace user quotes. * Sets the workspace user quotes.
* *
@ -1407,7 +1359,7 @@ public class AppController implements SubscriberInterface {
*/ */
private void setWorkspaceUserQuotes(String size, long totalItems){ private void setWorkspaceUserQuotes(String size, long totalItems){
String msg; String msg;
if(totalItems<=0){ if(totalItems<=0){
msg = "No items"; msg = "No items";
}else if(totalItems==1){ }else if(totalItems==1){
@ -1415,7 +1367,7 @@ public class AppController implements SubscriberInterface {
}else { }else {
msg = totalItems + " items"; msg = totalItems + " items";
} }
msg+= ", "+size; msg+= ", "+size;
wsQuotesView.updateQuotes(msg); wsQuotesView.updateQuotes(msg);
} }
@ -1431,7 +1383,7 @@ public class AppController implements SubscriberInterface {
//get the cookie with name GCBUEWorkspaceGridViewSetting //get the cookie with name GCBUEWorkspaceGridViewSetting
String msg = Cookies.getCookie(ConstantsPortlet.GCUBE_COOKIE_WORKSPACE_GRID_VIEW_SETTING); String msg = Cookies.getCookie(ConstantsPortlet.GCUBE_COOKIE_WORKSPACE_GRID_VIEW_SETTING);
//if null, there was no cookie //if null, there was no cookie
if(msg == null){ if(msg == null){
setCookieGridViewSetting("true"); setCookieGridViewSetting("true");
return true; return true;
} }
@ -1442,7 +1394,7 @@ public class AppController implements SubscriberInterface {
return false; return false;
} }
/** /**
* Read cookie workspace available features. * Read cookie workspace available features.
@ -1454,7 +1406,7 @@ public class AppController implements SubscriberInterface {
//get the cookie with name GCBUEWorkspaceGridViewSetting //get the cookie with name GCBUEWorkspaceGridViewSetting
String msg = Cookies.getCookie(ConstantsPortlet.GCUBE_COOKIE_WORKSPACE_AVAILABLE_FEATURES); String msg = Cookies.getCookie(ConstantsPortlet.GCUBE_COOKIE_WORKSPACE_AVAILABLE_FEATURES);
//if null, there was no cookie //if null, there was no cookie
if(msg == null){ if(msg == null){
setCookie(ConstantsPortlet.GCUBE_COOKIE_WORKSPACE_AVAILABLE_FEATURES, "true", ConstantsPortlet.COOKIE_EXPIRE_DAYS); setCookie(ConstantsPortlet.GCUBE_COOKIE_WORKSPACE_AVAILABLE_FEATURES, "true", ConstantsPortlet.COOKIE_EXPIRE_DAYS);
return true; return true;
} }
@ -1592,10 +1544,10 @@ public class AppController implements SubscriberInterface {
GWT.log("addedFile skipping, parentId is null"); GWT.log("addedFile skipping, parentId is null");
return; return;
} }
//UPDATE GRID ONLY IF TREE AND GRID DISPLAYING THE SAME PARENT //UPDATE GRID ONLY IF TREE AND GRID DISPLAYING THE SAME PARENT
if(parentIsBreadcrumbLastParent(parentId)){ if(parentIsBreadcrumbLastParent(parentId)){
if(uploadType.equals(WS_UPLOAD_TYPE.File)){ if(uploadType.equals(WS_UPLOAD_TYPE.File)){
GWT.log("Calling addFileToStoreById "+parentId); GWT.log("Calling addFileToStoreById "+parentId);
//IF IS OVERWRITE DELETE BEFORE THE ITEM FORM STORE //IF IS OVERWRITE DELETE BEFORE THE ITEM FORM STORE
@ -1605,8 +1557,8 @@ public class AppController implements SubscriberInterface {
} }
} }
} }
/** /**
* Parent is breadcrumb last parent. * Parent is breadcrumb last parent.
* *
@ -1615,10 +1567,10 @@ public class AppController implements SubscriberInterface {
*/ */
private boolean parentIsBreadcrumbLastParent(String parentId){ private boolean parentIsBreadcrumbLastParent(String parentId){
FileModel breadParent = wsPortlet.getToolBarPath().getLastParent(); FileModel breadParent = wsPortlet.getToolBarPath().getLastParent();
return ((breadParent!=null) && (parentId!=null) && (breadParent.getIdentifier().compareTo(parentId)==0)); return breadParent!=null && parentId!=null && breadParent.getIdentifier().compareTo(parentId)==0;
} }
/** /**
* Adds the file to store by id. * Adds the file to store by id.
* *
@ -1627,7 +1579,7 @@ public class AppController implements SubscriberInterface {
* @param deleteCurrentItem the delete current item from store * @param deleteCurrentItem the delete current item from store
*/ */
private void addFileToStoreById(final String itemIdentifier, String parentId, final boolean deleteCurrentItem){ private void addFileToStoreById(final String itemIdentifier, String parentId, final boolean deleteCurrentItem){
appContrExplorer.getRpcWorkspaceService().getItemForFileGrid(itemIdentifier, new AsyncCallback<FileGridModel>() { appContrExplorer.getRpcWorkspaceService().getItemForFileGrid(itemIdentifier, new AsyncCallback<FileGridModel>() {
@Override @Override
@ -1637,10 +1589,10 @@ public class AppController implements SubscriberInterface {
@Override @Override
public void onSuccess(FileGridModel result) { public void onSuccess(FileGridModel result) {
if(deleteCurrentItem) if(deleteCurrentItem)
wsPortlet.getGridGroupContainer().deleteItem(itemIdentifier); wsPortlet.getGridGroupContainer().deleteItem(itemIdentifier);
wsPortlet.getGridGroupContainer().addToStore(result); wsPortlet.getGridGroupContainer().addToStore(result);
// wsPortlet.getGridGroupContainer().unmask(); // wsPortlet.getGridGroupContainer().unmask();
} }
@ -1667,10 +1619,10 @@ public class AppController implements SubscriberInterface {
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){ //ADDED 12-04-12 if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){ //ADDED 12-04-12
wsPortlet.getSearchAndFilterContainer().searchCancel(); //TODO added in 05/04/2012 wsPortlet.getSearchAndFilterContainer().searchCancel(); //TODO added in 05/04/2012
AppController.getEventBus().fireEvent(new SearchTextEvent(null, null)); AppController.getEventBus().fireEvent(new SearchTextEvent(null, null));
wsPortlet.getSearchAndFilterContainer().setSearchActive(false); wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
resetSmartFolderSelected(); resetSmartFolderSelected();
updatGridViewForSelectedItem(item); updatGridViewForSelectedItem(item);
return; return;
} }
//CASE IS NOT A SEARCH //CASE IS NOT A SEARCH
@ -1735,22 +1687,22 @@ public class AppController implements SubscriberInterface {
if(ids==null || ids.size()==0) if(ids==null || ids.size()==0)
return false; return false;
boolean deleted = false; boolean deleted = false;
for (String itemIdentifier : ids) { for (String itemIdentifier : ids) {
deleted = wsPortlet.getGridGroupContainer().deleteItem(itemIdentifier); deleted = wsPortlet.getGridGroupContainer().deleteItem(itemIdentifier);
} }
executeTrashOperation(WorkspaceTrashOperation.REFRESH, null); executeTrashOperation(WorkspaceTrashOperation.REFRESH, null);
return deleted; return deleted;
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface#rootLoaded(org.gcube.portlets.user.workspace.client.model.FileModel) * @see org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface#rootLoaded(org.gcube.portlets.user.workspace.client.model.FileModel)
*/ */
@Override @Override
public void rootLoaded(FileModel root) { public void rootLoaded(FileModel root) {
this.rootIdentifier = root.getIdentifier(); this.rootIdentifier = root.getIdentifier();
} }
/* (non-Javadoc) /* (non-Javadoc)
@ -1847,7 +1799,7 @@ public class AppController implements SubscriberInterface {
} }
//***ADDED 24/04/2012 //***ADDED 24/04/2012
wsPortlet.getSearchAndFilterContainer().searchCancel(); wsPortlet.getSearchAndFilterContainer().searchCancel();
eventBus.fireEvent(new SearchTextEvent(null, null)); eventBus.fireEvent(new SearchTextEvent(null, null));
// appContrExplorer.searching(false); // appContrExplorer.searching(false);
//************** //**************
@ -1870,12 +1822,12 @@ public class AppController implements SubscriberInterface {
FileGridModel folder = wsPortlet.getGridGroupContainer().getFileGridModelByIdentifier(folderTarget.getIdentifier()); FileGridModel folder = wsPortlet.getGridGroupContainer().getFileGridModelByIdentifier(folderTarget.getIdentifier());
GWT.log("force refresh, folder :" +folder); GWT.log("force refresh, folder :" +folder);
updateStoreByRpc(folderTarget); updateStoreByRpc(folderTarget);
if(forceRefreshBreadcrumb){ if(forceRefreshBreadcrumb){
GWT.log("forcing reload breadcrumb for: "+folderTarget); GWT.log("forcing reload breadcrumb for: "+folderTarget);
loadBreadcrumbByFileModel(folderTarget, true); loadBreadcrumbByFileModel(folderTarget, true);
} }
return; return;
} }
@ -1890,14 +1842,14 @@ public class AppController implements SubscriberInterface {
return; return;
} }
} }
GWT.log("folderTarget is not egual to last parent of the breadrcrumb, refresh folder skypped"); GWT.log("folderTarget is not egual to last parent of the breadrcrumb, refresh folder skypped");
if(forceRefreshBreadcrumb){ if(forceRefreshBreadcrumb){
GWT.log("forcing reload breadcrumb for: "+folderTarget); GWT.log("forcing reload breadcrumb for: "+folderTarget);
loadBreadcrumbByFileModel(folderTarget, true); loadBreadcrumbByFileModel(folderTarget, true);
} }
} }
else else
GWT.log("folderTarget is null, refresh skypped"); GWT.log("folderTarget is null, refresh skypped");
@ -1956,9 +1908,9 @@ public class AppController implements SubscriberInterface {
}else if(wsPortlet.getToolBarPath().getLastParent()!=null){ }else if(wsPortlet.getToolBarPath().getLastParent()!=null){
folderId = wsPortlet.getToolBarPath().getLastParent().getIdentifier(); folderId = wsPortlet.getToolBarPath().getLastParent().getIdentifier();
} }
logger.log(Level.INFO, "Showing session expired panel, folderId is: "+folderId); logger.log(Level.INFO, "Showing session expired panel, folderId is: "+folderId);
if(folderId!=null && !folderId.isEmpty()){ if(folderId!=null && !folderId.isEmpty()){
HashMap<String, String> params = new HashMap<String, String>(1); HashMap<String, String> params = new HashMap<String, String>(1);
params.put(ConstantsExplorer.GET_ITEMID_PARAMETER, folderId); params.put(ConstantsExplorer.GET_ITEMID_PARAMETER, folderId);
@ -2103,10 +2055,10 @@ public class AppController implements SubscriberInterface {
} }
}); });
break; break;
} }
default:{ default:{
@ -2157,9 +2109,9 @@ public class AppController implements SubscriberInterface {
*/ */
@Override @Override
public void changedFileModelId(String oldId, String newId) { public void changedFileModelId(String oldId, String newId) {
} }
/** /**
* Sets the visible user quote. * Sets the visible user quote.
* *
@ -2168,7 +2120,7 @@ public class AppController implements SubscriberInterface {
private void setVisibleUserQuote(boolean bool){ private void setVisibleUserQuote(boolean bool){
wsQuotesView.setQuoteVisible(bool); wsQuotesView.setQuoteVisible(bool);
} }
/** /**
* Sets the visible ws available features. * Sets the visible ws available features.
* *
@ -2184,9 +2136,9 @@ public class AppController implements SubscriberInterface {
*/ */
@Override @Override
public void updateWorksapaceSize(boolean delayCall) { public void updateWorksapaceSize(boolean delayCall) {
Timer t = new Timer() { Timer t = new Timer() {
@Override @Override
public void run() { public void run() {
@ -2200,7 +2152,7 @@ public class AppController implements SubscriberInterface {
@Override @Override
public void onSuccess(WorkspaceUserQuote wsquote) { public void onSuccess(WorkspaceUserQuote wsquote) {
if(wsquote==null) if(wsquote==null)
setVisibleUserQuote(false); setVisibleUserQuote(false);
else{ else{
@ -2209,10 +2161,10 @@ public class AppController implements SubscriberInterface {
} }
} }
}); });
} }
}; };
if(delayCall) if(delayCall)
t.schedule(3000); //UPDATING RUN AFTER THREE SECOND t.schedule(3000); //UPDATING RUN AFTER THREE SECOND
else else

View File

@ -6,6 +6,85 @@
@import url(workspacebootstrap.min.css); @import url(workspacebootstrap.min.css);
.gwt-DialogBoxNew
{
border: 8px solid #dfe8f6;
border-radius: 6px 6px 6px 6px;
box-shadow: none;
line-height: 7px;
opacity: 1;
z-index: 1000;
background-color : #FFFFFF;
}
.gwt-DialogBoxNew .Caption {
background: none repeat scroll 0 0 #dfe8f6;
border: medium none #D4D4D4;
cursor: default;
font-family: Arial Unicode MS, Arial, sans-serif !important;
font-size: 18px;
font-weight: 400;
line-height: 27px;
padding:2px 0px 0px 0px;
}
.gwt-DialogBoxNew .dialogContent {
}
.gwt-DialogBoxNew .dialogMiddleCenter {
padding: 3px;
background: white;
}
.gwt-DialogBoxNew .dialogBottomCenter {
}
.gwt-DialogBoxNew .dialogMiddleLeft {
/* background: url(images/vborder.png) repeat-y -31px 0px; */
}
.gwt-DialogBoxNew .dialogMiddleRight {
/* background: url(images/vborder.png) repeat-y -32px 0px;
}
.gwt-DialogBoxNew .dialogTopLeftInner {
width: 10px;
height: 8px;
zoom: 1;
background: none repeat scroll 0 0 #E4E4E4;
}
.gwt-DialogBoxNew .dialogTopRightInner {
width: 12px;
zoom: 1;
background: none repeat scroll 0 0 #E4E4E4;
}
.gwt-DialogBoxNew .dialogBottomLeftInner {
width: 10px;
height: 12px;
zoom: 1;
}
.gwt-DialogBoxNew .dialogBottomRightInner {
width: 12px;
height: 12px;
zoom: 1;
}*/
.gwt-DialogBoxNew .dialogTopLeft {
/* background: url(images/circles.png) no-repeat -20px 0px;
-background: url(images/circles_ie6.png) no-repeat -20px 0px; */
background: none repeat scroll 0 0 #E4E4E4;
}
.gwt-DialogBoxNew .dialogTopRight {
/* background: url(images/circles.png) no-repeat -28px 0px;
-background: url(images/circles_ie6.png) no-repeat -28px 0px; */
background: none repeat scroll 0 0 #E4E4E4;
}
.gwt-DialogBoxNew .dialogBottomLeft {
/* background: url(images/circles.png) no-repeat 0px -36px;
-background: url(images/circles_ie6.png) no-repeat 0px -36px; */
}
.gwt-DialogBoxNew .dialogBottomRight {
/* background: url(images/circles.png) no-repeat -8px -36px;
-background: url(images/circles_ie6.png) no-repeat -8px -36px; */
}
#SearchAndFilter { #SearchAndFilter {
background-color: #d0def0; background-color: #d0def0;
/* Mozilla Firefox */ /* Mozilla Firefox */