From b63f679d33f92c05cc8c4da46bb8bf563820733b Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Tue, 3 Jul 2018 16:09:33 +0000 Subject: [PATCH] renewed set of icons git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@169644 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 2 +- pom.xml | 5 +- .../user/workspace/WorkspaceTree.gwt.xml | 2 +- .../client/AppControllerExplorer.java | 7 +- .../workspace/client/resources/Icons.java | 18 - .../workspace/client/resources/Resources.java | 356 +++++------------- .../workspace/client/view/ExplorerPanel.java | 26 -- .../client/view/tree/ContextMenuTree.java | 44 +-- .../user/workspace/WorkspaceTree.gwt.xml | 2 +- 9 files changed, 115 insertions(+), 347 deletions(-) diff --git a/.classpath b/.classpath index a5e9dbb..71d462c 100644 --- a/.classpath +++ b/.classpath @@ -13,7 +13,7 @@ - + diff --git a/pom.xml b/pom.xml index a47d51e..16daa1c 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,10 @@ ${gwtVersion} provided - + + org.gcube.portal + storagehub-icons-library + com.sencha.gxt gxt2.2.5-gwt2.X diff --git a/src/main/java/org/gcube/portlets/user/workspace/WorkspaceTree.gwt.xml b/src/main/java/org/gcube/portlets/user/workspace/WorkspaceTree.gwt.xml index a28b9dc..d3d6fe8 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/WorkspaceTree.gwt.xml +++ b/src/main/java/org/gcube/portlets/user/workspace/WorkspaceTree.gwt.xml @@ -11,7 +11,7 @@ - + diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/AppControllerExplorer.java b/src/main/java/org/gcube/portlets/user/workspace/client/AppControllerExplorer.java index 791200c..0cbd53e 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/AppControllerExplorer.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/AppControllerExplorer.java @@ -1053,7 +1053,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt private void doChangeScope(String scopeId) { explorerPanel.getAsycTreePanel().loadRootItem(scopeId,selectRootItem); // RELOAD ROOT BY SCOPE - explorerPanel.getSmartFolderPanel().reloadPanelSmartFolder(); //RELOAD SMART FOLDER + } }); @@ -1295,8 +1295,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt @Override public void onSuccess(Boolean result) { - if(result) - explorerPanel.getSmartFolderPanel().removeSmartFolder(smartIdentifier); + } @Override @@ -1356,7 +1355,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt @Override public void onSuccess(SmartFolderModel smart) { - explorerPanel.getShortuctsPanel().loadSmartFolder(smart); + } }); } diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/resources/Icons.java b/src/main/java/org/gcube/portlets/user/workspace/client/resources/Icons.java index 693b7fe..eae015d 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/resources/Icons.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/resources/Icons.java @@ -5,9 +5,6 @@ import com.google.gwt.resources.client.ImageResource; public interface Icons extends ClientBundle { - @Source("icons/cloud-drive.png") - ImageResource cloudDrive(); - @Source("icons/table.png") ImageResource table(); @@ -47,9 +44,6 @@ public interface Icons extends ClientBundle { @Source("icons/mime/movie.png") ImageResource movie(); - @Source("icons/new-folder.png") - ImageResource addFolder(); - @Source("icons/mime/deletefolder.jpg") ImageResource deleteFolder(); @@ -233,21 +227,9 @@ public interface Icons extends ClientBundle { @Source("icons/reporttemplate.png") ImageResource reportTemplate(); - @Source("icons/workflowreport.png") - ImageResource workflowReport(); - - @Source("icons/workflowtemplate.png") - ImageResource workflowTemplate(); - @Source("icons/webdav.png") ImageResource webDav(); - @Source("icons/mail-reply.png") - ImageResource replyMail(); - - @Source("icons/mail-reply-all.png") - ImageResource replyAllMail(); - @Source("icons/application-link.png") ImageResource resourceLink(); diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/resources/Resources.java b/src/main/java/org/gcube/portlets/user/workspace/client/resources/Resources.java index 7d6b7fb..55ba7d6 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/resources/Resources.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/resources/Resources.java @@ -1,5 +1,6 @@ package org.gcube.portlets.user.workspace.client.resources; +import org.gcube.portal.stohubicons.shared.resources.StorageHubIconResources; import org.gcube.portlets.user.workspace.client.interfaces.GXTFolderItemTypeEnum; import com.google.gwt.core.client.GWT; @@ -15,6 +16,7 @@ public class Resources { public static final Icons ICONS = GWT.create(Icons.class); + private static final String CAL = "calendar"; private static final String XML = "xml"; private static final String JAVA = "java"; private static final String HTML = "html"; @@ -65,7 +67,7 @@ public class Resources { */ public static AbstractImagePrototype getCloudDriveIcon(){ - return AbstractImagePrototype.create(ICONS.cloudDrive()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.USER_CIRCLE()); } /** @@ -74,8 +76,7 @@ public class Resources { * @return the icon x tex */ public static AbstractImagePrototype getIconXTex(){ - - return AbstractImagePrototype.create(ICONS.tex()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.TXT()); } @@ -97,8 +98,8 @@ public class Resources { * @return the icon postscript */ public static AbstractImagePrototype getIconPostscript(){ + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.TXT()); - return AbstractImagePrototype.create(ICONS.postscript()); } /** @@ -112,16 +113,6 @@ public class Resources { } - /** - * Gets the icon information. - * - * @return the icon information - */ - public static AbstractImagePrototype getIconInformation(){ - - return AbstractImagePrototype.create(ICONS.information()); - } - /** * Gets the icon folder shared public. @@ -140,8 +131,7 @@ public class Resources { * @return the icon information */ public static AbstractImagePrototype getIconAbout(){ - - return AbstractImagePrototype.create(ICONS.about()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.INFO()); } /** @@ -150,8 +140,18 @@ public class Resources { * @return the icon shell */ public static AbstractImagePrototype getIconShell(){ + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.SCRIPT()); + } + - return AbstractImagePrototype.create(ICONS.shell()); + + /** + * Gets the icon information. + * + * @return the icon information + */ + public static AbstractImagePrototype getIconInformation(){ + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.INFO()); } /** @@ -160,8 +160,7 @@ public class Resources { * @return the icon zip */ public static AbstractImagePrototype getIconZip(){ - - return AbstractImagePrototype.create(ICONS.zip()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.ARCHIVE()); } @@ -171,8 +170,7 @@ public class Resources { * @return the icon odp */ public static AbstractImagePrototype getIconOdp(){ - - return AbstractImagePrototype.create(ICONS.odp()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.DOC()); } /** @@ -181,8 +179,7 @@ public class Resources { * @return the icon odp */ public static AbstractImagePrototype getIconOds(){ - - return AbstractImagePrototype.create(ICONS.ods()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.DOC()); } @@ -192,8 +189,7 @@ public class Resources { * @return the icon odp */ public static AbstractImagePrototype getIconOdg(){ - - return AbstractImagePrototype.create(ICONS.odg()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.DOC()); } @@ -203,8 +199,7 @@ public class Resources { * @return the icon folder link */ public static AbstractImagePrototype getIconFolderPublic(){ - - return AbstractImagePrototype.create(ICONS.folderPublic()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.FOLDER_LINK()); } @@ -214,8 +209,7 @@ public class Resources { * @return the icon odp */ public static AbstractImagePrototype getIconOtt(){ - - return AbstractImagePrototype.create(ICONS.ott()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.DOC()); } /** @@ -225,7 +219,7 @@ public class Resources { */ public static AbstractImagePrototype getIconOdt(){ - return AbstractImagePrototype.create(ICONS.odt()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.DOC()); } /** @@ -235,7 +229,7 @@ public class Resources { */ public static AbstractImagePrototype getIconTable(){ - return AbstractImagePrototype.create(ICONS.table()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.unknown()); } /** @@ -266,7 +260,7 @@ public class Resources { */ public static AbstractImagePrototype getIconArchive(){ - return AbstractImagePrototype.create(ICONS.archive()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.ARCHIVE()); } /** @@ -275,7 +269,7 @@ public class Resources { * @return the icon link */ public static AbstractImagePrototype getIconLink(){ - return AbstractImagePrototype.create(ICONS.extLink()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.LINK()); } /** @@ -284,8 +278,7 @@ public class Resources { * @return the icon share link */ public static AbstractImagePrototype getIconShareLink(){ - - return AbstractImagePrototype.create(ICONS.shareLink()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.GET_LINK()); } /** @@ -295,7 +288,7 @@ public class Resources { */ public static AbstractImagePrototype getTrashFull(){ - return AbstractImagePrototype.create(ICONS.trash_full()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.BIN()); } /** @@ -305,7 +298,7 @@ public class Resources { */ public static AbstractImagePrototype getTrashEmpty(){ - return AbstractImagePrototype.create(ICONS.trash_empty()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.BIN()); } /** @@ -325,7 +318,7 @@ public class Resources { */ public static AbstractImagePrototype getIconVREFolder(){ - return AbstractImagePrototype.create(ICONS.vreFolder()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.VRE_FOLDER()); } /** @@ -335,7 +328,7 @@ public class Resources { */ public static AbstractImagePrototype getIconPpt(){ - return AbstractImagePrototype.create(ICONS.ppt()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.PPT()); } /** @@ -345,7 +338,7 @@ public class Resources { */ public static AbstractImagePrototype getIconExcel(){ - return AbstractImagePrototype.create(ICONS.excel()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.XLS()); } /** @@ -354,8 +347,7 @@ public class Resources { * @return the icon users */ public static AbstractImagePrototype getIconUsers(){ - - return AbstractImagePrototype.create(ICONS.users()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.GROUP()); } /** @@ -374,8 +366,7 @@ public class Resources { * @return the icon share user */ public static AbstractImagePrototype getIconShareUser(){ - - return AbstractImagePrototype.create(ICONS.user()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.GROUP()); } /** @@ -384,8 +375,7 @@ public class Resources { * @return the icon share group */ public static AbstractImagePrototype getIconShareGroup(){ - - return AbstractImagePrototype.create(ICONS.groupusers()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.GROUP()); } /** @@ -394,8 +384,7 @@ public class Resources { * @return the icon special folder */ public static AbstractImagePrototype getIconSpecialFolder(){ - - return AbstractImagePrototype.create(ICONS.specialFolder()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.FOLDER_SPECIAL()); } /** @@ -424,8 +413,7 @@ public class Resources { * @return the icon info */ public static AbstractImagePrototype getIconInfo(){ - - return AbstractImagePrototype.create(ICONS.info()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.INFO()); } /** @@ -435,7 +423,7 @@ public class Resources { */ public static AbstractImagePrototype getIconSharedFolder(){ - return AbstractImagePrototype.create(ICONS.sharedFolder()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.SHARED_FOLDER()); } /** @@ -445,7 +433,7 @@ public class Resources { */ public static AbstractImagePrototype getIconCsv(){ - return AbstractImagePrototype.create(ICONS.csv()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.CSV()); } /** @@ -486,7 +474,7 @@ public class Resources { */ public static AbstractImagePrototype getIconGif(){ - return AbstractImagePrototype.create(ICONS.gif()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.IMAGE()); } /** @@ -496,7 +484,7 @@ public class Resources { */ public static AbstractImagePrototype getIconJpeg(){ - return AbstractImagePrototype.create(ICONS.jpeg()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.IMAGE()); } /** @@ -506,7 +494,7 @@ public class Resources { */ public static AbstractImagePrototype getIconSvg(){ - return AbstractImagePrototype.create(ICONS.svg()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.IMAGE()); } /** @@ -516,7 +504,7 @@ public class Resources { */ public static AbstractImagePrototype getIconPng(){ - return AbstractImagePrototype.create(ICONS.png()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.IMAGE()); } /** @@ -526,7 +514,7 @@ public class Resources { */ public static AbstractImagePrototype getIconTiff(){ - return AbstractImagePrototype.create(ICONS.tiff()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.IMAGE()); } /** @@ -536,7 +524,7 @@ public class Resources { */ public static AbstractImagePrototype getIconPdf(){ - return AbstractImagePrototype.create(ICONS.pdf()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.PDF()); } /** @@ -546,9 +534,16 @@ public class Resources { */ public static AbstractImagePrototype getIconXml(){ - return AbstractImagePrototype.create(ICONS.xml()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.XML()); + } + /** + * Gets the icon permissions. + * + * @return the icon permissions + */ + public static AbstractImagePrototype getIconCalendar() { + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.CALENDAR()); } - /** * Gets the icon html. * @@ -556,7 +551,7 @@ public class Resources { */ public static AbstractImagePrototype getIconHtml(){ - return AbstractImagePrototype.create(ICONS.html()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.HTML()); } /** @@ -566,7 +561,7 @@ public class Resources { */ public static AbstractImagePrototype getIconJava(){ - return AbstractImagePrototype.create(ICONS.java()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.SCRIPT()); } /** @@ -576,7 +571,7 @@ public class Resources { */ public static AbstractImagePrototype getIconDoc(){ - return AbstractImagePrototype.create(ICONS.doc()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.DOC()); } /** @@ -586,7 +581,7 @@ public class Resources { */ public static AbstractImagePrototype getIconTxt(){ - return AbstractImagePrototype.create(ICONS.txt()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.TXT()); } /** @@ -596,7 +591,7 @@ public class Resources { */ public static AbstractImagePrototype getIconMovie(){ - return AbstractImagePrototype.create(ICONS.movie()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.MOVIE()); } /** @@ -606,7 +601,7 @@ public class Resources { */ public static AbstractImagePrototype getIconAddFolder(){ - return AbstractImagePrototype.create(ICONS.addFolder()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.NEW_FOLDER()); } /** @@ -626,7 +621,7 @@ public class Resources { */ public static AbstractImagePrototype getIconRenameItem(){ - return AbstractImagePrototype.create(ICONS.renameItem()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.EDIT()); } /** @@ -638,6 +633,16 @@ public class Resources { return AbstractImagePrototype.create(ICONS.renameItem32()); } + + /** + * Gets the icon rename item32. + * + * @return the icon rename item32 + */ + public static AbstractImagePrototype getSearchIcon(){ + + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.SEARCH()); + } /** * Gets the icon file upload. @@ -646,7 +651,7 @@ public class Resources { */ public static AbstractImagePrototype getIconFileUpload(){ - return AbstractImagePrototype.create(ICONS.uploadFile()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.FILE_UPLOAD()); } /** @@ -665,8 +670,7 @@ public class Resources { * @return the icon delete folder */ public static AbstractImagePrototype getIconDeleteFolder(){ - - return AbstractImagePrototype.create(ICONS.deleteFolder()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.DELETE()); } /** @@ -675,8 +679,7 @@ public class Resources { * @return the icon delete item */ public static AbstractImagePrototype getIconDeleteItem(){ - - return AbstractImagePrototype.create(ICONS.deleteItem()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.DELETE()); } /** @@ -685,8 +688,7 @@ public class Resources { * @return the icon delete item32 */ public static AbstractImagePrototype getIconDeleteItem32(){ - - return AbstractImagePrototype.create(ICONS.deleteItem32()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.DELETE()); } /** @@ -695,8 +697,7 @@ public class Resources { * @return the icon folder */ public static AbstractImagePrototype getIconFolder(){ - - return AbstractImagePrototype.create(ICONS.folder()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.FOLDER()); } /** @@ -705,8 +706,7 @@ public class Resources { * @return the icon audio */ public static AbstractImagePrototype getIconAudio(){ - - return AbstractImagePrototype.create(ICONS.audio()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.MOVIE()); } /** @@ -715,8 +715,7 @@ public class Resources { * @return the icon archive upload */ public static AbstractImagePrototype getIconArchiveUpload(){ - - return AbstractImagePrototype.create(ICONS.archiveUpload()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.UNARCHIVE()); } /** @@ -735,8 +734,7 @@ public class Resources { * @return the icon images */ public static AbstractImagePrototype getIconImages(){ - - return AbstractImagePrototype.create(ICONS.images()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.IMAGE()); } /** @@ -745,8 +743,7 @@ public class Resources { * @return the icon documents */ public static AbstractImagePrototype getIconDocuments(){ - - return AbstractImagePrototype.create(ICONS.documents()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.TXT()); } /** @@ -775,8 +772,7 @@ public class Resources { * @return the icon history */ public static AbstractImagePrototype getIconHistory(){ - - return AbstractImagePrototype.create(ICONS.history()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.HISTORY()); } /** @@ -826,7 +822,7 @@ public class Resources { * @return the icon grid view */ public static AbstractImagePrototype getIconGridView(){ - return AbstractImagePrototype.create(ICONS.gridView()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.CATEGORY()); } /** @@ -853,7 +849,7 @@ public class Resources { * @return the icon download */ public static AbstractImagePrototype getIconDownload(){ - return AbstractImagePrototype.create(ICONS.download()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.FILE_DOWNLOAD()); } /** @@ -916,7 +912,7 @@ public class Resources { * @return the icon preview */ public static AbstractImagePrototype getIconPreview() { - return AbstractImagePrototype.create(ICONS.preview()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.PREVIEW()); } /** @@ -925,7 +921,7 @@ public class Resources { * @return the icon show */ public static AbstractImagePrototype getIconShow() { - return AbstractImagePrototype.create(ICONS.show()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.OPEN()); } /** @@ -934,7 +930,7 @@ public class Resources { * @return the icon open url */ public static AbstractImagePrototype getIconOpenUrl() { - return AbstractImagePrototype.create(ICONS.openUrl()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.OPEN()); } /** @@ -943,16 +939,7 @@ public class Resources { * @return the icon add url */ public static AbstractImagePrototype getIconAddUrl() { - return AbstractImagePrototype.create(ICONS.addUrl()); - } - - /** - * Gets the icon send to. - * - * @return the icon send to - */ - public static AbstractImagePrototype getIconSendTo() { - return AbstractImagePrototype.create(ICONS.sendTo()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.LINK()); } /** @@ -963,43 +950,6 @@ public class Resources { public static AbstractImagePrototype getIconCheckUser() { return AbstractImagePrototype.create(ICONS.checkUser()); } - - /** - * Gets the icon messages received. - * - * @return the icon messages received - */ - public static AbstractImagePrototype getIconMessagesReceived() { - return AbstractImagePrototype.create(ICONS.inboxReceived()); - } - - /** - * Gets the icon messages sent. - * - * @return the icon messages sent - */ - public static AbstractImagePrototype getIconMessagesSent() { - return AbstractImagePrototype.create(ICONS.inboxSent()); - } - - /** - * Gets the icon email. - * - * @return the icon email - */ - public static AbstractImagePrototype getIconEmail() { - return AbstractImagePrototype.create(ICONS.email()); - } - - /** - * Gets the icon open email. - * - * @return the icon open email - */ - public static AbstractImagePrototype getIconOpenEmail() { - return AbstractImagePrototype.create(ICONS.openEmail()); - } - /** * Gets the icon hand. * @@ -1017,59 +967,13 @@ public class Resources { public static AbstractImagePrototype getIconSaveAttachments() { return AbstractImagePrototype.create(ICONS.saveAttachs()); } - - /** - * Gets the icon download emails. - * - * @return the icon download emails - */ - public static AbstractImagePrototype getIconDownloadEmails() { - return AbstractImagePrototype.create(ICONS.downloadEmail()); - } - - /** - * Gets the icon email read. - * - * @return the icon email read - */ - public static AbstractImagePrototype getIconEmailRead() { - return AbstractImagePrototype.create(ICONS.emailRead()); - } - - /** - * Gets the icon email not read. - * - * @return the icon email not read - */ - public static AbstractImagePrototype getIconEmailNotRead() { - return AbstractImagePrototype.create(ICONS.emailNotRead()); - } - - /** - * Gets the icon delete message. - * - * @return the icon delete message - */ - public static AbstractImagePrototype getIconDeleteMessage() { - return AbstractImagePrototype.create(ICONS.emailDelete()); - } - - /** - * Gets the icon email forward. - * - * @return the icon email forward - */ - public static AbstractImagePrototype getIconEmailForward() { - return AbstractImagePrototype.create(ICONS.emailForward()); - } - /** * Gets the icon copy. * * @return the icon copy */ public static AbstractImagePrototype getIconCopy() { - return AbstractImagePrototype.create(ICONS.copy()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.COPY()); } /** @@ -1078,7 +982,7 @@ public class Resources { * @return the icon paste */ public static AbstractImagePrototype getIconPaste() { - return AbstractImagePrototype.create(ICONS.paste()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.PASTE()); } /** @@ -1087,7 +991,7 @@ public class Resources { * @return the icon refresh */ public static AbstractImagePrototype getIconRefresh() { - return AbstractImagePrototype.create(ICONS.refreshFolder()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.RELOAD()); } /** @@ -1153,23 +1057,6 @@ public class Resources { return AbstractImagePrototype.create(ICONS.removeFilter()); } - /** - * Gets the icon new mail. - * - * @return the icon new mail - */ - public static AbstractImagePrototype getIconNewMail() { - return AbstractImagePrototype.create(ICONS.createNewMail()); - } - - /** - * Gets the icon reply mail. - * - * @return the icon reply mail - */ - public static AbstractImagePrototype getIconReplyMail() { - return AbstractImagePrototype.create(ICONS.replyMail()); - } /** * Gets the icon public link. @@ -1177,35 +1064,21 @@ public class Resources { * @return the icon public link */ public static AbstractImagePrototype getIconPublicLink() { - return AbstractImagePrototype.create(ICONS.publicLink()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.PUBLIC_LINK()); } - /** - * Gets the icon reply all mail. - * - * @return the icon reply all mail - */ - public static AbstractImagePrototype getIconReplyAllMail() { - return AbstractImagePrototype.create(ICONS.replyAllMail()); - } /** - * Gets the icon workflow report. + * Gets the icon versioning. * - * @return the icon workflow report + * @return the icon versioning */ - public static AbstractImagePrototype getIconWorkflowReport() { - return AbstractImagePrototype.create(ICONS.workflowReport()); + public static AbstractImagePrototype getIconVersioning() { + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.VERSIONS()); } - /** - * Gets the icon workflow template. - * - * @return the icon workflow template - */ - public static AbstractImagePrototype getIconWorkflowTemplate() { - return AbstractImagePrototype.create(ICONS.workflowTemplate()); - } + + /** * Gets the icon web dav. @@ -1231,7 +1104,7 @@ public class Resources { * @return the icon share folder */ public static AbstractImagePrototype getIconShareFolder() { - return AbstractImagePrototype.create(ICONS.shareFolder()); + return AbstractImagePrototype.create(StorageHubIconResources.INSTANCE.GROUP()); } /** @@ -1314,7 +1187,7 @@ public class Resources { public static AbstractImagePrototype getSelectedRight() { return AbstractImagePrototype.create(ICONS.selectedRight()); } - + /** * Gets the icon permissions. * @@ -1353,15 +1226,6 @@ public class Resources { } - /** - * Gets the icon versioning. - * - * @return the icon versioning - */ - public static AbstractImagePrototype getIconVersioning() { - return AbstractImagePrototype.create(ICONS.versioning()); - } - /** * Gets the icon thredds publish. @@ -1481,7 +1345,9 @@ public class Resources { return Resources.getIconDoc(); } else if (XML.equals(mediaTypeName)) { return Resources.getIconXml(); - } else if (CSV.equals(mediaTypeName)) { + } else if (mediaTypeName.contains(CAL)) { + return Resources.getIconCalendar(); + }else if (CSV.equals(mediaTypeName)) { return Resources.getIconCsv(); } else if (JAVA.equals(mediaTypeName)) { return Resources.getIconJava(); @@ -1576,15 +1442,11 @@ public class Resources { return Resources.getIconReportTemplate(); }else if(itemType.equals(GXTFolderItemTypeEnum.URL_DOCUMENT)){ return Resources.getIconLink(); - }else if(itemType.equals(GXTFolderItemTypeEnum.WORKFLOW_REPORT)){ - return Resources.getIconWorkflowReport(); - }else if(itemType.equals(GXTFolderItemTypeEnum.WORKFLOW_TEMPLATE)){ - return Resources.getIconWorkflowTemplate(); }else if(itemType.equals(GXTFolderItemTypeEnum.EXTERNAL_RESOURCE_LINK)){ return Resources.getIconResourceLink(); } } - return Resources.getIconTable(); + return Resources.getIconTxt(); } @@ -1596,16 +1458,6 @@ public class Resources { * @return the icon by type */ public static AbstractImagePrototype getIconByType(String name, String type){ - - /*if(type.equals(GXTFolderItemTypeEnum.FOLDER.toString())) - return Resources.getIconFolder(); - else if(type.equals(GXTFolderItemTypeEnum.FOLDER_PUBLIC.toString())) - return Resources.getIconFolderPublic(); - else if(type.equals(GXTFolderItemTypeEnum.FOLDER_SHARED.toString())) - return Resources.getIconSharedFolder(); - else if(type.equals(GXTFolderItemTypeEnum.FOLDER_SHARED_PUBLIC.toString())) - return Resources.getIconFolderSharedPublic();*/ - //RECOVERING "media type name" from type / media type name [+suffix] int sl = type.indexOf("/"); String mediaTypeName = type.substring(sl+1, type.length()); diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/ExplorerPanel.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/ExplorerPanel.java index 7f92470..8d637df 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/ExplorerPanel.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/ExplorerPanel.java @@ -5,7 +5,6 @@ import org.gcube.portlets.user.workspace.client.ConstantsExplorer; import org.gcube.portlets.user.workspace.client.ConstantsExplorer.ViewSwitchType; import org.gcube.portlets.user.workspace.client.event.SwitchViewEvent; import org.gcube.portlets.user.workspace.client.resources.Resources; -import org.gcube.portlets.user.workspace.client.view.smartfolder.SmartFolderPanel; import org.gcube.portlets.user.workspace.client.view.tree.AsyncTreePanel; import com.extjs.gxt.ui.client.event.BaseEvent; @@ -29,7 +28,6 @@ public class ExplorerPanel extends LayoutContainer { private Radio radioTree = null; private Radio radioSmartFolder = null; private AsyncTreePanel asycTreePanel = null; - private SmartFolderPanel smartFolderPanel = null; private final RadioGroup radioGroup = new RadioGroup(); private ContentPanel expPanel = null; private ToolBar toolBar = new ToolBar(); @@ -55,16 +53,10 @@ public class ExplorerPanel extends LayoutContainer { initToolBar(); this.asycTreePanel = new AsyncTreePanel(); - if(isSmartFolderInstanced) - this.smartFolderPanel = new SmartFolderPanel(); - this.expPanel = new ContentPanel(); this.expPanel.setHeaderVisible(false); - this.expPanel.setTopComponent(toolBar); - - // smartFolderPanel.setVisible(false); // messagesPanel.setVisible(false); asycTreePanel.setVisible(true); @@ -73,11 +65,6 @@ public class ExplorerPanel extends LayoutContainer { // expPanel.add(messagesPanel); - if(instancingSmartFolder){ - smartFolderPanel.setVisible(false); - expPanel.add(smartFolderPanel); - } - //BULK //REMOVED 2016-09-15 CHECK SVN @@ -191,8 +178,6 @@ public class ExplorerPanel extends LayoutContainer { if (type.compareTo(ViewSwitchType.Tree)==0) { - if(isSmartFolderInstanced) - smartFolderPanel.setVisible(false); asycTreePanel.setVisible(true); @@ -204,8 +189,6 @@ public class ExplorerPanel extends LayoutContainer { - smartFolderPanel.unPressedAllToogle(); - smartFolderPanel.setVisible(true); AppControllerExplorer.getEventBus().fireEvent(new SwitchViewEvent(ViewSwitchType.SmartFolder)); @@ -216,8 +199,6 @@ public class ExplorerPanel extends LayoutContainer { asycTreePanel.setVisible(false); - if(isSmartFolderInstanced) - smartFolderPanel.setVisible(false); } @@ -227,13 +208,6 @@ public class ExplorerPanel extends LayoutContainer { return asycTreePanel; } - public SmartFolderPanel getShortuctsPanel() { - return smartFolderPanel; - } - - public SmartFolderPanel getSmartFolderPanel() { - return smartFolderPanel; - } public boolean isSmartFolderInstanced() { return isSmartFolderInstanced; diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/tree/ContextMenuTree.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/tree/ContextMenuTree.java index 1e011bf..d6cb32a 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/tree/ContextMenuTree.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/tree/ContextMenuTree.java @@ -55,7 +55,6 @@ import com.google.gwt.user.client.rpc.AsyncCallback; * The Class ContextMenuTree. * * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it - * Nov 17, 2015 */ public class ContextMenuTree { @@ -71,7 +70,7 @@ public class ContextMenuTree { * Instantiates a new context menu tree. */ public ContextMenuTree() { - this.contextMenu.setWidth(140); + this.contextMenu.setWidth(200); this.listSelectedItems = new ArrayList(); createContextMenu(); @@ -121,47 +120,6 @@ public class ContextMenuTree { }); contextMenu.add(openUrl); - - //Open Report Template - //TODO REMOVE - // MenuItem openReportTemplate = new MenuItem(); - // openReportTemplate.setId(WorkspaceOperation.OPEN_REPORT_TEMPLATE.getId()); - // openReportTemplate.setText(ConstantsExplorer.MESSAGE_OPEN_REPORT_TEMPLATE); - // openReportTemplate.setIcon(Resources.getIconShow()); - // - // openReportTemplate.addSelectionListener(new SelectionListener() { - // public void componentSelected(MenuEvent ce) { - // - // FileModel selected = listSelectedItems.get(0); - // - // if(selected!=null){ - // eventBus.fireEvent(new OpenReportsEvent(selected)); - // } - // } - // }); - - //contextMenu.add(openReportTemplate); - - //Open Report Template - //TODO REMOVE - // MenuItem openReport = new MenuItem(); - // openReport.setId(WorkspaceOperation.OPEN_REPORT.getId()); - // openReport.setText(ConstantsExplorer.MESSAGE_OPEN_REPORT); - // openReport.setIcon(Resources.getIconShow()); - // - // openReport.addSelectionListener(new SelectionListener() { - // public void componentSelected(MenuEvent ce) { - // - // FileModel selected = listSelectedItems.get(0); - // - // if (selected != null){ - // eventBus.fireEvent(new OpenReportsEvent(selected)); - // } - // - // } - // }); - - //contextMenu.add(openReport); contextMenu.add(new SeparatorMenuItem()); //END SPECIFIC OPERATION diff --git a/src/main/resources/org/gcube/portlets/user/workspace/WorkspaceTree.gwt.xml b/src/main/resources/org/gcube/portlets/user/workspace/WorkspaceTree.gwt.xml index a28b9dc..d3d6fe8 100644 --- a/src/main/resources/org/gcube/portlets/user/workspace/WorkspaceTree.gwt.xml +++ b/src/main/resources/org/gcube/portlets/user/workspace/WorkspaceTree.gwt.xml @@ -11,7 +11,7 @@ - +