task_21363 #1
|
@ -33,11 +33,11 @@ import com.google.gwt.user.client.ui.ComplexPanel;
|
|||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
|
||||
/**
|
||||
* The Class CkanContentModeratorWidget.
|
||||
* The Class CkanContentModeratorWidgetController.
|
||||
*
|
||||
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||
*
|
||||
* Jun 15, 2021
|
||||
* Jun 29, 2021
|
||||
*/
|
||||
public class CkanContentModeratorWidgetController {
|
||||
|
||||
|
@ -99,7 +99,7 @@ public class CkanContentModeratorWidgetController {
|
|||
for (T t : items) {
|
||||
CatalogueDataset clickedDataset = (CatalogueDataset) t;
|
||||
CkanFramePanel cfp = new CkanFramePanel(eventBus);
|
||||
cfp.instanceFrame(clickedDataset.getUrl(), null);
|
||||
cfp.instanceFrame(clickedDataset.getUrl());
|
||||
mainTabPanel.addTab(clickedDataset.getTitle(), cfp);
|
||||
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ public class CkanContentModeratorWidgetController {
|
|||
|
||||
@Override
|
||||
public void onValueChanged(SelectItemsWithItemStatusEvent statusSelectedEvent) {
|
||||
GWT.log("On value changed: "+statusSelectedEvent.getItemStatus());
|
||||
GWT.log("On value changed: " + statusSelectedEvent.getItemStatus());
|
||||
if (statusSelectedEvent.getItemStatus() != null) {
|
||||
howeView.loadItemsWithStatus(statusSelectedEvent.getItemStatus());
|
||||
mainTabPanel.selectTab(0);
|
||||
|
|
|
@ -46,21 +46,6 @@ public class CkanFramePanel extends FlowPanel{
|
|||
addLoading();
|
||||
}
|
||||
|
||||
/**
|
||||
* Post message.
|
||||
*
|
||||
* @param msg the msg (as json)
|
||||
* @param frameName the frame name
|
||||
*/
|
||||
protected native void sendMessage(String msg, String frameName) /*-{
|
||||
console.log("Sending message " + msg);
|
||||
// $wnd.parent.postMessage(msg,'*');
|
||||
//var f = $wnd.frames[frameName];
|
||||
//console.log(f);
|
||||
//f.contentWindow.postMessage(msg, "*");
|
||||
$wnd.frames[frameName].postMessage(msg,"*")
|
||||
console.log("Message sent");
|
||||
}-*/;
|
||||
|
||||
/**
|
||||
* Prints the.
|
||||
|
@ -72,14 +57,14 @@ public class CkanFramePanel extends FlowPanel{
|
|||
}-*/;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Instance frame.
|
||||
*
|
||||
* @param datasetURL the dataset URL
|
||||
* @param messageToSend the message to send
|
||||
* @return the frame
|
||||
*/
|
||||
public Frame instanceFrame(String datasetURL, final String messageToSend) {
|
||||
public Frame instanceFrame(String datasetURL) {
|
||||
GWT.log("Instancing new IFRAME with uri: "+datasetURL);
|
||||
try{
|
||||
if(frame != null)
|
||||
|
@ -109,9 +94,6 @@ public class CkanFramePanel extends FlowPanel{
|
|||
|
||||
CkanFramePanel.this.remove(loading);
|
||||
eventBus.fireEvent(new IFrameInstanciedEvent(frame, OPERATION.ONLOAD));
|
||||
if(messageToSend!=null)
|
||||
sendMessage(messageToSend, iFrameRandomName);
|
||||
|
||||
}
|
||||
});
|
||||
add(frame);
|
||||
|
|
Loading…
Reference in New Issue