use of org.olat.core.gui.control.generic.iframe.NewIframeUriEvent in project OpenOLAT by OpenOLAT.
the class SinglePageController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
@Override
public void event(UserRequest ureq, Controller source, Event event) {
if (source == idc) {
if (event instanceof OlatCmdEvent) {
OlatCmdEvent oce = (OlatCmdEvent) event;
String nodeId = oce.getSubcommand();
ThreadLocalUserActivityLogger.log(CourseLoggingAction.COURSE_BROWSE_GOTO_NODE, getClass(), CoreLoggingResourceable.wrapSpUri(GOTO_NID + nodeId));
// refire to listening controllers
fireEvent(ureq, event);
} else if (event instanceof NewIframeUriEvent) {
NewIframeUriEvent iframeEvent = (NewIframeUriEvent) event;
String newUri = iframeEvent.getNewUri();
setCurURI(newUri);
// log this uri change
ThreadLocalUserActivityLogger.log(CourseLoggingAction.NODE_SINGLEPAGE_GET_FILE, getClass(), CoreLoggingResourceable.wrapSpUri(newUri));
}
} else if (source == htmlEditorController) {
idc.setCurrentURI(g_curURI);
mainPanel.setContent(myContent);
}
}
use of org.olat.core.gui.control.generic.iframe.NewIframeUriEvent in project OpenOLAT by OpenOLAT.
the class CPDisplayController method event.
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
if (source == cpContentCtr) {
// a .html click within the contentpackage
if (event instanceof NewInlineUriEvent) {
NewInlineUriEvent nue = (NewInlineUriEvent) event;
// adjust the tree selection to the current choice if found
selectTreeNode(ureq, nue.getNewUri());
} else if (event instanceof NewIframeUriEvent) {
NewIframeUriEvent nue = (NewIframeUriEvent) event;
selectTreeNode(ureq, nue.getNewUri());
}
// else ignore (e.g. misplaced olatcmd event (inner olat link found in a
// contentpackaging file)
} else if (source == printPopup) {
removeAsListenerAndDispose(printPopup);
removeAsListenerAndDispose(printController);
printController = null;
printPopup = null;
} else if (source == printController) {
if (Event.DONE_EVENT == event) {
List<String> nodeToPrint = printController.getSelectedNodeIdentifiers();
printPages(nodeToPrint);
}
printPopup.deactivate();
removeAsListenerAndDispose(printPopup);
removeAsListenerAndDispose(printController);
printController = null;
printPopup = null;
}
}
use of org.olat.core.gui.control.generic.iframe.NewIframeUriEvent in project openolat by klemens.
the class CPDisplayController method event.
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
if (source == cpContentCtr) {
// a .html click within the contentpackage
if (event instanceof NewInlineUriEvent) {
NewInlineUriEvent nue = (NewInlineUriEvent) event;
// adjust the tree selection to the current choice if found
selectTreeNode(ureq, nue.getNewUri());
} else if (event instanceof NewIframeUriEvent) {
NewIframeUriEvent nue = (NewIframeUriEvent) event;
selectTreeNode(ureq, nue.getNewUri());
}
// else ignore (e.g. misplaced olatcmd event (inner olat link found in a
// contentpackaging file)
} else if (source == printPopup) {
removeAsListenerAndDispose(printPopup);
removeAsListenerAndDispose(printController);
printController = null;
printPopup = null;
} else if (source == printController) {
if (Event.DONE_EVENT == event) {
List<String> nodeToPrint = printController.getSelectedNodeIdentifiers();
printPages(nodeToPrint);
}
printPopup.deactivate();
removeAsListenerAndDispose(printPopup);
removeAsListenerAndDispose(printController);
printController = null;
printPopup = null;
}
}
use of org.olat.core.gui.control.generic.iframe.NewIframeUriEvent in project openolat by klemens.
the class SinglePageController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
@Override
public void event(UserRequest ureq, Controller source, Event event) {
if (source == idc) {
if (event instanceof OlatCmdEvent) {
OlatCmdEvent oce = (OlatCmdEvent) event;
String nodeId = oce.getSubcommand();
ThreadLocalUserActivityLogger.log(CourseLoggingAction.COURSE_BROWSE_GOTO_NODE, getClass(), CoreLoggingResourceable.wrapSpUri(GOTO_NID + nodeId));
// refire to listening controllers
fireEvent(ureq, event);
} else if (event instanceof NewIframeUriEvent) {
NewIframeUriEvent iframeEvent = (NewIframeUriEvent) event;
String newUri = iframeEvent.getNewUri();
setCurURI(newUri);
// log this uri change
ThreadLocalUserActivityLogger.log(CourseLoggingAction.NODE_SINGLEPAGE_GET_FILE, getClass(), CoreLoggingResourceable.wrapSpUri(newUri));
}
} else if (source == htmlEditorController) {
idc.setCurrentURI(g_curURI);
mainPanel.setContent(myContent);
}
}
Aggregations