[rhq] 2 commits - modules/enterprise
mike thompson
mithomps at fedoraproject.org
Mon Aug 20 16:36:37 UTC 2012
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java | 33 ------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java | 50 ++++++++++
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml | 6 +
3 files changed, 56 insertions(+), 33 deletions(-)
New commits:
commit 155c66f5fa5ac816de6ce8693875cc746f80096d
Author: Mike Thompson <mithomps at redhat.com>
Date: Mon Aug 20 09:31:13 2012 -0700
[BZ 848529 - Creating a domain deployment spins and never uploads the WAR on IE8]. IE8 had issues registering the listener when the upload was complete. This was a regression caused by smartgwt3.0 upgrade.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java
new file mode 100644
index 0000000..89c1615
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.rhq.enterprise.gui.coregui.client.components.upload;
+
+import com.google.gwt.dom.client.Element;
+
+/**
+ * Implementation class used by {@link com.google.gwt.user.client.ui.FormPanel}.
+ */
+public class DynamicCallbackFormImplIE8 extends DynamicCallbackFormImpl {
+
+ @Override
+ public native void hookEvents(Element iframe,
+ DynamicCallbackFormImplHost listener) /*-{
+ if (iframe) {
+ iframe.onreadystatechange = function() {
+ // If there is no __formAction yet, this is a spurious onreadystatechange
+ // generated when the iframe is first added to the DOM.
+ if (!iframe.__formAction)
+ return;
+
+ if (iframe.readyState == 'complete') {
+ // If the iframe's contentWindow has not navigated to the expected action
+ // url, then it must be an error, so we ignore it.
+ listener. at org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImplHost::onFrameLoad()();
+ }
+ };
+ }
+ }-*/;
+
+ @Override
+ public native void unhookEvents(Element iframe) /*-{
+ if (iframe)
+ iframe.onreadystatechange = null;
+ }-*/;
+
+}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
index 78db5af..c5c4391 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
@@ -39,6 +39,12 @@
<when-type-is class="org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImpl"/>
</replace-with>
+ <!-- Special case for IE8 where upload onsubmit handlers need special registration code from other browsers -->
+ <replace-with class="org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImplIE8">
+ <when-type-is class="org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImpl"/>
+ <when-property-is name="user.agent" value="ie8"/>
+ </replace-with>
+
<generate-with class="org.rhq.enterprise.gui.coregui.user.rebind.rpc.TrackingServiceInterfaceProxyGenerator">
<when-type-assignable class="com.google.gwt.user.client.rpc.RemoteService"/>
commit dc966bdbe0ef18915cba3a1cdd69c4167f5bd4c1
Author: Mike Thompson <mithomps at redhat.com>
Date: Fri Aug 10 15:29:53 2012 -0700
Removed unused methods from ImageManager.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
index e50fe14..a15857e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
@@ -403,9 +403,6 @@ public class ImageManager {
return "subsystems/availability/availability_yellow_16.png";
}
- public static String getAvailabilityYellowLargeIcon() {
- return "subsystems/availability/availability_yellow_24.png";
- }
public static String getAvailBarImagePath(AvailabilityType availType) {
@@ -437,13 +434,6 @@ public class ImageManager {
return "subsystems/alert/Flag_blue_16.png";
}
- public static String getAlertLargeIcon() {
- return "subsystems/alert/Flag_blue_24.png";
- }
-
- public static String getAlertEditIcon() {
- return "subsystems/alert/Edit_Alert.png";
- }
public static String getMetricEditIcon() {
return "subsystems/monitor/Edit_Metric.png";
@@ -551,9 +541,6 @@ public class ImageManager {
return "subsystems/event/" + severity.name() + "_16.png";
}
- public static String getEventLargeIcon() {
- return "subsystems/event/Events_24.png";
- }
public static String getEventIcon() {
return "subsystems/event/Events_16.png";
@@ -563,45 +550,25 @@ public class ImageManager {
return "subsystems/monitor/Monitor_16.png";
}
- public static String getMonitorLargeIcon() {
- return "subsystems/monitor/Monitor_24.png";
- }
public static String getMonitorFailedIcon() {
return "subsystems/monitor/Monitor_failed_16.png";
}
- public static String getMonitorFailedLargeIcon() {
- return "subsystems/monitor/Monitor_failed_24.png";
- }
-
- public static String getOperationLargeIcon() {
- return "subsystems/control/Operation_24.png";
- }
-
public static String getOperationIcon() {
return "subsystems/control/Operation_16.png";
}
- public static String getActivityPackageLargeIcon() {
- return "subsystems/content/Package_24.png";
- }
public static String getActivityPackageIcon() {
return "subsystems/content/Package_16.png";
}
- public static String getBundleLargeIcon() {
- return "subsystems/content/Content_24.png";
- }
public static String getBundleIcon() {
return "subsystems/content/Content_16.png";
}
- public static String getConfigureLargeIcon() {
- return "subsystems/configure/Configure_24.png";
- }
public static String getConfigureIcon() {
return "subsystems/configure/Configure_16.png";
More information about the rhq-commits
mailing list