mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 13:16:28 +08:00
473487faec
Closes SCI-1049.
61 lines
1.8 KiB
Text
61 lines
1.8 KiB
Text
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<!-- Enable IE Standards mode -->
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
|
|
<title><%= t('assets.head_title.view', file_name: @asset.file_file_name) %></title>
|
|
<meta name="description" content="">
|
|
<meta name="viewport"
|
|
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
|
|
|
|
<link rel="shortcut icon" href='<%= @favicon_url %>' />
|
|
|
|
<style type="text/css">
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow:hidden;
|
|
-ms-content-zooming: none;
|
|
}
|
|
#office_frame {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
margin: 0;
|
|
border: none;
|
|
display: block;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<form id='office_form' name='office_form' target='office_frame'
|
|
action='<%= @action_url %>' method='post'>
|
|
<input name='access_token' value='<%= @token %>' type='hidden'/>
|
|
<input name='access_token_ttl' value='<%= @ttl %>' type='hidden'/>
|
|
</form>
|
|
|
|
<span id="frameholder"></span>
|
|
|
|
<script type="text/javascript">
|
|
var frameholder = document.getElementById('frameholder');
|
|
var office_frame = document.createElement('iframe');
|
|
office_frame.name = 'office_frame';
|
|
office_frame.id ='office_frame';
|
|
// The title should be set for accessibility
|
|
office_frame.title = 'Office Online Frame';
|
|
// This attribute allows true fullscreen mode in slideshow view
|
|
// when using PowerPoint Online's 'view' action.
|
|
office_frame.setAttribute('allowfullscreen', 'true');
|
|
frameholder.appendChild(office_frame);
|
|
document.getElementById('office_form').submit();
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|