mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-27 12:36:18 +08:00
Merge branch 'release/v7.4.0' into feature/scaling-250
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -13,8 +13,10 @@ apps/documenteditor/mobile/resources/sass/.sass-cache
|
||||
apps/spreadsheeteditor/mobile/resources/sass/.sass-cache
|
||||
apps/presentationeditor/mobile/resources/sass/.sass-cache
|
||||
apps/**/main/resources/**/iconssmall*.png
|
||||
apps/**/main/resources/**/iconssmall*.svg
|
||||
apps/**/main/resources/**/iconssmall*.less
|
||||
apps/**/main/resources/**/iconsbig*.png
|
||||
apps/**/main/resources/**/iconsbig*.svg
|
||||
apps/**/main/resources/**/iconsbig*.less
|
||||
apps/**/main/resources/**/iconshuge*.png
|
||||
apps/**/main/resources/**/iconshuge*.less
|
||||
|
||||
@ -162,6 +162,7 @@
|
||||
layout: false / true, // layout tab
|
||||
references: false / true, // de references tab
|
||||
collaboration: false / true // collaboration tab
|
||||
draw: false / true // draw tab
|
||||
protect: false / true, // protect tab
|
||||
plugins: false / true // plugins tab
|
||||
view: {
|
||||
@ -389,7 +390,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 ) {
|
||||
@ -445,7 +446,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.");
|
||||
|
||||
@ -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": {
|
||||
|
||||
@ -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 = {};
|
||||
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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 = {};
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 = {});
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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'
|
||||
|
||||
};
|
||||
|
||||
@ -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 = {});
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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 = {});
|
||||
|
||||
@ -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 = {};
|
||||
}
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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 = {};
|
||||
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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 = {};
|
||||
|
||||
@ -43,7 +42,12 @@ define([
|
||||
render: function(parentEl) {
|
||||
Common.UI.Button.prototype.render.call(this, parentEl);
|
||||
|
||||
$('button:first-child', this.cmpEl).append( $('<div class="btn-color-value-line"></div>'));
|
||||
if (/huge/.test(this.options.cls) && this.options.split === true ) {
|
||||
var btnEl = $('button', this.cmpEl),
|
||||
btnMenuEl = $(btnEl[1]);
|
||||
btnMenuEl && btnMenuEl.append( $('<div class="btn-color-value-line"></div>'));
|
||||
} else
|
||||
$('button:first-child', this.cmpEl).append( $('<div class="btn-color-value-line"></div>'));
|
||||
this.colorEl = this.cmpEl.find('.btn-color-value-line');
|
||||
|
||||
if (this.options.auto)
|
||||
@ -62,6 +66,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));
|
||||
@ -71,6 +78,9 @@ define([
|
||||
this.colorAuto = this.cmpEl.find('#' + this.menu.id + '-color-auto > a');
|
||||
(color == 'auto') && this.setAutoColor(true);
|
||||
}
|
||||
if (this.options.eyeDropper) {
|
||||
this.cmpEl.find('#' + this.menu.id + '-eyedropper').on('click', _.bind(this.onEyedropperStart, this));
|
||||
}
|
||||
this.initInnerMenu();
|
||||
}
|
||||
return this.colorPicker;
|
||||
@ -85,7 +95,8 @@ define([
|
||||
options = options || this.options;
|
||||
var height = options.paletteHeight ? options.paletteHeight + 'px' : 'auto',
|
||||
id = Common.UI.getId(),
|
||||
auto = [];
|
||||
auto = [],
|
||||
eyedropper = [];
|
||||
if (options.auto) {
|
||||
this.autocolor = (typeof options.auto == 'object') ? options.auto.color || '000000' : '000000';
|
||||
auto.push({
|
||||
@ -95,14 +106,22 @@ define([
|
||||
});
|
||||
auto.push({caption: '--'});
|
||||
}
|
||||
if (options.eyeDropper) {
|
||||
eyedropper.push({
|
||||
id: id + '-eyedropper',
|
||||
caption: this.textEyedropper,
|
||||
iconCls: 'menu__icon btn-eyedropper'
|
||||
});
|
||||
}
|
||||
|
||||
var menu = new Common.UI.Menu({
|
||||
id: id,
|
||||
cls: 'shifted-left',
|
||||
cls: 'color-menu ' + (options.eyeDropper ? 'shifted-right' : 'shifted-left'),
|
||||
additionalAlign: options.additionalAlign,
|
||||
items: (options.additionalItems ? options.additionalItems : []).concat(auto).concat([
|
||||
{ template: _.template('<div id="' + id + '-color-menu" style="width: 164px; height:' + height + '; display: inline-block;"></div>') },
|
||||
{caption: '--'},
|
||||
{caption: '--'}
|
||||
]).concat(eyedropper).concat([
|
||||
{
|
||||
id: id + '-color-new',
|
||||
template: _.template('<a tabindex="-1" type="menuitem" style="">' + this.textNewColor + '</a>')
|
||||
@ -135,10 +154,10 @@ define([
|
||||
this.menu.setInnerMenu([{menu: this.colorPicker, index: index}]);
|
||||
},
|
||||
|
||||
setMenu: function (m) {
|
||||
setMenu: function (m, preventCreatePicker) {
|
||||
m = m || this.getMenu();
|
||||
Common.UI.Button.prototype.setMenu.call(this, m);
|
||||
this.getPicker(this.options.color, this.options.colors);
|
||||
!preventCreatePicker && this.getPicker(this.options.color, this.options.colors);
|
||||
},
|
||||
|
||||
onColorSelect: function(picker, color) {
|
||||
@ -181,6 +200,17 @@ define([
|
||||
this.colorPicker && this.colorPicker.addNewColor((typeof(this.color) == 'object') ? this.color.color : this.color);
|
||||
},
|
||||
|
||||
onEyedropperStart: function () {
|
||||
this.trigger('eyedropper:start', this);
|
||||
},
|
||||
|
||||
eyedropperEnd: function (r, g, b) {
|
||||
var color = Common.Utils.ThemeColor.getHexColor(r, g, b);
|
||||
this.colorPicker.setCustomColor('#' + color);
|
||||
this.onColorSelect(this.colorPicker, color);
|
||||
this.trigger('eyedropper:end', this);
|
||||
},
|
||||
|
||||
onBeforeKeyDown: function(menu, e) {
|
||||
if ((e.keyCode == Common.UI.Keys.DOWN || e.keyCode == Common.UI.Keys.SPACE) && !this.isMenuOpen()) {
|
||||
$('button', this.cmpEl).click();
|
||||
@ -193,7 +223,8 @@ define([
|
||||
},
|
||||
|
||||
textNewColor: 'Add New Custom Color',
|
||||
textAutoColor: 'Automatic'
|
||||
textAutoColor: 'Automatic',
|
||||
textEyedropper: 'Eyedropper'
|
||||
|
||||
}, Common.UI.ButtonColored || {}));
|
||||
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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}, //pxValue = 1.34px
|
||||
{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: 6, offsety: 100},
|
||||
{displayValue: '6 ' + txtPt, value: 6, pxValue: 8, 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();
|
||||
@ -191,15 +194,23 @@ define([
|
||||
'<% _.each(items, function(item) { %>',
|
||||
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">',
|
||||
'<% if (!isRTL) { %>',
|
||||
'<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><%= item.displayValue %>' + '</span>',
|
||||
'<% if (item.imgId!==undefined) { %>',
|
||||
'<span class="border-line">',
|
||||
'<svg>',
|
||||
'<use xlink:href="#<%= item.imgId %>"></use>',
|
||||
'</svg>',
|
||||
'</span>',
|
||||
'<% } %>',
|
||||
'<% } else { %>',
|
||||
'<% if (item.offsety!==undefined) { %>',
|
||||
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" align="left" style="background-position: 0 -<%= item.offsety %>px;">',
|
||||
'<% if (item.imgId!==undefined) { %>',
|
||||
'<span class="border-line">',
|
||||
'<svg>',
|
||||
'<use xlink:href="#<%= item.imgId %>"></use>',
|
||||
'</svg>',
|
||||
'</span>',
|
||||
'<% } %>',
|
||||
'<span><%= item.displayValue %></span>',
|
||||
'<span><%= item.displayValue %>' + '</span>',
|
||||
'<% } %>',
|
||||
'</a></li>',
|
||||
'<% }); %>',
|
||||
@ -211,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: 6, offsety: 100},
|
||||
{displayValue: '6 ' + txtPt, value: 6, pxValue: 8, 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)
|
||||
@ -243,7 +254,7 @@ define([
|
||||
template: _.template([
|
||||
'<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">',
|
||||
@ -252,9 +263,10 @@ 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 style="margin-top: 0;"></span>',
|
||||
'<% if (item.offsety!==undefined) { %>',
|
||||
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="background-position: 0 -<%= item.offsety %>px;">',
|
||||
'<% if (item.imgId!==undefined) { %>',
|
||||
'<span>',
|
||||
'<svg><use xlink:href="#<%= item.imgId %>"></use></svg>',
|
||||
'</span>',
|
||||
'<% } %>',
|
||||
'</a></li>',
|
||||
'<% }); %>',
|
||||
@ -266,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));
|
||||
},
|
||||
@ -284,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) {
|
||||
|
||||
@ -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,6 +153,7 @@ define([
|
||||
menuStyle : this.menuStyle,
|
||||
items : items,
|
||||
scope : me,
|
||||
placeHolder : this.placeHolder,
|
||||
dataHint : this.options.dataHint,
|
||||
dataHintDirection: this.options.dataHintDirection,
|
||||
dataHintOffset: this.options.dataHintOffset,
|
||||
@ -184,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));
|
||||
@ -262,6 +266,8 @@ define([
|
||||
},
|
||||
|
||||
openMenu: function(delay) {
|
||||
if (this.store.length<1) return;
|
||||
|
||||
var me = this;
|
||||
|
||||
if ( !this.scroller ) {
|
||||
@ -337,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);
|
||||
}
|
||||
@ -345,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 = {};
|
||||
},
|
||||
|
||||
@ -374,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) {
|
||||
@ -460,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;
|
||||
@ -516,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');
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
});
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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 = {};
|
||||
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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 = {};
|
||||
|
||||
|
||||
@ -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([
|
||||
@ -408,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 = {};
|
||||
@ -768,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([
|
||||
@ -1030,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 = {};
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
@ -128,7 +127,8 @@ define([
|
||||
'</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;
|
||||
@ -446,7 +446,7 @@ define([
|
||||
for (var i=0; i<_flex.length; i++) {
|
||||
var item = _flex[i].el;
|
||||
_rightedge = $active.outerWidth() + _staticPanelWidth;
|
||||
if (item.outerWidth() > parseInt(item.css('min-width'))) {
|
||||
if (Math.floor(item.outerWidth()) > parseInt(item.css('min-width'))) {
|
||||
data.rightedge = _rightedge;
|
||||
return;
|
||||
} else
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 = {};
|
||||
|
||||
|
||||
@ -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
|
||||
*
|
||||
@ -74,9 +73,9 @@ define([
|
||||
render: function() {
|
||||
var el = this.template(this);
|
||||
this.$el = $(el);
|
||||
this.$el.find('span').tooltip({
|
||||
/*this.$el.find('span').tooltip({
|
||||
title: this.label,
|
||||
placement: 'cursor'});
|
||||
placement: 'cursor'});*/
|
||||
this.rendered = true;
|
||||
this.disable(this.disabled);
|
||||
return this;
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
*/
|
||||
*/
|
||||
/**
|
||||
* TableStyler.js
|
||||
*
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,7 +58,9 @@ define([
|
||||
transparent: false,
|
||||
value: '000000',
|
||||
enableKeyEvents: true,
|
||||
keyMoveDirection: 'both' // 'vertical', 'horizontal'
|
||||
colorHints: true,
|
||||
keyMoveDirection: 'both', // 'vertical', 'horizontal',
|
||||
storageSuffix: ''
|
||||
},
|
||||
|
||||
template :
|
||||
@ -70,18 +71,18 @@ define([
|
||||
'<% 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"> </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"> </span></em>' +
|
||||
'</a>' +
|
||||
'<% } else if (me.isEffect(item)) { %>' +
|
||||
'<% if (idx>0 && me.columns>0 && idx%me.columns===0) { %> ' +
|
||||
'<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"> </span></em>' +
|
||||
'</a>' +
|
||||
'<% } else if (me.isCaption(item)) { %>' +
|
||||
@ -94,7 +95,7 @@ define([
|
||||
'<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"> </span></em></a>' +
|
||||
'<% } %>' +
|
||||
'<% } %>' +
|
||||
@ -116,6 +117,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 +157,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;
|
||||
},
|
||||
|
||||
@ -192,7 +205,7 @@ define([
|
||||
this.lastSelectedIdx = -1;
|
||||
}
|
||||
|
||||
var colors = Common.localStorage.getItem('asc.'+Common.localStorage.getId()+'.colors.custom');
|
||||
var colors = Common.localStorage.getItem('asc.'+Common.localStorage.getId()+'.colors.custom' + this.options.storageSuffix);
|
||||
colors = colors ? colors.split(',') : [];
|
||||
|
||||
var i = -1, colorEl, c = colors.length < this.options.dynamiccolors ? colors.length : this.options.dynamiccolors;
|
||||
@ -210,6 +223,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);
|
||||
@ -290,33 +304,38 @@ define([
|
||||
var el = this.$el || $(this.el);
|
||||
color = /#?([a-fA-F0-9]{6})/.exec(color);
|
||||
if (color) {
|
||||
this.saveCustomColor(color[1]);
|
||||
var isNew = this.saveCustomColor(color[1]);
|
||||
this.clearSelection(true);
|
||||
|
||||
var child = el.find('.dynamic-empty-color');
|
||||
if (child.length==0) {
|
||||
this.updateCustomColors();
|
||||
child = el.find('.color-dynamic-' + (this.options.dynamiccolors - 1));
|
||||
} else {
|
||||
if (this.options.hideEmptyColors && this._layoutParams) // recalc indexed
|
||||
if (isNew && this.options.hideEmptyColors && this._layoutParams) // recalc indexed
|
||||
this._layoutParams = undefined;
|
||||
}
|
||||
|
||||
child.first().removeClass('dynamic-empty-color').removeClass(this.emptyColorsClass).addClass(this.selectedCls).attr('color', color[1]);
|
||||
child.first().find('span').css({
|
||||
'background-color': '#'+color[1]
|
||||
});
|
||||
if (isNew) {
|
||||
child.first().removeClass('dynamic-empty-color').removeClass(this.emptyColorsClass).addClass(this.selectedCls).attr('color', color[1]);
|
||||
child.first().find('span').css({
|
||||
'background-color': '#' + color[1]
|
||||
});
|
||||
}
|
||||
el.find('.palette-color-dynamiccolors').removeClass(this.emptyColorsClass);
|
||||
this.select(color[1], true);
|
||||
}
|
||||
},
|
||||
|
||||
saveCustomColor: function(color) {
|
||||
var key_name = 'asc.'+Common.localStorage.getId()+'.colors.custom';
|
||||
var key_name = 'asc.'+Common.localStorage.getId()+'.colors.custom' + this.options.storageSuffix;
|
||||
var colors = Common.localStorage.getItem(key_name);
|
||||
colors = colors ? colors.split(',') : [];
|
||||
if (colors.push(color) > this.options.dynamiccolors) colors.shift();
|
||||
Common.localStorage.setItem(key_name, colors.join().toUpperCase());
|
||||
var index = _.indexOf(colors, color.toUpperCase());
|
||||
if (index < 0) {
|
||||
if (colors.push(color) > this.options.dynamiccolors) colors.shift();
|
||||
Common.localStorage.setItem(key_name, colors.join().toUpperCase());
|
||||
}
|
||||
return index < 0;
|
||||
},
|
||||
|
||||
addNewColor: function(defcolor) {
|
||||
@ -446,11 +465,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 +493,7 @@ define([
|
||||
aEl.attr('effectvalue', '' + effectcolors[aEffectIdx].effectValue);
|
||||
|
||||
me.colors[i] = effectcolors[aEffectIdx];
|
||||
|
||||
me.colorHints && me.createTip(aEl, effectcolors[aEffectIdx].tip);
|
||||
aEffectIdx++;
|
||||
}
|
||||
}
|
||||
@ -489,6 +509,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 +709,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 || {}));
|
||||
});
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
@ -380,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');
|
||||
|
||||
119
apps/common/main/lib/component/UpDownPicker.js
Normal file
119
apps/common/main/lib/component/UpDownPicker.js
Normal file
@ -0,0 +1,119 @@
|
||||
/*
|
||||
* (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
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* UpDownPicker.js
|
||||
*
|
||||
* Created by Julia Radzhabova on 3/29/23
|
||||
* Copyright (c) 2023 Ascensio System SIA. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
if (Common === undefined)
|
||||
var Common = {};
|
||||
|
||||
define([
|
||||
'common/main/lib/component/BaseView'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
Common.UI.UpDownPicker = Common.UI.BaseView.extend((function(){
|
||||
return {
|
||||
options: {
|
||||
caption: '',
|
||||
iconUpCls: 'btn-zoomup',
|
||||
iconDownCls: 'btn-zoomdown',
|
||||
minWidth: 40
|
||||
},
|
||||
disabled : false,
|
||||
|
||||
template:_.template([
|
||||
'<label class="title"><%= options.caption %></label>',
|
||||
'<button type="button" class="btn small btn-toolbar updown-picker-button-up"><i class="icon menu__icon <%= options.iconUpCls %>"> </i></button>',
|
||||
'<label class="updown-picker-value" style="min-width: <%= options.minWidth %>px;"></label>',
|
||||
'<button type="button" class="btn small btn-toolbar updown-picker-button-down"><i class="icon menu__icon <%= options.iconDownCls %>"> </i></button>'
|
||||
].join('')),
|
||||
|
||||
initialize : function(options) {
|
||||
Common.UI.BaseView.prototype.initialize.call(this, options);
|
||||
|
||||
this.render();
|
||||
|
||||
this.cmpEl = this.$el || $(this.el);
|
||||
|
||||
this.btnUp = new Common.UI.Button({
|
||||
el: this.cmpEl.find('.updown-picker-button-up')
|
||||
}).on('click', _.bind(function () {
|
||||
this.trigger('click', 'up');
|
||||
}, this));
|
||||
|
||||
this.btnDown = new Common.UI.Button({
|
||||
el: this.cmpEl.find('.updown-picker-button-down')
|
||||
}).on('click', _.bind(function () {
|
||||
this.trigger('click', 'down');
|
||||
}, this));
|
||||
|
||||
this.displayValue = this.cmpEl.find('.updown-picker-value');
|
||||
|
||||
if (this.options.disabled)
|
||||
this.setDisabled(this.options.disabled);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
var el = this.$el || $(this.el);
|
||||
el.html($(this.template({
|
||||
options: this.options
|
||||
})));
|
||||
|
||||
this.rendered = true;
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
setValue: function(value) {
|
||||
this.displayValue.html(value || '');
|
||||
},
|
||||
|
||||
setDisabled: function(disabled) {
|
||||
if (!this.rendered)
|
||||
return;
|
||||
|
||||
disabled = (disabled===true);
|
||||
if (disabled !== this.disabled) {
|
||||
this.btnUp.setDisabled(disabled);
|
||||
this.btnDown.setDisabled(disabled);
|
||||
}
|
||||
|
||||
this.disabled = disabled;
|
||||
}
|
||||
}
|
||||
})())
|
||||
});
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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);
|
||||
},
|
||||
|
||||
|
||||
@ -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
|
||||
@ -41,21 +40,21 @@ define([
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
var features = {
|
||||
version: '{{PRODUCT_VERSION}}',
|
||||
eventloading: true,
|
||||
titlebuttons: true,
|
||||
uithemes: true,
|
||||
btnhome: true,
|
||||
quickprint: true
|
||||
};
|
||||
var webapp = window.DE || window.PE || window.SSE;
|
||||
var features = Object.assign({
|
||||
version: '{{PRODUCT_VERSION}}',
|
||||
eventloading: true,
|
||||
titlebuttons: true,
|
||||
uithemes: true,
|
||||
btnhome: true,
|
||||
quickprint: true,
|
||||
}, webapp.features);
|
||||
|
||||
var native = window.desktop || window.AscDesktopEditor;
|
||||
!!native && native.execCommand('webapps:features', JSON.stringify(features));
|
||||
|
||||
var Desktop = function () {
|
||||
var config = {version:'{{PRODUCT_VERSION}}'};
|
||||
var webapp = window.DE || window.PE || window.SSE;
|
||||
var titlebuttons;
|
||||
var btnsave_icons = {
|
||||
'btn-save': 'save',
|
||||
@ -98,7 +97,12 @@ define([
|
||||
if ( obj.singlewindow !== undefined ) {
|
||||
// $('#box-document-title .hedset')[obj.singlewindow ? 'hide' : 'show']();
|
||||
native.features.singlewindow = obj.singlewindow;
|
||||
titlebuttons.home && titlebuttons.home.btn.setVisible(obj.singlewindow);
|
||||
|
||||
if ( config.isFillFormApp ) {
|
||||
$("#title-doc-name")[obj.singlewindow ? 'hide' : 'show']();
|
||||
} else {
|
||||
titlebuttons && titlebuttons.home && titlebuttons.home.btn.setVisible(obj.singlewindow);
|
||||
}
|
||||
}
|
||||
} else
|
||||
if (/editor:config/.test(cmd)) {
|
||||
@ -213,7 +217,7 @@ define([
|
||||
}
|
||||
|
||||
var _onKeyDown = function (e) {
|
||||
if ( Common.UI.HintManager.isHintVisible() ) {
|
||||
if ( Common.UI.HintManager && Common.UI.HintManager.isHintVisible() ) {
|
||||
native.execCommand('althints:keydown', JSON.stringify({code:e.keyCode}));
|
||||
console.log('hint keydown', e.keyCode);
|
||||
}
|
||||
@ -261,18 +265,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){
|
||||
})
|
||||
}
|
||||
});
|
||||
@ -463,6 +473,11 @@ define([
|
||||
}, {id: 'desktop'});
|
||||
|
||||
$(document).on('keydown', _onKeyDown.bind(this));
|
||||
|
||||
if ( features.uitype == 'fillform' ) {
|
||||
config.isFillFormApp = true;
|
||||
$('#header-logo, .brand-logo').hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
process: function (opts) {
|
||||
@ -526,8 +541,13 @@ 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';
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
!Common.Controllers && (Common.Controllers = {});
|
||||
Common.Controllers.Desktop = new Desktop();
|
||||
});
|
||||
|
||||
198
apps/common/main/lib/controller/Draw.js
Normal file
198
apps/common/main/lib/controller/Draw.js
Normal file
@ -0,0 +1,198 @@
|
||||
/*
|
||||
* (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
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Draw.js
|
||||
*
|
||||
* Created by Julia Radzhabova on 28.03.2023
|
||||
* Copyright (c) 2023 Ascensio System SIA. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
if (Common === undefined)
|
||||
var Common = {};
|
||||
Common.Controllers = Common.Controllers || {};
|
||||
|
||||
define([
|
||||
'core',
|
||||
'common/main/lib/view/Draw',
|
||||
'common/main/lib/view/PasswordDialog',
|
||||
'common/main/lib/view/SignDialog',
|
||||
'common/main/lib/view/SignSettingsDialog'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
Common.Controllers.Draw = Backbone.Controller.extend(_.extend({
|
||||
models : [],
|
||||
collections : [
|
||||
],
|
||||
views : [
|
||||
'Common.Views.Draw'
|
||||
],
|
||||
sdkViewName : '#id_main',
|
||||
|
||||
initialize: function () {
|
||||
|
||||
this.addListeners({
|
||||
'Common.Views.Draw': {
|
||||
'draw:select': _.bind(this.onSelect, this),
|
||||
'draw:eraser': _.bind(this.onEraser, this),
|
||||
'draw:pen': _.bind(this.onDrawPen, this),
|
||||
'draw:size': _.bind(this.onDrawSizeClick, this),
|
||||
'draw:color': _.bind(this.onDrawColorClick, this)
|
||||
}
|
||||
});
|
||||
},
|
||||
onLaunch: function () {
|
||||
this._state = {};
|
||||
|
||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||
},
|
||||
|
||||
setConfig: function (data, api) {
|
||||
this.setApi(api);
|
||||
|
||||
if (data) {
|
||||
this.sdkViewName = data['sdkviewname'] || this.sdkViewName;
|
||||
}
|
||||
},
|
||||
setApi: function (api) {
|
||||
if (api) {
|
||||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onInkDrawerStop',_.bind(this.onInkDrawerStop, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
setMode: function(mode) {
|
||||
this.appConfig = mode;
|
||||
|
||||
this.view = this.createView('Common.Views.Draw', {
|
||||
mode: mode
|
||||
});
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
SetDisabled: function(state) {
|
||||
this.view && this.view.SetDisabled(state);
|
||||
},
|
||||
|
||||
onInkDrawerStop: function() {
|
||||
this.view && this.view.depressButtons();
|
||||
},
|
||||
|
||||
onSelect: function(btn){
|
||||
this.api && this.api.asc_StopInkDrawer();
|
||||
Common.NotificationCenter.trigger('edit:complete', this.view);
|
||||
},
|
||||
|
||||
onEraser: function(btn){
|
||||
if (this.api) {
|
||||
if (!btn.pressed)
|
||||
this.api.asc_StopInkDrawer();
|
||||
else {
|
||||
this.view.depressButtons(btn);
|
||||
this.api.asc_StartInkEraser();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onDrawPen: function(btn){
|
||||
if (this.api) {
|
||||
if (!btn.pressed)
|
||||
this.api.asc_StopInkDrawer();
|
||||
else {
|
||||
this.view.depressButtons(btn);
|
||||
|
||||
var options = btn.options.penOptions;
|
||||
var stroke = new Asc.asc_CStroke();
|
||||
stroke.put_type( Asc.c_oAscStrokeType.STROKE_COLOR);
|
||||
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(options.color));
|
||||
stroke.asc_putPrstDash(Asc.c_oDashType.solid);
|
||||
stroke.put_width(options.size.arr[options.size.idx]);
|
||||
stroke.put_transparent(options.opacity * 2.55);
|
||||
this.api.asc_StartDrawInk(stroke);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onDrawSizeClick: function(btn, direction){
|
||||
if (!btn.pressed) {
|
||||
btn.toggle(true, true);
|
||||
this.view && this.view.depressButtons(btn);
|
||||
}
|
||||
|
||||
var options = btn.options.penOptions;
|
||||
options.size.idx = (direction==='up') ? Math.min(options.size.idx+1, options.size.arr.length-1) : Math.max(options.size.idx-1, 0);
|
||||
this.view && this.view.updateButtonHint(btn);
|
||||
|
||||
this.onDrawPen(btn);
|
||||
},
|
||||
|
||||
onDrawColorClick: function(btn, color){
|
||||
if (!btn.pressed) {
|
||||
btn.toggle(true, true);
|
||||
this.view && this.view.depressButtons(btn);
|
||||
}
|
||||
|
||||
btn.options.penOptions.color = color;
|
||||
this.view && this.view.updateButtonHint(btn);
|
||||
|
||||
this.onDrawPen(btn);
|
||||
},
|
||||
|
||||
createToolbarPanel: function() {
|
||||
return this.view.getPanel();
|
||||
},
|
||||
|
||||
getView: function(name) {
|
||||
return !name && this.view ?
|
||||
this.view : Backbone.Controller.prototype.getView.call(this, name);
|
||||
},
|
||||
|
||||
onAppReady: function (config) {
|
||||
var me = this;
|
||||
(new Promise(function (accept, reject) {
|
||||
accept();
|
||||
})).then(function(){
|
||||
});
|
||||
},
|
||||
|
||||
onCoAuthoringDisconnect: function() {
|
||||
this.SetDisabled(true);
|
||||
}
|
||||
|
||||
}, Common.Controllers.Draw || {}));
|
||||
});
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
85
apps/common/main/lib/controller/ExternalUsers.js
Normal file
85
apps/common/main/lib/controller/ExternalUsers.js
Normal 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
|
||||
}
|
||||
})();
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
@ -120,8 +119,11 @@ Common.UI.HintManager = new(function() {
|
||||
_isEditDiagram = false,
|
||||
_usedTitles = [],
|
||||
_appPrefix,
|
||||
_staticHints = { // for desktop buttons
|
||||
_staticHints = { // for 0 level
|
||||
// "btnhome": 'K'
|
||||
// "quick-print": 'Q'
|
||||
"scroll-right": 'R',
|
||||
"scroll-left": 'V'
|
||||
};
|
||||
|
||||
var _api;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
@ -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 || {}));
|
||||
});
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
*
|
||||
@ -551,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);
|
||||
},
|
||||
@ -670,7 +677,7 @@ define([
|
||||
}
|
||||
if (item === 'file') {
|
||||
if (this.api)
|
||||
this.api.asc_CompareDocumentFile(this._state.compareSettings);
|
||||
setTimeout(function() {me.api.asc_CompareDocumentFile(me._state.compareSettings);}, 1);
|
||||
Common.NotificationCenter.trigger('edit:complete', this.view);
|
||||
} else if (item === 'url') {
|
||||
(new Common.Views.ImageFromUrlDialog({
|
||||
@ -727,7 +734,7 @@ define([
|
||||
this._state.compareSettings.putWords(!Common.localStorage.getBool("de-compare-char"));
|
||||
}
|
||||
if (item === 'file') {
|
||||
this.api.asc_MergeDocumentFile(this._state.compareSettings);
|
||||
setTimeout(function() {me.api.asc_MergeDocumentFile(me._state.compareSettings);}, 1);
|
||||
Common.NotificationCenter.trigger('edit:complete', this.view);
|
||||
} else if (item === 'url') {
|
||||
(new Common.Views.ImageFromUrlDialog({
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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>
|
||||
<% } %>
|
||||
|
||||
@ -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>
|
||||
<% } %>
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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},
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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.fetch ) {
|
||||
var element = document.createElement('script');
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user