task_21363 #1

Closed
francesco.mangiacrapa wants to merge 53 commits from task_21363 into master
1 changed files with 21 additions and 21 deletions
Showing only changes of commit 88a62069fe - Show all commits

View File

@ -29,14 +29,14 @@ import com.google.gwt.user.client.ui.NamedFrame;
*/
public class CkanInternalFramePanel extends FlowPanel {
private NamedFrame frame;
private NamedFrame namedFrame;
private HandlerManager eventBus;
private Image loading = new Image(ContentModeratorWidgetResources.ICONS.loading());
private String messageToSend;
private String iFrameRandomName;
/**
* Instantiates a new ckan frame panel.
* Instantiates a new ckan namedFrame panel.
*
* @param eventBus the event bus
*/
@ -55,46 +55,46 @@ public class CkanInternalFramePanel extends FlowPanel {
}-*/;
/**
* Instance frame.
* Instance namedFrame.
*
* @param datasetURL the dataset URL
* @return the frame
* @return the namedFrame
*/
public Frame instanceFrame(String datasetURL) {
GWT.log("Instancing new IFRAME with uri: " + datasetURL);
addLoading();
String urlEncoded = URL.encode(datasetURL);
GWT.log("Encoded url for instanciating frame is " + urlEncoded);
iFrameRandomName = Random.nextInt() + "dataset-iframe" + Random.nextInt();
frame = new NamedFrame(iFrameRandomName);
frame.setUrl(urlEncoded);
GWT.log("Encoded url for instanciating namedFrame is " + urlEncoded);
iFrameRandomName = Random.nextInt() + "dataset-internal-iframe" + Random.nextInt();
namedFrame = new NamedFrame(iFrameRandomName);
namedFrame.setUrl(urlEncoded);
frame.getElement().setId(iFrameRandomName);
frame.setWidth("100%");
frame.setHeight("580px");
frame.getElement().getStyle().setBorderWidth(0, Unit.PX);
frame.addLoadHandler(new LoadHandler() {
namedFrame.getElement().setId(iFrameRandomName);
namedFrame.setWidth("100%");
namedFrame.setHeight("580px");
namedFrame.getElement().getStyle().setBorderWidth(0, Unit.PX);
namedFrame.addLoadHandler(new LoadHandler() {
@Override
public void onLoad(LoadEvent arg0) {
CkanInternalFramePanel.this.remove(loading);
eventBus.fireEvent(new IFrameInstanciedEvent(frame, OPERATION.ONLOAD));
eventBus.fireEvent(new IFrameInstanciedEvent(namedFrame, OPERATION.ONLOAD));
}
});
add(frame);
frame.setVisible(true);
eventBus.fireEvent(new IFrameInstanciedEvent(frame, OPERATION.INIT));
return frame;
add(namedFrame);
namedFrame.setVisible(true);
eventBus.fireEvent(new IFrameInstanciedEvent(namedFrame, OPERATION.INIT));
return namedFrame;
}
/**
* Gets the frame.
* Gets the namedFrame.
*
* @return the frame
* @return the namedFrame
*/
public Frame getFrame() {
return frame;
return namedFrame;
}
/**