Skip to content
Snippets Groups Projects
Commit 1165a089 authored by uhensler's avatar uhensler
Browse files

OO-4878: Disable close button of Collabora Editor everywhere

parent 56205774
No related branches found
No related tags found
No related merge requests found
......@@ -125,9 +125,10 @@ public class CollaboraServiceImpl implements CollaboraService, GenericEventListe
String discoveryUrl = getDiscoveryUrl();
discovery = discoveryService.getDiscovery(discoveryUrl);
if (discovery != null) {
log.info("Recieved new document editor discovery from " + discoveryUrl);
log.info("Recieved new document editor discovery from {}", discoveryUrl);
} else {
log.warn("Not able to fetch new document editor discovery from {}", discoveryUrl);
}
log.warn("Not able to fetch new document editor discovery from " + discoveryUrl);
}
return discovery;
}
......
......@@ -86,12 +86,7 @@ public class CollaboraEditorController extends BasicController {
@Override
protected void event(UserRequest ureq, Component source, Event event) {
if ("close".equals(event.getCommand())) {
// Suppress close event, because we can not hide close button
if (!Mode.EMBEDDED.equals(access.getMode())) {
fireEvent(ureq, Event.DONE_EVENT);
}
} else if(event == Window.CLOSE_WINDOW) {
if(event == Window.CLOSE_WINDOW) {
deleteAccess();
}
}
......
......@@ -5,25 +5,5 @@
</div>
#else
<iframe id="$id" src="$url" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
<script>
/* <![CDATA[ */
jQuery('$id').ready(function(){
window.addEventListener('message', function(e){
try {
var msg = JSON.parse(e.data);
var msgId = msg.MessageId;
var args = msg.Values;
var deprecated = !!args.Deprecated;
} catch(exc) {
msgId = e.data;
}
if (msgId === 'UI_Close' || msgId === 'close' /* deprecated */) {
$r.openJavaScriptCommand("close"));
}
});
});
/* ]]> */
</script>
#end
</div>
......@@ -19,8 +19,8 @@
*/
package org.olat.modules.edubase;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import org.olat.core.commons.services.csp.CSPDirectiveProvider;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -69,7 +69,7 @@ public class EdubaseDirectiveProvider implements CSPDirectiveProvider {
}
private Collection<String> getUrls() {
return edubaseModule.isEnabled()? Collections.singletonList(edubaseModule.getLtiBaseUrl()): null;
return edubaseModule.isEnabled()? Arrays.asList(edubaseModule.getLtiBaseUrl(), edubaseModule.getReaderUrl(), "https://*.edubase.ch/"): null;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment