From 2b3a9838a8617719d0a478a7f6868c786f21a6e7 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 17 Mar 2017 11:06:56 +0000 Subject: [PATCH] ref 6078:TDM - Create a new widget to support operations's invocation on DataMiner https://support.d4science.org/issues/6078 Updated to support DataMiner git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/data-miner-manager-widget@144996 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../experiments/OperatorCategoryPanel.java | 17 ++------------ .../client/experiments/OperatorPanel.java | 16 +------------ .../client/resources/DataMiner.css | 23 ++++++++++++------- .../client/resources/DataMiner.css | 23 ++++++++++++------- 4 files changed, 33 insertions(+), 46 deletions(-) diff --git a/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/experiments/OperatorCategoryPanel.java b/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/experiments/OperatorCategoryPanel.java index c23268c..16432fe 100644 --- a/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/experiments/OperatorCategoryPanel.java +++ b/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/experiments/OperatorCategoryPanel.java @@ -105,21 +105,8 @@ public class OperatorCategoryPanel extends SimpleContainer { * @return */ private String getTooltipTemplate(String base, String id, boolean hasImage, String description){ - String image; - if(hasImage==false||id==null||id.isEmpty()){ - image=DataMinerManagerPanel.resources.categoryDefaultImage().getSafeUri().asString(); - } else { - switch(id){ - case "DISTRIBUTIONS": - image=DataMinerManagerPanel.resources.categoryDefaultImage().getSafeUri().asString(); - break; - default: - image=DataMinerManagerPanel.resources.categoryDefaultImage().getSafeUri().asString(); - break; - - } - } - + String image=DataMinerManagerPanel.resources.categoryDefaultImage().getSafeUri().asString(); + String html = "
"+ ""+ diff --git a/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/experiments/OperatorPanel.java b/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/experiments/OperatorPanel.java index 534508b..550c8a0 100644 --- a/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/experiments/OperatorPanel.java +++ b/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/experiments/OperatorPanel.java @@ -113,21 +113,7 @@ public class OperatorPanel extends SimpleContainer { */ private String getTooltipTemplate(String base, String id, boolean hasImage, String description) { - String image; - if(hasImage==false||id==null||id.isEmpty()){ - image=DataMinerManagerPanel.resources.operatorsDefaultImage().getSafeUri().asString(); - } else { - switch(id){ - case "AquamapsNative2050": - image=DataMinerManagerPanel.resources.operatorsAquamapsNative2050Operator().getSafeUri().asString(); - break; - default: - image=DataMinerManagerPanel.resources.operatorsDefaultImage().getSafeUri().asString(); - break; - - } - } - + String image=DataMinerManagerPanel.resources.operatorsDefaultImage().getSafeUri().asString(); String template = "
" + "" + Format.ellipse(description, TOOLTIP_DESCRIPTION_LENGHT) diff --git a/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/resources/DataMiner.css b/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/resources/DataMiner.css index 068b6b6..cc58fbd 100644 --- a/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/resources/DataMiner.css +++ b/src/main/java/org/gcube/portlets/widgets/dataminermanagerwidget/client/resources/DataMiner.css @@ -107,7 +107,7 @@ cursor: pointer; } -.categoryItem { +@sprite .categoryItem { margin-top: 10px; margin-left: 5px; font-size: 15px; @@ -115,17 +115,22 @@ font-weight: bolder; border-bottom: 2px solid #505050; margin-bottom: 5px; - background-image: url(images/triangle-right.png); + gwt-image: "triangleRight"; + /*background-image: url(images/triangle-right.png);*/ background-repeat: no-repeat; background-position: right; } -.categoryItem-Collapsed { - background-image: url(images/triangle-right.png); + + +@sprite .categoryItem-Collapsed { + gwt-image: "triangleRight"; + /*"background-image: url(images/triangle-right.png);*/ } -.categoryItem-Expanded { - background-image: url(images/triangle-down.png); +@sprite .categoryItem-Expanded { + gwt-image: triangleDown"; + /*"background-image: url(images/triangle-down.png);*/ } .categoryItem:hover { @@ -300,9 +305,11 @@ background-color: gray; } -.workflow-parameters-preload { +@sprite .workflow-parameters-preload { display: block; - background: url('ajax-loader-big.gif') no-repeat; + gwt-image: "loaderBig"; + background-repeat: no-repeat; + /*background: url('ajax-loader-big.gif') no-repeat;*/ width: 400px; height: 180px; } diff --git a/src/main/resources/org/gcube/portlets/widgets/dataminermanagerwidget/client/resources/DataMiner.css b/src/main/resources/org/gcube/portlets/widgets/dataminermanagerwidget/client/resources/DataMiner.css index 068b6b6..cc58fbd 100644 --- a/src/main/resources/org/gcube/portlets/widgets/dataminermanagerwidget/client/resources/DataMiner.css +++ b/src/main/resources/org/gcube/portlets/widgets/dataminermanagerwidget/client/resources/DataMiner.css @@ -107,7 +107,7 @@ cursor: pointer; } -.categoryItem { +@sprite .categoryItem { margin-top: 10px; margin-left: 5px; font-size: 15px; @@ -115,17 +115,22 @@ font-weight: bolder; border-bottom: 2px solid #505050; margin-bottom: 5px; - background-image: url(images/triangle-right.png); + gwt-image: "triangleRight"; + /*background-image: url(images/triangle-right.png);*/ background-repeat: no-repeat; background-position: right; } -.categoryItem-Collapsed { - background-image: url(images/triangle-right.png); + + +@sprite .categoryItem-Collapsed { + gwt-image: "triangleRight"; + /*"background-image: url(images/triangle-right.png);*/ } -.categoryItem-Expanded { - background-image: url(images/triangle-down.png); +@sprite .categoryItem-Expanded { + gwt-image: triangleDown"; + /*"background-image: url(images/triangle-down.png);*/ } .categoryItem:hover { @@ -300,9 +305,11 @@ background-color: gray; } -.workflow-parameters-preload { +@sprite .workflow-parameters-preload { display: block; - background: url('ajax-loader-big.gif') no-repeat; + gwt-image: "loaderBig"; + background-repeat: no-repeat; + /*background: url('ajax-loader-big.gif') no-repeat;*/ width: 400px; height: 180px; }