index documenteditor

This commit is contained in:
OVSharova 2021-08-30 04:49:25 +03:00
parent 478802ec82
commit a0280ed55b
25 changed files with 1768 additions and 399 deletions

View file

@ -846,7 +846,7 @@
for (var i = scripts.length - 1; i >= 0; i--) {
match = scripts[i].src.match(/(.*)apps\/api\/documents\/api.js/i);
if (match) {
return match[1] + "test/apps/";
return match[1] + "test/";
}
}

View file

@ -1,45 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Documents</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="description" content="">
<meta name="author" content="">
</head>
<body>
<div id="editor_sdk" class="viewer" style="overflow: hidden;" tabindex="-1"></div>
<!--vendor-->
<script type="text/javascript" src="../../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../../vendor/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="../../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../../vendor/xregexp/xregexp-all-min.js"></script>
<script src="../../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../../../'
});
</script>
<script type="text/javascript" src="../../../../../sdkjs/develop/sdkjs/word/scripts.js"></script>
<script>
window.sdk_scripts.forEach(function(item){
document.write('<script type="text/javascript" src="' +'../'+ item + '"><\/script>');
});
</script>
<!--application-->
<script type="text/javascript" src="../../../unit-tests/common/locale.js"></script>
<script type="text/javascript" src="../../../unit-tests/common/Gateway.js"></script>
<script type="text/javascript" src="../../../unit-tests/common/main/lib/util/LocalStorage.js"></script>
<script type="text/javascript" src="../../../unit-tests/common/main/lib/util/utils.js"></script>
<script type="text/javascript" src="js/ApplicationView.js"></script>
<script type="text/javascript" src="js/ApplicationController.js"></script>
<script type="text/javascript" src="js/application.js"></script>
</body>
</html>

View file

@ -1,94 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL 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
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
if (DE === undefined) {
var DE = {};
}
DE.ApplicationView = new(function(){
var $btnTools;
var $menuForm;
// Initialize view
function createView(){
$btnTools = $('#box-tools button');
$btnTools.addClass('dropdown-toggle').attr('data-toggle', 'dropdown').attr('aria-expanded', 'true');
$btnTools.parent().append(
'<ul class="dropdown-menu pull-right">' +
'<li><a id="idt-print"><span class="mi-icon svg-icon print"></span>' + this.txtPrint + '</a></li>' +
'<li class="divider"></li>' +
'<li><a id="idt-download"><span class="mi-icon svg-icon download"></span>' + this.txtDownload + '</a></li>' +
'<li><a id="idt-download-docx"><span class="mi-icon svg-icon download"></span>' + this.txtDownloadDocx + '</a></li>' +
'<li><a id="idt-download-pdf"><span class="mi-icon"></span>' + this.txtDownloadPdf + '</a></li>' +
'<li class="divider"></li>' +
'<li><a id="idt-share" data-toggle="modal"><span class="mi-icon svg-icon share"></span>' + this.txtShare + '</a></li>' +
'<li><a id="idt-close" data-toggle="modal"><span class="mi-icon svg-icon go-to-location"></span>' + this.txtFileLocation + '</a></li>' +
'<li class="divider"></li>' +
'<li><a id="idt-embed" data-toggle="modal"><span class="mi-icon svg-icon embed"></span>' + this.txtEmbed + '</a></li>' +
'<li><a id="idt-fullscreen"><span class="mi-icon svg-icon fullscr"></span>' + this.txtFullScreen + '</a></li>' +
'</ul>');
}
function getTools(name) {
return $btnTools.parent().find(name);
}
function getMenuForm() {
if (!$menuForm) {
$menuForm = $('<div id="menu-container-form" style="position: absolute; z-index: 10000;" data-value="prevent-canvas-click">' +
'<div class="dropdown-toggle" data-toggle="dropdown"></div>' +
'<ul class="dropdown-menu" oo_editor_input="true" role="menu" style="right: 0; left: auto;max-height: 200px; overflow-y: auto;"></ul>' +
'</div>');
$('#editor_sdk').append($menuForm);
}
return $menuForm;
}
return {
create: createView
, tools: {
get: getTools
},
getMenuForm: getMenuForm,
txtDownload: 'Download',
txtPrint: 'Print',
txtShare: 'Share',
txtEmbed: 'Embed',
txtFullScreen: 'Full Screen',
txtFileLocation: 'Open file location',
txtDownloadDocx: 'Download as docx',
txtDownloadPdf: 'Download as pdf'
}
})();

View file

@ -0,0 +1,158 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Documents</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="description" content="">
<meta name="author" content="">
<!-- debug begin -->
<link rel="stylesheet/less" type="text/css" href="resources/less/application.less" />
<!-- debug end -->
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script
<![endif]-->
</head>
<body >
<!-- debug begin -->
<script type="text/javascript">var less=less||{};less.env='development';</script>
<script src="../../../vendor/less/dist/less.js" type="text/javascript"></script>
<!-- debug end -->
<script>
var userAgent = navigator.userAgent.toLowerCase(),
check = function(regex){ return regex.test(userAgent); };
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
var m = /msie (\d+\.\d+)/.exec(userAgent);
if (m && parseFloat(m[1]) < 10.0) {
document.write(
'<div id="id-error-mask" class="errormask">',
'<div class="error-body" align="center">',
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
'<div id="id-error-mask-text">Sorry, ONLYOFFICE Document is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
'</div>',
'</div>'
);
}
}
function getUrlParams() {
var e,
a = /\+/g, // Regex for replacing addition symbol with a space
r = /([^&=]+)=?([^&]*)/g,
d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
q = window.location.search.substring(1),
urlParams = {};
while (e = r.exec(q))
urlParams[d(e[1])] = d(e[2]);
return urlParams;
}
function encodeUrlParam(str) {
return str.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
}
var params = getUrlParams(),
lang = (params["lang"] || 'en').split(/[\-\_]/)[0],
logo = params["headerlogo"] ? encodeUrlParam(params["headerlogo"]) : null;
window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"];
var elem = document.querySelector('.loading-logo');
if (elem && logo) {
elem.style.backgroundImage= 'none';
var img = document.querySelector('.loading-logo img');
img && img.setAttribute('src', logo);
img.style.opacity = 1;
}
</script>
<div id="editor_sdk" class="viewer" style="overflow: hidden;" tabindex="-1"></div>
<!-- <div class="modal fade error" id="id-critical-error-dialog" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 id="id-critical-error-title"></h4>
</div>
<div class="modal-body">
<p id="id-critical-error-message"></p>
</div>
<div class="modal-footer">
<button id="id-critical-error-close" class="btn btn-sm btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>
</div>
</div>
<div class="hyperlink-tooltip" data-toggle="tooltip" title="" style="display:none;"></div>-->
<!--vendor-->
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script type="text/javascript" src="../../../../sdkjs/develop/sdkjs/word/scripts.js"></script>
<script>
window.sdk_scripts.forEach(function(item){
document.write('<script type="text/javascript" src="' + item + '"><\/script>');
});
</script>
<!--application-->
<script type="text/javascript" src="../../unit-tests/common/locale.js"></script>
<script type="text/javascript" src="../../unit-tests/common/Gateway.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/LocalStorage.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/utils.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/view/LoadMask.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/view/modals.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/controller/modals.js"></script>
<script type="text/javascript" src="js/ApplicationView.js"></script>
<script type="text/javascript" src="js/ApplicationController.js"></script>
<script type="text/javascript" src="js/application.js"></script>
<script type="text/javascript">
var isBrowserSupported = function() {
return ($.browser.msie && parseFloat($.browser.version) > 9) ||
($.browser.chrome && parseFloat($.browser.version) > 7) ||
($.browser.safari && parseFloat($.browser.version) > 4) ||
($.browser.opera && parseFloat($.browser.version) > 10.4) ||
($.browser.mozilla && parseFloat($.browser.version) > 3.9);
};
if (!isBrowserSupported()){
document.write(
'<div id="id-error-mask" class="errormask">',
'<div class="error-body" align="center">',
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
'<div id="id-error-mask-text">Sorry, ONLYOFFICE Document is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
'</div>',
'</div>'
);
}
</script>
</body>
</html>

View file

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Documents</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="description" content="">
<meta name="author" content="">
</head>
<body>
<div id="editor_sdk" class="viewer" style="overflow: hidden;" tabindex="-1"></div>
<!--vendor-->
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<script type="text/javascript" src="../../../../sdkjs/develop/sdkjs/word/scripts.js"></script>
<script>
window.sdk_scripts.forEach(function(item){
document.write('<script type="text/javascript" src="' + item + '"><\/script>');
});
</script>
<!--application-->
<script type="text/javascript" src="../../unit-tests/common/locale.js"></script>
<script type="text/javascript" src="../../unit-tests/common/Gateway.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/LocalStorage.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/utils.js"></script>
<script type="text/javascript" src="js/ApplicationView.js"></script>
<script type="text/javascript" src="js/ApplicationController.js"></script>
<script type="text/javascript" src="js/application.js"></script>
</body>
</html>

View file

