Files
document-server-integration/web/documentserver-example/nodejs/views/index.ejs
2016-03-30 13:43:56 +03:00

250 lines
14 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width" />
<title>ONLYOFFICE™ Integration Edition</title>
<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&subset=latin,cyrillic-ext,cyrillic,latin-ext" />
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/jquery-ui.css" />
</head>
<body>
<header>
<a href="">
<img src ='images/logo.png' alt="ONLYOFFICE™" />
</a>
</header>
<div class="main-panel">
<span class="portal-name">ONLYOFFICE™ Integration Edition Welcome!</span>
<br />
<br />
<span class="portal-descr">This interactive example demonstrates a way to integrate ONLYOFFICE™ collaborative online document editing into your Web Application. Our editors are fully implemented in HTML5! You may upload your own documents for testing, using the "Upload file" button and uploading local Office files from your computer. You can upload the documents with the most popular file formats, such as .DOCX, .XLSX, .PPTX, etc.</span>
<ul class="features-list">
<li>Open, Edit and Save existing documents for in-browser editing using ONLYOFFICE™ Server documents.</li>
<li>Collaborative co-editing functions chat, comments and other multi-user features.</li>
<li>Use of Auto-save function.</li>
<li>All editing operations are processed on this virtual machine. Your documents stay under your complete control.</li>
</ul>
<table class="user-block-table" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" width="30%">
<span class="select-user">Username:</span>
<select class="select-user" id="user">
<option value="uid-1">Jonn Smith</option>
<option value="uid-2">Mark Pottato</option>
<option value="uid-3">Hamish Mitchell</option>
</select>
</td>
<td valign="middle" width="70%">Select user name before opening the document; you can open the same document using different users in different Web browser sessions, so you can check out multi-user editing functions.</td>
</tr>
<tr>
<td valign="middle" width="30%">
<select class="select-user" id="language">
<option value="en" selected>English</option>
<option value="de">Deutsch</option>
<option value="es">Espanol</option>
<option value="fr">Francais</option>
<option value="it">Italiano</option>
<option value="pt">Portuguese</option>
<option value="ru">Русский</option>
<option value="sl">Slovenian</option>
</select>
</td>
<td valign="middle" width="70%">Choose the language for ONLYOFFICE&trade; editors interface.</td>
</tr>
</table>
<br />
<div class="file-upload button gray">
<span>Upload file</span>
<input type="file" id="fileupload" name="uploadedFile" data-url="upload?<%= params %>" />
</div>
<label class="save-original">
<input type="checkbox" id="checkOriginalFormat" class="checkbox" />Save document in original format
</label>
<span class="question"></span>
<br />
<br />
<br />
<span class="try-descr">Or, you can view and edit sample documents click on one of the links below.</span>
<ul class="try-editor-list">
<li>
<a class="try-editor document reload-page" target="_blank" href="editor?fileExt=docx<%= params %>&create=true">Create <br />Document</a>
</li>
<li>
<a class="try-editor spreadsheet reload-page" target="_blank" href="editor?fileExt=xlsx<%= params %>&create=true">Create <br />Spreadsheet</a>
</li>
<li>
<a class="try-editor presentation reload-page" target="_blank" href="editor?fileExt=pptx<%= params %>&create=true">Create <br />Presentation</a>
</li>
</ul>
<label class="create-sample">
<input type="checkbox" id="createSample" class="checkbox" />Create a file filled with sample content
</label>
<br />
<br />
<% if (storedFiles.length > 0)
{ %>
<br />
<div class="help-block">
<span>Your documents</span>
<br />
<br />
<div class="stored-list">
<table cellspacing="0" cellpadding="0" width="100%">
<thead>
<tr class="tableHeader">
<td class="tableHeaderCell tableHeaderCellFileName">Filename</td>
<td colspan="2" class="tableHeaderCell contentCells-shift">Editors</td>
<td colspan="3" class="tableHeaderCell">Viewers</td>
</tr>
</thead>
<tbody>
<% for (var i = 0; i < storedFiles.length; i++) { %>
<tr>
<td class="contentCells">
<a class="stored-edit <%= storedFiles[i].documentType%>" href="editor?fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<span title="<%= storedFiles[i].url %>"><%= storedFiles[i].name %></span></a>
<a href="<%= storedFiles[i].url %>">
<img class="icon-download" src="images/download-24.png" alt="download" /></a>
<a class="delete-file" data="<%= encodeURIComponent(storedFiles[i].name) %>">
<img class="icon-delete" src="images/delete-24.png" alt="delete" /></a>
</td>
<td class="contentCells contentCells-icon">
<a href="editor?fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<img src="images/desktop-24.png" alt="editor" /></a>
</td>
<td class="contentCells contentCells-shift contentCells-icon">
<a href="editor?type=mobile&mode=edit&fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<img src="images/mobile-24.png" alt="mobile editor" /></a>
</td>
<td class="contentCells contentCells-icon">
<a href="editor?mode=view&fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<img src="images/desktop-24.png" alt="viewer" /></a>
</td>
<td class="contentCells contentCells-icon">
<a href="editor?type=mobile&mode=view&fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<img src="images/mobile-24.png" alt="mobile viewer" /></a>
</td>
<td class="contentCells contentCells-icon">
<a href="editor?type=embedded&mode=embedded&fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<img src="images/embeded-24.png" alt="embedded" /></a>
</td>
</tr>
<% } %>
</tbody>
</table>
</div>
</div>
<% } %>
<br />
<br />
<br />
<div class="help-block">
<span>Want to learn the magic?</span>
<br />
Explore ONLYOFFICE™ Integration Edition <a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation.</a>
</div>
<br />
<div class="help-block">
<span>Warning</span>
<br />
This is a test example used for demonstration purposes only and it can be accessed by anyone. Once you finish examining it, we recommend that you disable this example for security reasons. This is done running the following commands:
<pre>
sudo docker exec $(sudo docker ps -q) sudo supervisorctl stop onlyoffice-documentserver:example
sudo docker exec $(sudo docker ps -q) sudo sed 's,autostart=true,autostart=false,' -i /etc/supervisor/conf.d/onlyoffice-documentserver-example.conf
</pre>
</div>
<div class="help-block">
<span>Any questions?</span>
<br />
Please, <a href="mailto:sales@onlyoffice.com">submit your request here</a>.
</div>
</div>
<div id="hint">
<div class="corner"></div>
If you check this option the file will be saved both in the original and converted into Office Open XML format for faster viewing and editing. In other case the document will be overwritten by its copy in Office Open XML format.
</div>
<div id="mainProgress">
<div id="uploadSteps">
<span id="step1" class="step">1. Loading the file</span>
<span class="step-descr">The file loading process will take some time depending on the file size, presence or absence of additional elements in it (macros, etc.) and the connection speed.</span>
<br />
<span id="step2" class="step">2. File conversion</span>
<span class="step-descr">The file is being converted into Office Open XML format for the document faster viewing and editing.</span>
<br />
<span id="step3" class="step">3. Loading editor scripts</span>
<span class="step-descr">The scripts for the editor are loaded only once and are will be cached on your computer in future. It might take some time depending on the connection speed.</span>
<input type="hidden" name="hiddenFileName" id="hiddenFileName" />
<br />
<br />
<span class="progress-descr">Please note, that the speed of all operations greatly depends on the server and the client locations. In case they differ or are located in differernt countries/continents, there might be lack of speed and greater wait time. The best results are achieved when the server and client computers are located in one and the same place (city).</span>
<br />
<br />
<div class="error-message">
<span></span>
<br />
Please select another file and try again. If you have questions please <a href="mailto:sales@onlyoffice.com">contact us.</a>
</div>
</div>
<iframe id="embeddedView" src="" height="345px" width="600px" frameborder="0" scrolling="no" allowtransparency></iframe>
<br />
<div id="beginEmbedded" class="button disable">Embedded view</div>
<div id="beginView" class="button disable">View</div>
<div id="beginEdit" class="button disable">Edit</div>
<div id="cancelEdit" class="button gray">Cancel</div>
</div>
<span id="loadScripts" data-docs="<%= preloaderUrl %>"></span>
<footer>&copy; Ascensio Systems Inc 2016. All rights reserved.</footer>
<script type="text/javascript" src="javascripts/jquery-1.8.2.js"></script>
<script type="text/javascript" src="javascripts/jquery-ui.js"></script>
<script type="text/javascript" src="javascripts/jquery.blockUI.js"></script>
<script type="text/javascript" src="javascripts/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="javascripts/jquery.fileupload.js"></script>
<script type="text/javascript" src="javascripts/jquery.dropdownToggle.js"></script>
<script type="text/javascript" src="javascripts/jscript.js"></script>
<script type="text/javascript">
var ConverExtList = "<%= convertExts %>";
var EditedExtList = "<%= editedExts %>";
var UrlConverter = "convert";
var UrlEditor = "editor";
</script>
</body>
</html>