21
sdkjs-plugins/content/rainbow/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
## Overview
|
||||
|
||||
Communicate with your team, exchange instant messages and make video and voice calls using Rainbow right in the ONLYOFFICE editors.
|
||||
|
||||
[Rainbow](https://www.al-enterprise.com/en) is a business communication platform developed by Alcatel-Lucent Enterprise (ALE).
|
||||
|
||||
The Rainbow plugin is compatible with [self-hosted](https://github.com/ONLYOFFICE/DocumentServer) versions of ONLYOFFICE Docs.
|
||||
|
||||
## How to use
|
||||
|
||||
1. Open Plugins tab and click Rainbow.
|
||||
2. Log in to your Rainbow account or create a new one.
|
||||
|
||||
## How to install
|
||||
|
||||
Detailed instructions can be found in [ONLYOFFICE API documentation](https://api.onlyoffice.com/plugin/installation).
|
||||
|
||||
## Known issues
|
||||
|
||||
There may be an issue with accessing cookies in Google Chrome browser. To fix that, go to your Chrome settings:
|
||||
Settings -> Privacy and security -> Cookies and other site data and enable the Allow all cookies option.
|
||||
122
sdkjs-plugins/content/rainbow/config.json
Normal file
@ -0,0 +1,122 @@
|
||||
{
|
||||
"name": "Rainbow",
|
||||
"nameLocale": {
|
||||
"ru": "Rainbow",
|
||||
"fr": "Rainbow",
|
||||
"es": "Rainbow",
|
||||
"de": "Rainbow"
|
||||
},
|
||||
"guid": "asc.{0743b63f-cb32-438c-b46b-81ce182ff4f7}",
|
||||
"version": "1.0.0",
|
||||
|
||||
"variations": [
|
||||
{
|
||||
"description": "Rainbow",
|
||||
"descriptionLocale": {
|
||||
"ru": "Rainbow",
|
||||
"fr": "Rainbow",
|
||||
"es": "Rainbow",
|
||||
"de": "Rainbow"
|
||||
},
|
||||
"url": "index.html",
|
||||
|
||||
"icons": [ "resources/light/icon.png", "resources/light/icon@2x.png" ],
|
||||
"icons2": [
|
||||
{
|
||||
"style" : "light",
|
||||
|
||||
"100%": {
|
||||
"normal": "resources/light/icon.png"
|
||||
},
|
||||
"125%": {
|
||||
"normal": "resources/light/icon@1.25x.png"
|
||||
},
|
||||
"150%": {
|
||||
"normal": "resources/light/icon@1.5x.png"
|
||||
},
|
||||
"175%": {
|
||||
"normal": "resources/light/icon@1.75x.png"
|
||||
},
|
||||
"200%": {
|
||||
"normal": "resources/light/icon@2x.png"
|
||||
}
|
||||
},
|
||||
{
|
||||
"style" : "dark",
|
||||
|
||||
"100%": {
|
||||
"normal": "resources/dark/icon.png"
|
||||
},
|
||||
"125%": {
|
||||
"normal": "resources/dark/icon@1.25x.png"
|
||||
},
|
||||
"150%": {
|
||||
"normal": "resources/dark/icon@1.5x.png"
|
||||
},
|
||||
"175%": {
|
||||
"normal": "resources/dark/icon@1.75x.png"
|
||||
},
|
||||
"200%": {
|
||||
"normal": "resources/dark/icon@2x.png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"isViewer": false,
|
||||
"EditorsSupport": [ "word", "slide", "cell" ],
|
||||
|
||||
"isVisual": true,
|
||||
"isModal": false,
|
||||
"isInsideMode": true,
|
||||
|
||||
"initDataType": "none",
|
||||
"initData": "",
|
||||
|
||||
"isUpdateOleOnResize": false,
|
||||
|
||||
"buttons": [
|
||||
{
|
||||
"text": "Close",
|
||||
"primary": true,
|
||||
"textLocale": {
|
||||
"ru": "Закрыть",
|
||||
"fr": "Fermer",
|
||||
"es": "Cerrar",
|
||||
"de": "Schließen"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "About",
|
||||
"descriptionLocale": {
|
||||
"ru": "Справка",
|
||||
"fr": "À propos",
|
||||
"es": "Sobre programa",
|
||||
"de": "Über"
|
||||
},
|
||||
"url": "index_about.html",
|
||||
|
||||
"icons": [ "resources/img/icon.png", "resources/img/icon@2x.png" ],
|
||||
"isViewer": false,
|
||||
"EditorsSupport": [ "word", "slide", "cell" ],
|
||||
|
||||
"isVisual": true,
|
||||
"isModal": true,
|
||||
"isInsideMode": false,
|
||||
|
||||
"initDataType": "none",
|
||||
"initData": "",
|
||||
|
||||
"isUpdateOleOnResize": false,
|
||||
|
||||
"buttons": [
|
||||
{
|
||||
"text": "Ok",
|
||||
"primary": true
|
||||
}
|
||||
],
|
||||
|
||||
"size": [ 392, 147 ]
|
||||
}
|
||||
]
|
||||
}
|
||||
40
sdkjs-plugins/content/rainbow/index.html
Normal file
@ -0,0 +1,40 @@
|
||||
<!--
|
||||
(c) Copyright Ascensio System SIA 2020
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<script type="text/javascript" src="https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.js"></script>
|
||||
<script type="text/javascript" src="https://onlyoffice.github.io/sdkjs-plugins/v1/plugins-ui.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
|
||||
<script src="./scripts/rainbow.js"></script>
|
||||
<link rel="stylesheet" href="https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.css">
|
||||
<style>
|
||||
html, body {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
.error {
|
||||
margin: 16px 12px 0 12px;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="margin: 0;">
|
||||
<div id="iframe_parent" style="width:100%; height:100%;margin:0;padding:0; display: flex;"></div>
|
||||
</body>
|
||||
</html>
|
||||
63
sdkjs-plugins/content/rainbow/index_about.html
Normal file
@ -0,0 +1,63 @@
|
||||
<!--
|
||||
(c) Copyright Ascensio System SIA 2020
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>About</title>
|
||||
<script type="text/javascript" src="https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.js"></script>
|
||||
<script type="text/javascript">
|
||||
window.Asc.plugin.init = function()
|
||||
{
|
||||
this.resizeWindow(400, 130, 400, 130, 400, 130);
|
||||
};
|
||||
window.Asc.plugin.button = function(id)
|
||||
{
|
||||
this.executeCommand("close", "");
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
p, a{
|
||||
font-size: 12px;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: darkgrey;
|
||||
}
|
||||
|
||||
/* visited link */
|
||||
a:visited {
|
||||
color: darkgrey;
|
||||
}
|
||||
|
||||
/* mouse over link */
|
||||
a:hover {
|
||||
color: #8d8d8d;
|
||||
}
|
||||
|
||||
/* selected link */
|
||||
a:active {
|
||||
color: darkgrey;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="padding-left: 20px; padding-right: 20px">
|
||||
<p style="font-size: 15px" id="p1">This plugin use:</p>
|
||||
<p style="font-size: 12px" id="p2"><a href="https://web-sandbox.openrainbow.com/" target="_blank">Rainbow </a>is a cloud collaboration service from Alcatel-Lucent Enterprise that enables organizations and employees to communicate effectively with colleagues, business partners and customers.</p>
|
||||
<p>Version: 1.0</p>
|
||||
</body>
|
||||
</html>
|
||||
BIN
sdkjs-plugins/content/rainbow/resources/dark/icon.png
Normal file
|
After Width: | Height: | Size: 690 B |
BIN
sdkjs-plugins/content/rainbow/resources/dark/icon@1.25x.png
Normal file
|
After Width: | Height: | Size: 765 B |
BIN
sdkjs-plugins/content/rainbow/resources/dark/icon@1.5x.png
Normal file
|
After Width: | Height: | Size: 1023 B |
BIN
sdkjs-plugins/content/rainbow/resources/dark/icon@1.75x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
sdkjs-plugins/content/rainbow/resources/dark/icon@2x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
sdkjs-plugins/content/rainbow/resources/light/icon.png
Normal file
|
After Width: | Height: | Size: 726 B |
BIN
sdkjs-plugins/content/rainbow/resources/light/icon@1.25x.png
Normal file
|
After Width: | Height: | Size: 820 B |
BIN
sdkjs-plugins/content/rainbow/resources/light/icon@1.5x.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
sdkjs-plugins/content/rainbow/resources/light/icon@1.75x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
sdkjs-plugins/content/rainbow/resources/light/icon@2x.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
62
sdkjs-plugins/content/rainbow/scripts/rainbow.js
Normal file
@ -0,0 +1,62 @@
|
||||
(function(window, undefined){
|
||||
var isInit = false;
|
||||
var ifr;
|
||||
|
||||
window.Asc.plugin.init = function(text)
|
||||
{
|
||||
if (!isInit) {
|
||||
document.getElementById("iframe_parent").innerHTML = "";
|
||||
ifr = document.createElement("iframe");
|
||||
ifr.position = "fixed";
|
||||
ifr.name = "google_name";
|
||||
ifr.id = "google_id";
|
||||
ifr.src = "https://web.openrainbow.com/";//?text=" + encodeURIComponent(text);
|
||||
ifr.style.top = "0px";
|
||||
ifr.style.left = "0px";
|
||||
ifr.style.width = "100%";
|
||||
ifr.style.height = "100%";
|
||||
ifr.setAttribute("frameBorder", "0");
|
||||
ifr.setAttribute("allow", "camera https://web.openrainbow.com; microphone https://web.openrainbow.com");
|
||||
document.getElementById("iframe_parent").appendChild(ifr);
|
||||
isInit = true;
|
||||
ifr.onload = function() {
|
||||
// checking what iframe is downloaded clearly
|
||||
if ($('body[ng-controller="MainController"]'))
|
||||
console.log('Downloaded...')
|
||||
else {
|
||||
$('#google_id').remove();
|
||||
$('<span>', {
|
||||
"class": "error",
|
||||
text: "Refused to frame 'https://web.openrainbow.com/' because an ancestor violates the Content Security Policy directive."
|
||||
}).appendTo('#iframe_parent');
|
||||
$('#iframe_parent').css('text-align', 'center');
|
||||
}
|
||||
}
|
||||
ifr.onerror = function() {
|
||||
$('#google_id').remove();
|
||||
$('<span>', {
|
||||
"class": "error",
|
||||
text: "Refused to frame 'https://web.openrainbow.com/' because an ancestor violates the Content Security Policy directive."
|
||||
}).appendTo('#iframe_parent');
|
||||
$('#iframe_parent').css('text-align', 'center');
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log('Error while loading...')
|
||||
}
|
||||
};
|
||||
|
||||
window.Asc.plugin.button = function(id)
|
||||
{
|
||||
this.executeCommand("close", "");
|
||||
};
|
||||
|
||||
window.Asc.plugin.onExternalMouseUp = function()
|
||||
{
|
||||
var evt = document.createEvent("MouseEvents");
|
||||
evt.initMouseEvent("mouseup", true, true, window, 1, 0, 0, 0, 0,
|
||||
false, false, false, false, 0, null);
|
||||
|
||||
document.dispatchEvent(evt);
|
||||
};
|
||||
})(window, undefined);
|
||||