@ -40,7 +40,6 @@ DE.ApplicationController = new(function(){
maxPages = 0,
created = false,
ttOffset = [0, -10],
labelDocName,
appOptions = {},
btnSubmit,
_submitFail, $submitedTooltip, $requiredTooltip,
@ -49,10 +48,6 @@ DE.ApplicationController = new(function(){
var LoadingDocument = -256;
// Initialize analytics
// -------------------------
// Common.Analytics.initialize('UA-12442749-13', 'Embedded Document Editor');
// Check browser
@ -77,15 +72,10 @@ DE.ApplicationController = new(function(){
common.controller.modals.init(embedConfig);
// Docked toolbar
if (embedConfig.toolbarDocked === 'bottom') {
//$('#toolbar').addClass('bottom');
if (embedConfig.toolbarDocked === 'bottom') {
$('#editor_sdk').addClass('bottom');
//$('#box-tools').removeClass('dropdown').addClass('dropup');
ttOffset[1] = -40;
} else {
//$('#toolbar').addClass('top');
$('#editor_sdk').addClass('top');
ttOffset[1] = 40;
}
config.canBackToFolder = (config.canBackToFolder!==false) && config.customization && config.customization.goback &&
@ -106,7 +96,7 @@ DE.ApplicationController = new(function(){
guestName = (typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') &&
(typeof (config.customization.anonymous.label) == 'string') && config.customization.anonymous.label.trim()!=='' ?
common.utils.htmlEncode(config.customization.anonymous.label) : me.textGuest,
value = canRenameAnonymous ? common.localStorage.getItem("guest-username") : null,
value = canRenameAnonymous ? common.localStorage.getItem("guest-username") : null;//,
user = common.utils.fillUserInfo(config.user, config.lang, value ? (value + ' (' + guestName + ')' ) : me.textAnonymous,
common.localStorage.getItem("guest-id") || ('uid-' + Date.now()));
user.anonymous && common.localStorage.setItem("guest-id", user.id);
@ -141,13 +131,7 @@ DE.ApplicationController = new(function(){
api.asc_setDocInfo(docInfo);
api.asc_getEditorPermissions(config.licenseUrl, config.customerId);
api.asc_enableKeyEvents(true);
Common.Analytics.trackEvent('Load', 'Start');
}
embedConfig.docTitle = docConfig.title;
labelDocName = $('#title-doc-name');
labelDocName.text(embedConfig.docTitle || '')
}
}
@ -157,7 +141,7 @@ DE.ApplicationController = new(function(){
}
function onCurrentPage(number) {
$('#page-number').val(number + 1);
//$('#page-number').val(number + 1);
}
function onLongActionBegin(type, id) {
@ -170,8 +154,8 @@ DE.ApplicationController = new(function(){
case Asc.c_oAscAsyncAction['Submit']:
_submitFail = false;
$submitedTooltip && $submitedTooltip.hide();
btnSubmit.attr({disabled: true});
btnSubmit.css("pointer-events", "none");
/*btnSubmit.attr({disabled: true});
btnSubmit.css("pointer-events", "none");*/
break;
case LoadingDocument:
text = me.textLoadingDocument + ' ';
@ -191,8 +175,8 @@ DE.ApplicationController = new(function(){
function onLongActionEnd(type, id){
if (id==Asc.c_oAscAsyncAction['Submit']) {
btnSubmit.removeAttr('disabled');
btnSubmit.css("pointer-events", "auto");
/*btnSubmit.removeAttr('disabled');
btnSubmit.css("pointer-events", "auto");*/
if (!_submitFail) {
if (!$submitedTooltip) {
$submitedTooltip = $('<div class="submit-tooltip" style="display:none;">' + me.textSubmited + '</div>');
@ -280,14 +264,14 @@ DE.ApplicationController = new(function(){
}
function onFillRequiredFields(isFilled) {
if (isFilled) {
/*if (isFilled) {
btnSubmit.removeAttr('disabled');
btnSubmit.css("pointer-events", "auto");
// $requiredTooltip && $requiredTooltip.hide();
} else {
btnSubmit.attr({disabled: true});
btnSubmit.css("pointer-events", "none");
}
}*/
}
function onShowContentControlsActions(obj, x, y) {
@ -392,72 +376,18 @@ DE.ApplicationController = new(function(){
var zf = (config.customization && config.customization.zoom ? parseInt(config.customization.zoom) : -2);
(zf == -1) ? api.zoomFitToPage() : ((zf == -2) ? api.zoomFitToWidth() : api.zoom(zf>0 ? zf : 100));
var dividers = $('#box-tools .divider');
var itemsCount = $('#box-tools a').length;
/*if ( permissions.print === false) {
$('#idt-print').hide();
$(dividers[0]).hide();
itemsCount--;
}
if ( !embedConfig.saveUrl && permissions.print === false || appOptions.canFillForms) {
$('#idt-download').hide();
itemsCount--;
}
if ( !appOptions.canFillForms || permissions.download === false) {
$('#idt-download-docx').hide();
$('#idt-download-pdf').hide();
$(dividers[0]).hide();
$(dividers[1]).hide();
itemsCount -= 2;
}
if ( !embedConfig.shareUrl || appOptions.canFillForms) {
$('#idt-share').hide();
itemsCount--;
}
if (!config.canBackToFolder) {
$('#idt-close').hide();
itemsCount--;
}
if (itemsCount<3)
$(dividers[2]).hide();
if ( !embedConfig.embedUrl || appOptions.canFillForms) {
$('#idt-embed').hide();
itemsCount--;
}
if ( !embedConfig.fullscreenUrl ) {
$('#idt-fullscreen').hide();
itemsCount--;
}
// if ( !embedConfig.saveUrl && permissions.print === false && (!embedConfig.shareUrl || appOptions.canFillForms) && (!embedConfig.embedUrl || appOptions.canFillForms) && !embedConfig.fullscreenUrl && !config.canBackToFolder)
if (itemsCount<1)
$('#box-tools').addClass('hidden');
else if ((!embedConfig.embedUrl || appOptions.canFillForms) && !embedConfig.fullscreenUrl)
$(dividers[2]).hide();
common.controller.modals.attach({
share: '#idt-share',
embed: '#idt-embed'
});*/
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
api.asc_registerCallback('asc_onEndAction', onLongActionEnd);
api.asc_registerCallback('asc_onMouseMoveStart', onDocMouseMoveStart);
api.asc_registerCallback('asc_onMouseMoveEnd', onDocMouseMoveEnd);
api.asc_registerCallback('asc_onMouseMove', onDocMouseMove);
/* api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink);
api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink);
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
api.asc_registerCallback('asc_onPrint', onPrint);
api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
api.asc_registerCallback('sync_onAllRequiredFormsFilled', onFillRequiredFields);*/
api.asc_registerCallback('sync_onAllRequiredFormsFilled', onFillRequiredFields);
if (appOptions.canFillForms) {
api.asc_registerCallback('asc_onShowContentControlsActions', onShowContentControlsActions);
api.asc_registerCallback('asc_onHideContentControlsActions', onHideContentControlsActions);
@ -468,124 +398,32 @@ DE.ApplicationController = new(function(){
Common.Gateway.on('downloadas', onDownloadAs);
Common.Gateway.on('requestclose', onRequestClose);
DE.ApplicationView.tools.get('#idt-fullscreen')
.on('click', function(){
common.utils.openLink(embedConfig.fullscreenUrl);
});
DE.ApplicationView.tools.get('#idt-download')
.on('click', function(){
if ( !!embedConfig.saveUrl ){
common.utils.openLink(embedConfig.saveUrl);
} else
if (api && permissions.print!==false){
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
}
Common.Analytics.trackEvent('Save');
});
DE.ApplicationView.tools.get('#idt-print')
.on('click', function(){
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
Common.Analytics.trackEvent('Print');
});
DE.ApplicationView.tools.get('#idt-close')
.on('click', function(){
if (config.customization && config.customization.goback) {
if (config.customization.goback.requestClose && config.canRequestClose)
Common.Gateway.requestClose();
else if (config.customization.goback.url)
window.parent.location.href = config.customization.goback.url;
}
});
var downloadAs = function(format){
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
Common.Analytics.trackEvent('Save');
};
DE.ApplicationView.tools.get('#idt-download-docx')
.on('click', function(){
downloadAs(Asc.c_oAscFileType.DOCX);
});
DE.ApplicationView.tools.get('#idt-download-pdf')
.on('click', function(){
downloadAs(Asc.c_oAscFileType.PDF);
});
$('#id-btn-zoom-in').on('click', api.zoomIn.bind(this));
$('#id-btn-zoom-out').on('click', api.zoomOut.bind(this));
var $pagenum = $('#page-number');
$pagenum.on({
'keyup': function(e){
if ( e.keyCode == 13 ){
var newPage = parseInt($('#page-number').val());
if ( newPage > maxPages ) newPage = maxPages;
if (newPage < 2 || isNaN(newPage)) newPage = 1;
api.goToPage(newPage-1);
$pagenum.blur();
}
}
, 'focusin' : function(e) {
$pagenum.removeClass('masked');
}
, 'focusout': function(e){
!$pagenum.hasClass('masked') && $pagenum.addClass('masked');
}
});
$('#pages').on('click', function(e) {
$pagenum.focus();
});
// TODO: add asc_hasRequiredFields to sdk
if (appOptions.canSubmitForms && !api.asc_IsAllRequiredFormsFilled()) {
var sgroup = $('#id-submit-group');
btnSubmit.attr({disabled: true});
btnSubmit.css("pointer-events", "none");
if (!common.localStorage.getItem("de-embed-hide-submittip")) {
var offset = btnSubmit.offset();
$requiredTooltip = $('<div class="required-tooltip bottom-left" style="display:none;"><div class="tip-arrow bottom-left"></div><div>' + me.textRequired + '</div><div class="close-div">' + me.textGotIt + '</div></div>');
$(document.body).append($requiredTooltip);
$requiredTooltip.css({top : offset.top + btnSubmit.height() + 'px', left: offset.left + btnSubmit.outerWidth()/2 - $requiredTooltip.outerWidth() + 'px'});
$requiredTooltip.find('.close-div').on('click', function() {
$requiredTooltip.hide();
api.asc_MoveToFillingForm(true, true, true);
common.localStorage.setItem("de-embed-hide-submittip", 1);
sgroup.attr('data-toggle', 'tooltip');
sgroup.tooltip({
title : me.textRequired,
placement : 'bottom'
});
});
$requiredTooltip.show();
} else {
sgroup.attr('data-toggle', 'tooltip');
sgroup.tooltip({
title : me.textRequired,
placement : 'bottom'
});
}
}
var documentMoveTimer;
var ismoved = false;
$(document).mousemove(function(event){
$('#id-btn-zoom-in').fadeIn();
$('#id-btn-zoom-out').fadeIn();
/*$('#id-btn-zoom-in').fadeIn();
$('#id-btn-zoom-out').fadeIn();*/
ismoved = true;
if ( !documentMoveTimer ) {
documentMoveTimer = setInterval(function(){
if ( !ismoved ) {
$('#id-btn-zoom-in').fadeOut();
$('#id-btn-zoom-out').fadeOut();
/* $('#id-btn-zoom-in').fadeOut();
$('#id-btn-zoom-out').fadeOut();*/
clearInterval(documentMoveTimer);
documentMoveTimer = undefined;
}
@ -595,23 +433,10 @@ DE.ApplicationController = new(function(){
}
});
Common.Gateway.documentReady();
Common.Analytics.trackEvent('Load', 'Complete');
}
function onEditorPermissions(params) {
if ( (params.asc_getLicenseType() === Asc.c_oLicenseResult.Success) && (typeof config.customization == 'object') &&
config.customization && config.customization.logo ) {
var logo = $('#header-logo');
if (config.customization.logo.imageEmbedded) {
logo.html('<img src="'+config.customization.logo.imageEmbedded+'" style="max-width:124px; max-height:20px;"/>');
logo.css({'background-image': 'none', width: 'auto', height: 'auto'});
}
if (config.customization.logo.url) {
logo.attr('href', config.customization.logo.url);
}
}
var licType = params.asc_getLicenseType();
appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
appOptions.canFillForms = appOptions.canLicense && (permissions.fillForms===true) && (config.mode !== 'view');
@ -619,49 +444,12 @@ DE.ApplicationController = new(function(){
api.asc_setViewMode(!appOptions.canFillForms);
btnSubmit = $('#id-btn-submit');
if (!appOptions.canFillForms) {
$('#id-btn-prev-field').hide();
$('#id-btn-next-field').hide();
$('#id-btn-clear-fields').hide();
btnSubmit.hide();
} else {
$('#id-btn-next-field .caption').text(me.textNext);
$('#id-btn-clear-fields .caption').text(me.textClear);
$('#id-btn-prev-field').on('click', function(){
api.asc_MoveToFillingForm(false);
});
$('#id-btn-next-field').on('click', function(){
api.asc_MoveToFillingForm(true);
});
$('#id-btn-clear-fields').on('click', function(){
api.asc_ClearAllSpecialForms();
});
if (appOptions.canSubmitForms) {
btnSubmit.find('.caption').text(me.textSubmit);
btnSubmit.on('click', function(){
api.asc_SendForm();
});
} else
btnSubmit.hide();
if (appOptions.canFillForms) {
api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyForms);
api.asc_SetFastCollaborative(true);
api.asc_setAutoSaveGap(1);
}
var $parent = labelDocName.parent();
var _left_width = $parent.position().left,
_right_width = $parent.next().outerWidth();
if ( _left_width < _right_width )
$parent.css('padding-left', _right_width - _left_width);
else
$parent.css('padding-right', _left_width - _right_width);
onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
api.asc_LoadDocument();
@ -773,8 +561,6 @@ DE.ApplicationController = new(function(){
}
$('#id-critical-error-dialog').modal('show');
Common.Analytics.trackEvent('Internal Error', id.toString());
}
function onExternalMessage(error) {
@ -783,8 +569,6 @@ DE.ApplicationController = new(function(){
$('#id-error-mask-title').text(me.criticalErrorTitle);
$('#id-error-mask-text').text(error.msg);
$('#id-error-mask').css('display', 'block');
Common.Analytics.trackEvent('External Error');
}
}
@ -873,7 +657,7 @@ DE.ApplicationController = new(function(){
}
});
window["flat_desine"] = true;
window["flat_desine"] = true;
api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk',
'embedded' : true

View file

@ -0,0 +1,50 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL 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
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
if (DE === undefined) {
var DE = {};
}
DE.ApplicationView = new(function(){
// Initialize view
function createView(){
}
return {
create: createView
}
})();

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,2 @@
// Common styles
@import "../../../../unit-tests/common/main/resources/less/common.less";

View file

@ -0,0 +1,143 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL 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
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
+function () {
!window.common && (window.common = {});
!common.controller && (common.controller = {});
common.controller.modals = new(function() {
var $dlgShare, $dlgEmbed;
var appConfig;
var embedCode = '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="{embed-url}" width="{width}" height="{height}"></iframe>',
minEmbedWidth = 400,
minEmbedHeight = 600;
function copytext(el, event) {
el.select();
if ( !document.execCommand('copy') ) {
window.alert('Browser\'s error! Use keyboard shortcut [Ctrl] + [C]');
}
}
var createDlgShare = function () {
$dlgShare = common.view.modals.create('share');
var _encoded = encodeURIComponent(appConfig.shareUrl);
var _mailto = 'mailto:?subject=I have shared a document with you: ' + appConfig.docTitle + '&body=I have shared a document with you: ' + _encoded;
$dlgShare.find('#btn-copyshort').on('click', copytext.bind(this, $dlgShare.find('#id-short-url')));
$dlgShare.find('.share-buttons > span').on('click', function(e){
var _url;
switch ($(e.target).attr('data-name')) {
case 'facebook':
_url = 'https://www.facebook.com/sharer/sharer.php?u=' + appConfig.shareUrl + '&t=' + encodeURI(appConfig.docTitle);
window.open(_url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');
break;
case 'twitter':
_url = 'https://twitter.com/share?url='+ _encoded;
!!appConfig.docTitle && (_url += encodeURIComponent('&text=' + appConfig.docTitle));
window.open(_url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');
break;
case 'email':
window.open(_mailto, '_self');
break;
}
});
$dlgShare.find('#id-short-url').val(appConfig.shareUrl);
$dlgShare.find('.share-buttons > #email.autotest').attr('data-test', _mailto);
};
var createDlgEmbed =function () {
$dlgEmbed = common.view.modals.create('embed');
var txtembed = $dlgEmbed.find('#txt-embed-url');
txtembed.text(embedCode.replace('{embed-url}', appConfig.embedUrl).replace('{width}', minEmbedWidth).replace('{height}', minEmbedHeight));
$dlgEmbed.find('#btn-copyembed').on('click', copytext.bind(this, txtembed));
$dlgEmbed.find('#txt-embed-width, #txt-embed-height').on({
'keypress': function(e){
if (e.keyCode == 13)
updateEmbedCode();
}
, 'focusout': function(e){
updateEmbedCode();
}
});
};
function updateEmbedCode(){
var $txtwidth = $dlgEmbed.find('#txt-embed-width');
var $txtheight = $dlgEmbed.find('#txt-embed-height');
var newWidth = parseInt($txtwidth.val()),
newHeight = parseInt($txtheight.val());
if (newWidth < minEmbedWidth)
newWidth = minEmbedWidth;
if (newHeight < minEmbedHeight)
newHeight = minEmbedHeight;
$dlgEmbed.find('#txt-embed-url').text(embedCode.replace('{embed-url}', appConfig.embedUrl).replace('{width}', newWidth).replace('{height}', newHeight));
$txtwidth.val(newWidth + 'px');
$txtheight.val(newHeight + 'px');
}
var attachToView = function(config) {
if ( config.share && !!appConfig.shareUrl ) {
if ( !$dlgShare ) {
createDlgShare();
}
$(config.share).on('click', function(e){
$dlgShare.modal('show');
});
}
if ( config.embed && !!appConfig.embedUrl ) {
if ( !$dlgEmbed ) {
createDlgEmbed();
}
$(config.embed).on('click', function(e) {
$dlgEmbed.modal('show');
})
}
};
return {
init: function(config) { appConfig = config; }
, attach: attachToView
};
});
}();

View file

@ -1,33 +1,106 @@
/**
* utils.js
/*
*
* Unit test
* (c) Copyright Ascensio System SIA 2010-2019
*
* Created by Alexander Yuzhin on 5/7/14
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL 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
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
define([
'../../../../../apps/common/main/lib/util/utils.js'
],function() {
describe('Common.Utils.String', function(){
it('Test format', function(){
assert.equal('successively: first, second', Common.Utils.String.format('successively: {0}, {1}', 'first', 'second'));
assert.equal('revers: second, first', Common.Utils.String.format('revers: {1}, {0}', 'first', 'second'));
});
+function () {
!window.common && (window.common = {});
!common.utils && (common.utils = {});
it('Test htmlEncode', function(){
assert.equal('Curly, Larry &amp; Moe', Common.Utils.String.htmlEncode('Curly, Larry & Moe'));
});
common.utils = new(function(){
return {
openLink: function(url) {
if (url) {
var newDocumentPage = window.open(url, '_blank');
if (newDocumentPage)
newDocumentPage.focus();
}
}
, dialogPrint: function(url, api) {
$('#id-print-frame').remove();
it('Test htmlDecode', function(){
assert.equal('Curly, Larry & Moe', Common.Utils.String.htmlDecode('Curly, Larry &amp; Moe'));
});
if ( !!url ) {
var iframePrint = document.createElement("iframe");
it('Test ellipsis', function(){
assert.equal('Truncate a s...', Common.Utils.String.ellipsis('Truncate a string and add an ellipsis', 15));
assert.equal('Truncate a string and add...', Common.Utils.String.ellipsis('Truncate a string and add an ellipsis', 30, true));
});
});
});
iframePrint.id = "id-print-frame";
iframePrint.style.display = 'none';
iframePrint.style.visibility = "hidden";
iframePrint.style.position = "fixed";
iframePrint.style.right = "0";
iframePrint.style.bottom = "0";
document.body.appendChild(iframePrint);
iframePrint.onload = function () {
try {
iframePrint.contentWindow.focus();
iframePrint.contentWindow.print();
iframePrint.contentWindow.blur();
window.focus();
} catch (e) {
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF));
}
};
iframePrint.src = url;
}
},
htmlEncode: function(value) {
return $('<div/>').text(value).html();
},
fillUserInfo: function(info, lang, defname, defid) {
var _user = info || {};
_user.anonymous = !_user.id;
!_user.id && (_user.id = defid);
_user.fullname = !_user.name ? defname : _user.name;
_user.group && (_user.fullname = (_user.group).toString() + AscCommon.UserInfoParser.getSeparator() + _user.fullname);
_user.guest = !_user.name;
return _user;
},
fixedDigits: function(num, digits, fill) {
(fill===undefined) && (fill = '0');
var strfill = "",
str = num.toString();
for (var i=str.length; i<digits; i++) strfill += fill;
return strfill + str;
},
getKeyByValue: function(obj, value) {
for(var prop in obj) {
if(obj.hasOwnProperty(prop)) {
if(obj[prop] === value)
return prop;
}
}
}
};
})();
}();

View file

@ -0,0 +1,33 @@
/**
* utils.js
*
* Unit test
*
* Created by Alexander Yuzhin on 5/7/14
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'../../../../../../apps/common/main/lib/util/utils.js'
],function() {
describe('common.utils.String', function(){
it('Test format', function(){
assert.equal('successively: first, second', common.utils.String.format('successively: {0}, {1}', 'first', 'second'));
assert.equal('revers: second, first', common.utils.String.format('revers: {1}, {0}', 'first', 'second'));
});
it('Test htmlEncode', function(){
assert.equal('Curly, Larry &amp; Moe', common.utils.String.htmlEncode('Curly, Larry & Moe'));
});
it('Test htmlDecode', function(){
assert.equal('Curly, Larry & Moe', common.utils.String.htmlDecode('Curly, Larry &amp; Moe'));
});
it('Test ellipsis', function(){
assert.equal('Truncate a s...', common.utils.String.ellipsis('Truncate a string and add an ellipsis', 15));
assert.equal('Truncate a string and add...', common.utils.String.ellipsis('Truncate a string and add an ellipsis', 30, true));
});
});
});

View file

@ -0,0 +1,101 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2021
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL 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
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* LoadMask.js
*
* Displays loading mask over selected element(s) or component. Accepts both single and multiple selectors.
*
* Created by Julia Radzhabova 24.06.2021
* Copyright (c) 2021 Ascensio System SIA. All rights reserved.
*
*/
!window.common && (window.common = {});
!common.view && (common.view = {});
common.view.LoadMask = function(owner) {
var tpl = '<div class="asc-loadmask-body" role="presentation" tabindex="-1">' +
'<i id="loadmask-spinner" class="asc-loadmask-image"></i>' +
'<div class="asc-loadmask-title"></div>' +
'</div>';
var ownerEl = owner || $(document.body),
loaderEl,
maskedEl,
title = '',
timerId = 0,
rendered = false;
return {
show: function(){
if (!loaderEl || !maskedEl) {
loaderEl = $(tpl);
maskedEl = $('<div class="asc-loadmask"></div>');
}
$('.asc-loadmask-title', loaderEl).html(title);
// show mask after 500 ms if it wont be hided
if (!rendered) {
rendered = true;
timerId = setTimeout(function () {
ownerEl.append(maskedEl);
ownerEl.append(loaderEl);
loaderEl.css('min-width', $('.asc-loadmask-title', loaderEl).width() + 105);
},500);
}
},
hide: function() {
if (timerId) {
clearTimeout(timerId);
timerId = 0;
}
maskedEl && maskedEl.remove();
loaderEl && loaderEl.remove();
maskedEl = loaderEl = null;
rendered = false;
},
setTitle: function(text) {
title = text;
if (ownerEl && loaderEl){
var el = $('.asc-loadmask-title', loaderEl);
el.html(title);
loaderEl.css('min-width', el.width() + 105);
}
}
}
};

View file

@ -0,0 +1,102 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL 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
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
!window.common && (window.common = {});
!common.view && (common.view = {});
common.view.modals = new(function() {
var tplDialog = '<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="idm-title" aria-hidden="true">' +
'<div class="modal-dialog" role="document">' +
'<div class="modal-content">' +
'<div class="modal-header">' +
'<button type="button" class="close" data-dismiss="modal" aria-label="Close">' +
'<span aria-hidden="true">&times;</span>' +
'</button>' +
'<h4 id="idm-title" class="modal-title">{title}</h4>'+
'</div>'+
'<div class="modal-body">{body}</div>'+
'<div class="modal-footer">{footer}</div>'+
'</div>' +
'</div>' +
'</div>';
var _tplbody_share = '<div class="share-link">' +
'<input id="id-short-url" class="form-control" type="text" readonly/>' +
'</div>' +
'<div class="share-buttons">' +
'<span class="svg big-facebook" data-name="facebook"></span>' +
'<span class="svg big-twitter" data-name="twitter"></span>' +
'<span class="svg big-email" data-name="email"></span>' +
'<div class="autotest" id="email" style="display: none"></div>' +
'</div>';
var _tplbody_embed = '<div class="size-manual">' +
'<span class="caption">{width}:</span>' +
'<input id="txt-embed-width" class="form-control input-xs" type="text" value="400px">' +
'<input id="txt-embed-height" class="form-control input-xs right" type="text" value="600px">' +
'<span class="right caption">{height}:</span>' +
'</div>' +
'<textarea id="txt-embed-url" rows="4" class="form-control" readonly></textarea>';
return {
create: function(name, parent) {
!parent && (parent = 'body');
var _$dlg;
if (name == 'share') {
_$dlg = $(tplDialog
.replace(/\{title}/, this.txtShare)
.replace(/\{body}/, _tplbody_share)
.replace(/\{footer}/, '<button id="btn-copyshort" type="button" class="btn">' + this.txtCopy + '</button>'))
.appendTo(parent)
.attr('id', 'dlg-share');
} else
if (name == 'embed') {
_$dlg = $(tplDialog
.replace(/\{title}/, this.txtEmbed)
.replace(/\{body}/, _tplbody_embed)
.replace(/\{width}/, this.txtWidth)
.replace(/\{height}/, this.txtHeight)
.replace(/\{footer}/, '<button id="btn-copyembed" type="button" class="btn">' + this.txtCopy + '</button>'))
.appendTo(parent)
.attr('id', 'dlg-embed');
}
return _$dlg;
},
txtWidth: 'Width',
txtHeight: 'Height',
txtShare: 'Share Link',
txtCopy: 'Copy to clipboard',
txtEmbed: 'Embed'
};
})();

View file

@ -0,0 +1,152 @@
<svg width="380" height="40" viewBox="0 0 380 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="icon-menu-sprite Embedded Viewer">
<g id="view-settings">
<path id="Vector" d="M17 26H3V27H17V26Z" fill="white"/>
<path id="Vector_2" d="M17 30H3V31H17V30Z" fill="white"/>
<path id="Vector_3" d="M17 34H3V35H17V34Z" fill="white"/>
</g>
<g id="download">
<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M31 22H30V33.2929L25.3536 28.6464L24.6465 29.3536L30.1465 34.8536L30.5 35.2071L30.8536 34.8536L36.3536 29.3536L35.6465 28.6464L31 33.2929V22Z" fill="white"/>
<rect id="Rectangle 88" x="24" y="36" width="13" height="1" fill="white"/>
</g>
<g id="share">
<path id="share_2" d="M56 25C56 26.1046 55.1046 27 54 27C53.4663 27 52.9815 26.791 52.6229 26.4503L47.9076 29.3974C47.9676 29.5875 48 29.79 48 30C48 30.21 47.9676 30.4125 47.9076 30.6026L52.6229 33.5497C52.9815 33.209 53.4663 33 54 33C55.1046 33 56 33.8954 56 35C56 36.1046 55.1046 37 54 37C52.8954 37 52 36.1046 52 35C52 34.79 52.0324 34.5875 52.0924 34.3974L47.3771 31.4503C47.0185 31.791 46.5337 32 46 32C44.8954 32 44 31.1046 44 30C44 28.8954 44.8954 28 46 28C46.5337 28 47.0185 28.209 47.3771 28.5497L52.0924 25.6026C52.0324 25.4125 52 25.21 52 25C52 23.8954 52.8954 23 54 23C55.1046 23 56 23.8954 56 25Z" fill="white"/>
</g>
<g id="embed ">
<g id="embed _2">
<path d="M67.8536 25.3536L67.1465 24.6465L62.293 29.5L67.1465 34.3536L67.8536 33.6465L63.7072 29.5L67.8536 25.3536Z" fill="white"/>
<path d="M72.1465 25.3536L72.8536 24.6465L77.7072 29.5L72.8536 34.3536L72.1465 33.6465L76.293 29.5L72.1465 25.3536Z" fill="white"/>
</g>
</g>
<g id="full-screen">
<path id="Rectangle 81 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M93 27H87V33H93V27ZM86 26V34H94V26H86Z" fill="white"/>
<path id="Subtract" fill-rule="evenodd" clip-rule="evenodd" d="M86 23H83V26H84V24H86V23Z" fill="white"/>
<path id="Subtract_2" fill-rule="evenodd" clip-rule="evenodd" d="M97 26L97 23L94 23L94 24L96 24L96 26L97 26Z" fill="white"/>
<path id="Subtract_3" fill-rule="evenodd" clip-rule="evenodd" d="M94 37L97 37L97 34L96 34L96 36L94 36L94 37Z" fill="white"/>
<path id="Subtract_4" fill-rule="evenodd" clip-rule="evenodd" d="M83 34L83 37L86 37L86 36L84 36L84 34L83 34Z" fill="white"/>
</g>
<g id="zoom-in">
<path id="Union_2" fill-rule="evenodd" clip-rule="evenodd" d="M111 25H110V30H105V31H110V36H111V31H116V30H111V25Z" fill="white"/>
</g>
<g id="zoom-out">
<rect id="Rectangle 44.8" x="135" y="30" width="1" height="10" transform="rotate(90 135 30)" fill="white"/>
</g>
<g id="scroll-to-first-sheet">
<path id="Vector 13 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M155 25L147 30L155 35V25Z" fill="white"/>
<path id="Rectangle 225" d="M145 25H146V35H145V25Z" fill="white"/>
</g>
<g id="scroll-to-last-sheet">
<path id="Vector 13 (Stroke)_2" fill-rule="evenodd" clip-rule="evenodd" d="M165 35L173 30L165 25V35Z" fill="white"/>
<path id="Rectangle 225 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M174 35H175V25H174V35Z" fill="white"/>
</g>
<g id="play">
<path id="Vector 8 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M185 23L198 30L185 37V23Z" fill="white"/>
</g>
<g id="pause">
<path id="Rectangle 81 (Stroke)_2" fill-rule="evenodd" clip-rule="evenodd" d="M205 25V35H209V25H205Z" fill="white"/>
<path id="Rectangle 81.1 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M211 25V35H215V25H211Z" fill="white"/>
</g>
<g id=" print">
<path id="Union_3" fill-rule="evenodd" clip-rule="evenodd" d="M226 24H234V26H226V24ZM225 26V24C225 23.4477 225.448 23 226 23H234C234.552 23 235 23.4477 235 24V26H237C237.552 26 238 26.4477 238 27V33C238 33.5523 237.552 34 237 34H235V36C235 36.5523 234.552 37 234 37H226C225.448 37 225 36.5523 225 36V34H223C222.448 34 222 33.5523 222 33V27C222 26.4477 222.448 26 223 26H225ZM225 33V31C225 30.4477 225.448 30 226 30H234C234.552 30 235 30.4477 235 31V33H237V27H234H226H223V33H225ZM225 28H224V29H225V28ZM234 31H226V36H234V31ZM227 32H233V33H227V32ZM233 34H227V35H233V34Z" fill="white"/>
</g>
<g id="clear-style">
<path id="Union_4" fill-rule="evenodd" clip-rule="evenodd" d="M253.268 24.5608C252.291 23.5845 250.708 23.5845 249.732 24.5608L243.561 30.7324C242.584 31.7087 242.584 33.2916 243.561 34.268L245.146 35.8537L245.293 36.0002L245.5 36.0002H249.5L249.707 36.0002L255 36.0002V35.0002H250.707L255.439 30.268C256.416 29.2916 256.416 27.7087 255.439 26.7324L253.268 24.5608ZM249.293 35.0002L252.793 31.5002L248.5 27.2073L244.268 31.4395C243.682 32.0253 243.682 32.9751 244.268 33.5609L245.707 35.0002L249.293 35.0002ZM249.207 26.5002L253.5 30.7931L254.732 29.5608C255.318 28.9751 255.318 28.0253 254.732 27.4395L252.561 25.268C251.975 24.6822 251.025 24.6822 250.439 25.268L249.207 26.5002Z" fill="white"/>
</g>
<g id="view-settings_2">
<path id="Vector_4" d="M17 6H3V7H17V6Z" fill="black"/>
<path id="Vector_5" d="M17 10H3V11H17V10Z" fill="black"/>
<path id="Vector_6" d="M17 14H3V15H17V14Z" fill="black"/>
</g>
<g id="download_2">
<path id="Union_5" fill-rule="evenodd" clip-rule="evenodd" d="M31 2H30V13.2929L25.3536 8.64645L24.6465 9.35355L30.1465 14.8536L30.5 15.2071L30.8536 14.8536L36.3536 9.35355L35.6465 8.64645L31 13.2929V2Z" fill="black"/>
<rect id="Rectangle 88_2" x="24" y="16" width="13" height="1" fill="black"/>
</g>
<g id="share_3">
<path id="share_4" d="M56 5C56 6.10457 55.1046 7 54 7C53.4663 7 52.9815 6.79098 52.6229 6.45034L47.9076 9.39737C47.9676 9.58754 48 9.78999 48 10C48 10.21 47.9676 10.4125 47.9076 10.6026L52.6229 13.5497C52.9815 13.209 53.4663 13 54 13C55.1046 13 56 13.8954 56 15C56 16.1046 55.1046 17 54 17C52.8954 17 52 16.1046 52 15C52 14.79 52.0324 14.5875 52.0924 14.3974L47.3771 11.4503C47.0185 11.791 46.5337 12 46 12C44.8954 12 44 11.1046 44 10C44 8.89543 44.8954 8 46 8C46.5337 8 47.0185 8.20902 47.3771 8.54966L52.0924 5.60264C52.0324 5.41246 52 5.21001 52 5C52 3.89543 52.8954 3 54 3C55.1046 3 56 3.89543 56 5Z" fill="black"/>
</g>
<g id="embed _3">
<g id="embed _4">
<path d="M67.8536 5.35359L67.1465 4.64648L62.293 9.50004L67.1465 14.3536L67.8536 13.6465L63.7072 9.50004L67.8536 5.35359Z" fill="black"/>
<path d="M72.1465 5.35359L72.8536 4.64648L77.7072 9.50004L72.8536 14.3536L72.1465 13.6465L76.293 9.50004L72.1465 5.35359Z" fill="black"/>
</g>
</g>
<g id="full-screen_2">
<path id="Rectangle 81 (Stroke)_3" fill-rule="evenodd" clip-rule="evenodd" d="M93 7H87V13H93V7ZM86 6V14H94V6H86Z" fill="black"/>
<path id="Subtract_5" fill-rule="evenodd" clip-rule="evenodd" d="M86 3H83V6H84V4H86V3Z" fill="black"/>
<path id="Subtract_6" fill-rule="evenodd" clip-rule="evenodd" d="M97 6L97 3L94 3L94 4L96 4L96 6L97 6Z" fill="black"/>
<path id="Subtract_7" fill-rule="evenodd" clip-rule="evenodd" d="M94 17L97 17L97 14L96 14L96 16L94 16L94 17Z" fill="black"/>
<path id="Subtract_8" fill-rule="evenodd" clip-rule="evenodd" d="M83 14L83 17L86 17L86 16L84 16L84 14L83 14Z" fill="black"/>
</g>
<g id="zoom-in_2">
<path id="Union_6" fill-rule="evenodd" clip-rule="evenodd" d="M111 5H110V10H105V11H110V16H111V11H116V10H111V5Z" fill="black"/>
</g>
<g id="zoom-out_2">
<rect id="Rectangle 44.8_2" x="135" y="10" width="1" height="10" transform="rotate(90 135 10)" fill="black"/>
</g>
<g id="scroll-to-first-sheet_2">
<path id="Vector 13 (Stroke)_3" fill-rule="evenodd" clip-rule="evenodd" d="M155 5L147 10L155 15V5Z" fill="black"/>
<path id="Rectangle 225_2" d="M145 5H146V15H145V5Z" fill="black"/>
</g>
<g id="scroll-to-last-sheet_2">
<path id="Vector 13 (Stroke)_4" fill-rule="evenodd" clip-rule="evenodd" d="M165 15L173 10L165 5V15Z" fill="black"/>
<path id="Rectangle 225 (Stroke)_2" fill-rule="evenodd" clip-rule="evenodd" d="M174 15H175V5H174V15Z" fill="black"/>
</g>
<g id="play_2">
<path id="Vector 8 (Stroke)_2" fill-rule="evenodd" clip-rule="evenodd" d="M185 3L198 10L185 17V3Z" fill="black"/>
</g>
<g id="pause_2">
<path id="Rectangle 81 (Stroke)_4" fill-rule="evenodd" clip-rule="evenodd" d="M205 5V15H209V5H205Z" fill="black"/>
<path id="Rectangle 81.1 (Stroke)_2" fill-rule="evenodd" clip-rule="evenodd" d="M211 5V15H215V5H211Z" fill="black"/>
</g>
<g id=" print_2">
<path id="Union_7" fill-rule="evenodd" clip-rule="evenodd" d="M226 4H234V6H226V4ZM225 6V4C225 3.44772 225.448 3 226 3H234C234.552 3 235 3.44772 235 4V6H237C237.552 6 238 6.44772 238 7V13C238 13.5523 237.552 14 237 14H235V16C235 16.5523 234.552 17 234 17H226C225.448 17 225 16.5523 225 16V14H223C222.448 14 222 13.5523 222 13V7C222 6.44772 222.448 6 223 6H225ZM225 13V11C225 10.4477 225.448 10 226 10H234C234.552 10 235 10.4477 235 11V13H237V7H234H226H223V13H225ZM225 8H224V9H225V8ZM234 11H226V16H234V11ZM227 12H233V13H227V12ZM233 14H227V15H233V14Z" fill="black"/>
</g>
<g id="clear-style_2">
<path id="Union_8" fill-rule="evenodd" clip-rule="evenodd" d="M253.268 4.56085C252.291 3.58454 250.708 3.58453 249.732 4.56085L243.561 10.7324C242.584 11.7087 242.584 13.2916 243.561 14.268L245.146 15.8537L245.293 16.0002L245.5 16.0002H249.5L249.707 16.0002L255 16.0002V15.0002H250.707L255.439 10.268C256.416 9.29164 256.416 7.70873 255.439 6.73242L253.268 4.56085ZM249.293 15.0002L252.793 11.5002L248.5 7.20729L244.268 11.4395C243.682 12.0253 243.682 12.9751 244.268 13.5609L245.707 15.0002L249.293 15.0002ZM249.207 6.50019L253.5 10.7931L254.732 9.56085C255.318 8.97506 255.318 8.02531 254.732 7.43953L252.561 5.26795C251.975 4.68217 251.025 4.68217 250.439 5.26795L249.207 6.50019Z" fill="black"/>
</g>
<g id="edit">
<path id="Vector_7" d="M263 34V37H266L274 29L271 26L263 34Z" fill="white"/>
<path id="Vector 2" d="M275 28L272 25L274 23H275L277 25V26L275 28Z" fill="white"/>
</g>
<g id="more-vertical">
<circle id="Ellipse" cx="290" cy="26" r="1" transform="rotate(90 290 26)" fill="white"/>
<circle id="Ellipse_2" cx="290" cy="30" r="1" transform="rotate(90 290 30)" fill="white"/>
<circle id="Ellipse_3" cx="290" cy="34" r="1" transform="rotate(90 290 34)" fill="white"/>
</g>
<g id="go-to-location">
<path id="Vector_8" d="M317 26H311V25C311 24.45 310.55 24 310 24H303C302.45 24 302 24.45 302 25V36C302 36.55 302.45 37 303 37H317C317.55 37 318 36.55 318 36V27C318 26.45 317.55 26 317 26ZM317 36H303V25H310V27H317V36Z" fill="white"/>
<path id="Union_9" fill-rule="evenodd" clip-rule="evenodd" d="M309.646 33.6465L310.354 34.3536L313.207 31.5L310.354 28.6465L309.646 29.3536L311.268 30.9747H306V31.9747H311.318L309.646 33.6465Z" fill="white"/>
</g>
<g id="arrow-down">
<path id="Union_10" fill-rule="evenodd" clip-rule="evenodd" d="M331 23H330V34.2929L325.354 29.6464L324.646 30.3536L330.146 35.8536L330.5 36.2071L330.854 35.8536L336.354 30.3536L335.646 29.6464L331 34.2929V23Z" fill="white"/>
</g>
<g id="edit_2">
<path id="Vector_9" d="M263 14V17H266L274 9L271 6L263 14Z" fill="black"/>
<path id="Vector 2_2" d="M275 8L272 5L274 3H275L277 5V6L275 8Z" fill="black"/>
</g>
<g id="more-vertical_2">
<circle id="Ellipse_4" cx="290" cy="6" r="1" transform="rotate(90 290 6)" fill="black"/>
<circle id="Ellipse_5" cx="290" cy="10" r="1" transform="rotate(90 290 10)" fill="black"/>
<circle id="Ellipse_6" cx="290" cy="14" r="1" transform="rotate(90 290 14)" fill="black"/>
</g>
<g id="go-to-location_2">
<path id="Vector_10" d="M317 6H311V5C311 4.45 310.55 4 310 4H303C302.45 4 302 4.45 302 5V16C302 16.55 302.45 17 303 17H317C317.55 17 318 16.55 318 16V7C318 6.45 317.55 6 317 6ZM317 16H303V5H310V7H317V16Z" fill="black"/>
<path id="Union_11" fill-rule="evenodd" clip-rule="evenodd" d="M309.646 13.6465L310.354 14.3536L313.207 11.5L310.354 8.64648L309.646 9.35359L311.268 10.9747H306V11.9747H311.318L309.646 13.6465Z" fill="black"/>
</g>
<g id="arrow-down_2">
<path id="Union_12" fill-rule="evenodd" clip-rule="evenodd" d="M331 3H330V14.2929L325.354 9.64645L324.646 10.3536L330.146 15.8536L330.5 16.2071L330.854 15.8536L336.354 10.3536L335.646 9.64645L331 14.2929V3Z" fill="black"/>
</g>
<g id="arrow-up">
<path id="Union_13" fill-rule="evenodd" clip-rule="evenodd" d="M350 36.207L351 36.207L351 24.9141L355.646 29.5606L356.354 28.8535L350.854 23.3535L350.5 22.9999L350.146 23.3535L344.646 28.8535L345.354 29.5606L350 24.9141L350 36.207Z" fill="white"/>
</g>
<g id="arrow-up_2">
<path id="Union_14" fill-rule="evenodd" clip-rule="evenodd" d="M350 16.207L351 16.207L351 4.91414L355.646 9.56059L356.354 8.85348L350.854 3.35348L350.5 2.99993L350.146 3.35348L344.646 8.85348L345.354 9.56059L350 4.91414L350 16.207Z" fill="black"/>
</g>
<g id="close">
<path id="Vector 73" d="M366 25L375 34M375 25L366 34" stroke="white" stroke-width="1.5"/>
</g>
<g id="close_2">
<path id="Vector 73_2" d="M366 5L375 14M375 5L366 14" stroke="black" stroke-width="1.5"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 152 76"><defs><path id="a" d="M144.9 0h-23.8c-3.9 0-7.1 3.2-7.1 7.1v23.7c0 3.9 3.2 7.1 7.1 7.1h23.8c3.9 0 7.1-3.2 7.1-7.1V7.1c0-3.9-3.2-7.1-7.1-7.1zm1.8 28.3c0 1.3-1.1 2.4-2.4 2.4h-22.4c-1.3 0-2.4-1.1-2.4-2.4V9.7c0-1.3 1.1-2.4 2.4-2.4h22.4c1.3 0 2.4 1.1 2.4 2.4v18.6zM68.9 0H45.1C41.2 0 38 3.2 38 7.1v23.7c0 3.9 3.2 7.1 7.1 7.1h23.7c3.9 0 7.1-3.2 7.1-7.1V7.1c.1-3.9-3.1-7.1-7-7.1zm-1.8 14.6v.7c0 6.9-5.2 14.8-14.8 14.8-2.9 0-5.7-.9-8-2.3.4 0 .8.1 1.2.1 2.4 0 4.7-.8 6.5-2.2-2.3 0-4.2-1.6-4.8-3.6.3 0 .6.1 1 .1.5 0 .8-.1 1.3-.2-2.4-.5-4.3-2.6-4.3-5.1.8.4 1.6.6 2.5.6-1.4-.9-2.3-2.5-2.3-4.3 0-.9.3-1.9.7-2.6 2.6 3.2 6.4 5.2 10.7 5.4-.1-.4-.1-.8-.1-1.2 0-2.9 2.3-5.2 5.2-5.2 1.5 0 2.8.6 3.8 1.6 1.2-.2 2.3-.7 3.3-1.3-.4 1.2-1.2 2.3-2.3 2.9 1.1-.1 2.1-.4 3-.8-.7 1-1.6 1.9-2.6 2.6zM30.9 0H7.1C3.2 0 0 3.2 0 7.1v23.7c0 4 3.2 7.2 7.1 7.2h11.7V26.8h-5.3v-5.7h5.3V17c0-4.8 3.2-7.5 7.9-7.5 2.2 0 4.2.1 4.7.2v5.1h-3.2c-2.6 0-3.1 1.1-3.1 2.7v3.6h6.1l-.8 5.7h-5.3V38h5.7c3.9 0 7.1-3.2 7.1-7.1V7.1c.1-3.9-3.1-7.1-7-7.1zm105.9 20.6c-1.1.9-2.4 2-3.8 2-1.5 0-2.8-1.1-3.8-2l-6-4.8c-.4-.3-.7-.6-1-.9v12.6c0 .2.2.5.4.5h20.7c.2 0 .4-.2.4-.5V14.9c-.3.3-.6.6-1 .9-1.9 1.6-3.9 3.2-5.9 4.8zM106.9 0H83.1C79.2 0 76 3.2 76 7.1v23.7c0 3.9 3.2 7.1 7.1 7.1h23.8c3.9 0 7.1-3.2 7.1-7.1V7.1c0-3.9-3.2-7.1-7.1-7.1zM89.6 28.5c-5.3 0-9.5-4.3-9.5-9.5s4.2-9.5 9.5-9.5c2.5 0 4.7.9 6.4 2.5l-2.6 2.5c-.7-.7-2-1.5-3.8-1.5-3.3 0-5.9 2.7-5.9 6s2.6 6 5.9 6c3.8 0 5.2-2.7 5.4-4.1h-5.4v-3.3h9c.1.5.1 1 .1 1.6 0 5.4-3.7 9.3-9.1 9.3zm20.3-8.1h-2.7v2.7h-2.7v-2.7h-2.7v-2.7h2.7V15h2.7v2.7h2.7v2.7zM143.3 10h-20.7c-.2 0-.4.2-.4.5 0 1.6.8 3 2.1 4 1.9 1.5 3.8 3 5.6 4.5.7.6 2.1 1.9 3.1 1.9s2.3-1.3 3.1-1.9c1.9-1.5 3.7-3 5.6-4.5.9-.7 2.1-2.3 2.1-3.5 0-.4.1-1-.5-1z"/></defs><use xlink:href="#a" fill="#999"/><use xlink:href="#a" fill="#666" y="38"/></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1 @@
<svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" viewBox="-4 23 100 24"><style>.st0{fill:#5B5B5B;} .st1{fill:#3A3A3A;} .st2{opacity:0.42;fill:#8C8C8C;enable-background:new ;} .st3{opacity:0.72;fill:#9B9B9B;enable-background:new ;} .st4{fill:#9B9B9B;}</style><path class="st0" d="M21.3 35.5c0-1.5.4-2.7 1.3-3.5.9-.8 1.9-1.2 3.1-1.2 1.2 0 2.2.4 3.1 1.2.9.8 1.3 1.9 1.3 3.5 0 1.5-.4 2.7-1.3 3.5-.9.8-1.9 1.2-3.1 1.2-1.2 0-2.2-.4-3.1-1.2-.8-.8-1.3-2-1.3-3.5zm1.9 0c0 1.1.2 1.8.6 2.3.4.5.8.8 1.3.9.1 0 .2 0 .3.1h.6c.1 0 .2 0 .3-.1.5-.1.9-.4 1.3-.9s.6-1.3.6-2.3c0-1-.2-1.8-.6-2.3-.4-.5-.8-.8-1.3-.9-.1 0-.2-.1-.3-.1h-.6c-.1 0-.2 0-.3.1-.5.1-.9.4-1.3.9s-.6 1.2-.6 2.3zm7.8-4.4h2.4l3.1 5.6.5 1.2v-6.8h1.8V40h-2.3l-3.2-5.9-.4-1h-.1l.1 1.6V40H31zm9.3 0h1.9v7.4h3.6V40h-5.5zm4.4 0h2.1l1.8 3 .2.7h.1l.3-.7 1.8-3h2l-3.3 5.2V40H48v-3.7z"/><path class="st1" d="M53.1 35.5c0-1.5.4-2.7 1.3-3.5.9-.8 1.9-1.2 3.1-1.2s2.2.4 3.1 1.2c.9.8 1.3 1.9 1.3 3.5 0 1.5-.4 2.7-1.3 3.5-.9.8-1.9 1.2-3.1 1.2-1.2 0-2.2-.4-3.1-1.2-.9-.8-1.3-2-1.3-3.5zm1.9 0c0 1.1.2 1.8.6 2.3.4.5.8.8 1.3.9.1 0 .2 0 .3.1h.6c.1 0 .2 0 .3-.1.5-.1.9-.4 1.3-.9s.6-1.3.6-2.3c0-1-.2-1.8-.6-2.3s-.8-.8-1.3-.9c-.1 0-.2-.1-.3-.1h-.6s-.2 0-.3.1c-.5.1-.9.4-1.3.9s-.6 1.2-.6 2.3zm7.8-4.4h5v1.5h-3.2v2.1h3.1v1.5h-3.1V40h-1.8zm6.1 0h5v1.5h-3.2v2.1h3v1.5h-3V40h-1.8zm6 8.9v-8.9h1.9V40zM85 31.3v1.6c-.3-.1-.6-.2-1-.3s-.7-.1-1.1-.1c-1 0-1.7.3-2.2.9-.5.6-.8 1.3-.8 2.2s.2 1.6.7 2.2c.5.6 1.2.9 2.1.9.3 0 .7 0 1-.1.4 0 .8-.2 1.2-.3l.1 1.5c-.1 0-.1.1-.2.1s-.2.1-.4.1h-.8c-.3 0-.7.1-1.1.1h-.4c-1-.1-2-.5-2.9-1.2-.9-.7-1.3-1.8-1.3-3.4 0-1.5.4-2.6 1.3-3.5.9-.8 2-1.2 3.4-1.2h1c.3 0 .6.1.9.2.1 0 .1 0 .2.1s.2.1.3.2zm1.1-.2h5.5v1.4H88v2.1h3.2V36H88v2.6h3.6V40h-5.5z"/><path class="st2" d="M7.4 43.1l-7.7-3.7c-.7-.3-.7-.8 0-1.1L2.3 37l5.1 2.4c.7.3 1.7.3 2.4 0l5.1-2.4 2.7 1.3c.7.3.7.8 0 1.1l-7.7 3.7c-.7.3-1.8.3-2.5 0z"/><path class="st3" d="M7.4 38.7L-.3 35c-.7-.3-.7-.8 0-1.1l2.7-1.3L7.5 35c.7.3 1.7.3 2.4 0l5.2-2.4 2.7 1.2c.7.3.7.8 0 1.1L10 38.6c-.8.4-1.9.4-2.6.1z"/><path class="st4" d="M7.4 34.3l-7.7-3.7c-.7-.3-.7-.8 0-1.1l7.7-3.7c.7-.3 1.7-.3 2.4 0l7.7 3.7c.7.3.7.8 0 1.1l-7.7 3.7c-.6.3-1.7.3-2.4 0z"/></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

View file

@ -0,0 +1,788 @@
// Core variables and mixins
@import "../../../../../../vendor/bootstrap/less/variables.less";
@icon-font-path: "../../../../../../vendor/bootstrap/dist/fonts/";
@import "../../../../../../vendor/bootstrap/less/mixins.less";
// Reset
@import "../../../../../../vendor/bootstrap/less/normalize.less";
@import "../../../../../../vendor/bootstrap/less/print.less";
// Core CSS
@import "../../../../../../vendor/bootstrap/less/scaffolding.less";
@import "../../../../../../vendor/bootstrap/less/type.less";
//@import "code.less";
//@import "grid.less";
//@import "tables.less";
@import "../../../../../../vendor/bootstrap/less/forms.less";
@import "../../../../../../vendor/bootstrap/less/buttons.less";
// Components
@import "../../../../../../vendor/bootstrap/less/component-animations.less";
//@import "../../../../../../vendor/bootstrap/less/glyphicons.less";
//@import "dropdowns.less";
//@import "button-groups.less";
//@import "input-groups.less";
//@import "navs.less";
//@import "navbar.less";
//@import "breadcrumbs.less";
//@import "pagination.less";
//@import "pager.less";
@import "../../../../../../vendor/bootstrap/less/labels.less";
//@import "badges.less";
//@import "jumbotron.less";
//@import "thumbnails.less";
@import "../../../../../../vendor/bootstrap/less/alerts.less";
//@import "progress-bars.less";
//@import "media.less";
//@import "list-group.less";
//@import "panels.less";
//@import "wells.less";
@import "../../../../../../vendor/bootstrap/less/close.less";
// Components w/ JavaScript
@import "../../../../../../vendor/bootstrap/less/modals.less";
@import "../../../../../../vendor/bootstrap/less/tooltip.less";
//@import "../../../../../../vendor/bootstrap/less/popovers.less";
@import "../../../../../../vendor/bootstrap/less/dropdowns.less";
//@import "carousel.less";
// Utility classes
@import "../../../../../../vendor/bootstrap/less/utilities.less";
@import "../../../../../../vendor/bootstrap/less/responsive-utilities.less";
@import "loadmask.less";
@toolbarBorderColor: #dbdbdb;
@toolbarBorderShadowColor: #FAFAFA;
@toolbarTopColor: #F7F7F7;
@toolbarBottomColor: #CCCCCC;
@toolbarHoverColor: #7698DE;
@toolbarFontSize: 12px;
@buttonFontSize: 11px;
@controlBtnHoverTopColor: #6180C4;
@controlBtnHoverBottomColor: #8AACF1;
@btnColor: #d8dadc;
@btnActiveColor: #7d858c;
@btnColored: #446995;
@btnActiveColored: #293F59;
@btnHoverColored: #375478;
@notificationColor: #fcfed7;
@iconSpriteCommonPath: "../../../../unit-tests/common/main/resources/img/glyphicons.png";
@icon-socnet-size: 40px;
.input-xs {
.input-size(@input-height-small - 8px; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
}
.embed-body {
-moz-user-select: -moz-none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
font-size: @toolbarFontSize;
overflow: hidden;
}
// Document Viewer
// -------------------------
.viewer {
position: absolute;
margin: 0;
padding: 0;
left: 0;
right: 0;
&.top {
top: 48px;
bottom: 0;
}
&.bottom {
top: 0;
bottom: 46px;
}
}
// Toolbar
// -------------------------
.toolbar {
position: fixed;
font-size: @toolbarFontSize;
min-width: 340px;
z-index: 100;
background-color: @toolbarTopColor;
display: flex;
align-items: center;
white-space: nowrap;
&.top {
top: 0;
left: 0;
width: 100%;
height: 48px;
-webkit-box-shadow: inset 0 -1px 0 @toolbarBorderColor, inset 0 1px 0 @toolbarBorderShadowColor;
//-moz-box-shadow: inset 0 -1px 0 @toolbarBorderColor, inset 0 1px 0 @toolbarBorderShadowColor;
box-shadow: inset 0 -1px 0 @toolbarBorderColor, inset 0 1px 0 @toolbarBorderShadowColor;
}
&.bottom {
bottom: 0;
left: 0;
width: 100%;
height: 46px;
-webkit-box-shadow: inset 0 1px 0 @toolbarBorderColor, inset 0 2px 0 @toolbarBorderShadowColor;
//-moz-box-shadow: inset 0 1px 0 @toolbarBorderColor, inset 0 2px 0 @toolbarBorderShadowColor;
box-shadow: inset 0 1px 0 @toolbarBorderColor, inset 0 2px 0 @toolbarBorderShadowColor;
}
.group {
margin: 0;
padding: 0;
.item {
input {
display: inline-block;
width: 35px;
padding: 0;
text-align: right;
}
.text {
cursor: default;
}
}
&.left {
left: 0;
padding-left: 10px;
.item {
float: left;
}
& > div {
display: inline-block;
vertical-align: middle;
}
}
&.right {
right: 0;
padding-right: 10px;
.item {
display: inline-block;
}
}
&.center {
display: flex;
justify-content: center;
flex-grow: 1;
overflow: hidden;
padding: 0 20px;
#title-doc-name {
overflow: hidden;
text-overflow: ellipsis;
}
}
.separator {
height: 22px;
margin: 0 9px;
border-right: 1px solid @toolbarBorderShadowColor;
border-left: 1px solid @toolbarBorderColor;
}
}
.close {
font-size: 28px;
font-family: Arial, sans-serif;
color: #666666;
opacity: 0.8;
display: block;
line-height: 22px;
&:hover {
opacity: 1;
color: #666666;
}
}
.margin-right-small {
margin-right: 8px;
}
.margin-right-large {
margin-right: 12px;
}
.margin-left-small {
margin-left: 8px;
}
.margin-left-large {
margin-left: 12px;
}
}
// Logo
// -------------------------
.brand-logo {
display: block;
width: 100px;
height: 24px;
background: data-uri('../../../../unit-tests/common/main/resources/img/logo.svg') no-repeat;
}
// Control buttons
// -------------------------
.control-btn {
display: inline-block;
vertical-align: middle;
cursor: pointer;
background-color: transparent;
border: 1px solid transparent;
border-radius: 2px;
width: 22px;
height: 22px;
background-origin: content-box;
padding: 0 1px;
font-size: @buttonFontSize;
&.has-caption {
width: auto;
padding-right: 5px;
}
&.colored {
padding: 0 16px;
height: 28px;
background-color: @btnColored;
border-radius: 3px;
color: #ffffff;
font-weight: 700;
}
// Hover state
&:hover:not(:disabled) {
text-decoration: none;
background-color: @btnColor;
&.colored {
background-color: @btnHoverColored;
}
}
&:active:not(:disabled) {
&, .btn-icon {
background-position-y: -@icon-height !important;
}
&.has-caption {
color: #ffffff
}
&.colored {
background-color: @btnActiveColored;
}
}
// Focus state for keyboard and accessibility
&:focus {
.tab-focus();
outline: none;
}
// Active state
&.active:not(:disabled),
&:active:not(:disabled) {
outline: none;
border: 1px solid @btnActiveColor;
background-color: @btnActiveColor;
}
&[disabled] {
opacity: 0.4;
}
}
// Overlay control
// -------------------------
.overlay-controls {
position: absolute;
bottom: 55px;
z-index: 10;
left: 50%;
ul {
padding: 0;
list-style-type: none;
margin: 0 auto;
li {
display: inline-block;
&:first-child {
margin-right: 5px;
}
&:last-child {
margin-left: 5px;
}
}
}
.overlay {
width: 32px;
height: 32px;
display: inline-block;
cursor: pointer;
background-color: black;
border: 5px solid black;
border-radius: 50%;
outline: none;
opacity: 0.3;
background-origin: content-box;
padding: 1px 0 0 1px;
-webkit-box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
-moz-box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
&:hover {
opacity: .6;
}
&.active, &:active {
opacity: .8;
}
}
}
// Error mask
// -------------------------
.errormask {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
overflow: hidden;
border: none;
background-color: #f4f4f4;
z-index: 30002;
.error-body {
position: relative;
top: 40%;
width: 400px;
margin: 0 auto;
padding: 20px;
background-color: #FFFFFF;
border: 1px solid #C0C0C0;
.title {
font-weight: bold;
font-size: 1.6em;
padding-bottom: 10px;
}
}
}
// Modals
// -------------------------
.modal {
.modal-header {
//padding: 5px 15px;
}
.modal-footer {
//border-top: none;
}
//&.in .modal-dialog { .translate(0, 100%)}
}
.share-buttons {
ul {
width: 244px;
//height: 25px;
list-style-type: none;
margin: 5px 0 0;
overflow: hidden;
li {
display: inline-block;
float: left;
margin: 1px 5px 0 0;
vertical-align: middle;
&.share-mail {
float: right;
padding-right: 1px;
margin: 0;
a {
min-width: 64px;
}
.glyphicon {
margin-right: 4px;
}
}
&.share-twitter {
max-width: 93px;
}
}
}
}
.size-manual {
margin-bottom: 10px;
.right {
float: right;
}
.caption {
margin-top: 2px;
margin-right: 8px;
}
input {
display: inline-block;
font-size: 1em;
padding: 0 4px;
//border-radius: 0;
margin: 0;
margin-top: -1px;
&.input-xs {
width: 50px;
}
}
}
.socnet-btn(@index) {
background-position: -@icon-socnet-size*@index 0;
&:hover {
background-position: -@icon-socnet-size*@index -@icon-socnet-size;
}
}
.svg {
background: data-uri('../../../../unit-tests/common/main/resources/img/icon-social-sprite.svg');
width: 40px;
height: 40px;
background-size: @icon-socnet-size*4 @icon-socnet-size*2;
&.big-facebook:hover {
background-position: 0 -@icon-socnet-size;
}
&.big-twitter { .socnet-btn(1); }
&.big-gplus { .socnet-btn(2); }
&.big-email { .socnet-btn(3); }
}
@icon-width: 20px;
@icon-height: 20px;
.svg-icon {
background: data-uri('../../../../unit-tests/common/main/resources/img/icon-menu-sprite.svg') no-repeat;
background-size: @icon-width*19 @icon-height*2;
&.download {
background-position: -@icon-width 0;
}
&.share {
background-position: -@icon-width*2 0;
}
&.embed {
background-position: -@icon-width*3 0;
}
&.fullscr {
background-position: -@icon-width*4 0;
}
&.zoom-up {
background-position: -@icon-width*5 -@icon-height;
}
&.zoom-down {
background-position: -@icon-width*6 -@icon-height;
}
&.slide-prev {
background-position: -@icon-width*7 -@icon-height;
}
&.slide-next {
background-position: -@icon-width*8 -@icon-height;
}
&.play {
background-position: -@icon-width*9 -@icon-height;
}
&.pause {
background-position: -@icon-width*10 -@icon-height;
}
&.print {
background-position: -@icon-width*11 0;
}
&.arrow-up {
background-position: -@icon-width*17 0;
}
&.arrow-down {
background-position: -@icon-width*16 0;
}
&.clear-style {
background-position: -@icon-width*12 0;
}
&.go-to-location {
background-position: -@icon-width*15 0;
}
&.more-vertical {
background-position: -@icon-width*14 0;
}
}
.mi-icon {
width: @icon-width;
height: @icon-height;
float: left;
margin: -3px 4px 0 -24px;
}
.btn-icon {
width: 22px;
height: 22px;
display: inline-block;
vertical-align: middle;
}
.btn, button {
&:focus, &:active:focus {
outline: 0 none;
}
background-color: @btnColor;
}
.modal-dialog {
margin-top: 100px;
.share-buttons {
height: 40px;
text-align: center;
span {
display: inline-block;
margin: 0 7px;
cursor: pointer;
}
}
.share-link {
margin: 0 0 15px 0;
}
}
.modal-header {
padding-bottom: 10px;
text-align: center;
.close {
margin-top: 0;
opacity: 0.5;
&:hover {
opacity: 0.7;
}
}
}
.modal-body {
padding: 20px;
}
.modal-footer {
text-align: center;
}
#dlg-share, #dlg-embed {
.modal-dialog {
width: 330px;
}
textarea {
width: 288px;
resize: none;
cursor: auto;
font-size: 1em;
border-radius: 0;
}
}
.dropdown-menu {
> li > a {
padding: 8px 20px 8px 28px;
&:hover, &:focus {
background-color: @btnColor;
outline: 0 none;
}
font-size: @buttonFontSize;
}
.divider {
margin: 4px 0;
}
}
.dropdown {
&.open {
> button {
background-color: @btnActiveColor !important;
background-position: -@icon-width*14 -@icon-height;
}
}
}
#box-tools {
display: inline-block;
a {
cursor: pointer;
}
}
.masked {
background-color: transparent;
border-color: transparent;
-webkit-box-shadow: none;
box-shadow: none;
}
#pages {
cursor: pointer;
display: inline-block;
line-height: 22px;
padding: 0 0 0 3px;
}
#page-number {
&.masked {
cursor: pointer;
}
}
.tooltip {
.tooltip-inner {
background-color: #fff;
border: 1px solid rgba(0,0,0,0.15);
color: #333;
font-weight: bold;
font-size: 11px;
box-shadow: 0 6px 12px rgba(0,0,0,0.175);
max-width: 350px;
padding: 5px 12px;
white-space: pre-wrap;
text-align: left;
word-wrap: break-word;
}
.tooltip-arrow {
display: none;
}
}
.form-control {
&:focus {
-webkit-box-shadow: none;
box-shadow: none;
}
}
.submit-tooltip {
position: absolute;
z-index: 1000;
top: 58px;
right: 15px;
padding: 7px 15px;
border-radius: 5px;
background-color: @notificationColor;
-webkit-box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.5);
box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.5);
font-size: 11px;
}
.required-tooltip {
position: absolute;
z-index: 1000;
padding: 15px;
border-radius: 5px;
background-color: @btnColored;
color: #fff;
-webkit-box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.5);
box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.5);
font-size: 11px;
&.bottom-left {
border-top-right-radius: 0;
margin: 15px 0 0 0;
.tip-arrow {
position: absolute;
overflow: hidden;
right: 0;
top: -15px;
width: 15px;
height: 15px;
.box-shadow(8px 5px 8px -5px rgba(0, 0, 0, 0.2));
&:after {
content: '';
position: absolute;
top: 8px;
left: 8px;
background-color: @btnColored;
width: 15px;
height: 15px;
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
.box-shadow(0 0 8px -1px rgba(0, 0, 0, 0.2));
}
}
}
.close-div {
display: inline-block;
border: 1px solid #fff;
border-radius: 2px;
padding: 3px 12px;
margin-top: 10px;
}
}
.tooltip {
.tooltip-inner {
.toolbar & {
font-weight: normal;
}
}
}

View file

@ -0,0 +1,74 @@
@loadmask-zindex: 10000;
@loadmask-image-height: 28px;
@loadmask-image-width: 28px;
@loadmask-small-image-height: 20px;
@loadmask-small-image-width: 20px;
@background-loader-ie: fade(#000, 65%);
@background-loader: fade(#181818, 90%);
@text-contrast-background-ie: #fff;
@text-contrast-background: #fff;
.asc-loadmask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
zoom: 1;
background-color: transparent;
z-index: @loadmask-zindex;
}
.asc-loadmask-body {
position: absolute;
z-index: @loadmask-zindex + 1;
padding: 24px;
line-height: @loadmask-image-height;
border: none;
background-image: none;
background-color: @background-loader-ie;
background-color: @background-loader;
color: @text-contrast-background-ie;
color: @text-contrast-background;
border-radius: 6px;
left: 50%;
top: 50%;
transform: translate(-50%);
& > div {
display: inline-block;
vertical-align: middle;
}
.asc-loadmask-image {
background-image: ~"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgcj0iMTAuMjUiIHN0cm9rZS1kYXNoYXJyYXk9IjE2MCUsIDQwJSIgLz48L3N2Zz4=)";
height: 28px;
width: 28px;
float: left;
margin-left: 8px;
}
.asc-loadmask-title {
font-size: 13px;
margin: 0 8px 0 12px;
white-space: pre-wrap;
}
}
@keyframes rotation {
from {
transform: rotate(0);
}
to {
transform: rotate(360deg);
}
}
#loadmask-spinner {
animation-duration: .8s;
animation-name: rotation;
animation-iteration-count: infinite;
animation-timing-function: linear;
}