pinned bar restyled
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/resource-management@81792 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
375ed3e51d
commit
1d14179522
11
.classpath
11
.classpath
|
@ -34,17 +34,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="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
|
||||||
<classpathentry kind="lib" path="/Applications/eclipse 4.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/gwt-user.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="javadoc_location" value="file:/Applications/eclipse%204.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/doc/javadoc/"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/Applications/eclipse 4.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/gwt-dev.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="javadoc_location" value="file:/Applications/eclipse%204.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/doc/javadoc/"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/Applications/eclipse 4.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA-sources.jar"/>
|
<classpathentry kind="lib" path="/Applications/eclipse 4.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA-sources.jar"/>
|
||||||
<classpathentry kind="lib" path="/Applications/eclipse 4.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA.jar" sourcepath="/Applications/eclipse 4.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA-sources.jar"/>
|
<classpathentry kind="lib" path="/Applications/eclipse 4.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA.jar" sourcepath="/Applications/eclipse 4.3/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA-sources.jar"/>
|
||||||
<classpathentry kind="output" path="target/resource-management-5.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/resource-management-5.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
|
31
pom.xml
31
pom.xml
|
@ -50,23 +50,28 @@
|
||||||
<version>${gwtVersion}</version>
|
<version>${gwtVersion}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>xalan</groupId>
|
|
||||||
<artifactId>xalan</artifactId>
|
|
||||||
<version>2.7.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.gwt</groupId>
|
<groupId>com.google.gwt</groupId>
|
||||||
<artifactId>gwt-servlet</artifactId>
|
<artifactId>gwt-servlet</artifactId>
|
||||||
<version>${gwtVersion}</version>
|
<version>${gwtVersion}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>xalan</groupId>
|
||||||
|
<artifactId>xalan</artifactId>
|
||||||
|
<version>2.7.1</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sencha.gxt</groupId>
|
<groupId>com.sencha.gxt</groupId>
|
||||||
<artifactId>gxt</artifactId>
|
<artifactId>gxt</artifactId>
|
||||||
<version>2.2.5</version>
|
<version>2.2.5</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.googlecode.gwtquery</groupId>
|
||||||
|
<artifactId>gwtquery</artifactId>
|
||||||
|
<version>1.3.3</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.admin</groupId>
|
<groupId>org.gcube.portlets.admin</groupId>
|
||||||
<artifactId>rmp-common-library</artifactId>
|
<artifactId>rmp-common-library</artifactId>
|
||||||
|
@ -120,20 +125,20 @@
|
||||||
<artifactId>ishealth-monitor-widget</artifactId>
|
<artifactId>ishealth-monitor-widget</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency> -->
|
<dependency>
|
||||||
<!-- <groupId>org.gcube.portlets.admin</groupId> -->
|
<groupId>org.gcube.portlets.admin</groupId>
|
||||||
<!-- <artifactId>resource-sweeper-widget</artifactId> -->
|
<artifactId>resource-sweeper-widget</artifactId>
|
||||||
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
|
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||||
<!-- </dependency> -->
|
</dependency>
|
||||||
<!-- <dependency> -->
|
<!-- <dependency> -->
|
||||||
<!-- <groupId>org.gcube.portlets.admin</groupId> -->
|
<!-- <groupId>org.gcube.portlets.admin</groupId> -->
|
||||||
<!-- <artifactId>software-upload-wizard</artifactId> -->
|
<!-- <artifactId>software-upload-wizard</artifactId> -->
|
||||||
<!-- <version>[1.1.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
|
<!-- <version>[1.1.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
|
||||||
<!-- </dependency> -->
|
<!-- </dependency> -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.admin</groupId>
|
<groupId>org.gcube.portlets.admin</groupId>
|
||||||
<artifactId>activation-record-widgets</artifactId>
|
<artifactId>activation-record-widgets</artifactId>
|
||||||
<version>[1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
<version>[1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- guice -->
|
<!-- guice -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -33,11 +33,12 @@ import org.gcube.portlets.admin.resourcemanagement.client.widgets.panels.MainPan
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.widgets.registry.UIIdentifiers;
|
import org.gcube.portlets.admin.resourcemanagement.client.widgets.registry.UIIdentifiers;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.widgets.registry.WidgetsRegistry;
|
import org.gcube.portlets.admin.resourcemanagement.client.widgets.registry.WidgetsRegistry;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.widgets.viewport.MainContainer;
|
import org.gcube.portlets.admin.resourcemanagement.client.widgets.viewport.MainContainer;
|
||||||
//import org.gcube.portlets.admin.resourcesweeper.client.dialog.SweeperDialog;
|
import org.gcube.portlets.admin.resourcesweeper.client.dialog.SweeperDialog;
|
||||||
import org.gcube.resourcemanagement.support.client.Resource_support;
|
import org.gcube.resourcemanagement.support.client.Resource_support;
|
||||||
import org.gcube.resourcemanagement.support.client.events.SetScopeEvent;
|
import org.gcube.resourcemanagement.support.client.events.SetScopeEvent;
|
||||||
import org.gcube.resourcemanagement.support.client.events.SetScopeEventHandler;
|
import org.gcube.resourcemanagement.support.client.events.SetScopeEventHandler;
|
||||||
import org.gcube.resourcemanagement.support.client.utils.CurrentStatus;
|
import org.gcube.resourcemanagement.support.client.utils.CurrentStatus;
|
||||||
|
import org.gcube.resourcemanagement.support.client.utils.LocalStatus;
|
||||||
import org.gcube.resourcemanagement.support.client.utils.StatusHandler;
|
import org.gcube.resourcemanagement.support.client.utils.StatusHandler;
|
||||||
import org.gcube.resourcemanagement.support.shared.exceptions.InvalidParameterException;
|
import org.gcube.resourcemanagement.support.shared.exceptions.InvalidParameterException;
|
||||||
import org.gcube.resourcemanagement.support.shared.operations.SupportedOperations;
|
import org.gcube.resourcemanagement.support.shared.operations.SupportedOperations;
|
||||||
|
@ -90,7 +91,6 @@ public class ResourceManagementPortlet implements EntryPoint {
|
||||||
|
|
||||||
private final HandlerManager eventBus = new HandlerManager(null);
|
private final HandlerManager eventBus = new HandlerManager(null);
|
||||||
|
|
||||||
|
|
||||||
private void printStatus(final CurrentStatus status) {
|
private void printStatus(final CurrentStatus status) {
|
||||||
ConsoleMessageBroker.trace(this, "User: " + status.getCurrentUser());
|
ConsoleMessageBroker.trace(this, "User: " + status.getCurrentUser());
|
||||||
ConsoleMessageBroker.trace(this, "Scope: " + status.getCurrentScope());
|
ConsoleMessageBroker.trace(this, "Scope: " + status.getCurrentScope());
|
||||||
|
@ -438,15 +438,19 @@ public class ResourceManagementPortlet implements EntryPoint {
|
||||||
MenuItem testIS = new MenuItem("Check IS Health") {
|
MenuItem testIS = new MenuItem("Check IS Health") {
|
||||||
protected void onClick(final ComponentEvent be) {
|
protected void onClick(final ComponentEvent be) {
|
||||||
super.onClick(be);
|
super.onClick(be);
|
||||||
GWT.runAsync(ISMonitor.class, new RunAsyncCallback() {
|
if (LocalStatus.getInstance().getAvailableScopes() == null || LocalStatus.getInstance().getAvailableScopes().isEmpty()) {
|
||||||
@Override
|
MessageBox.info("Sorry", "This functionality is not available in logged-in mode.", null);
|
||||||
public void onSuccess() {
|
} else {
|
||||||
ISMonitor.pingIS();
|
GWT.runAsync(ISMonitor.class, new RunAsyncCallback() {
|
||||||
}
|
@Override
|
||||||
public void onFailure(Throwable reason) {
|
public void onSuccess() {
|
||||||
Window.alert("There are networks problem, please check your connection.");
|
ISMonitor.pingIS();
|
||||||
}
|
}
|
||||||
});
|
public void onFailure(Throwable reason) {
|
||||||
|
Window.alert("There are networks problem, please check your connection.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
testIS.setIconStyle("is-icon");
|
testIS.setIconStyle("is-icon");
|
||||||
|
@ -458,22 +462,22 @@ public class ResourceManagementPortlet implements EntryPoint {
|
||||||
|
|
||||||
MenuItem cleanGHN = new MenuItem("Resource Sweeper") {
|
MenuItem cleanGHN = new MenuItem("Resource Sweeper") {
|
||||||
protected void onClick(final ComponentEvent be) {
|
protected void onClick(final ComponentEvent be) {
|
||||||
// super.onClick(be);
|
super.onClick(be);
|
||||||
// if (SupportedOperations.SWEEP_GHN.isAllowed(StatusHandler.getStatus().getCredentials())) {
|
if (SupportedOperations.SWEEP_GHN.isAllowed(StatusHandler.getStatus().getCredentials())) {
|
||||||
// GWT.runAsync(SweeperDialog.class, new RunAsyncCallback() {
|
GWT.runAsync(SweeperDialog.class, new RunAsyncCallback() {
|
||||||
// @Override
|
@Override
|
||||||
// public void onSuccess() {
|
public void onSuccess() {
|
||||||
// String currentScope = StatusHandler.getStatus().getCurrentScope();
|
String currentScope = StatusHandler.getStatus().getCurrentScope();
|
||||||
// new SweeperDialog(currentScope);
|
new SweeperDialog(currentScope);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void onFailure(Throwable reason) {
|
public void onFailure(Throwable reason) {
|
||||||
// Window.alert("There are networks problem, please check your connection.");
|
Window.alert("There are networks problem, please check your connection.");
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// MessageBox.alert("Resource Sweeper", "You are not allowed to execute this operation", null);
|
MessageBox.alert("Resource Sweeper", "You are not allowed to execute this operation", null);
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -621,8 +625,9 @@ public class ResourceManagementPortlet implements EntryPoint {
|
||||||
"implied warranty is given for its use, quality or fitness for a " +
|
"implied warranty is given for its use, quality or fitness for a " +
|
||||||
"particular case.</p>" +
|
"particular case.</p>" +
|
||||||
"" +
|
"" +
|
||||||
"<p><b>Bugs</b> can be submitted <a href=\"https://support.d4science.research-infrastructures.eu/\">here</a>.</p>" +
|
"<p><b>Issues</b> can be submitted <a href=\"https://support.d4science.research-infrastructures.eu/\">here</a>.</p>" +
|
||||||
"<p><b>Notice:</b> specify this Component: <br/><i>portlets/admin/ResourceManagementPortlet</i></p>" +
|
"<p><b>Notice:</b> specify this Component: <br/><i>Repository Path: /org/gcube/portlets/admin/resource-management</i></p>" +
|
||||||
|
"<br/>This software was built over the <a href=\"http://gcube.wiki.gcube-system.org/gcube/index.php/Featherweight_Stack\">gCube Featherweight Stack (FWS) </a> and <a href=\"http://www.gwtproject.org\">Google Webtool Kit (GWT)</a> technologies.<br/>" +
|
||||||
"<br/>");
|
"<br/>");
|
||||||
|
|
||||||
dlg.setClosable(true);
|
dlg.setClosable(true);
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
package org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar;
|
package org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar;
|
||||||
|
import static com.google.gwt.query.client.GQuery.$;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.utils.FWSTranslate;
|
import org.gcube.portlets.admin.resourcemanagement.client.utils.FWSTranslate;
|
||||||
|
|
||||||
|
@ -28,6 +31,8 @@ import com.extjs.gxt.ui.client.widget.IconSupport;
|
||||||
import com.google.gwt.user.client.DOM;
|
import com.google.gwt.user.client.DOM;
|
||||||
import com.google.gwt.user.client.Element;
|
import com.google.gwt.user.client.Element;
|
||||||
import com.google.gwt.user.client.Event;
|
import com.google.gwt.user.client.Event;
|
||||||
|
import com.google.gwt.user.client.Random;
|
||||||
|
import com.google.gwt.user.client.Timer;
|
||||||
import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,144 +41,163 @@ import com.google.gwt.user.client.ui.AbstractImagePrototype;
|
||||||
* A selectable icon (post-it styled) and text added to the pinned resources (TaskbarWindow).
|
* A selectable icon (post-it styled) and text added to the pinned resources (TaskbarWindow).
|
||||||
*/
|
*/
|
||||||
public class TaskbarButton extends Component implements IconSupport {
|
public class TaskbarButton extends Component implements IconSupport {
|
||||||
private String type;
|
private String type;
|
||||||
private String text;
|
private String text;
|
||||||
private AbstractImagePrototype icon;
|
private AbstractImagePrototype icon;
|
||||||
private El iconEl;
|
private El iconEl;
|
||||||
|
|
||||||
/**
|
private ArrayList<Integer> extractedColors = new ArrayList<Integer>();
|
||||||
* Creates a new shortcut.
|
|
||||||
*/
|
|
||||||
public TaskbarButton() {
|
|
||||||
|
|
||||||
}
|
/**
|
||||||
|
* Creates a new shortcut.
|
||||||
|
*/
|
||||||
|
public TaskbarButton() {
|
||||||
|
|
||||||
/**
|
}
|
||||||
* Creates a new shortcut.
|
|
||||||
*
|
|
||||||
* @param id the shortcut id
|
|
||||||
* @param text the shortcut text
|
|
||||||
*/
|
|
||||||
public TaskbarButton(final String id, final String type, final String text) {
|
|
||||||
setId(id);
|
|
||||||
setText(text);
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a selection listener.
|
* Creates a new shortcut.
|
||||||
*
|
*
|
||||||
* @param listener the listener to add
|
* @param id the shortcut id
|
||||||
*/
|
* @param text the shortcut text
|
||||||
public final void addSelectionListener(final SelectionListener<? extends ComponentEvent> listener) {
|
*/
|
||||||
addListener(Events.Select, listener);
|
public TaskbarButton(final String id, final String type, final String text) {
|
||||||
}
|
setId(id);
|
||||||
|
setText(text);
|
||||||
|
this.type = type;
|
||||||
|
//need to make sure the element is attached to the DOM
|
||||||
|
Timer t = new Timer() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
$(getElement().getFirstChildElement()).animate("opacity:'0.9'", 500);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
t.schedule(100);
|
||||||
|
}
|
||||||
|
|
||||||
public final AbstractImagePrototype getIcon() {
|
/**
|
||||||
return icon;
|
* Adds a selection listener.
|
||||||
}
|
*
|
||||||
|
* @param listener the listener to add
|
||||||
|
*/
|
||||||
|
public final void addSelectionListener(final SelectionListener<? extends ComponentEvent> listener) {
|
||||||
|
addListener(Events.Select, listener);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
public final AbstractImagePrototype getIcon() {
|
||||||
* Returns the shortcuts text.
|
return icon;
|
||||||
*
|
}
|
||||||
* @return the text
|
|
||||||
*/
|
|
||||||
public final String getText() {
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
/**
|
||||||
public final void onComponentEvent(final ComponentEvent ce) {
|
* Returns the shortcuts text.
|
||||||
super.onComponentEvent(ce);
|
*
|
||||||
if (ce.getEventTypeInt() == Event.ONCLICK) {
|
* @return the text
|
||||||
onClick(ce);
|
*/
|
||||||
}
|
public final String getText() {
|
||||||
}
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Removes a previously added listener.
|
public final void onComponentEvent(final ComponentEvent ce) {
|
||||||
*
|
super.onComponentEvent(ce);
|
||||||
* @param listener the listener to be removed
|
if (ce.getEventTypeInt() == Event.ONCLICK) {
|
||||||
*/
|
onClick(ce);
|
||||||
public final void removeSelectionListener(final SelectionListener<? extends ComponentEvent> listener) {
|
}
|
||||||
removeListener(Events.Select, listener);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public final void setIcon(final AbstractImagePrototype icon) {
|
/**
|
||||||
if (rendered) {
|
* Removes a previously added listener.
|
||||||
iconEl.setInnerHtml("");
|
*
|
||||||
iconEl.appendChild((Element) icon.createElement().cast());
|
* @param listener the listener to be removed
|
||||||
}
|
*/
|
||||||
this.icon = icon;
|
public final void removeSelectionListener(final SelectionListener<? extends ComponentEvent> listener) {
|
||||||
|
removeListener(Events.Select, listener);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public final void setIcon(final AbstractImagePrototype icon) {
|
||||||
|
if (rendered) {
|
||||||
|
iconEl.setInnerHtml("");
|
||||||
|
iconEl.appendChild((Element) icon.createElement().cast());
|
||||||
|
}
|
||||||
|
this.icon = icon;
|
||||||
|
|
||||||
public final void setIconStyle(final String icon) {
|
}
|
||||||
setIcon(IconHelper.create(icon, 48, 48));
|
|
||||||
|
|
||||||
}
|
public final void setIconStyle(final String icon) {
|
||||||
|
setIcon(IconHelper.create(icon, 48, 48));
|
||||||
|
|
||||||
/**
|
}
|
||||||
* Sets the shortcuts text.
|
|
||||||
*
|
|
||||||
* @param text the text
|
|
||||||
*/
|
|
||||||
public final void setText(final String text) {
|
|
||||||
this.text = text;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void onClick(final ComponentEvent ce) {
|
/**
|
||||||
ce.stopEvent();
|
* Sets the shortcuts text.
|
||||||
fireEvent(Events.Select, ce);
|
*
|
||||||
}
|
* @param text the text
|
||||||
|
*/
|
||||||
|
public final void setText(final String text) {
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
protected void onClick(final ComponentEvent ce) {
|
||||||
protected final void onRender(final Element target, final int index) {
|
ce.stopEvent();
|
||||||
super.onRender(target, index);
|
fireEvent(Events.Select, ce);
|
||||||
int splitTextTo = 16;
|
}
|
||||||
String style = "background:#ffc; display:block; margin-left: 15px; margin-top: 10px; " +
|
|
||||||
"padding:3px; width: 120px; height: 120px;font-family:'Reenie Beanie',arial,sans-serif; font-size:19px;line-height:1;" +
|
|
||||||
"-moz-box-shadow:5px 5px 7px rgba(33,33,33,1);"+
|
|
||||||
"-webkit-box-shadow: 5px 5px 7px rgba(33,33,33,.7);"+
|
|
||||||
"box-shadow: 5px 5px 7px rgba(33,33,33,.7); " +
|
|
||||||
"";
|
|
||||||
|
|
||||||
//add the (fake) randomly tilted effect
|
@Override
|
||||||
int rd = index + 1;
|
protected final void onRender(final Element target, final int index) {
|
||||||
if (rd % 2 == 0) { //even
|
super.onRender(target, index);
|
||||||
style += "-o-transform:rotate(5deg); -webkit-transform:rotate(5deg); -moz-transform:rotate(5deg); position:relative;";
|
|
||||||
} else if (rd % 3 == 0) { // 3 times
|
|
||||||
style += "-o-transform:rotate(-3deg); -webkit-transform:rotate(-3deg); -moz-transform:rotate(-3deg); position:relative; top: -5px; ";
|
|
||||||
} else { //antyhing else
|
|
||||||
style += "-o-transform:rotate(2deg); -webkit-transform:rotate(2deg); -moz-transform:rotate(2deg); position:relative;";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
String fontStyle = "font-family:'Reenie Beanie',arial,sans-serif; font-size:20px; padding: 5px; overflow-x: hidden; overflow-y: hidden;";
|
|
||||||
setElement(DOM.createElement("dt"), target, index);
|
|
||||||
El a = el().createChild("<div style=\""+ style +"\"><a href='#'></a></div>");
|
|
||||||
iconEl = a.createChild("<h2>"+FWSTranslate.getFWSNameFromLabel(type)+"</h2>");
|
|
||||||
El txt = a.createChild("<div style=\""+fontStyle+"\" align=\"center\"></div>");
|
|
||||||
String toShow = "";
|
|
||||||
if (text.length() / splitTextTo > 0) {
|
|
||||||
int iterateTo = ((text.length() / splitTextTo) < 4) ? (text.length() / splitTextTo) : 3;
|
|
||||||
for (int i = 0; i < iterateTo; i++)
|
|
||||||
toShow += text.substring(i*splitTextTo, (i+1)*splitTextTo) + " ";
|
|
||||||
|
|
||||||
if (iterateTo < 4)
|
String fontStyle = "font-size:12px; font-weight: 300; margin-top: 5px; padding: 5px; word-wrap: break-word;";
|
||||||
toShow += text.substring((text.length() / splitTextTo)*splitTextTo,text.length());
|
setElement(DOM.createElement("dt"), target, index);
|
||||||
}
|
|
||||||
else
|
|
||||||
toShow = text;
|
|
||||||
|
|
||||||
if (txt != null) {
|
|
||||||
txt.setInnerHtml(toShow);
|
|
||||||
}
|
|
||||||
el().updateZIndex(0);
|
|
||||||
sinkEvents(Event.ONCLICK);
|
|
||||||
if (icon != null) {
|
|
||||||
setIcon(icon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
final El a = el().createChild("<div class=\"iosItem\" style=\"background-color: "+ getExaBackgroundColor() + "; opacity: 0;\"><a href='#'></a></div>");
|
||||||
|
iconEl = a.createChild(FWSTranslate.getFWSNameFromLabel(type));
|
||||||
|
El txt = a.createChild("<div style=\""+fontStyle+"\" align=\"center\"></div>");
|
||||||
|
|
||||||
|
if (txt != null) {
|
||||||
|
txt.setInnerHtml(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
el().updateZIndex(0);
|
||||||
|
sinkEvents(Event.ONCLICK);
|
||||||
|
if (icon != null) {
|
||||||
|
setIcon(icon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getExaBackgroundColor() {
|
||||||
|
//pick a random color
|
||||||
|
int no = Random.nextInt(7);
|
||||||
|
while (extractedColors.contains(no)) {
|
||||||
|
no = Random.nextInt(7);
|
||||||
|
}
|
||||||
|
extractedColors.add(no);
|
||||||
|
if (extractedColors.size() > 6)
|
||||||
|
extractedColors = new ArrayList<Integer>();
|
||||||
|
|
||||||
|
switch (no) {
|
||||||
|
case 0:
|
||||||
|
return "#bebee4";
|
||||||
|
case 1:
|
||||||
|
return "#CAEBFA";
|
||||||
|
case 2:
|
||||||
|
return "#a8f2b5";
|
||||||
|
case 3:
|
||||||
|
return "#fe99ad";
|
||||||
|
case 4:
|
||||||
|
return "#ffd395";
|
||||||
|
case 5:
|
||||||
|
return "#ffea97";
|
||||||
|
case 6:
|
||||||
|
return "#d4d4d4";
|
||||||
|
default:
|
||||||
|
return "#a8f2b5";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
package org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar;
|
package org.gcube.portlets.admin.resourcemanagement.client.widgets.taskbar;
|
||||||
|
|
||||||
|
import static com.google.gwt.query.client.GQuery.$;
|
||||||
|
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.remote.ProxyRegistry;
|
import org.gcube.portlets.admin.resourcemanagement.client.remote.ProxyRegistry;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.utils.Callbacks;
|
import org.gcube.portlets.admin.resourcemanagement.client.utils.Callbacks;
|
||||||
import org.gcube.portlets.admin.resourcemanagement.client.utils.Commands;
|
import org.gcube.portlets.admin.resourcemanagement.client.utils.Commands;
|
||||||
|
@ -69,7 +71,6 @@ public class TaskbarItem {
|
||||||
relatedWidget.doMinimize();
|
relatedWidget.doMinimize();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
GWT.log("TITLE: " + title);
|
|
||||||
this.detachButton.setStyleName("taskbar-button");
|
this.detachButton.setStyleName("taskbar-button");
|
||||||
|
|
||||||
this.detachButton.setIconStyle(buttonIcon);
|
this.detachButton.setIconStyle(buttonIcon);
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
<!-- <set-property name="user.agent" value="gecko1_8" /> -->
|
<!-- <set-property name="user.agent" value="gecko1_8" /> -->
|
||||||
<!-- Other module inherits -->
|
<!-- Other module inherits -->
|
||||||
<inherits name='com.extjs.gxt.ui.GXT' />
|
<inherits name='com.extjs.gxt.ui.GXT' />
|
||||||
|
<inherits name='com.google.gwt.query.Query' />
|
||||||
<!-- inherits Software Uplad Widget -->
|
<!-- inherits Software Uplad Widget -->
|
||||||
<!-- <inherits name='org.gcube.portlets.admin.software_upload_wizard.SoftwareUploadWizard' /> -->
|
<!-- <inherits name='org.gcube.portlets.admin.software_upload_wizard.SoftwareUploadWizard' /> -->
|
||||||
<!-- inherits Resource Sweeper Widget -->
|
<!-- inherits Resource Sweeper Widget -->
|
||||||
<!-- <inherits name='org.gcube.portlets.admin.resourcesweeper.Resource_sweeper' /> -->
|
<inherits name='org.gcube.portlets.admin.resourcesweeper.Resource_sweeper' />
|
||||||
|
|
||||||
<inherits name='org.gcube.portlets.admin.Activation_record_widgets' />
|
<inherits name='org.gcube.portlets.admin.Activation_record_widgets' />
|
||||||
<!-- inherits IS Health Monitor Widget -->
|
<!-- inherits IS Health Monitor Widget -->
|
||||||
|
|
|
@ -4,9 +4,25 @@
|
||||||
|
|
||||||
/* Fix the scrollbar background style*/
|
/* Fix the scrollbar background style*/
|
||||||
.x-progress-text div {
|
.x-progress-text div {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.iosItem {
|
||||||
|
color: #4c68a6;
|
||||||
|
font-family: "HelveticaNeue-Light", "Helvetica Neue Light",
|
||||||
|
"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
||||||
|
font-weight: 300;
|
||||||
|
font-size: 15px;
|
||||||
|
display: block;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 5px;
|
||||||
|
width: 120px;
|
||||||
|
border-radius: 10px;
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wizardTextBox {
|
.wizardTextBox {
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
<link href='http://fonts.googleapis.com/css?family=Reenie+Beanie' rel='stylesheet' type='text/css'>
|
<link href='http://fonts.googleapis.com/css?family=Reenie+Beanie' rel='stylesheet' type='text/css'>
|
||||||
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/xmlverbatim.css">
|
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/xmlverbatim.css">
|
||||||
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/gxt/css/gxt-all.css" />
|
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/gxt/css/gxt-all.css" />
|
||||||
|
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/ResourceManagementPortlet.css" />
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" language="javascript" src="<%=request.getContextPath()%>/resourcemanagementportlet/resourcemanagementportlet.nocache.js"></script>
|
<script type="text/javascript" language="javascript" src="<%=request.getContextPath()%>/resourcemanagementportlet/resourcemanagementportlet.nocache.js"></script>
|
||||||
<div id="MyUniqueDIV" class="portlet-wrapper"></div>
|
<div id="MyUniqueDIV" class="portlet-wrapper"></div>
|
||||||
|
|
|
@ -16,15 +16,15 @@
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
<!-- Sweeper -->
|
<!-- Sweeper -->
|
||||||
<!-- <servlet> -->
|
<servlet>
|
||||||
<!-- <servlet-name>sweeperServlet</servlet-name> -->
|
<servlet-name>sweeperServlet</servlet-name>
|
||||||
<!-- <servlet-class>org.gcube.portlets.admin.resourcesweeper.server.SweeperServiceImpl</servlet-class> -->
|
<servlet-class>org.gcube.portlets.admin.resourcesweeper.server.SweeperServiceImpl</servlet-class>
|
||||||
<!-- </servlet> -->
|
</servlet>
|
||||||
|
|
||||||
<!-- <servlet-mapping> -->
|
<servlet-mapping>
|
||||||
<!-- <servlet-name>sweeperServlet</servlet-name> -->
|
<servlet-name>sweeperServlet</servlet-name>
|
||||||
<!-- <url-pattern>/resourcemanagementportlet/sweeper</url-pattern> -->
|
<url-pattern>/resourcemanagementportlet/sweeper</url-pattern>
|
||||||
<!-- </servlet-mapping> -->
|
</servlet-mapping>
|
||||||
|
|
||||||
|
|
||||||
<!-- SUW -->
|
<!-- SUW -->
|
||||||
|
|
|
@ -5,8 +5,13 @@
|
||||||
width: 92% !important;
|
width: 92% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#bottombar {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
.x-menubar {
|
.x-menubar {
|
||||||
background: #FFF url(images/bg-pattern.png) repeat;
|
background-image: none;
|
||||||
|
background-color: #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-panel-body-noheader {
|
.x-panel-body-noheader {
|
||||||
|
@ -22,41 +27,45 @@
|
||||||
|
|
||||||
.x-toolbar {
|
.x-toolbar {
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
background: #FFF url(images/bg-pattern.png) repeat;
|
background-image: none;
|
||||||
|
background-color: #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-panel-header {
|
.x-panel-header {
|
||||||
background: #FFF url(images/bg-pattern.png) repeat;
|
background-image: none;
|
||||||
|
background-color: #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-toolbar .xtb-sep {
|
.x-toolbar .xtb-sep {
|
||||||
background-image: none !important;
|
background-image: none !important;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-accordion-hd {
|
.x-accordion-hd {
|
||||||
background-position: 0 0px;
|
background-position: 0 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-status-text {
|
.x-status-text,.x-tree3-node-text,.x-status .x-status-text,.x-toolbar label,.x-component,.x-btn button
|
||||||
color: #226599;
|
{
|
||||||
font-weight: bold !important;
|
color: #4c68a6;
|
||||||
|
font-family: "HelveticaNeue-Light", "Helvetica Neue Light",
|
||||||
|
"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
||||||
|
font-weight: 300;
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-grid-group-hd .x-grid-group-div {
|
||||||
|
color: #4c68a6;
|
||||||
|
font-family: "HelveticaNeue-Light", "Helvetica Neue Light",
|
||||||
|
"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 12px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-status-text-panel {
|
.x-status-text-panel {
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-component {
|
|
||||||
color: #226599;
|
|
||||||
}
|
|
||||||
|
|
||||||
.x-btn button {
|
|
||||||
color: #226599;
|
|
||||||
font-weight: bold !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.x-panel-mc {
|
.x-panel-mc {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
background: #FFF url(images/bg-pattern.png) repeat;
|
background: #FFF url(images/bg-pattern.png) repeat;
|
||||||
|
@ -72,9 +81,15 @@
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
|
background-image: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ext-el-mask-msg div {
|
.ext-el-mask-msg div {
|
||||||
|
color: #4c68a6;
|
||||||
|
font-family: "HelveticaNeue-Light", "Helvetica Neue Light",
|
||||||
|
"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
||||||
|
font-weight: 300;
|
||||||
|
font-size: 12px !important;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
@ -82,4 +97,4 @@
|
||||||
.loading-indicator {
|
.loading-indicator {
|
||||||
background-position: 5px 50%;
|
background-position: 5px 50%;
|
||||||
background-image: url("images/loader.gif");
|
background-image: url("images/loader.gif");
|
||||||
}
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
Loading…
Reference in New Issue