Author: nscavell
Date: 2011-10-10 11:38:44 -0400 (Mon, 10 Oct 2011)
New Revision: 7702
Modified:
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java
Log:
GTNPORTAL-2161: Inconsistency in Export/Import Gadget UI after attempting to import
invalid file.
Modified:
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java
===================================================================
---
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java 2011-10-10
15:05:02 UTC (rev 7701)
+++
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java 2011-10-10
15:38:44 UTC (rev 7702)
@@ -58,6 +58,7 @@
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.Tree;
import com.google.gwt.user.client.ui.TreeItem;
+import gwtupload.client.IUploadStatus;
import gwtupload.client.IUploader;
import gwtupload.client.MultiUploader;
@@ -302,37 +303,40 @@
public void onStart(IUploader uploader)
{
- statusLabel.setText("Process in progress...");
- statusLabel.setStyleName("progress-style");
- statusImg.setStyleName("progress-style-icon");
- importModeListBox.setEnabled(false);
- importButton.setEnabled(false);
- if (!isShwon)
+ if (uploader.getStatus() == IUploadStatus.Status.INPROGRESS)
{
- statusPanel.setStyleName("status-panel");
- statusPanel.setSize("380px", "0px");
- absolutePanel.add(statusPanel, 10, 120);
-
- Timer t = new Timer()
+ statusLabel.setText("Process in progress...");
+ statusLabel.setStyleName("progress-style");
+ statusImg.setStyleName("progress-style-icon");
+ importModeListBox.setEnabled(false);
+ importButton.setEnabled(false);
+ if (!isShwon)
{
+ statusPanel.setStyleName("status-panel");
+ statusPanel.setSize("380px", "0px");
+ absolutePanel.add(statusPanel, 10, 120);
- int dx = 5;
- int height = 0;
+ Timer t = new Timer()
+ {
- public void run()
- {
- height += dx;
- statusPanel.setHeight(height + "px");
- if (height >= 45)
+ int dx = 5;
+ int height = 0;
+
+ public void run()
{
- cancel(); // Stop the timer
+ height += dx;
+ statusPanel.setHeight(height + "px");
+ if (height >= 45)
+ {
+ cancel(); // Stop the timer
+ }
}
- }
- };
+ };
- // Schedule the timer to run once in 100 milliseconds.
- t.scheduleRepeating(100);
- isShwon = true;
+ // Schedule the timer to run once in 100 milliseconds.
+ t.scheduleRepeating(100);
+ isShwon = true;
+ }
}
}
});
Show replies by date