Merge branch 'develop' into feature/protection-document

This commit is contained in:
Sergey Ezhin
2023-03-23 20:14:26 +04:00
committed by GitHub
3629 changed files with 127668 additions and 24858 deletions

View File

@ -195,6 +195,7 @@
},
font: {
name: "Arial",
size: "11px";
},
chat: true,
comments: true,
@ -388,7 +389,7 @@
if ( msg ) {
if ( msg.type === "onExternalPluginMessage" ) {
_sendCommand(msg);
} else if (msg.type === "onExternalPluginMessageCallback") {
} else if ((window.parent !== window) && msg.type === "onExternalPluginMessageCallback") {
postMessage(window.parent, msg);
} else
if ( msg.frameEditorId == placeholderId ) {
@ -444,7 +445,7 @@
if (typeof _config.document.fileType === 'string' && _config.document.fileType != '') {
_config.document.fileType = _config.document.fileType.toLowerCase();
var type = /^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots|xlsb)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp)|(doc|docx|doct|odt|gdoc|txt|rtf|pdf|mht|htm|html|epub|djvu|xps|oxps|docm|dot|dotm|dotx|fodt|ott|fb2|xml|oform|docxf))$/
var type = /^(?:(xls|xlsx|ods|csv|gsheet|xlsm|xlt|xltm|xltx|fods|ots|xlsb|sxc|et|ett)|(pps|ppsx|ppt|pptx|odp|gslides|pot|potm|potx|ppsm|pptm|fodp|otp|sxi|dps|dpt)|(doc|docx|odt|gdoc|txt|rtf|pdf|mht|htm|html|mhtml|epub|djvu|xps|oxps|docm|dot|dotm|dotx|fodt|ott|fb2|xml|oform|docxf|sxw|stw|wps|wpt))$/
.exec(_config.document.fileType);
if (!type) {
window.alert("The \"document.fileType\" parameter for the config object is invalid. Please correct it.");

View File

@ -257,12 +257,19 @@ div {
showError();
return;
}
var type;
if (queryParams.embed === "1") {
type = "embedded"
} else if (queryParams.mobile === "1") {
type = "mobile"
} else {
type = "desktop"
}
var fileType = fileInfo.BaseFileName ? fileInfo.BaseFileName.substr(fileInfo.BaseFileName.lastIndexOf('.') + 1) : "";
var config = {
"width": "100%",
"height": "100%",
"type": queryParams.embed==="1" ? "embedded" : "desktop",
"type": type,
"documentType": documentType,
"token": token,
"document": {

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
if (window.Common === undefined)
window.Common = {};

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
if (window.Common === undefined) {
window.Common = {};
@ -323,8 +322,8 @@ if (window.Common === undefined) {
_postMessage({event:'onMakeActionLink', data: config});
},
requestUsers: function () {
_postMessage({event:'onRequestUsers'});
requestUsers: function (command) {
_postMessage({event:'onRequestUsers', data: {c: command}});
},
requestSendNotify: function (emails) {

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
if (Common === undefined)
var Common = {};

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2021
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* 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 = {});

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2021
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2020
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -45,7 +44,10 @@ common.view.SearchBar = new(function() {
var tpl = '<div class="asc-window search-window" style="display: none;">' +
'<div class="body">{body}</div>' +
'</div>';
var tplBody = '<input type="text" id="search-bar-text" placeholder="{textFind}" autocomplete="off">' +
var tplBody = '<div class="search-input-group">' +
'<input type="text" id="search-bar-text" placeholder="{textFind}" autocomplete="off">' +
'<div id="search-bar-results">0/0</div>' +
'</div>' +
'<div class="tools">' +
'<button id="search-bar-back" class="svg-icon search-arrow-up"></button>' +
'<button id="search-bar-next" class="svg-icon search-arrow-down"></button>' +
@ -71,6 +73,13 @@ common.view.SearchBar = new(function() {
$('#search-bar-next').attr({disabled: disable});
},
updateResultsNumber: function (current, all) {
var $results = $('#search-bar-results'),
$input = $('#search-bar-text');
$results.text(!all || $input.val() === '' ? '0/0' : current + 1 + '/' + all);
$input.css('padding-right', $results.outerWidth() + 'px');
},
textFind: 'Find'
};

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* 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 = {});

View File

@ -824,23 +824,38 @@
display: flex;
padding: 16px;
input {
width: 192px;
.search-input-group {
display: flex;
position: relative;
height: 22px;
border-radius: 2px;
box-shadow: none;
border: solid 1px #CFCFCF;
padding: 1px 3px;
color: #444444;
font-size: 11px;
&::placeholder {
color: #CFCFCF;
input {
width: 192px;
height: 100%;
border-radius: 2px;
box-shadow: none;
border: solid 1px #CFCFCF;
padding: 1px 25px 1px 3px;
color: #444444;
font-size: 11px;
&::placeholder {
color: #CFCFCF;
}
&:focus {
border-color: #848484;
outline: 0;
}
}
&:focus {
border-color: #848484;
outline: 0;
#search-bar-results {
position: absolute;
right: 0;
height: 100%;
line-height: 22px;
padding: 0 4px;
color: #A5A5A5;
}
}

View File

@ -1,3 +1,34 @@
/*
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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-6 Ernesta Birznieka-Upish
* 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.Views && (Common.Views = {});

View File

@ -705,6 +705,14 @@
.fontsize(@font-size-large);
}
.font-size-medium {
.fontsize(@font-size-medium);
}
.font-size-huge {
.fontsize(@font-size-huge);
}
.search-bar {
z-index: 50;
}

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
if (Common === undefined) {
var Common = {};
}
@ -171,10 +170,15 @@ Common.Locale = new(function() {
} else require(polyfills, _requireLang);
} else _requireLang();
const _isCurrentRtl = function () {
return false;
};
return {
apply: _applyLocalization,
get: _get,
getCurrentLanguage: _getCurrentLanguage,
isCurrentLanguageRtl: _isCurrentRtl,
getDefaultLanguage: _getDefaultLanguage
};

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ChatMessages.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Comments.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Fonts.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* User: Julia.Radzhabova
* Date: 05.03.15

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* User: Julia.Radzhabova
* Date: 17.05.16

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ReviewChanges.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Created by Julia.Radzhabova on 09.07.15
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Users.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* BaseView.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Button.js
*
@ -237,7 +236,7 @@ define([
var getWidthOfCaption = function (txt) {
var el = document.createElement('span');
el.style.fontSize = '11px';
el.style.fontSize = document.documentElement.style.getPropertyValue("--font-size-base-app-custom") || '11px';
el.style.fontFamily = 'Arial, Helvetica, "Helvetica Neue", sans-serif';
el.style.position = "absolute";
el.style.top = '-1000px';

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
if (Common === undefined)
var Common = {};

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* CheckBox.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
if (Common === undefined)
var Common = {};
@ -62,6 +61,9 @@ define([
};
(this.options.transparent!==undefined) && (config['transparent'] = this.options.transparent);
(this.options.hideEmptyColors!==undefined) && (config['hideEmptyColors'] = this.options.hideEmptyColors);
(this.options.themecolors!==undefined) && (config['themecolors'] = this.options.themecolors);
(this.options.effects!==undefined) && (config['effects'] = this.options.effects);
(this.options.colorHints!==undefined) && (config['colorHints'] = this.options.colorHints);
this.colorPicker = new Common.UI.ThemeColorPalette(config);
this.colorPicker.on('select', _.bind(this.onColorSelect, this));
@ -91,7 +93,7 @@ define([
auto.push({
id: id + '-color-auto',
caption: (typeof options.auto == 'object') ? options.auto.caption || this.textAutoColor : this.textAutoColor,
template: _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon color-auto" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 1px; background-color: #' + this.autocolor + ';"></span><%= caption %></a>')
template: _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon color-auto" style="background-color: #' + this.autocolor + ';"></span><%= caption %></a>')
});
auto.push({caption: '--'});
}

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ColorPalette.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ColorPaletteExt.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ComboBorderSize.js
*
@ -65,7 +64,7 @@ define([
displayValue: null,
pxValue: null,
id: Common.UI.getId(),
offsety: undefined
imgId: undefined
}
}
});
@ -78,7 +77,7 @@ define([
template: _.template([
'<div class="input-group combobox combo-border-size input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">',
'<div class="form-control" style="<%= style %>" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>">',
'<i class="image"></i>',
'<i class="img-line"><svg><use xlink:href="#half-pt"></use></svg></i>',
'<span class="text"></span>',
'</div>',
'<div style="display: table-cell;"></div>',
@ -89,9 +88,11 @@ define([
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">',
'<span><%= item.displayValue %></span>',
'<% if (item.offsety!==undefined) { %>',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" align="right" style="background-position: 0 -<%= item.offsety %>px;">',
'<% } %>',
'<span class="border-line">',
'<svg>',
'<use xlink:href="#<%= item.imgId %>"></use>',
'</svg>',
'</span>',
'</a></li>',
'<% }); %>',
'</ul>',
@ -101,13 +102,13 @@ define([
initialize : function(options) {
var txtPt = Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt),
data = [
{displayValue: '0.5 ' + txtPt, value: 0.5, pxValue: 0.5, offsety: 0},
{displayValue: '1 ' + txtPt, value: 1, pxValue: 1, offsety: 20},
{displayValue: '1.5 ' + txtPt, value: 1.5, pxValue: 2, offsety: 40},
{displayValue: '2.25 ' + txtPt, value: 2.25,pxValue: 3, offsety: 60},
{displayValue: '3 ' + txtPt, value: 3, pxValue: 4, offsety: 80},
{displayValue: '4.5 ' + txtPt, value: 4.5, pxValue: 5, offsety: 100},
{displayValue: '6 ' + txtPt, value: 6, pxValue: 6, offsety: 120}
{displayValue: '0.5 ' + txtPt, value: 0.5, pxValue: 0.5, imgId: 'half-pt'},
{displayValue: '1 ' + txtPt, value: 1, pxValue: 1, imgId: 'one-pt'},
{displayValue: '1.5 ' + txtPt, value: 1.5, pxValue: 2, imgId: 'one-and-half-pt'},
{displayValue: '2.25 ' + txtPt, value: 2.25,pxValue: 3, imgId: 'two-and-quarter-pt'},
{displayValue: '3 ' + txtPt, value: 3, pxValue: 4, imgId: 'three-pt'},
{displayValue: '4.5 ' + txtPt, value: 4.5, pxValue: 6, imgId: 'four-and-half-pt'},
{displayValue: '6 ' + txtPt, value: 6, pxValue: 8, imgId: 'six-pt'}
];
if (options.allowNoBorders !== false)
data.unshift({displayValue: this.txtNoBorders, value: 0, pxValue: 0 });
@ -144,11 +145,13 @@ define([
updateFormControl: function(record) {
var formcontrol = $(this.el).find('.form-control');
var image = formcontrol.find('> .image');
var image = formcontrol.find('> .img-line');
var text = formcontrol.find('> .text');
if (record.get('value')>0) {
image.css('background-position', '10px -' + record.get('offsety') + 'px').show();
var elm = formcontrol.find('use');
(elm.length>0) && elm[0].setAttribute('xlink:href', '#' + record.get('imgId'));
image.show();
text.hide();
} else {
image.hide();
@ -190,10 +193,25 @@ define([
'<ul class="dropdown-menu <%= menuCls %>" style="<%= menuStyle %>" role="menu">',
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">',
'<span><%= item.displayValue %></span>',
'<% if (item.offsety!==undefined) { %>',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" align="right" style="background-position: 0 -<%= item.offsety %>px;">',
'<% if (!isRTL) { %>',
'<span><%= item.displayValue %>' + '</span>',
'<% if (item.imgId!==undefined) { %>',
'<span class="border-line">',
'<svg>',
'<use xlink:href="#<%= item.imgId %>"></use>',
'</svg>',
'</span>',
'<% } %>',
'<% } else { %>',
'<% if (item.imgId!==undefined) { %>',
'<span class="border-line">',
'<svg>',
'<use xlink:href="#<%= item.imgId %>"></use>',
'</svg>',
'</span>',
'<% } %>',
'<span><%= item.displayValue %>' + '</span>',
'<% } %>',
'</a></li>',
'<% }); %>',
'</ul>',
@ -204,13 +222,13 @@ define([
this.txtNoBorders = options.txtNoBorders || this.txtNoBorders;
var txtPt = Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt),
data = [
{displayValue: '0.5 ' + txtPt, value: 0.5, pxValue: 0.5, offsety: 0},
{displayValue: '1 ' + txtPt, value: 1, pxValue: 1, offsety: 20},
{displayValue: '1.5 ' + txtPt, value: 1.5, pxValue: 2, offsety: 40},
{displayValue: '2.25 ' + txtPt, value: 2.25,pxValue: 3, offsety: 60},
{displayValue: '3 ' + txtPt, value: 3, pxValue: 4, offsety: 80},
{displayValue: '4.5 ' + txtPt, value: 4.5, pxValue: 5, offsety: 100},
{displayValue: '6 ' + txtPt, value: 6, pxValue: 6, offsety: 120}
{displayValue: '0.5 ' + txtPt, value: 0.5, pxValue: 0.5, imgId: 'half-pt'},
{displayValue: '1 ' + txtPt, value: 1, pxValue: 1, imgId: 'one-pt'},
{displayValue: '1.5 ' + txtPt, value: 1.5, pxValue: 2, imgId: 'one-and-half-pt'},
{displayValue: '2.25 ' + txtPt, value: 2.25,pxValue: 3, imgId: 'two-and-quarter-pt'},
{displayValue: '3 ' + txtPt, value: 3, pxValue: 4, imgId: 'three-pt'},
{displayValue: '4.5 ' + txtPt, value: 4.5, pxValue: 6, imgId: 'four-and-half-pt'},
{displayValue: '6 ' + txtPt, value: 6, pxValue: 8, imgId: 'six-pt'}
];
if (options.allowNoBorders !== false)
@ -234,9 +252,9 @@ define([
Common.UI.ComboBorderType = Common.UI.ComboBorderSize.extend(_.extend({
template: _.template([
'<div class="input-group combobox combo-border-size input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">',
'<div class="input-group combobox combo-border-size combo-border-type input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">',
'<div class="form-control" style="<%= style %>" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>">',
'<i class="image"></i>',
'<i class="img-line"><svg><use xlink:href="#solid"></use></svg></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">',
@ -244,10 +262,11 @@ define([
'</button>',
'<ul class="dropdown-menu <%= menuCls %>" style="<%= menuStyle %>" role="menu">',
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem" style="padding: 2px 0 2px 10px;">',
'<span style="margin-top: 0;"></span>',
'<% if (item.offsety!==undefined) { %>',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" align="left" style="background-position: 0 -<%= item.offsety %>px;">',
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">',
'<% if (item.imgId!==undefined) { %>',
'<span>',
'<svg><use xlink:href="#<%= item.imgId %>"></use></svg>',
'</span>',
'<% } %>',
'</a></li>',
'<% }); %>',
@ -259,14 +278,14 @@ define([
Common.UI.ComboBorderSize.prototype.initialize.call(this, _.extend({
store: new Common.UI.BordersStore(),
data: [
{value: Asc.c_oDashType.solid, offsety: 140},
{value: Asc.c_oDashType.sysDot, offsety: 160},
{value: Asc.c_oDashType.sysDash, offsety: 180},
{value: Asc.c_oDashType.dash, offsety: 200},
{value: Asc.c_oDashType.dashDot, offsety: 220},
{value: Asc.c_oDashType.lgDash, offsety: 240},
{value: Asc.c_oDashType.lgDashDot, offsety: 260},
{value: Asc.c_oDashType.lgDashDotDot, offsety: 280}
{value: Asc.c_oDashType.solid, imgId: "solid"},
{value: Asc.c_oDashType.sysDot, imgId: 'dots'},
{value: Asc.c_oDashType.sysDash, imgId: 'dashes'},
{value: Asc.c_oDashType.dash, imgId: 'dashes-spaced'},
{value: Asc.c_oDashType.dashDot, imgId: 'dash-dot'},
{value: Asc.c_oDashType.lgDash, imgId: 'dashes-wide'},
{value: Asc.c_oDashType.lgDashDot, imgId: 'wide-dash-dot'},
{value: Asc.c_oDashType.lgDashDotDot, imgId: 'wide-dash-dot-dot'}
]
}, options));
},
@ -277,11 +296,18 @@ define([
},
updateFormControl: function(record) {
if (record)
$(this.el).find('.form-control > .image')
.css('background-position', '10px -' + record.get('offsety') + 'px').show();
if (record) {
var elm = $(this.el).find('.form-control > .img-line use');
if(elm.length) {
var height = Math.ceil(record.get('pxValue'));
height = height ? height : 3;
elm[0].setAttribute('xlink:href', '#' + record.get('imgId'));
elm.parent().css('height', height + 'px');
}
$(this.el).find('.form-control > .img-line').show();
}
else
$(this.el).find('.form-control > .image').hide();
$(this.el).find('.form-control > .img-line').hide();
},
setValue: function(value) {
@ -300,9 +326,9 @@ define([
Common.UI.ComboBoxColor = Common.UI.ComboBox.extend(_.extend({
template: _.template([
'<div class="input-group combobox combo-color input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">',
'<div class="form-control" style="padding:2px 14px 2px 3px; <%= style %> display: block;">',
'<div style="display: inline-block;overflow: hidden;width: 100%;height: 100%;"></div>',
'<div class="input-group combobox combo-color combobox-color input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">',
'<div class="form-control" style="<%= style %>">',
'<div></div>',
'</div>',
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">',
'<span class="caret"></span>',
@ -313,7 +339,7 @@ define([
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem"><%= scope.getDisplayValue(item) %></a></li>',
'<% } else { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>">',
'<a tabindex="-1" type="menuitem" style="padding: 5px;"><div style="height: 15px;<%= item.styleStr %>"><%= scope.getDisplayValue(item) %></div></a>',
'<a tabindex="-1" type="menuitem"><div style="<%= item.styleStr %>"><%= scope.getDisplayValue(item) %></div></a>',
'</li>',
'<% } %>',
'<% }); %>',
@ -380,7 +406,7 @@ define([
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem"><%= scope.getDisplayValue(item) %></a></li>',
'<% } else { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>">',
'<a tabindex="-1" type="menuitem" style="padding: 5px;"><div style="height: 15px;<%= item.styleStr %>"><%= scope.getDisplayValue(item) %></div></a>',
'<a tabindex="-1" type="menuitem""><div style="<%= item.styleStr %>"><%= scope.getDisplayValue(item) %></div></a>',
'</li>',
'<% } %>',
'<% }); %>'
@ -407,9 +433,9 @@ define([
Common.UI.ComboBoxIcons= Common.UI.ComboBox.extend(_.extend({
template: _.template([
'<div class="input-group combobox combo-color input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">',
'<div class="form-control" style="padding:2px 0 2px 3px; <%= style %> display: block;">',
'<div style="display: inline-block;overflow: hidden;width: 100%;height: 100%;"></div>',
'<div class="input-group combobox combobox-icons combo-color input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">',
'<div class="form-control" style="<%= style %>">',
'<div></div>',
'</div>',
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">',
'<span class="caret"></span>',
@ -420,9 +446,9 @@ define([
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem"><%= scope.getDisplayValue(item) %></a></li>',
'<% } else { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>">',
'<a tabindex="-1" type="menuitem" style="padding: 5px;">',
'<a tabindex="-1" type="menuitem">',
'<% _.each(item.data.iconSet, function(icon) { %>',
'<img src="<%= item.data.icons.at(icon-1).get(\'icon\') %>" style="width:16px;height:16px;margin-right: 5px;">',
'<img src="<%= item.data.icons.at(icon-1).get(\'icon\') %>">',
'<% }) %>',
'</a>',
'</li>',
@ -454,7 +480,7 @@ define([
if (record.get('value')!=-1) {
var str = '';
_.each(record.get('data').iconSet, function(icon) {
str += '<img src="' + record.get('data').icons.at(icon-1).get("icon") + '" style="width:16px;height:16px;margin-right: 5px;">';
str += '<img src="' + record.get('data').icons.at(icon-1).get("icon") + '">';
});
formcontrol[0].innerHTML = str;
formcontrol.css({'margin-top': '0'});
@ -495,7 +521,7 @@ define([
'<li id="<%= item.id %>" data-value="<%= item.value %>">',
'<a tabindex="-1" type="menuitem" style="padding: 5px;">',
'<% _.each(item.data.iconSet, function(icon) { %>',
'<img src="<%= item.data.icons.at(icon-1).get(\'icon\') %>" style="width:16px;height:16px;margin-right: 5px;">',
'<img src="<%= item.data.icons.at(icon-1).get(\'icon\') %>">',
'<% }) %>',
'</a>',
'</li>',

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ComboBox.js
*
@ -86,6 +85,7 @@ define([
displayField: 'displayValue',
valueField : 'value',
search : false,
placeHolder : '',
scrollAlwaysVisible: false,
takeFocusOnClose: false,
dataHint: '',
@ -95,7 +95,7 @@ define([
template: _.template([
'<span class="input-group combobox <%= cls %>" id="<%= id %>" style="<%= style %>">',
'<input type="text" class="form-control" spellcheck="false" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>">',
'<input type="text" class="form-control" spellcheck="false" placeholder="<%= placeHolder %>" data-hint="<%= dataHint %>" data-hint-direction="<%= dataHintDirection %>" data-hint-offset="<%= dataHintOffset %>">',
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">',
'<span class="caret"></span>',
'</button>',
@ -125,8 +125,10 @@ define([
this.store = me.options.store || new Common.UI.ComboBoxStore();
this.displayField = me.options.displayField;
this.valueField = me.options.valueField;
this.placeHolder = me.options.placeHolder;
this.search = me.options.search;
this.scrollAlwaysVisible = me.options.scrollAlwaysVisible;
this.focusWhenNoSelection = (me.options.focusWhenNoSelection!==false);
me.rendered = me.options.rendered || false;
this.lastValue = null;
@ -151,9 +153,11 @@ define([
menuStyle : this.menuStyle,
items : items,
scope : me,
placeHolder : this.placeHolder,
dataHint : this.options.dataHint,
dataHintDirection: this.options.dataHintDirection,
dataHintOffset: this.options.dataHintOffset
dataHintOffset: this.options.dataHintOffset,
isRTL : Common.UI.isRTL()
}));
if (this.itemsTemplate)
this.cmpEl.find('ul').html(
@ -183,6 +187,7 @@ define([
if (this.editable) {
el.on('change', 'input', _.bind(this.onInputChanged, this));
el.on('input', 'input', _.bind(this.onInputChanging, this));
el.on('keydown', 'input', _.bind(this.onInputKeyDown, this));
el.on('focusin', 'input', _.bind(this.onInputFocusIn, this));
el.on('click', '.form-control', _.bind(this.onEditableInputClick, this));
@ -261,6 +266,8 @@ define([
},
openMenu: function(delay) {
if (this.store.length<1) return;
var me = this;
if ( !this.scroller ) {
@ -336,7 +343,7 @@ define([
$list.scrollTop(height);
}
setTimeout(function(){$selected.find('a').focus();}, 1);
} else {
} else if (this.focusWhenNoSelection) {
var me = this;
setTimeout(function(){me.cmpEl.find('ul li:first a').focus();}, 1);
}
@ -344,7 +351,7 @@ define([
if (this.scroller)
this.scroller.update({alwaysVisibleY: this.scrollAlwaysVisible});
this.trigger('show:after', this, e);
this.trigger('show:after', this, e, {fromKeyDown: e===undefined});
this._search = {};
},
@ -373,8 +380,12 @@ define([
this.openMenu();
this.onAfterShowMenu();
return false;
}
else if (e.keyCode == Common.UI.Keys.RETURN && (this.editable || this.isMenuOpen())) {
} else if (!this.focusWhenNoSelection && (e.keyCode == Common.UI.Keys.DOWN || e.keyCode == Common.UI.Keys.UP)) {
var $items = this.cmpEl.find('ul > li a');
if ($items.filter(':focus').length===0 && $items.length>0) {
setTimeout(function(){$items[e.keyCode == Common.UI.Keys.DOWN ? 0 : $items.length-1].focus();}, 1);
}
} else if (e.keyCode == Common.UI.Keys.RETURN && (this.editable || this.isMenuOpen())) {
var isopen = this.isMenuOpen();
$(e.target).click();
if (this.rendered) {
@ -459,8 +470,10 @@ define([
this.closeMenu();
this.onAfterHideMenu(e);
} else if (e.keyCode == Common.UI.Keys.UP || e.keyCode == Common.UI.Keys.DOWN) {
if (!this.isMenuOpen())
if (!this.isMenuOpen()) {
this.openMenu();
this.onAfterShowMenu();
}
_.delay(function() {
me._skipInputChange = true;
@ -515,6 +528,16 @@ define([
this.trigger('changed:after', this, record, e);
},
onInputChanging: function(e, extra) {
var newValue = $(e.target).val();
if (e.isDefaultPrevented())
return;
// trigger changing event
this.trigger('changing', this, newValue, e);
},
onInputClick: function(e) {
if (this._button)
this._button.dropdown('toggle');
@ -637,6 +660,11 @@ define([
$('#' + this._selectedItem.get('id'), $(this.el)).addClass('selected');
},
clearSelection: function (){
$('.selected', $(this.el)).removeClass('selected');
this._selectedItem = null;
},
itemClicked: function (e) {
var el = $(e.target).closest('li');

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ComboBoxFonts.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ComboDataView.js
*
@ -115,7 +114,7 @@ define([
this.openButton = new Common.UI.Button({
cls: 'open-menu',
menu: new Common.UI.Menu({
menuAlign: 'tl-tl',
menuAlign: Common.UI.isRTL() ? 'tr-tr' : 'tl-tl',
offset: [0, 3],
items: [
{template: _.template('<div class="menu-picker-container"></div>')}
@ -299,7 +298,7 @@ define([
var itemMargins = parseFloat(itemEl.css('margin-left')) + parseFloat(itemEl.css('margin-right'));
var fieldPickerEl = this.fieldPicker.$el;
var fieldPickerPadding = parseFloat(fieldPickerEl.css('padding-right'));
var fieldPickerPadding = parseFloat(fieldPickerEl.css(Common.UI.isRTL() ? 'padding-left' : 'padding-right'));
var fieldPickerBorder = parseFloat(fieldPickerEl.css('border-width'));
var dataviewPaddings = parseFloat(this.fieldPicker.$el.find('.dataview').css('padding-left')) + parseFloat(this.fieldPicker.$el.find('.dataview').css('padding-right'));

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ComboDataView.js
*
@ -368,7 +367,10 @@ define([
if (menu.cmpEl) {
menu.menuAlignEl = this.cmpEl;
var offset = this.cmpEl.width() - this.openButton.$el.width() - this.menuWidth + 1;
menu.setOffset(Math.min(offset, 0));
if (Common.UI.isRTL()) {
offset = this.openButton.$el.width() - 1;
}
menu.setOffset(Common.UI.isRTL() ? offset : Math.min(offset, 0));
}
if (this.options.hint) {

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* DataView.js
*
@ -224,6 +223,7 @@ define([
allowScrollbar: true,
scrollAlwaysVisible: false,
minScrollbarLength: 40,
scrollYStyle: null,
showLast: true,
useBSKeydown: false,
cls: ''
@ -274,6 +274,7 @@ define([
me.allowScrollbar = (me.options.allowScrollbar!==undefined) ? me.options.allowScrollbar : true;
me.scrollAlwaysVisible = me.options.scrollAlwaysVisible || false;
me.minScrollbarLength = me.options.minScrollbarLength || 40;
me.scrollYStyle = me.options.scrollYStyle;
me.tabindex = me.options.tabindex || 0;
me.delayRenderTips = me.options.delayRenderTips || false;
if (me.parentMenu)
@ -359,6 +360,7 @@ define([
el: $(this.el).find('.inner').addBack().filter('.inner'),
useKeyboard: this.enableKeyEvents && !this.handleSelect,
minScrollbarLength : this.minScrollbarLength,
scrollYStyle: this.scrollYStyle,
wheelSpeed: 10,
alwaysVisibleY: this.scrollAlwaysVisible
});
@ -559,6 +561,8 @@ define([
},
onResetItems: function() {
this.trigger('reset:before', this);
_.each(this.dataViewItems, function(item) {
var tip = item.$el.data('bs.tooltip');
if (tip) {
@ -599,6 +603,7 @@ define([
el: $(this.el).find('.inner').addBack().filter('.inner'),
useKeyboard: this.enableKeyEvents && !this.handleSelect,
minScrollbarLength : this.minScrollbarLength,
scrollYStyle: this.scrollYStyle,
wheelSpeed: 10,
alwaysVisibleY: this.scrollAlwaysVisible
});
@ -703,10 +708,10 @@ define([
}
},
scrollToRecord: function (record, force) {
scrollToRecord: function (record, force, offsetTop) {
if (!record) return;
var innerEl = $(this.el).find('.inner'),
inner_top = innerEl.offset().top,
inner_top = innerEl.offset().top + (offsetTop ? offsetTop : 0),
idx = _.indexOf(this.store.models, record),
div = (idx>=0 && this.dataViewItems.length>idx) ? $(this.dataViewItems[idx].el) : innerEl.find('#' + record.get('id'));
if (div.length<=0) return;
@ -1066,6 +1071,7 @@ define([
el: $(this.el).find('.inner').addBack().filter('.inner'),
useKeyboard: this.enableKeyEvents && !this.handleSelect,
minScrollbarLength : this.minScrollbarLength,
scrollYStyle: this.scrollYStyle,
wheelSpeed: 10,
alwaysVisibleY: this.scrollAlwaysVisible
});
@ -1158,6 +1164,7 @@ define([
el: $(this.el).find('.inner').addBack().filter('.inner'),
useKeyboard: this.enableKeyEvents && !this.handleSelect,
minScrollbarLength : this.minScrollbarLength,
scrollYStyle: this.scrollYStyle,
wheelSpeed: 10,
alwaysVisibleY: this.scrollAlwaysVisible
});

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* DimensionPicker.js
*
@ -53,12 +52,13 @@ define([
minRows : 5,
minColumns : 5,
maxRows : 20,
maxColumns : 20
maxColumns : 20,
direction : undefined // 'left', 'right'
},
template:_.template([
'<div style="width: 100%; height: 100%;">',
'<div class="dimension-picker-status">0x0</div>',
'<div dir="ltr" class="dimension-picker-status">0x0</div>',
'<div class="dimension-picker-observecontainer">',
'<div class="dimension-picker-mousecatcher"></div>',
'<div class="dimension-picker-unhighlighted"></div>',
@ -84,12 +84,24 @@ define([
me.maxRows = me.options.maxRows;
me.maxColumns = me.options.maxColumns;
me.direction = me.options.direction;
if (Common.UI.isRTL() && !me.direction) {
me.direction = 'right';
}
me.curColumns = 0;
me.curRows = 0;
var onMouseMove = function(event){
var offsetX;
if (me.direction === 'right' && me.areaMouseCatcher) {
var width = me.areaMouseCatcher.width();
offsetX = event.offsetX === undefined ? (width - event.originalEvent.layerX) : (width - event.offsetX)*Common.Utils.zoom()
} else {
offsetX = event.offsetX === undefined ? event.originalEvent.layerX : event.offsetX*Common.Utils.zoom();
}
me.setTableSize(
Math.ceil((event.offsetX === undefined ? event.originalEvent.layerX : event.offsetX*Common.Utils.zoom()) / me.itemSize),
Math.ceil(offsetX / me.itemSize),
Math.ceil((event.offsetY === undefined ? event.originalEvent.layerY : event.offsetY*Common.Utils.zoom()) / me.itemSize),
event
);
@ -104,27 +116,31 @@ define([
};
if (rootEl){
var areaMouseCatcher = rootEl.find('.dimension-picker-mousecatcher');
me.areaMouseCatcher = rootEl.find('.dimension-picker-mousecatcher');
me.areaUnHighLighted = rootEl.find('.dimension-picker-unhighlighted');
me.areaHighLighted = rootEl.find('.dimension-picker-highlighted');
me.areaStatus = rootEl.find('.dimension-picker-status');
rootEl.css({width: me.minColumns + 'em'});
areaMouseCatcher.css('z-index', 1);
areaMouseCatcher.width(me.maxColumns + 'em').height(me.maxRows + 'em');
me.areaMouseCatcher.css('z-index', 1);
me.areaMouseCatcher.width(me.maxColumns + 'em').height(me.maxRows + 'em');
me.areaUnHighLighted.width(me.minColumns + 'em').height(me.minRows + 'em');
me.areaStatus.html(me.curColumns + ' x ' + me.curRows);
me.areaStatus.html(!Common.UI.isRTL() ? this.curColumns + ' x ' + this.curRows : this.curRows + ' x ' + this.curColumns);
me.areaStatus.width(me.areaUnHighLighted.width());
areaMouseCatcher.on('mousemove', onMouseMove);
me.areaMouseCatcher.on('mousemove', onMouseMove);
me.areaHighLighted.on('mousemove', onMouseMove);
me.areaUnHighLighted.on('mousemove', onMouseMove);
areaMouseCatcher.on('mouseleave', onMouseLeave);
me.areaMouseCatcher.on('mouseleave', onMouseLeave);
me.areaHighLighted.on('mouseleave', onMouseLeave);
me.areaUnHighLighted.on('mouseleave', onMouseLeave);
areaMouseCatcher.on('click', onHighLightedMouseClick);
me.areaMouseCatcher.on('click', onHighLightedMouseClick);
me.areaHighLighted.on('click', onHighLightedMouseClick);
me.areaUnHighLighted.on('click', onHighLightedMouseClick);
if (me.direction === 'right') {
me.areaHighLighted.css({left: 'auto', right: '0'});
}
}
},
@ -157,7 +173,7 @@ define([
);
this.cmpEl.width(this.areaUnHighLighted.width());
this.areaStatus.html(this.curColumns + ' x ' + this.curRows);
this.areaStatus.html(!Common.UI.isRTL() ? this.curColumns + ' x ' + this.curRows : this.curRows + ' x ' + this.curColumns);
this.areaStatus.width(this.areaUnHighLighted.width());
this.trigger('change', this, this.curColumns, this.curRows, event);

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
if (Common === undefined)
var Common = {};

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* InputField.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2022
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Label.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Layout.js
*
@ -261,7 +260,7 @@ define([
var panel = e.data.panel;
this.resize.type = e.data.type;
this.resize.$el = panel.el;
this.resize.min = panel.minpos;
this.resize.min = panel.minpos > 0 ? panel.minpos : this.resize.$el.parent().width() + panel.minpos;
this.resize.fmin = panel.fmin;
this.resize.fmax = panel.fmax;
this.resize.behaviour = panel.behaviour;
@ -365,15 +364,15 @@ define([
oldValue = parseInt(panel.css(prop));
} else {
panel = this.resize.$el.next();
next = this.resize.$el.next();
next = this.resize.$el.prev();
oldValue = parseInt(panel.css(prop));
value = panel.parent()[prop]() - (value + this.resize[prop]);
}
if (this.resize.type == 'vertical')
value -= panel.position().top;
if (this.resize.type == 'horizontal')
value -= panel.position().left;
// if (this.resize.type == 'horizontal')
// value -= panel.position().left;
panel.css(prop, value + 'px');

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ListView.js
*
@ -53,19 +52,180 @@ define([
enableKeyEvents: true,
showLast: true,
simpleAddMode: false,
headers: [], //{name: 'string', width: 'number'(optional for last), sortType: 'string'(optional), style: 'string'(optional)} ---> example {name:text, width: 100, sortType: name, style: 'margin-left:10px;}
initSort: null, //{type: 'string', direction: -1 or 1} ---> example {type:name, direction:1}
keyMoveDirection: 'vertical',
itemTemplate: _.template('<div id="<%= id %>" class="list-item" style=""><%= value %></div>'),
cls: ''
},
template: _.template([
'<div class="listview inner <%= cls %>" <% if (options.dataHint) { %> data-hint="<%= options.dataHint %>" <% } if (options.dataHintDirection) { %> data-hint-direction="<%= options.dataHintDirection %>" <% } if (options.dataHintOffset) { %> data-hint-offset="<%= options.dataHintOffset %>" <% } %>></div>'
'<div class="listview inner <%= cls %>" <% if (options.dataHint) { %> data-hint="<%= options.dataHint %>" <% } if (options.dataHintDirection) { %> data-hint-direction="<%= options.dataHintDirection %>" <% } if (options.dataHintOffset) { %> data-hint-offset="<%= options.dataHintOffset %>" <% } %>>',
'</div>'
].join('')),
initialize : function(options) {
if(this.options.initSort != null) {
this.activeSortType = this.options.initSort.type;
this.sortDirection = this.options.initSort.direction;
}
this.headerEl = null;
this.headerHeight = 0;
Common.UI.DataView.prototype.initialize.call(this, options);
},
render: function() {
(this.options.headers.length > 0) && (this.insertHeaders());
Common.UI.DataView.prototype.render.call(this);
},
insertHeaders: function() {
var template = _.template([
'<div class="listview-table-header-wrapper">',
'<div class="listview-table-header">',
'<% _.each(headers, function(header){ %>',
'<%if (header.sortType) { %>',
'<div class="table-header-item" style="<% if (header.width) {%>width: <%=header.width%>px; <%}%> <% if (header.style) { %> <%= header.style %> <%}%>" sort-type="<%=header.sortType%>">',
'<div class="header-sorted-wrapper">',
'<span class="header-sorted">',
'<label><%= header.name %></label>',
'<span class="sort-direction caret <%if (sortDirection == -1) { %>sort-desc <% } if (activeSortType != header.sortType) { %>caret-hidden<%}%>"></span>',
'</span>',
'</div>',
'</div>',
'<%} else { %>',
'<label class="table-header-item" style="<% if (header.width) {%>width: <%=header.width%>px; <%}%> <% if (header.style) { %> <%= header.style %> <%}%>"><%= header.name %></label>',
'<%}%>',
'<% }); %>',
'</div>',
'</div>'
].join(''))({
headers: this.options.headers,
activeSortType: this.options.initSort ? this.options.initSort.type : null,
sortDirection: this.options.initSort ? this.options.initSort.direction : null,
});
this.$el.before(template);
var me = this,
headerEl = this.$el.prev().children();
//Calculating the width of a multiline label in sort header
for(var i = 0, sortHeaderIndex = 0; i < this.options.headers.length; i++){
var header = this.options.headers[i];
if(header.sortType){
var headerWords = header.name.split(' '),
labelEl = $(headerEl.find('.table-header-item .header-sorted label')[sortHeaderIndex]),
tempEl = $('<label>A</label>');
me.$el.before(tempEl);
if(headerWords.length > 1 && labelEl.height() > Math.ceil(tempEl.height())) {
var maxWidthWord = 0;
headerWords.forEach(function(word) {
tempEl.text(word);
(tempEl.width() > maxWidthWord) && (maxWidthWord = tempEl.width());
});
(maxWidthWord < labelEl.width()) && labelEl.width(maxWidthWord);
}
tempEl.remove();
sortHeaderIndex++;
}
};
headerEl.find('.table-header-item .header-sorted').on('click', function(e) {
var selectedSortType = $(e.currentTarget).parent().parent().attr('sort-type'),
curCaretEl = $(e.currentTarget).find('.caret');
if(me.activeSortType === selectedSortType){
me.sortDirection = -me.sortDirection
}
else {
me.activeSortType = selectedSortType;
me.sortDirection = 1;
}
headerEl.find('.caret').addClass('caret-hidden');
if(curCaretEl.removeClass('caret-hidden'));
if(me.sortDirection == -1)
curCaretEl.addClass('sort-desc');
else
curCaretEl.removeClass('sort-desc');
me.trigger('header:click', me.activeSortType, me.sortDirection);
});
if(this.tabindex != 0 && this.handleSelect){
headerEl.on('click', function(e) {
me.focus();
});
var onMouseDown = function (e) {
me.$el.find('.inner').addClass('focused');
$(document).on('mouseup', onMouseUp);
};
var onMouseUp = function (e) {
me.focus();
me.$el.find('.inner').removeClass('focused');
$(document).off('mouseup', onMouseUp);
};
headerEl.on('mousedown', onMouseDown);
}
this.headerEl = headerEl;
this.calcOffsetFromHeader()
},
setHeaderName: function(index, name) {
if(index < 0 || index > this.options.headers.length - 1 || !this.headerEl) return;
var labelEl = $(this.headerEl.find('.table-header-item')[index]);
if(labelEl.attr('sort-type')) {
labelEl = labelEl.find('label')[0];
}
this.options.headers[index].name = name;
labelEl.text(name);
},
setHeaderWidth: function(index, width) {
if(index < 0 || index > this.options.headers.length - 1 || !this.headerEl) return;
var labelEl = $(this.headerEl.find('.table-header-item')[index]);
if(labelEl.attr('sort-type')) {
labelEl = labelEl.find('label')[0];
}
this.options.headers[index].width = width;
$(labelEl).width(width);
},
calcOffsetFromHeader: function() {
if(!this.headerEl) return;
var headerHeight = Math.floor(this.headerEl.outerHeight());
this.headerHeight = headerHeight;
this.scrollYStyle = _.extend({}, this.scrollYStyle, {'margin-top': headerHeight+1 + 'px'});
},
setOffsetFromHeader: function(isCalcNewHeaderHeight) {
if(!this.headerEl) return;
if(isCalcNewHeaderHeight === true){
this.calcOffsetFromHeader();
}
this.$el.find('.listview').css({'padding-top': this.headerHeight + 'px'});
this.scroller.update(isCalcNewHeaderHeight ? {scrollYStyle: this.scrollYStyle} : undefined);
},
onResetItems : function() {
this.innerEl = null;
Common.UI.DataView.prototype.onResetItems.call(this);
this.trigger('items:reset', this);
if(this.headerEl) {
this.setOffsetFromHeader();
}
},
createNewItem: function(record) {
@ -88,7 +248,7 @@ define([
this.dataViewItems.push(view);
} else {
var idx = _.indexOf(this.store.models, record);
var innerDivs = this.innerEl.find('> div');
var innerDivs = this.innerEl.find('> .item');
if (idx > 0)
$(innerDivs.get(idx - 1)).after(view.render().el);
@ -124,7 +284,7 @@ define([
scrollToRecord: function (record, force) {
if (!this._fromKeyDown) {
Common.UI.DataView.prototype.scrollToRecord.call(this, record, force);
Common.UI.DataView.prototype.scrollToRecord.call(this, record, force, this.headerHeight);
return;
}
@ -137,10 +297,12 @@ define([
var div_top = div.position().top,
div_height = div.outerHeight(),
div_first = this.dataViewItems[0].el,
div_first_top = div_first ? div_first.offsetTop : 0,
newpos;
if (force || div_top<0)
newpos = innerEl.scrollTop() + div_top;
if (force || div_top<div_first_top)
newpos = innerEl.scrollTop() + div_top - div_first_top;
else if (div_top+div_height>innerHeight)
newpos = innerEl.scrollTop() + div_top + div_height - innerHeight;

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* LoadMask.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
if (Common === undefined)
var Common = {};

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Menu.js
*
@ -150,7 +149,9 @@ define([
offset : [0, 0],
cyclic : true,
search : false,
scrollAlwaysVisible: true
scrollAlwaysVisible: true,
scrollToCheckedItem: true, // if true - scroll menu to checked item on menu show
focusToCheckedItem: false // if true - move focus to checked item on menu show
},
template: _.template([
@ -173,6 +174,18 @@ define([
this.search = this.options.search;
this.outerMenu = this.options.outerMenu;
if (Common.UI.isRTL()) {
if (this.menuAlign === 'tl-tr') {
this.menuAlign = 'tr-tl';
} else if (this.menuAlign === 'tl-bl') {
this.menuAlign = 'tr-br';
} else if (this.menuAlign === 'tr-br') {
this.menuAlign = 'tl-bl';
} else if (this.menuAlign === 'bl-tl') {
this.menuAlign = 'br-tr';
}
}
if (this.options.restoreHeight) {
this.options.restoreHeight = (typeof (this.options.restoreHeight) == "number") ? this.options.restoreHeight : (this.options.maxHeight ? this.options.maxHeight : 100000);
!this.options.maxHeight && (this.options.maxHeight = this.options.restoreHeight);
@ -396,12 +409,12 @@ define([
var itemTop = $selected.position().top,
itemHeight = $selected.outerHeight(),
listHeight = menuRoot.outerHeight();
if (itemTop < 0 || itemTop + itemHeight > listHeight) {
if (!!this.options.scrollToCheckedItem && (itemTop < 0 || itemTop + itemHeight > listHeight)) {
var height = menuRoot.scrollTop() + itemTop + (itemHeight - listHeight)/2;
height = (Math.floor(height/itemHeight) * itemHeight);
menuRoot.scrollTop(height);
}
setTimeout(function(){$selected.focus();}, 1);
!!this.options.focusToCheckedItem && setTimeout(function(){$selected.focus();}, 1);
}
}
this._search = {};
@ -645,12 +658,19 @@ define([
var left = offset.left - posMenu[m[1]][0] + posParent[m[2]][0] + this.offset[0];
var top = offset.top - posMenu[m[1]][1] + posParent[m[2]][1] + this.offset[1];
if (left + menuW > docW)
if (left + menuW > docW) {
if (menuParent.is('li.dropdown-submenu')) {
left = offset.left - menuW + 2;
} else {
left = docW - menuW;
}
} else if (left < 0) {
if (menuParent.is('li.dropdown-submenu')) {
left = offset.left + parentW - 2;
} else {
left = 0;
}
}
if (left < 0)
left = 0;
@ -749,7 +769,9 @@ define([
offset : [0, 0],
cyclic : true,
search : false,
scrollAlwaysVisible: true
scrollAlwaysVisible: true,
scrollToCheckedItem: true, // if true - scroll menu to checked item on menu show
focusToCheckedItem: false // if true - move focus to checked item on menu show
},
template: _.template([
@ -787,6 +809,18 @@ define([
this.scrollAlwaysVisible = this.options.scrollAlwaysVisible;
this.search = this.options.search;
if (Common.UI.isRTL()) {
if (this.menuAlign === 'tl-tr') {
this.menuAlign = 'tr-tl';
} else if (this.menuAlign === 'tl-bl') {
this.menuAlign = 'tr-br';
} else if (this.menuAlign === 'tr-br') {
this.menuAlign = 'tl-bl';
} else if (this.menuAlign === 'bl-tl') {
this.menuAlign = 'br-tr';
}
}
if (this.options.restoreHeight) {
this.options.restoreHeight = (typeof (this.options.restoreHeight) == "number") ? this.options.restoreHeight : (this.options.maxHeight ? this.options.maxHeight : 100000);
!this.options.maxHeight && (this.options.maxHeight = this.options.restoreHeight);
@ -999,12 +1033,12 @@ define([
var itemTop = $selected.position().top,
itemHeight = $selected.outerHeight(),
listHeight = menuRoot.outerHeight();
if (itemTop < 0 || itemTop + itemHeight > listHeight) {
if (!!this.options.scrollToCheckedItem && (itemTop < 0 || itemTop + itemHeight > listHeight)) {
var height = menuRoot.scrollTop() + itemTop + (itemHeight - listHeight)/2;
height = (Math.floor(height/itemHeight) * itemHeight);
menuRoot.scrollTop(height);
}
setTimeout(function(){$selected.focus();}, 1);
!!this.options.focusToCheckedItem && setTimeout(function(){$selected.focus();}, 1);
}
}
this._search = {};
@ -1139,12 +1173,21 @@ define([
var left = offset.left - posMenu[m[1]][0] + posParent[m[2]][0] + this.offset[0];
var top = offset.top - posMenu[m[1]][1] + posParent[m[2]][1] + this.offset[1];
if (left + menuW > docW)
if (left + menuW > docW) {
if (menuParent.is('li.dropdown-submenu')) {
left = offset.left - menuW + 2;
} else {
left = docW - menuW;
}
} else if (left < 0) {
if (menuParent.is('li.dropdown-submenu')) {
left = offset.left + parentW - 2;
} else {
left = 0;
}
}
if (left < 0)
left = 0;
if (this.options.restoreHeight) {
if (typeof (this.options.restoreHeight) == "number") {

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* MenuItem.js
*
@ -246,7 +245,7 @@ define([
this.caption = caption;
if (this.rendered)
this.cmpEl.find('a').contents().last()[0].textContent = (noencoding) ? caption : Common.Utils.String.htmlEncode(caption);
this.cmpEl.find('> a').contents().last()[0].textContent = (noencoding) ? caption : Common.Utils.String.htmlEncode(caption);
},
setIconCls: function(iconCls) {
@ -392,6 +391,28 @@ define([
}
}
}
},
setMenu: function (m) {
if (m && _.isObject(m) && _.isFunction(m.render)){
if (this.rendered) {
if (this.menu && (this.menu instanceof Common.UI.Menu || this.menu instanceof Common.UI.MenuSimple)) {
Common.UI.Menu.Manager.unregister(this.menu);
this.menu.cmpEl && this.menu.cmpEl.remove();
}
this.menu = m;
var el = this.cmpEl;
el.addClass('dropdown-submenu');
this.menu.render(el);
el.mouseenter(_.bind(this.menu.alignPosition, this.menu));
el.focusout(_.bind(this.onBlurItem, this));
el.hover(
_.bind(this.onHoverItem, this),
_.bind(this.onUnHoverItem, this)
);
} else
this.menu = m;
}
}
});

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* MetricSpinner.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -56,7 +55,7 @@ define([
var onScrollTabs = function(opts, e) {
var sv = $boxTabs.scrollLeft();
if ( sv || opts == 'right' ) {
if (sv || opts == 'right' || Common.UI.isRTL() && opts == 'left') {
$boxTabs.animate({scrollLeft: opts == 'left' ? sv - 100 : sv + 100}, 200);
}
};
@ -93,6 +92,7 @@ define([
Common.UI.BaseView.prototype.initialize.call(this, options);
var _template_tabs =
!Common.UI.isRTL() ?
'<section class="tabs">' +
'<a class="scroll left" data-hint="0" data-hint-direction="bottom" data-hint-offset="-7, 0" data-hint-title="V"></a>' +
'<ul>' +
@ -108,10 +108,27 @@ define([
'<% } %>' +
'</ul>' +
'<a class="scroll right" data-hint="0" data-hint-direction="bottom" data-hint-offset="-7, 0" data-hint-title="R"></a>' +
'</section>' :
'<section class="tabs">' +
'<a class="scroll right" data-hint="0" data-hint-direction="bottom" data-hint-offset="-7, 0" data-hint-title="R"></a>' +
'<ul>' +
'<% for(var i in items) { %>' +
'<% if (typeof items[i] == "object") { %>' +
'<li class="ribtab' +
'<% if (items[i].haspanel===false) print(" x-lone") %>' +
'<% if (items[i].extcls) print(\' \' + items[i].extcls) %>"' +
'<% if (typeof items[i].layoutname == "string") print(" data-layout-name=" + \' \' + items[i].layoutname) + \' \' %>>' +
'<a data-tab="<%= items[i].action %>" data-title="<%= items[i].caption %>" data-hint="0" data-hint-direction="bottom" data-hint-offset="small" <% if (typeof items[i].dataHintTitle !== "undefined") { %> data-hint-title="<%= items[i].dataHintTitle %>" <% } %>><%= items[i].caption %></a>' +
'</li>' +
'<% } %>' +
'<% } %>' +
'</ul>' +
'<a class="scroll left" data-hint="0" data-hint-direction="bottom" data-hint-offset="-7, 0" data-hint-title="V"></a>' +
'</section>';
this.$layout = $(options.template({
tabsmarkup: _.template(_template_tabs)({items: options.tabs})
tabsmarkup: _.template(_template_tabs)({items: options.tabs}),
isRTL: Common.UI.isRTL()
}));
config.tabs = options.tabs;
@ -365,13 +382,13 @@ define([
var _left_bound_ = Math.round($boxTabs.offset().left),
_right_bound_ = Math.round(_left_bound_ + $boxTabs.width());
var tab = this.$tabs.filter(':visible:first').get(0);
var tab = this.$tabs.filter(Common.UI.isRTL() ? ':visible:last' : ':visible:first').get(0);
if ( !tab ) return false;
var rect = tab.getBoundingClientRect();
if ( !(Math.round(rect.left) < _left_bound_) ) {
tab = this.$tabs.filter(':visible:last').get(0);
tab = this.$tabs.filter(Common.UI.isRTL() ? ':visible:first' : ':visible:last').get(0);
rect = tab.getBoundingClientRect();
if (!(Math.round(rect.right) > _right_bound_))
@ -393,7 +410,9 @@ define([
function _fc() {
var $active = panel || me.$panels.filter('.active');
if ( $active && $active.length ) {
var _maxright = $active.parents('.box-controls').width();
var _maxright = $active.parents('.box-controls').width(),
_staticPanelWidth = $active.parents('.box-controls').find('.panel.static').outerWidth();
if (!_staticPanelWidth) _staticPanelWidth = 0;
var data = $active.data(),
_rightedge = data.rightedge,
_btns = data.buttons,
@ -403,7 +422,7 @@ define([
me.setMoreButton($active.attr('data-tab'), $active);
}
if ( !_rightedge ) {
_rightedge = $active.get(0).getBoundingClientRect().right;
_rightedge = $active.outerWidth() + _staticPanelWidth;
}
if ( !_btns ) {
_btns = [];
@ -421,13 +440,13 @@ define([
data.flex = _flex;
}
if ( (_rightedge > _maxright)) {
if (_rightedge > _maxright) {
if (!more_section.is(':visible') ) {
if (_flex.length>0) {
for (var i=0; i<_flex.length; i++) {
var item = _flex[i].el;
_rightedge = $active.get(0).getBoundingClientRect().right;
if (item.outerWidth() > parseInt(item.css('min-width'))) {
_rightedge = $active.outerWidth() + _staticPanelWidth;
if (Math.floor(item.outerWidth()) > parseInt(item.css('min-width'))) {
data.rightedge = _rightedge;
return;
} else
@ -438,7 +457,7 @@ define([
var btn = _btns[i];
if ( !btn.hasClass('compactwidth') && !btn.hasClass('slot-btn-more')) {
btn.addClass('compactwidth');
_rightedge = $active.get(0).getBoundingClientRect().right;
_rightedge = $active.outerWidth() + _staticPanelWidth;
if (_rightedge <= _maxright)
break;
}
@ -453,10 +472,10 @@ define([
var btn = _btns[i];
if ( btn.hasClass('compactwidth') ) {
btn.removeClass('compactwidth');
_rightedge = $active.get(0).getBoundingClientRect().right;
if ( _rightedge > _maxright) {
_rightedge = $active.outerWidth() + _staticPanelWidth;
if (_rightedge > _maxright) {
btn.addClass('compactwidth');
_rightedge = $active.get(0).getBoundingClientRect().right;
_rightedge = $active.outerWidth() + _staticPanelWidth;
break;
}
}
@ -506,7 +525,7 @@ define([
var me = this;
if (!btnsMore[tab]) {
var top = panel.position().top;
var box = $('<div class="more-box" style="position: absolute;right: 0; top:'+ top +'px; padding-left: 12px;padding-right: 6px;display: none;">' +
var box = $('<div class="more-box" style="top:'+ top +'px;">' +
'<div class="separator long" style="position: relative;display: table-cell;"></div>' +
'<div class="group" style=""><span class="btn-slot text x-huge slot-btn-more"></span></div>' +
'</div>');
@ -533,7 +552,7 @@ define([
var panel = this.$panels.filter('[data-tab=' + tab + ']');
if ( panel.length ) {
var data = panel.data();
data.buttons = data.flex = data.rightedge = undefined;
data.buttons = data.flex = data.rightedge = data.leftedge = undefined;
panel.find('.more-box').remove();
}
if (btnsMore[tab]) {
@ -554,8 +573,10 @@ define([
var more_section_width = parseInt(more_section.css('width')) || 0,
box_controls_width = $active.parents('.box-controls').width(),
_maxright = box_controls_width,
_rightedge = $active.get(0).getBoundingClientRect().right,
_staticPanelWidth = $active.parents('.box-controls').find('.panel.static').outerWidth(),
_maxright = box_controls_width;
if (!_staticPanelWidth) _staticPanelWidth = 0;
var _rightedge = $active.outerWidth() + _staticPanelWidth,
delta = (this._prevBoxWidth) ? (_maxright - this._prevBoxWidth) : -1,
hideAllMenus = false;
this._prevBoxWidth = _maxright;
@ -567,7 +588,7 @@ define([
if ( (reset || delta<0) && (_rightedge > _maxright)) { // from toolbar to more section
if (!more_section.is(':visible') ) {
more_section.css('display', "");
more_section.css('display', "block");
_maxright -= parseInt(more_section.css('width'));
}
var last_separator = null,
@ -589,11 +610,12 @@ define([
this.$moreBar.prepend(item);
hideAllMenus = true;
} else if (item.hasClass('group')) {
_rightedge = $active.get(0).getBoundingClientRect().right;
//_rightedge = $active.get(0).getBoundingClientRect().right;
_rightedge = $active.outerWidth() + _staticPanelWidth;
if (_rightedge <= _maxright) // stop moving items
break;
var offset = item.offset(),
var rect = item.get(0).getBoundingClientRect(),
item_width = item.outerWidth(),
children = item.children();
if (!item.attr('inner-width') && item.attr('group-state') !== 'open') {
@ -603,7 +625,7 @@ define([
child.attr('inner-width', child.outerWidth());
}
}
if ((offset.left > _maxright || children.length==1) && item.attr('group-state') != 'open') {
if (((rect.left > _maxright || Common.UI.isRTL() && box_controls_width - rect.right > _maxright) || children.length==1) && item.attr('group-state') != 'open') {
// move group
this.$moreBar.prepend(item);
if (last_separator) {
@ -611,7 +633,7 @@ define([
last_separator.removeAttr('hidden-on-resize');
}
hideAllMenus = true;
} else if ( offset.left+item_width > _maxright ) {
} else if ((Common.UI.isRTL() ? box_controls_width - rect.right : rect.left)+item_width > _maxright ) {
// move buttons from group
for (var j=children.length-1; j>=0; j--) {
var child = $(children[j]);
@ -624,9 +646,9 @@ define([
hideAllMenus = true;
break;
} else {
var child_offset = child.offset(),
var child_rect = child.get(0).getBoundingClientRect(),
child_width = child.outerWidth();
if (child_offset.left+child_width>_maxright) {
if ((Common.UI.isRTL() ? box_controls_width - child_rect.right : child_rect.left)+child_width>_maxright) {
if (!last_group) {
last_group = $('<div></div>');
last_group.addClass(items[i].className);
@ -689,7 +711,7 @@ define([
// from more panel to toolbar
for (var i=0; i<items.length; i++) {
var item = $(items[i]);
_rightedge = $active.get(0).getBoundingClientRect().right;
_rightedge = $active.outerWidth() + _staticPanelWidth;
if (!item.is(':visible') && item.attr('data-hidden-tb-item')) { // move invisible items as is
item.removeAttr('data-hidden-tb-item');
more_section.before(item);
@ -724,7 +746,7 @@ define([
for (var j=0; j<children.length; j++) {
if (islast && j==children.length-1)
_maxright = box_controls_width; // try to move last item from last group
_rightedge = $active.get(0).getBoundingClientRect().right;
_rightedge = $active.outerWidth() + _staticPanelWidth;
var child = $(children[j]);
if (child.hasClass('elset')) { // don't add group - no enough space
need_break = true;
@ -809,7 +831,8 @@ define([
right = Common.Utils.innerWidth() - (showxy.left - parentxy.left + target.width()),
top = showxy.top - parentxy.top + target.height() + 10;
moreContainer.css({right: right, left: 'auto', top : top, 'max-width': Common.Utils.innerWidth() + 'px'});
var styles = Common.UI.isRTL() ? {left: '6px', right: 'auto', top : top, 'max-width': Common.Utils.innerWidth() + 'px'} : {right: right, left: 'auto', top : top, 'max-width': Common.Utils.innerWidth() + 'px'}
moreContainer.css(styles);
moreContainer.show();
},

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* MultiSliderGradient.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* RadioBox.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Scroller.js
*
@ -64,7 +63,8 @@ define([
includePadding : true,
includeMargin : true,
alwaysVisibleX : false,
alwaysVisibleY : false
alwaysVisibleY : false,
scrollYStyle : null
},
initialize: function(options) {
@ -86,6 +86,8 @@ define([
this.setAlwaysVisibleX(me.options.alwaysVisibleX);
this.setAlwaysVisibleY(me.options.alwaysVisibleY);
(this.options.scrollYStyle) && (this.setOptionStyleY(this.options.scrollYStyle));
}
return this;
@ -108,6 +110,8 @@ define([
this.setAlwaysVisibleX(options.alwaysVisibleX);
this.setAlwaysVisibleY(options.alwaysVisibleY);
(options.scrollYStyle) && (this.setOptionStyleY(options.scrollYStyle));
// Emulate capture scroller
var mouseDownHandler = function(e) {
@ -167,6 +171,11 @@ define([
}
},
setOptionStyleY: function (style) {
$(this.el).find('.ps-scrollbar-y-rail').css(style);
this.cmpEl.perfectScrollbar('update');
},
isVisible: function() {
return $(this.el).find('.ps-scrollbar-y-rail').is(':visible');
}

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Slider.js
*
@ -156,7 +155,7 @@ define([
$(document).off('mousemove', onMouseMove);
me._dragstart = undefined;
me.trigger('changecomplete', me, me.value, me.lastValue);
me.trigger('changecomplete', me, Common.UI.isRTL() ? me.maxValue - me.value : me.value, me.lastValue);
};
var onMouseMove = function (e) {
@ -175,7 +174,7 @@ define([
me.value = pos/me.delta + me.minValue;
if (Math.abs(me.value-me.lastValue)>0.001)
me.trigger('change', me, me.value, me.lastValue);
me.trigger('change', me, Common.UI.isRTL() ? me.maxValue - me.value : me.value, me.lastValue);
};
var onMouseDown = function (e) {
@ -201,8 +200,8 @@ define([
me.lastValue = me.value;
me.value = pos/me.delta + me.minValue;
me.trigger('change', me, me.value, me.lastValue);
me.trigger('changecomplete', me, me.value, me.lastValue);
me.trigger('change', me, Common.UI.isRTL() ? me.maxValue - me.value : me.value, me.lastValue);
me.trigger('changecomplete', me, Common.UI.isRTL() ? me.maxValue - me.value : me.value, me.lastValue);
};
var updateslider;
@ -211,7 +210,7 @@ define([
me.lastValue = me.value;
me.value = Math.max(me.minValue, Math.min(me.maxValue, me.value + ((increase) ? me.step : -me.step)));
me.setThumbPosition(Math.round((me.value-me.minValue)*me.delta));
me.trigger('change', me, me.value, me.lastValue);
me.trigger('change', me, Common.UI.isRTL() ? me.maxValue - me.value : me.value, me.lastValue);
};
var onKeyDown = function (e) {
@ -234,7 +233,7 @@ define([
clearInterval(updateslider);
moveThumb(e.keyCode==Common.UI.Keys.UP || e.keyCode==Common.UI.Keys.RIGHT);
el.on('keydown', 'input', onKeyDown);
me.trigger('changecomplete', me, me.value, me.lastValue);
me.trigger('changecomplete', me, Common.UI.isRTL() ? me.maxValue - me.value : me.value, me.lastValue);
}
};
@ -264,7 +263,7 @@ define([
setValue: function(value) {
this.lastValue = this.value;
this.value = Math.max(this.minValue, Math.min(this.maxValue, value));
this.setThumbPosition(Math.round((value-this.minValue)*this.delta));
this.setThumbPosition(Math.round(((Common.UI.isRTL() ? this.maxValue - value : value)-this.minValue)*this.delta));
},
getValue: function() {

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* User: Julia.Radzhabova
* Date: 26.02.15

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
if (Common === undefined)
var Common = {};

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Tab.js
*
@ -56,7 +55,7 @@ define([
this.iconTitle = '';
this.index = -1;
this.template = _.template(['<li class="list-item <% if(active){ %>active selected<% } %> <% if(cls.length){%><%= cls %><%}%><% if(iconVisible){%> icon-visible <%}%>" data-label="<%- label %>">',
'<span title="<%- label %>" draggable="true" oo_editor_input="true" tabindex="-1" data-index="<%= index %>">',
'<span tabtitle="<%- label %>" draggable="true" oo_editor_input="true" tabindex="-1" data-index="<%= index %>">',
'<div class="toolbar__icon <% if(iconCls.length){%><%= iconCls %><%}%>" title="<% if(iconTitle.length){%><%=iconTitle%><%}%>"></div>',
'<%- label %>',
'</span>',
@ -74,7 +73,9 @@ define([
render: function() {
var el = this.template(this);
this.$el = $(el);
this.$el.find('span').tooltip({
title: this.label,
placement: 'cursor'});
this.rendered = true;
this.disable(this.disabled);
return this;

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* TabBar.js
*
@ -210,7 +209,7 @@ define([
event.dataTransfer.setDragImage(img, 0, 0);
} else if (Common.Utils.isIE) {
this.bar.selectTabs.forEach(function (tab) {
tab.$el.find('span').prop('title', '');
tab.$el.find('span').prop('tabtitle', '');
});
}
event.dataTransfer.effectAllowed = 'copyMove';
@ -569,8 +568,8 @@ define([
checkInvisible: function(suppress) {
var result = {
first: !this.isTabVisible(0),
last: !this.isTabVisible(this.tabs.length-1)
first: !this.isTabVisible(Common.UI.isRTL() ? this.tabs.length-1 : 0),
last: !this.isTabVisible(Common.UI.isRTL() ? 0 : this.tabs.length-1)
};
!suppress && this.fireEvent('tab:invisible', this, result);

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2020
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ThemeColorPalette.js
*
@ -59,42 +58,43 @@ define([
transparent: false,
value: '000000',
enableKeyEvents: true,
colorHints: true,
keyMoveDirection: 'both' // 'vertical', 'horizontal'
},
template :
_.template(
'<div style="padding: 4px 0 0 12px;">' +
'<div class="palette-inner">' +
'<% var me = this; var idx = 0; %>' +
'<% $(colors).each(function(num, item) { %>' +
'<% if (me.isBlankSeparator(item)) { %> <div class="palette-color-spacer" style="width:100%;height:8px;float:left;"></div>' +
'<% } else if (me.isSeparator(item)) { %> </div><div class="divider" style="width:100%;float:left;"></div><div style="padding: 12px;">' +
'<% if (me.isBlankSeparator(item)) { %> <div class="palette-color-spacer"></div>' +
'<% } else if (me.isSeparator(item)) { %> </div><div class="divider"></div><div style="padding: 12px;">' +
'<% } else if (me.isColor(item)) { %> ' +
'<a class="palette-color color-<%=item%>" style="background:#<%=item%>" idx="<%=idx++%>">' +
'<a class="palette-color color-<%=item%>" data-toggle="tooltip" style="background:#<%=item%>" idx="<%=idx++%>">' +
'<em><span style="background:#<%=item%>;" unselectable="on">&#160;</span></em>' +
'</a>' +
'<% } else if (me.isTransparent(item)) { %>' +
'<a class="color-<%=item%>" idx="<%=idx++%>">' +
'<a class="color-<%=item%>" data-toggle="tooltip" idx="<%=idx++%>">' +
'<em><span unselectable="on">&#160;</span></em>' +
'</a>' +
'<% } else if (me.isEffect(item)) { %>' +
'<% if (idx>0 && me.columns>0 && idx%me.columns===0) { %> ' +
'<div style="width:100%;height:0;float:left;"></div>' +
'<div class="color-divider"></div>' +
'<% } %>' +
'<a effectid="<%=item.effectId%>" effectvalue="<%=item.effectValue%>" class="palette-color-effect color-<%=item.color%>" style="background:#<%=item.color%>" idx="<%=idx++%>">' +
'<a effectid="<%=item.effectId%>" effectvalue="<%=item.effectValue%>" data-toggle="tooltip" class="palette-color-effect color-<%=item.color%>" style="background:#<%=item.color%>" idx="<%=idx++%>">' +
'<em><span style="background:#<%=item.color%>;" unselectable="on">&#160;</span></em>' +
'</a>' +
'<% } else if (me.isCaption(item)) { %>' +
'<div class="palette-color-caption" style="width:100%;float:left;font-size: 11px;"><%=item%></div>' +
'<div class="palette-color-caption"><%=item%></div>' +
'<% } %>' +
'<% }); %>' +
'</div>' +
'<% if (me.options.dynamiccolors!==undefined) { %>' +
'<div class="palette-color-dynamiccolors" style="padding: 4px 0 0 12px">' +
'<div class="palette-color-spacer" style="width:100%;height:8px;float:left;"></div>' +
'<div class="palette-color-caption" style="width:100%;float:left;font-size: 11px;"><%=me.textRecentColors%></div>' +
'<div class="palette-color-dynamiccolors">' +
'<div class="palette-color-spacer"></div>' +
'<div class="palette-color-caption"><%=me.textRecentColors%></div>' +
'<% for (var i=0; i<me.options.dynamiccolors; i++) { %>' +
'<a class="color-dynamic-<%=i%> dynamic-empty-color <%= me.emptyColorsClass %>" color="" idx="<%=idx++%>">' +
'<a class="color-dynamic-<%=i%> dynamic-empty-color <%= me.emptyColorsClass %>" data-toggle="tooltip" color="" idx="<%=idx++%>">' +
'<em><span unselectable="on">&#160;</span></em></a>' +
'<% } %>' +
'<% } %>' +
@ -116,6 +116,7 @@ define([
this.outerMenu = me.options.outerMenu;
this.lastSelectedIdx = -1;
this.emptyColorsClass = me.options.hideEmptyColors ? 'hidden' : '';
this.colorHints = me.options.colorHints;
me.colorItems = [];
if (me.options.keyMoveDirection=='vertical')
@ -155,6 +156,17 @@ define([
me.colorItems.push({el: item, index: num});
});
this.attachKeyEvents();
var modalParents = this.$el.closest('.asc-window');
if (modalParents.length > 0) {
this.tipZIndex = parseInt(modalParents.css('z-index')) + 10;
}
if (this.colorHints) {
this.options.transparent && this.createTip(this.$el.find('a.color-transparent'), this.textTransparent);
!this.options.themecolors && !this.options.effects && this.updateHints(typeof this.colorHints==='object' ? this.colorHints : undefined);
this.colorHints = !!this.colorHints;
}
return this;
},
@ -210,6 +222,7 @@ define([
this.lastSelectedIdx = parseInt(colorEl.attr('idx'));
color = undefined; //select only first found color
}
this.colorHints && this.createTip(colorEl, Common.Utils.ThemeColor.getTranslation(Common.Utils.ThemeColor.getRgbColor(colors[i]).asc_getName()));
}
while (i < this.options.dynamiccolors) {
colorEl = el.find('.color-dynamic-'+ i);
@ -446,11 +459,12 @@ define([
aEl = $(me.aColorElements[aColorIdx]);
aEl.removeClass('color-'+me.colors[i]);
me.colors[i] = standartcolors[aColorIdx].toUpperCase();
me.colors[i] = standartcolors[aColorIdx].color = standartcolors[aColorIdx].color.toUpperCase();
aEl.addClass('color-'+me.colors[i]);
aEl.css({background: "#"+me.colors[i]});
aEl.find('span').first().css({background: "#"+me.colors[i]});
me.colorHints && me.createTip(aEl, standartcolors[aColorIdx].tip);
aColorIdx++;
} else if ( typeof(me.colors[i]) == 'object' && me.colors[i].effectId !== undefined) {
if (aEffectIdx>=effectcolors.length)
@ -473,7 +487,7 @@ define([
aEl.attr('effectvalue', '' + effectcolors[aEffectIdx].effectValue);
me.colors[i] = effectcolors[aEffectIdx];
me.colorHints && me.createTip(aEl, effectcolors[aEffectIdx].tip);
aEffectIdx++;
}
}
@ -489,6 +503,22 @@ define([
this.options.updateColorsArr = undefined;
},
createTip: function(view, name) {
var tipZIndex = this.tipZIndex;
(view.attr('color-name')===undefined) && view.one('mouseenter', function(e){ // hide tooltip when mouse is over menu
var $target = $(e.currentTarget);
$target.tooltip({
title: $target.attr('color-name'),
placement : 'cursor',
zIndex : tipZIndex
});
$target.mouseenter();
});
var tip = view.data('bs.tooltip');
tip && tip.updateTitle(name);
view.attr('color-name', name || '');
},
clearSelection: function(suppressEvent) {
this.$el.find('a.' + this.selectedCls).removeClass(this.selectedCls);
if (!suppressEvent) {
@ -673,8 +703,23 @@ define([
this.focus(e.keyCode == Common.UI.Keys.DOWN ? 'first' : 'last');
},
updateHints: function(values) { // use for hex colors (without effectId)
if (!this.colorHints) return;
var me = this;
(me.$el || $(me.el)).find('a.palette-color').each(function(num, item) {
if (values && values[num])
me.createTip($(item), values[num]);
else {
var color = item.className.match(me.colorRe)[1];
me.createTip($(item), Common.Utils.ThemeColor.getTranslation(Common.Utils.ThemeColor.getRgbColor(color).asc_getName()));
}
});
},
textThemeColors : 'Theme Colors',
textStandartColors : 'Standard Colors',
textRecentColors : 'Recent Colors'
textRecentColors : 'Recent Colors',
textTransparent : 'Transparent'
}, Common.UI.ThemeColorPalette || {}));
});

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ToggleManager.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Tooltip.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* TreeView.js
*
@ -170,7 +169,7 @@ define([
initialize : function(options) {
options.store = options.store || new Common.UI.TreeViewStore();
options.emptyItemText = options.emptyItemText || '';
options.itemTemplate = options.itemTemplate || _.template([
options.itemTemplate = options.itemTemplate || !Common.UI.isRTL() ? _.template([
'<div id="<%= id %>" class="tree-item <% if (!isVisible) { %>' + 'hidden' + '<% } %>" style="display: block;padding-left: <%= level*16 + 24 %>px;">',
'<% if (hasSubItems) { %>',
'<div class="tree-caret img-commonctrl ' + '<% if (!isExpanded) { %>' + 'up' + '<% } %>' + '" style="margin-left: <%= level*16 %>px;"></div>',
@ -183,6 +182,19 @@ define([
'<div class="name"><%= Common.Utils.String.htmlEncode(name) %></div>',
'<% } %>',
'</div>'
].join('')) : _.template([
'<div id="<%= id %>" class="tree-item <% if (!isVisible) { %>' + 'hidden' + '<% } %>" style="display: block;padding-right: <%= level*16 + 24 %>px;">',
'<% if (hasSubItems) { %>',
'<div class="tree-caret img-commonctrl ' + '<% if (!isExpanded) { %>' + 'up' + '<% } %>' + '" style="margin-right: <%= level*16 %>px;"></div>',
'<% } %>',
'<% if (isNotHeader) { %>',
'<div class="name not-header"><%= Common.Utils.String.htmlEncode(name) %></div>',
'<% } else if (isEmptyItem) { %>',
'<div class="name empty">' + options.emptyItemText + '</div>',
'<% } else { %>',
'<div class="name"><%= Common.Utils.String.htmlEncode(name) %></div>',
'<% } %>',
'</div>'
].join(''));
Common.UI.DataView.prototype.initialize.call(this, options);
},
@ -367,6 +379,7 @@ define([
if (tip.dontShow===undefined)
tip.dontShow = true;
el.removeData('bs.tooltip');
(tip.tip()).remove();
}
if (record.get('tip')) {
el.attr('data-toggle', 'tooltip');

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Window.js
*
@ -158,7 +157,8 @@ define([
maxheight: undefined,
minwidth: 0,
minheight: 0,
enableKeyEvents: true
enableKeyEvents: true,
automove: true
};
var template = '<div class="asc-window<%= modal?" modal":"" %><%= cls?" "+cls:"" %>" id="<%= id %>" style="width:<%= width %>px;">' +
@ -265,8 +265,10 @@ define([
var top = main_geometry.top + Math.floor((parseInt(main_height) - parseInt(win_height)) / 2);
var left = Math.floor((parseInt(main_width) - parseInt(win_width)) / 2);
this.$window.css('left',left);
this.$window.css('top',top);
this.$window.css({
left: left < 0 ? 0 : left,
top: top < 0 ? 0 : top
});
}
function _setVisible() {
@ -355,6 +357,23 @@ define([
}
}
function _onResizeMove(){
var main_geometry = _readDocumetGeometry(),
main_width = main_geometry.width,
main_height = main_geometry.height,
win_height = this.getHeight(),
win_width = this.getWidth(),
top = this.getTop(),
left = this.getLeft();
top = top + win_height > main_height ? main_height - win_height : top;
left = left + win_width > main_width ? main_width - win_width : left;
this.$window.css({
left: left < 0 ? 0 : left,
top: top < 0 ? 0 : top
});
}
/* window resize functions */
function _resizestart(event) {
@ -456,7 +475,7 @@ define([
var template = '<div class="info-box">' +
'<% if (typeof iconCls !== "undefined") { %><div class="icon <%= iconCls %>"></div><% } %>' +
'<div class="text" <% if (typeof iconCls == "undefined") { %> style="padding-left:10px;" <% } %>><span><%= msg %></span>' +
'<div class="text" dir="ltr" <% if (typeof iconCls == "undefined") { %> style="padding-left:10px;" <% } %>><span><%= msg %></span>' +
'<% if (dontshow) { %><div class="dont-show-checkbox"></div><% } %>' +
'</div>' +
'</div>' +
@ -491,7 +510,8 @@ define([
text_cnt.height(Math.max(text.height(), icon_height) + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0));
body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height')));
var span_el = check.find('span');
window.setSize(Math.max(text.width(), span_el.length>0 ? span_el.position().left + span_el.width() : 0) + text.position().left + parseInt(text_cnt.css('padding-right')),
window.setSize(Math.max(text.width(), span_el.length>0 ? span_el.position().left + span_el.width() : 0) + text.position().left + parseInt(text_cnt.css('padding-right')) +
(Common.UI.isRTL() && icon.length > 0 ? icon.width() + parseInt(icon.css('margin-right')) + parseInt(icon.css('margin-left')) : 0),
parseInt(body.css('height')) + parseInt(header.css('height')));
} else {
text.css('white-space', 'normal');
@ -500,7 +520,7 @@ define([
body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height')));
window.setHeight(parseInt(body.css('height')) + parseInt(header.css('height')));
}
if (text.height() < icon_height-10)
if (text.height() < icon_height/2)
text.css({'vertical-align': 'baseline', 'line-height': icon_height+'px'});
}
@ -658,7 +678,6 @@ define([
this.$window.find('.header').on('mousedown', this.binding.dragStart);
this.$window.find('.tool.close').on('click', _.bind(doclose, this));
this.$window.find('.tool.help').on('click', _.bind(dohelp, this));
if (!this.initConfig.modal)
Common.Gateway.on('processmouse', _.bind(_onProcessMouse, this));
} else {
@ -742,6 +761,10 @@ define([
}
$(document).on('keydown.' + this.cid, this.binding.keydown);
if(this.initConfig.automove){
this.binding.windowresize = _.bind(_onResizeMove, this);
$(window).on('resize', this.binding.windowresize);
}
var me = this;
@ -793,6 +816,7 @@ define([
close: function(suppressevent) {
$(document).off('keydown.' + this.cid);
this.initConfig.automove && $(window).off('resize', this.binding.windowresize);
if ( this.initConfig.header ) {
this.$window.find('.header').off('mousedown', this.binding.dragStart);
}
@ -838,6 +862,7 @@ define([
hide: function() {
$(document).off('keydown.' + this.cid);
this.initConfig.automove && $(window).off('resize', this.binding.windowresize);
if (this.$window) {
if (this.initConfig.modal) {
var mask = _getMask(),

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Chat.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Comments.js
*
@ -1655,8 +1654,15 @@ define([
return strTime;
}
// MM/dd/yyyy hh:mm AM
var lang = (this.mode ? this.mode.lang || 'en' : 'en').replace('_', '-').toLowerCase();
try {
return date.toLocaleString(lang, {dateStyle: 'short', timeStyle: 'short'});
} catch (e) {
lang = 'en';
return date.toLocaleString(lang, {dateStyle: 'short', timeStyle: 'short'});
}
// MM/dd/yyyy hh:mm AM
return (date.getMonth() + 1) + '/' + (date.getDate()) + '/' + date.getFullYear() + ' ' + format(date);
},

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -261,18 +260,24 @@ define([
if ( me.helpUrl() ) {
fetch(build_url(me.helpUrl(), Common.Locale.getDefaultLanguage(), '/Contents.json'))
.then(function (response) {
if ( response.ok ) {
/* remote help avail */
fetch(build_url(me.helpUrl(), Common.Locale.getCurrentLanguage(), '/Contents.json'))
.then(function (response) {
if ( response.ok ) {
helpUrl = build_url(me.helpUrl(), Common.Locale.getCurrentLanguage(), '');
}
})
.catch(function (e) {
helpUrl = build_url(me.helpUrl(), Common.Locale.getDefaultLanguage(), '');
});
}
// if ( response.ok )
return response.json();
})
.then(function (text) {
/* remote help avail */
fetch(build_url(me.helpUrl(), Common.Locale.getCurrentLanguage(), '/Contents.json'))
.then(function (response) {
// if ( response.ok )
return response.json();
})
.then(function (t) {
helpUrl = build_url(me.helpUrl(), Common.Locale.getCurrentLanguage(), '');
})
.catch(function (e) {
helpUrl = build_url(me.helpUrl(), Common.Locale.getDefaultLanguage(), '');
});
})
.catch(function (e){
})
}
});
@ -526,6 +531,10 @@ define([
getDefaultPrinterName: function () {
return nativevars ? nativevars.defaultPrinterName : '';
},
systemThemeType: function () {
return nativevars.theme && !!nativevars.theme.system ? nativevars.theme.system :
window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
},
};
};

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ExternalDiagramEditor.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ExternalDiagramEditor.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2022
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ExternalOleEditor.js
*

View File

@ -0,0 +1,85 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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
*
*/
/**
* ExternalUsers.js
*
* Created by Julia Radzhabova on 02 February 2023
* Copyright (c) 2023 Ascensio System SIA. All rights reserved.
*
*/
if (Common === undefined)
var Common = {};
if (Common.UI === undefined) {
Common.UI = {};
}
Common.UI.ExternalUsers = new( function() {
var externalUsers = [],
isUsersLoading = false;
var _get = function(type) {
if (isUsersLoading) return;
type = type || 'mention';
if (externalUsers[type]===undefined) {
isUsersLoading = true;
Common.Gateway.requestUsers(type || 'mention');
} else {
Common.NotificationCenter.trigger('mentions:setusers', type, externalUsers[type]);
}
};
var _init = function(canRequestUsers) {
if (!canRequestUsers) return;
Common.Gateway.on('setusers', function(data) {
if (data.users===null) {// clear user lists
externalUsers = [];
return;
}
var type = data.c || 'mention';
externalUsers[type] = data.users || [];
isUsersLoading = false;
Common.NotificationCenter.trigger('mentions:setusers', type, externalUsers[type]);
});
Common.NotificationCenter.on('mentions:clearusers', function() {
externalUsers = [];
});
};
return {
init: _init,
get: _get
}
})();

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2020
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Fonts.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2021
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* User: Julia.Radzhabova
* Date: 06.03.15

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2021
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* User: Julia.Radzhabova
* Date: 17.05.16
@ -100,6 +99,7 @@ define([
this._moveOffset = {x:0, y:0};
this.autostart = [];
this.customPluginsDlg = [];
Common.Gateway.on('init', this.loadConfig.bind(this));
Common.NotificationCenter.on('app:face', this.onAppShowed.bind(this));
@ -115,38 +115,37 @@ define([
},
loadPlugins: function() {
this.configPlugins.plugins =
this.serverPlugins.plugins = false;
if (this.configPlugins.config) {
this.getPlugins(this.configPlugins.config.pluginsData)
.then(function(loaded)
{
.then(function(loaded) {
me.configPlugins.plugins = loaded;
me.mergePlugins();
})
.catch(function(err)
{
.catch(function(err) {
me.configPlugins.plugins = false;
});
} else
this.configPlugins.plugins = false;
}
var server_plugins_url = '../../../../plugins.json',
me = this;
Common.Utils.loadConfig(server_plugins_url, function (obj) {
if ( obj != 'error' ) {
me.serverPlugins.config = obj;
me.getPlugins(me.serverPlugins.config.pluginsData)
.then(function(loaded)
{
me.serverPlugins.plugins = loaded;
me.mergePlugins();
})
.catch(function(err)
{
me.serverPlugins.plugins = false;
});
} else
me.serverPlugins.plugins = false;
});
if ( !Common.Controllers.Desktop.isActive() || !Common.Controllers.Desktop.isOffline() ) {
var server_plugins_url = '../../../../plugins.json',
me = this;
Common.Utils.loadConfig(server_plugins_url, function (obj) {
if (obj != 'error') {
me.serverPlugins.config = obj;
me.getPlugins(me.serverPlugins.config.pluginsData)
.then(function (loaded) {
me.serverPlugins.plugins = loaded;
me.mergePlugins();
})
.catch(function (err) {
me.serverPlugins.plugins = false;
});
}
});
}
},
onAppShowed: function (config) {
@ -176,6 +175,12 @@ define([
this.api.asc_registerCallback('asc_onPluginShowButton', _.bind(this.onPluginShowButton, this));
this.api.asc_registerCallback('asc_onPluginHideButton', _.bind(this.onPluginHideButton, this));
this.api.asc_registerCallback("asc_onPluginWindowShow", _.bind(this.onPluginWindowShow, this));
this.api.asc_registerCallback("asc_onPluginWindowClose", _.bind(this.onPluginWindowClose, this));
this.api.asc_registerCallback("asc_onPluginWindowResize", _.bind(this.onPluginWindowResize, this));
this.api.asc_registerCallback("asc_onPluginWindowMouseUp", _.bind(this.onPluginWindowMouseUp, this));
this.api.asc_registerCallback("asc_onPluginWindowMouseMove", _.bind(this.onPluginWindowMouseMove, this));
this.loadPlugins();
}
return this;
@ -263,7 +268,7 @@ define([
} else {
_group.appendTo(me.$toolbarPanelPlugins);
$('<div class="separator long invisible"></div>').appendTo(me.$toolbarPanelPlugins);
_group = $('<div class="group" style="padding-left: 0;"></div>');
_group = $('<div class="group" style="' + (Common.UI.isRTL() ? 'padding-right: 0;' : 'padding-left: 0;') + '"></div>');
}
var btn = me.panelPlugins.createPluginButton(model);
@ -369,13 +374,14 @@ define([
onPluginShow: function(plugin, variationIndex, frameId, urlAddition) {
var variation = plugin.get_Variations()[variationIndex];
if (variation.get_Visual()) {
var lang = this.appOptions && this.appOptions.lang ? this.appOptions.lang.split(/[\-_]/)[0] : 'en';
var url = variation.get_Url();
url = ((plugin.get_BaseUrl().length == 0) ? url : plugin.get_BaseUrl()) + url;
if (urlAddition)
url += urlAddition;
if (variation.get_InsideMode()) {
if (!this.panelPlugins.openInsideMode(plugin.get_Name(), url, frameId))
this.api.asc_pluginButtonClick(-1);
if (!this.panelPlugins.openInsideMode(plugin.get_Name(lang), url, frameId, plugin.get_Guid()))
this.api.asc_pluginButtonClick(-1, plugin.get_Guid());
} else {
var me = this,
isCustomWindow = variation.get_CustomWindow(),
@ -396,20 +402,24 @@ define([
me.pluginDlg = new Common.Views.PluginDlg({
cls: isCustomWindow ? 'plain' : '',
header: !isCustomWindow,
title: plugin.get_Name(),
title: plugin.get_Name(lang),
width: size[0], // inner width
height: size[1], // inner height
url: url,
frameId : frameId,
buttons: isCustomWindow ? undefined : newBtns,
toolcallback: _.bind(this.onToolClose, this),
toolcallback: function(event) {
me.api.asc_pluginButtonClick(-1, plugin.get_Guid());
},
help: !!help,
loader: plugin.get_Loader(),
modal: isModal!==undefined ? isModal : true
});
me.pluginDlg.on({
'render:after': function(obj){
obj.getChild('.footer .dlg-btn').on('click', _.bind(me.onDlgBtnClick, me));
obj.getChild('.footer .dlg-btn').on('click', function(event) {
me.api.asc_pluginButtonClick(parseInt(event.currentTarget.attributes['result'].value), plugin.get_Guid());
});
me.pluginContainer = me.pluginDlg.$window.find('#id-plugin-container');
},
'close': function(obj){
@ -425,7 +435,7 @@ define([
help && window.open(help, '_blank');
},
'header:click': function(type){
me.api.asc_pluginButtonClick(type);
me.api.asc_pluginButtonClick(type, plugin.get_Guid());
}
});
@ -453,14 +463,9 @@ define([
callback.call();
}
},
onDlgBtnClick: function(event) {
var state = event.currentTarget.attributes['result'].value;
this.api.asc_pluginButtonClick(parseInt(state));
},
onToolClose: function() {
this.api.asc_pluginButtonClick(-1);
this.api.asc_pluginButtonClick(-1, this.panelPlugins ? this.panelPlugins._state.insidePlugin : undefined);
},
onPluginMouseUp: function(x, y) {
@ -758,6 +763,112 @@ define([
Common.Utils.lockControls(Common.enumLock.docLockForms, props.isFormsOnly, {array: this.panelPlugins.lockedControls});
Common.Utils.lockControls(Common.enumLock.docLockComments, props.isCommentsOnly, {array: this.panelPlugins.lockedControls});
}
},
// Plugin can create windows
onPluginWindowShow: function(frameId, variation) {
if (variation.isVisual) {
if (this.customPluginsDlg[frameId]) return;
var lang = this.appOptions && this.appOptions.lang ? this.appOptions.lang.split(/[\-_]/)[0] : 'en';
var url = variation.url; // full url
var visible = (this.appOptions.isEdit || variation.isViewer && (variation.isDisplayedInViewer!==false)) && _.contains(variation.EditorsSupport, this.editor) && !variation.isSystem;
if (visible && !variation.isInsideMode) {
var me = this,
isCustomWindow = variation.isCustomWindow,
arrBtns = variation.buttons,
newBtns = [],
size = variation.size,
isModal = variation.isModal;
if (!size || size.length<2) size = [800, 600];
var description = variation.description;
if (typeof variation.descriptionLocale == 'object')
description = variation.descriptionLocale[lang] || variation.descriptionLocale['en'] || description || '';
_.isArray(arrBtns) && _.each(arrBtns, function(b, index){
if (typeof b.textLocale == 'object')
b.text = b.textLocale[lang] || b.textLocale['en'] || b.text || '';
if (me.appOptions.isEdit || b.isViewer !== false)
newBtns[index] = {caption: b.text, value: index, primary: b.primary, frameId: frameId};
});
var help = variation.help;
me.customPluginsDlg[frameId] = new Common.Views.PluginDlg({
cls: isCustomWindow ? 'plain' : '',
header: !isCustomWindow,
title: description,
width: size[0], // inner width
height: size[1], // inner height
url: url,
frameId : frameId,
buttons: isCustomWindow ? undefined : newBtns,
toolcallback: function(event) {
me.api.asc_pluginButtonClick(-1, variation.guid, frameId);
},
help: !!help,
modal: isModal!==undefined ? isModal : true
});
me.customPluginsDlg[frameId].on({
'render:after': function(obj){
obj.getChild('.footer .dlg-btn').on('click', function(event) {
me.api.asc_pluginButtonClick(parseInt(event.currentTarget.attributes['result'].value), variation.guid, frameId);
});
me.customPluginsDlg[frameId].options.pluginContainer = me.customPluginsDlg[frameId].$window.find('#id-plugin-container');
},
'close': function(obj){
me.customPluginsDlg[frameId] = undefined;
},
'drag': function(args){
me.api.asc_pluginEnableMouseEvents(args[1]=='start', frameId);
},
'resize': function(args){
me.api.asc_pluginEnableMouseEvents(args[1]=='start', frameId);
},
'help': function(){
help && window.open(help, '_blank');
},
'header:click': function(type){
me.api.asc_pluginButtonClick(type, variation.guid, frameId);
}
});
me.customPluginsDlg[frameId].show();
}
}
},
onPluginWindowClose: function(frameId) {
if (this.customPluginsDlg[frameId])
this.customPluginsDlg[frameId].close();
},
onPluginWindowResize: function(frameId, size, minSize, maxSize, callback ) {
if (this.customPluginsDlg[frameId]) {
var resizable = (minSize && minSize.length>1 && maxSize && maxSize.length>1 && (maxSize[0] > minSize[0] || maxSize[1] > minSize[1] || maxSize[0]==0 || maxSize[1] == 0));
this.customPluginsDlg[frameId].setResizable(resizable, minSize, maxSize);
this.customPluginsDlg[frameId].setInnerSize(size[0], size[1]);
if (callback)
callback.call();
}
},
onPluginWindowMouseUp: function(frameId, x, y) {
if (this.customPluginsDlg[frameId]) {
if (this.customPluginsDlg[frameId].binding.dragStop) this.customPluginsDlg[frameId].binding.dragStop();
if (this.customPluginsDlg[frameId].binding.resizeStop) this.customPluginsDlg[frameId].binding.resizeStop();
} else
Common.NotificationCenter.trigger('frame:mouseup', { pageX: x*Common.Utils.zoom()+this._moveOffset.x, pageY: y*Common.Utils.zoom()+this._moveOffset.y });
},
onPluginWindowMouseMove: function(frameId, x, y) {
if (this.customPluginsDlg[frameId]) {
var offset = this.customPluginsDlg[frameId].options.pluginContainer.offset();
if (this.customPluginsDlg[frameId].binding.drag) this.customPluginsDlg[frameId].binding.drag({ pageX: x*Common.Utils.zoom()+offset.left, pageY: y*Common.Utils.zoom()+offset.top });
if (this.customPluginsDlg[frameId].binding.resize) this.customPluginsDlg[frameId].binding.resize({ pageX: x*Common.Utils.zoom()+offset.left, pageY: y*Common.Utils.zoom()+offset.top });
} else
Common.NotificationCenter.trigger('frame:mousemove', { pageX: x*Common.Utils.zoom()+this._moveOffset.x, pageY: y*Common.Utils.zoom()+this._moveOffset.y });
}
}, Common.Controllers.Plugins || {}));
});

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ReviewChanges.js
*
@ -81,6 +80,7 @@ define([
'reviewchange:preview': _.bind(this.onBtnPreviewClick, this),
'reviewchange:view': _.bind(this.onReviewViewClick, this),
'reviewchange:compare': _.bind(this.onCompareClick, this),
'reviewchange:combine': _.bind(this.onCombineClick, this),
'lang:document': _.bind(this.onDocLanguage, this),
'collaboration:coauthmode': _.bind(this.onCoAuthMode, this),
'protect:update': _.bind(this.onChangeProtectDocument, this)
@ -550,6 +550,14 @@ define([
return strTime;
}
var lang = (this.appConfig ? this.appConfig.lang || 'en' : 'en').replace('_', '-').toLowerCase();
try {
return date.toLocaleString(lang, {dateStyle: 'short', timeStyle: 'short'});
} catch (e) {
lang = 'en';
return date.toLocaleString(lang, {dateStyle: 'short', timeStyle: 'short'});
}
// MM/dd/yyyy hh:mm AM
return (date.getMonth() + 1) + '/' + (date.getDate()) + '/' + date.getFullYear() + ' ' + format(date);
},
@ -718,6 +726,36 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.view);
},
onCombineClick: function(item) {
if(this.api) {
var me = this;
if (!this._state.compareSettings) {
this._state.compareSettings = new AscCommonWord.ComparisonOptions();
this._state.compareSettings.putWords(!Common.localStorage.getBool("de-compare-char"));
}
if (item === 'file') {
this.api.asc_MergeDocumentFile(this._state.compareSettings);
Common.NotificationCenter.trigger('edit:complete', this.view);
} else if (item === 'url') {
(new Common.Views.ImageFromUrlDialog({
title: me.textUrl,
handler: function(result, value) {
if (result == 'ok') {
if (me.api) {
var checkUrl = value.replace(/ /g, '');
if (!_.isEmpty(checkUrl)) {
me.api.asc_MergeDocumentUrl(checkUrl, me._state.compareSettings);
}
}
Common.NotificationCenter.trigger('edit:complete', me.view);
}
}
})).show();
}
}
Common.NotificationCenter.trigger('edit:complete', this.view);
},
setRevisedFile: function(data) {
if (!this._state.compareSettings) {
this._state.compareSettings = new AscCommonWord.ComparisonOptions();
@ -832,7 +870,7 @@ define([
chat: false,
review: true,
viewport: false,
documentHolder: true,
documentHolder: {clear: false, disable: true},
toolbar: true,
plugins: true,
protect: true
@ -1014,7 +1052,7 @@ define([
if (!item.asc_getView())
length++;
});
Common.Utils.lockControls(Common.enumLock.hasCoeditingUsers, length>1, {array: [this.view.btnCompare]});
Common.Utils.lockControls(Common.enumLock.hasCoeditingUsers, length>1, {array: [this.view.btnCompare, this.view.btnCombine]});
}
},

View File

@ -1,3 +1,35 @@
/*
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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-6 Ernesta Birznieka-Upish
* 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
*
*/
/**
* Created by Maxim.Kadushkin on 2/5/2021.
*/
@ -133,6 +165,7 @@ define([
"canvas-high-contrast-disabled",
"canvas-cell-border",
"canvas-cell-title",
"canvas-cell-title-border",
"canvas-cell-title-border-hover",
"canvas-cell-title-border-selected",
@ -159,7 +192,16 @@ define([
"canvas-scroll-arrow-pressed",
"canvas-scroll-thumb-target",
"canvas-scroll-thumb-target-hover",
"canvas-scroll-thumb-target-pressed"
"canvas-scroll-thumb-target-pressed",
"canvas-sheet-view-cell-background",
"canvas-sheet-view-cell-background-hover",
"canvas-sheet-view-cell-background-pressed",
"canvas-sheet-view-cell-title-label",
"canvas-freeze-line-1px",
"canvas-freeze-line-2px",
"canvas-select-all-icon"
];
var get_current_theme_colors = function (colors) {
@ -280,7 +322,12 @@ define([
};
const is_theme_type_system = function (id) { return themes_map[id].type == THEME_TYPE_SYSTEM; }
const get_system_theme_type = function () { return window.matchMedia('(prefers-color-scheme: dark)').matches ? THEME_TYPE_DARK : THEME_TYPE_LIGHT; }
const get_system_theme_type = function () {
if ( Common.Controllers.Desktop && Common.Controllers.Desktop.isActive() )
return Common.Controllers.Desktop.systemThemeType();
return window.matchMedia('(prefers-color-scheme: dark)').matches ? THEME_TYPE_DARK : THEME_TYPE_LIGHT;
}
const get_system_default_theme = function () {
const id = get_system_theme_type() == THEME_TYPE_DARK ?
id_default_dark_theme : id_default_light_theme;

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* NotificationCenter.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Bootstrap.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ChatMessage.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Comments.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Font.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* User: Julia.Radzhabova
* Date: 05.03.15

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* User: Julia.Radzhabova
* Date: 17.05.16

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* ReviewChange.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* User.js
*

View File

@ -97,13 +97,43 @@
</div>
</div>
</div>
<div id="id-autocorrect-dialog-settings-autocorrect" class="settings-panel">
<div class="inner-content" style="width: 100%;">
<div class="padding-small">
<div id="id-autocorrect-dialog-chk-fl-sentence"></div>
</div>
<div class="padding-small">
<div id="id-autocorrect-dialog-chk-fl-cells"></div>
</div>
<div id="id-autocorrect-dialog-settings-exceptions" class="settings-panel">
<div class="inner-content">
<table cols="1" style="width: 100%;">
<tr>
<td style="padding-bottom: 12px;">
<div id="auto-correct-exceptions-chk-sentence" style="padding-bottom: 8px;"></div>
<div id="auto-correct-exceptions-chk-cells"></div>
</td>
</tr>
<tr>
<td>
<label><%= scope.textForLangFL %></label>
</td>
</tr>
<tr>
<td style="padding-bottom: 12px;">
<div id="auto-correct-exceptions-lang" style="display: inline-block; margin-right: 15px;vertical-align: middle;"></div>
</td>
</tr>
<tr>
<td>
<label><%= scope.textFLDont %></label>
<div id="auto-correct-exceptions-find" style="height:22px;width: 100%;margin-bottom: 4px;"></div>
</td>
</tr>
<tr>
<td style="padding-bottom: 8px;">
<div id="auto-correct-exceptions-list" class="" style="width:100%; height: 139px;"></div>
</td>
</tr>
<tr>
<td style="padding-bottom: 18px;">
<button type="button" class="btn btn-text-default auto" id="auto-correct-btn-exceptions-reset" style="min-width: 86px;"><%= scope.textResetAll %></button>
<button type="button" class="btn btn-text-default auto" id="auto-correct-btn-exceptions-delete" style="min-width: 86px;float: right;"><%= scope.textDelete %></button>
<button type="button" class="btn btn-text-default auto" id="auto-correct-btn-exceptions-edit" style="min-width: 86px;float: right;margin-right:5px;"><%= scope.textAdd %></button>
</td>
</tr>
</table>
</div>
</div>

View File

@ -62,7 +62,7 @@
<% if (!showReply && !scope.viewmode) { %>
<% if (replys.length && !add_arrow) { %>
<label class="user-reply" style="margin-left: 20px; margin-top: 5px;" role="presentation" tabindex="-1">textAddReply</label>
<label class="user-reply with-reply" role="presentation" tabindex="-1">textAddReply</label>
<% } else { %>
<label class="user-reply" role="presentation" tabindex="-1">textAddReply</label>
<% } %>

View File

@ -12,7 +12,7 @@
</div>
<div id="comments-header" class="">
<label><%=textComments%></label>
<div id="comments-btn-close" style="float:right;margin-left: 4px;"></div>
<div id="comments-btn-sort" style="float:right;"></div>
<div id="comments-btn-close"></div>
<div id="comments-btn-sort"></div>
</div>
</div>

View File

@ -63,7 +63,7 @@
<% if (!showReplyInPopover && !hideAddReply && (fullInfoInHint || !hint) && !scope.viewmode) { %>
<% if (replys.length && !add_arrow) { %>
<label class="user-reply" style="margin-left: 20px; margin-top: 5px;" role="presentation" tabindex="-1">textAddReply</label>
<label class="user-reply with-reply" role="presentation" tabindex="-1">textAddReply</label>
<% } else { %>
<label class="user-reply" role="presentation" tabindex="-1">textAddReply</label>
<% } %>

View File

@ -2,7 +2,7 @@
<div id="id-hsb-colorpicker" style="vertical-align:top;">
</div>
<div class="color-info" style="">
<div style="margin-left:15px;">
<div class="color-preview">
<label class="color-label"><%= txtNew %></label>
<div id="field-new-color" class="color-cnt top"></div>
<div id="field-start-color" class="color-cnt bottom"></div>

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* LanguageInfo.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* LocalStorage.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/**
* Shortcuts.js
*

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
/* ===========================================================
*
* Extends bootstrap-tooltip.js
@ -155,10 +154,16 @@
if (typeof this.options.placement === 'function') {
this.options.placement.call(this, $tip[0], this.$element[0]);
} else if (typeof at == 'object') {
var tp = {top: at[1] + 15, left: at[0] + 18},
var tp = {
top: at[1] + 15,
left: !Common.UI.isRTL() ? at[0] + 18 : at[0] - $tip.width() - 9
},
innerWidth = Common.Utils.innerWidth(),
innerHeight = Common.Utils.innerHeight();
if (tp.left < 0) {
tp.left = at[0] + 18;
}
if (tp.left + $tip.width() > innerWidth) {
tp.left = innerWidth - $tip.width() - 30;
}
@ -236,6 +241,11 @@
clearTimeout(self.timeout);
self.hoverState = 'in';
if (this._updateTitle) {
this.tip().find('.tooltip-inner')[this.options.html ? 'html' : 'text'](this.options.title);
this._updateTitle = undefined;
}
if (!self.options.delay || !self.options.delay.show) {
self.show();
} else {
@ -263,6 +273,11 @@
}
return out;
},
updateTitle: function(title) {
this.options.title = title;
this._updateTitle = title;
}
});

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions

View File

@ -1,6 +1,5 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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)
@ -13,7 +12,7 @@
* 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
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
@ -29,7 +28,7 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
*/
if (Common === undefined) {
var Common = {};
}
@ -463,6 +462,10 @@ define(function(){ 'use strict';
textComboBarLineSecondary: 'Clustered column - line on secondary axis',
textComboAreaBar: 'Stacked area - clustered column',
textComboCustom: 'Custom combination',
textRadar: 'Radar',
textRadarMarker: 'Radar with markers',
textRadarFilled: 'Filled radar',
getChartGroupData: function(headername) {
return [
@ -473,6 +476,7 @@ define(function(){ 'use strict';
{id: 'menu-chart-group-area', caption: this.textArea, inline: true},
{id: 'menu-chart-group-stock', caption: this.textStock, inline: true},
{id: 'menu-chart-group-scatter', caption: this.textPoint},
{id: 'menu-chart-group-radar', caption: this.textRadar},
{id: 'menu-chart-group-combo', caption: this.textCombo}
// {id: 'menu-chart-group-surface', caption: this.textSurface}
];
@ -512,6 +516,9 @@ define(function(){ 'use strict';
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatterLineMarker, iconCls: 'point-line-marker', tip: this.textScatterLineMarker},
{ group: 'menu-chart-group-scatter', type: Asc.c_oAscChartTypeSettings.scatterLine, iconCls: 'point-line', tip: this.textScatterLine},
{ group: 'menu-chart-group-stock', type: Asc.c_oAscChartTypeSettings.stock, iconCls: 'stock-normal', tip: this.textStock},
{ group: 'menu-chart-group-radar', type: Asc.c_oAscChartTypeSettings.radar, iconCls: 'radar', tip: this.textRadar},
{ group: 'menu-chart-group-radar', type: Asc.c_oAscChartTypeSettings.radarMarker, iconCls: 'radar-with-markers', tip: this.textRadarMarker},
{ group: 'menu-chart-group-radar', type: Asc.c_oAscChartTypeSettings.radarFilled, iconCls: 'filled-radar', tip: this.textRadarFilled},
{ group: 'menu-chart-group-combo', type: Asc.c_oAscChartTypeSettings.comboBarLine, iconCls: 'combo-bar-line', tip: this.textComboBarLine},
{ group: 'menu-chart-group-combo', type: Asc.c_oAscChartTypeSettings.comboBarLineSecondary, iconCls: 'combo-bar-line-sec', tip: this.textComboBarLineSecondary},
{ group: 'menu-chart-group-combo', type: Asc.c_oAscChartTypeSettings.comboAreaBar, iconCls: 'combo-area-bar', tip: this.textComboAreaBar},

View File

@ -1,3 +1,34 @@
/*
* (c) Copyright Ascensio System SIA 2010-2023
*
* 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-6 Ernesta Birznieka-Upish
* 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 ( window.AscDesktopEditor ) {
window.desktop = window.AscDesktopEditor;

Some files were not shown because too many files have changed in this diff Show More