Compare commits

..

92 commits

Author SHA1 Message Date
Lea 4eebaab5e6
Enable mobile editing 2023-01-12 14:28:17 +01:00
papacarlo ddec589b37 Merge branch hotfix/v7.2.2 into master 2022-12-20 08:00:10 +00:00
Maxim Kadushkin 7b03f08adc [desktop] for bug 60014 2022-12-07 16:54:48 +03:00
Maxim Kadushkin 3208a4bdf2 [desktop] hide panel before "print" command 2022-12-07 16:48:55 +03:00
Maxim Kadushkin 9e608f168d [desktop] for bug 60014 2022-12-06 21:43:43 +03:00
Maxim Kadushkin f91bc6e50e [desktop] for bug 60025 2022-12-06 20:24:15 +03:00
maxkadushkin b5c282872d
Merge pull request #2105 from ONLYOFFICE/fix/bug-59971
For Bug 59971
2022-12-04 22:50:14 +03:00
Julia Radzhabova 37b37425af For Bug 59971 2022-12-04 16:56:12 +03:00
Maxim Kadushkin f7eccb611f [DE] fix bug 59971 2022-12-03 23:27:22 +03:00
Julia Radzhabova f453f92a32
Merge pull request #2102 from ONLYOFFICE/fix/translation
Update translation. Fix Bug 59947
2022-12-02 14:24:26 +03:00
Julia Radzhabova b6d7e60624 Update translation. Fix Bug 59947 2022-12-02 14:18:13 +03:00
Maxim Kadushkin 6b269291ae [all] hide "quick print" button for macos 2022-12-02 00:14:31 +03:00
Julia Radzhabova 9e80367822
Merge pull request #2098 from ONLYOFFICE/fix/bugfix
Fix Bug 59959
2022-11-30 22:00:24 +03:00
Julia Radzhabova 2bcb91c15c Fix Bug 59959 2022-11-30 21:53:27 +03:00
Maxim Kadushkin 215f2bf28d [desktop] debug 2022-11-30 21:18:32 +03:00
Maxim Kadushkin 6543e5bb49 [SSE PE] fix bug 59951 2022-11-30 15:36:56 +03:00
Julia Radzhabova 9940b59d38
Merge pull request #2095 from ONLYOFFICE/fix/bugfix
[SSE] Try printing in internal spreadsheet editor
2022-11-30 01:37:54 +03:00
Julia Radzhabova 2c48d5c8cb [SSE] Try printing in internal spreadsheet editor 2022-11-30 01:31:59 +03:00
Julia Radzhabova 1ef412c1ee
Merge pull request #2091 from ONLYOFFICE/fix/bugfix
[DE][PE] Fix Bug 59911
2022-11-28 14:13:07 +03:00
Julia Radzhabova 70d6ecb6dc [DE][PE] Fix Bug 59911 2022-11-28 14:06:48 +03:00
Julia Radzhabova 43617a9729
Merge pull request #2087 from ONLYOFFICE/fix/translation
Update translation. Fix Bug 59887
2022-11-25 17:37:42 +03:00
Julia Radzhabova 30d35b42eb Update translation. Fix Bug 59887 2022-11-25 17:31:35 +03:00
Maxim Kadushkin 7e7f519caf [desktop] refactoring 2022-11-22 19:28:54 +03:00
Julia Radzhabova 62d74b444c
Merge pull request #2077 from ONLYOFFICE/fix/quick-preview-warning
Show warning before first click on Quick print button
2022-11-22 01:15:13 +03:00
Julia Radzhabova 7d0ac791aa Show warning before first click on Quick print button 2022-11-22 00:56:54 +03:00
Maxim Kadushkin 8e25f9c027 [desktop] event on show 'quick print' button 2022-11-22 00:28:55 +03:00
Maxim Kadushkin 4fa78dad3a [desktop] 'file locked' message didn't open 2022-11-21 13:04:25 +03:00
Julia Radzhabova 58203c0989
Merge pull request #2071 from ONLYOFFICE/fix/quick-print
Change button's order
2022-11-18 19:17:19 +03:00
Julia Radzhabova aec1b4464d Change button's order 2022-11-18 19:09:50 +03:00
Julia Radzhabova c7f4687a2f
Merge pull request #2067 from ONLYOFFICE/fix/print-preview
Fix/print preview
2022-11-18 15:11:10 +03:00
Julia Radzhabova 7455c536ac Add translation 2022-11-18 15:03:47 +03:00
Julia Radzhabova 033c44d473 [DE][PE] Show error when printing several pages 2022-11-18 14:47:58 +03:00
Julia Radzhabova 81fcfb05f0
Merge pull request #2065 from ONLYOFFICE/fix/print-preview
[DE][PE] Send paper size preset
2022-11-17 22:52:56 +03:00
Julia Radzhabova 8eb8226da2 [DE][PE] Send paper size preset 2022-11-17 22:47:18 +03:00
Julia Radzhabova 6f59e5771b
Merge pull request #2063 from ONLYOFFICE/fix/print-preview
[PE] Send paper size for print preview
2022-11-17 12:55:47 +03:00
Julia Radzhabova 640edd8a79 [PE] Send paper size for print preview 2022-11-17 12:49:11 +03:00
Maxim Kadushkin b825310d30 [desktop] changed "read only" file opening 2022-11-16 19:04:46 +03:00
Julia Radzhabova 4c4da4113f
Merge pull request #2059 from ONLYOFFICE/fix/print-preview
[DE] Send settings for first printing page
2022-11-16 15:45:52 +03:00
Julia Radzhabova db925cd1e8 [DE] Send settings for first printing page 2022-11-16 15:38:00 +03:00
Julia Radzhabova d535175dc1
Merge pull request #2058 from ONLYOFFICE/fix/quick-print
Fix/quick print
2022-11-16 14:52:39 +03:00
Julia Radzhabova 1401b51648 Merge branch 'hotfix/v7.2.2' into fix/quick-print 2022-11-16 14:46:00 +03:00
Julia Radzhabova 629af711e2 [PE][SSE] Add quick print button 2022-11-16 14:28:07 +03:00
Julia Radzhabova d4de267db2 Add icons for quick print/print preview 2022-11-16 14:25:12 +03:00
Julia Radzhabova 1ba9ddf351 [DE] Quick print 2022-11-16 12:46:49 +03:00
Maxim Kadushkin 2d2958e07b Merge branch 'hotfix/v7.2.2' of https://github.com/ONLYOFFICE/web-apps into hotfix/v7.2.2 2022-11-16 00:08:44 +03:00
Maxim Kadushkin 72fd49401f [desktop] get def printer name 2022-11-16 00:08:16 +03:00
Julia Radzhabova d2a87abfb5
Merge pull request #2055 from ONLYOFFICE/fix/print-preview
Fix/print preview
2022-11-15 23:40:14 +03:00
Julia Radzhabova 2a128bc539 [DE] Add quick print button 2022-11-15 21:45:25 +03:00
Julia Radzhabova c4536c0807 [PE] Add paper size. Send print settings to sdk. Enable print preview only for desktop. 2022-11-15 17:54:09 +03:00
Julia Radzhabova 53298b4aab [DE] Fix translation 2022-11-15 17:47:41 +03:00
Julia Radzhabova 24830cb70b [DE] Send print settings to sdk. Enable print preview only for desktop. 2022-11-15 16:45:28 +03:00
maxkadushkin 50bf470a63
Merge pull request #2051 from ONLYOFFICE/fix/refactoringLocks
Refactoring locks
2022-11-14 18:07:03 +03:00
Oleg Korshul a715c720ca Refactoring locks 2022-11-14 18:00:11 +03:00
Julia Radzhabova 6656f45b04
Merge pull request #2038 from ONLYOFFICE/fix/bugfix
[SSE] Fix bug 59466
2022-11-08 16:59:43 +03:00
JuliaSvinareva c0493d45ab [SSE] Fix bug 59466 2022-11-08 16:53:16 +03:00
Julia Radzhabova d499edb1f3
Merge pull request #2036 from ONLYOFFICE/feature/print-preview
Feature/print preview
2022-11-07 23:17:04 +03:00
Julia Radzhabova fcaeb143ba
Merge pull request #2032 from ONLYOFFICE/fix/bugfix
Fix Bug 59592
2022-11-01 16:29:54 +03:00
Julia Radzhabova 1ac0d04f2e Fix Bug 59592 2022-11-01 16:13:30 +03:00
Julia Radzhabova 42b75058c5 [PE] Show print preview 2022-10-27 15:40:52 +03:00
Julia Radzhabova d4aed51fdf [DE] Print preview refactoring 2022-10-27 15:29:06 +03:00
Julia Radzhabova 591cf88d5e [DE] Disable page settings in print preview 2022-10-26 22:13:10 +03:00
Julia Radzhabova 3dffb8a7ba [DE] Fix print preview 2022-10-26 00:22:23 +03:00
Julia Radzhabova e0c8c84c72 [DE] Refactoring custom margins 2022-10-25 23:56:46 +03:00
Julia Radzhabova 0020e55ea0 [DE] Fix pages numbers for printing 2022-10-25 21:40:16 +03:00
Julia Radzhabova d8600b8a2a [DE] Refactoring print preview, hide preview for mac os 2022-10-24 19:02:05 +03:00
Julia Radzhabova 229e55811e [DE] Init preview div 2022-10-24 14:16:34 +03:00
Julia Radzhabova c0fea1c230 [DE] Add print preview panel 2022-10-21 23:22:16 +03:00
papacarlo 645ff855aa Merge branch hotfix/v7.2.1 into master 2022-10-20 13:12:05 +00:00
Oleg Korshul 36e8f4214c
Merge pull request #2014 from ONLYOFFICE/fix/bugfix
[DE][PE] Remove hieroglyphs settings
2022-10-17 11:05:11 +03:00
Julia Radzhabova a0b6f03c71 [DE][PE] Remove hieroglyphs settings 2022-10-17 11:00:51 +03:00
Julia Radzhabova 8a5e21bc46 [DE] Fix forms dicsonnect 2022-10-14 18:24:03 +03:00
Julia Radzhabova 30a620c94a [DE] Use new type for complex field 2022-10-14 18:24:03 +03:00
Julia Radzhabova 447e203174 For Bug 59377 2022-10-14 18:24:03 +03:00
Julia Radzhabova ebaf3f2b1a Update help 2022-10-14 17:43:03 +03:00
Oleg Korshul 0621ebf4fd
Merge pull request #2009 from ONLYOFFICE/fix/bug-52732
Fix/bug 52732
2022-10-14 14:46:12 +03:00
Oleg Korshul 8a98c718fa Refactoring 2022-10-14 14:31:55 +03:00
Julia Radzhabova 207bdece2a For Bug 52732 2022-10-14 13:36:10 +03:00
Julia Radzhabova 5f7bd9d805
Merge pull request #2007 from ONLYOFFICE/fix/de-formKey
[DE] Fix apply empty key (back to old value)
2022-10-13 19:59:41 +03:00
Julia Radzhabova 1a61da2ae2 [DE] Fix apply empty key (back to old value) 2022-10-13 19:40:33 +03:00
Maxim Kadushkin 567cfdcd5d [desktop] for bug 59316 2022-10-12 23:02:44 +03:00
Julia Radzhabova 677b629c66
Merge pull request #2004 from ONLYOFFICE/fix/fix-search
[SSE] Fix search
2022-10-12 18:44:23 +03:00
JuliaSvinareva f83b4e55b1 [SSE] Fix search 2022-10-12 18:38:21 +03:00
Maxim Kadushkin 659e7cec50 [desktop] for bug 59316 2022-10-11 22:12:02 +03:00
Julia Radzhabova eae06bd4c9
Merge pull request #2001 from ONLYOFFICE/fix/maxChangesSize
Fix/max changes size
2022-10-11 17:48:03 +03:00
Julia Radzhabova 8ac5578200
Merge pull request #1998 from ONLYOFFICE/fix/inputBug
Refactoring. Fix bug with preventing composition input.
2022-10-10 23:57:03 +03:00
Julia Radzhabova 01b47592b8
Merge pull request #1997 from ONLYOFFICE/fix/bug-59278
Fix Bug 59278
2022-10-10 23:10:27 +03:00
Oleg Korshul 20fa8d11c1 Fix typo 2022-10-10 22:34:05 +03:00
Oleg Korshul 6109598791 Refactoring. Fix bug with preventing composition input. 2022-10-10 22:26:42 +03:00
Julia Radzhabova 30d8937204 Fix Bug 59278 2022-10-10 19:17:57 +03:00
Julia Radzhabova 144ef4639a [PE] Fix register events 2022-10-06 19:28:56 +03:00
Julia Radzhabova f9153dbc2d [Mobile] Add asc_onConfirmAction event 2022-10-06 16:43:26 +03:00
Julia Radzhabova c5ae22a932 Add asc_onConfirmAction event 2022-10-04 21:53:31 +03:00
787 changed files with 7804 additions and 17657 deletions

View file

@ -23,7 +23,6 @@
options: <advanced options>, options: <advanced options>,
key: 'key', key: 'key',
vkey: 'vkey', vkey: 'vkey',
referenceData: 'data for external paste',
info: { info: {
owner: 'owner name', owner: 'owner name',
folder: 'path to document', folder: 'path to document',
@ -219,6 +218,7 @@
hideRulers: false // hide or show rulers on first loading (presentation or document editor) hideRulers: false // hide or show rulers on first loading (presentation or document editor)
hideNotes: false // hide or show notes panel on first loading (presentation editor) hideNotes: false // hide or show notes panel on first loading (presentation editor)
uiTheme: 'theme-dark' // set interface theme: id or default-dark/default-light uiTheme: 'theme-dark' // set interface theme: id or default-dark/default-light
integrationMode: "embed" // turn off scroll to frame
}, },
coEditing: { coEditing: {
mode: 'fast', // <coauthoring mode>, 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true. 'fast' - default for editor mode: 'fast', // <coauthoring mode>, 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true. 'fast' - default for editor
@ -264,7 +264,6 @@
'onRequestCompareFile': <request file to compare>,// must call setRevisedFile method 'onRequestCompareFile': <request file to compare>,// must call setRevisedFile method
'onRequestSharingSettings': <request sharing settings>,// must call setSharingSettings method 'onRequestSharingSettings': <request sharing settings>,// must call setSharingSettings method
'onRequestCreateNew': <try to create document>, 'onRequestCreateNew': <try to create document>,
'onRequestReferenceData': <try to refresh external data>,
} }
} }
@ -328,7 +327,6 @@
_config.editorConfig.canRequestCompareFile = _config.events && !!_config.events.onRequestCompareFile; _config.editorConfig.canRequestCompareFile = _config.events && !!_config.events.onRequestCompareFile;
_config.editorConfig.canRequestSharingSettings = _config.events && !!_config.events.onRequestSharingSettings; _config.editorConfig.canRequestSharingSettings = _config.events && !!_config.events.onRequestSharingSettings;
_config.editorConfig.canRequestCreateNew = _config.events && !!_config.events.onRequestCreateNew; _config.editorConfig.canRequestCreateNew = _config.events && !!_config.events.onRequestCreateNew;
_config.editorConfig.canRequestReferenceData = _config.events && !!_config.events.onRequestReferenceData;
_config.frameEditorId = placeholderId; _config.frameEditorId = placeholderId;
_config.parentOrigin = window.location.origin; _config.parentOrigin = window.location.origin;
@ -493,6 +491,9 @@
if (target && _checkConfigParams()) { if (target && _checkConfigParams()) {
iframe = createIframe(_config); iframe = createIframe(_config);
if (_config.editorConfig.customization && _config.editorConfig.customization.integrationMode==='embed')
window.AscEmbed && window.AscEmbed.initWorker(iframe);
if (iframe.src) { if (iframe.src) {
var pathArray = iframe.src.split('/'); var pathArray = iframe.src.split('/');
this.frameOrigin = pathArray[0] + '//' + pathArray[2]; this.frameOrigin = pathArray[0] + '//' + pathArray[2];
@ -735,13 +736,6 @@
}); });
}; };
var _setReferenceData = function(data) {
_sendCommand({
command: 'setReferenceData',
data: data
});
};
var _serviceCommand = function(command, data) { var _serviceCommand = function(command, data) {
_sendCommand({ _sendCommand({
command: 'internalCommand', command: 'internalCommand',
@ -776,8 +770,7 @@
setFavorite : _setFavorite, setFavorite : _setFavorite,
requestClose : _requestClose, requestClose : _requestClose,
grabFocus : _grabFocus, grabFocus : _grabFocus,
blurFocus : _blurFocus, blurFocus : _blurFocus
setReferenceData : _setReferenceData
} }
}; };

View file

@ -1,174 +0,0 @@
<!DOCTYPE html>
<html>
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<!--
*
* (c) Copyright Ascensio System SIA 2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
-->
<title>ONLYOFFICE</title>
<style type="text/css">
html {
height: 100%;
width: 100%;
}
body {
background: #fff;
color: #333;
font-family: Arial, Tahoma,sans-serif;
font-size: 12px;
font-weight: normal;
height: 100%;
margin: 0;
overflow-y: hidden;
padding: 0;
text-decoration: none;
}
.form {
height: 100%;
}
div {
margin: 0;
padding: 0;
}
.app-error-panel {
position: absolute;
width: 100%;
height: 100%;
top: 0;
background-color: #f4f4f4;
z-index: 10;
}
.message-block {
display: inline-block;
vertical-align: middle;
width: 100%;
}
.message-inner {
width: 550px;
margin: auto;
padding: 30px;
background-color: #e3e3e3;
text-align: center;
}
.title {
font-size: 24px;
margin: 0 0 14px;
}
.text {
font-size: 16px;
}
</style>
</head>
<body>
<div id="progress">
Converting your file so you can edit it...
<a id="btn_end" style="display: none;">
<button type="button">Click here to open the converted file</button>
</a>
</div>
<div id="error" style="display: none;">
Conversion failed<br/>Sorry, we weren't able to convert the file for editing.<br/>Try again Go back
</div>
<script type="text/javascript" language="javascript">
function redirect(url) {
try {
window.top.location.replace(url);
}
catch (err) {
console.err(err);
}
}
function makeXHRRequest(url, success, error) {
var xhr = new XMLHttpRequest;
xhr.onreadystatechange = function() {
if (xhr.readyState == 4)
if (xhr.status == 200) {
success(xhr.responseText)
} else {
error()
}
}
;
xhr.open("GET", url, !0);
xhr.send();
}
function checkStatus(url, success, error) {
makeXHRRequest(url, function(responseText) {
let data = JSON.parse(responseText);
if(undefined !== data.error) {
error();
} else if(data.endConvert) {
success(data.fileUrl);
} else {
setTimeout(function(){
checkStatus(url, success, error);
}, 1000);
}
}, error);
}
function success(url) {
// redirect(url);
let btn = document.getElementById('btn_end');
btn.style.display = 'block';
btn.onclick = function() {
redirect(url);
};
}
function error() {
document.getElementById('progress').style.display = 'none';
document.getElementById('error').style.display = 'block';
}
var convertFile = function () {
let statusHandler = <%- JSON.stringify(statusHandler) %>;
if(!statusHandler) {
error();
}
checkStatus(statusHandler, success, error);
};
if (window.addEventListener) {
window.addEventListener("load", convertFile);
} else if (window.attachEvent) {
window.attachEvent("onload", convertFile);
}
</script>
</body>
</html>

View file

@ -312,7 +312,7 @@ div {
"events": { "events": {
"onAppReady": onAppReady, "onAppReady": onAppReady,
"onDocumentStateChange": fileInfo.EditNotificationPostMessage ? onDocumentStateChange : undefined, "onDocumentStateChange": fileInfo.EditNotificationPostMessage ? onDocumentStateChange : undefined,
'onRequestEditRights': fileInfo.EditModePostMessage || (fileInfo.HostEditUrl && !fileInfo.UserCanNotWriteRelative) ? onRequestEditRights : undefined, 'onRequestEditRights': fileInfo.EditModePostMessage || fileInfo.HostEditUrl ? onRequestEditRights : undefined,
"onError": onError, "onError": onError,
"onRequestClose": fileInfo.ClosePostMessage || fileInfo.CloseUrl ? onRequestClose : undefined, "onRequestClose": fileInfo.ClosePostMessage || fileInfo.CloseUrl ? onRequestClose : undefined,
"onRequestRename": fileInfo.SupportsRename && fileInfo.UserCanRename ? onRequestRename : undefined, "onRequestRename": fileInfo.SupportsRename && fileInfo.UserCanRename ? onRequestRename : undefined,

View file

@ -138,10 +138,6 @@ if (window.Common === undefined) {
'grabFocus': function(data) { 'grabFocus': function(data) {
$me.trigger('grabfocus', data); $me.trigger('grabfocus', data);
},
'setReferenceData': function(data) {
$me.trigger('setreferencedata', data);
} }
}; };
@ -351,10 +347,6 @@ if (window.Common === undefined) {
_postMessage({event:'onRequestCreateNew'}); _postMessage({event:'onRequestCreateNew'});
}, },
requestReferenceData: function (data) {
_postMessage({event:'onRequestReferenceData', data: data});
},
pluginsReady: function() { pluginsReady: function() {
_postMessage({ event: 'onPluginsReady' }); _postMessage({ event: 'onPluginsReady' });
}, },

View file

@ -589,7 +589,6 @@
height: 100%; height: 100%;
&.disabled { &.disabled {
opacity: @component-disabled-opacity-ie;
opacity: @component-disabled-opacity; opacity: @component-disabled-opacity;
cursor: default !important; cursor: default !important;
} }

View file

@ -346,65 +346,27 @@ define([
me.render(); me.render();
} else if (me.options.parentEl) } else if (me.options.parentEl)
me.render(me.options.parentEl); me.render(me.options.parentEl);
const str_mq_250 = `screen and (-webkit-min-device-pixel-ratio: 2.5),
screen and (min-resolution: 2.5dppx), screen and (min-resolution: 240dpi)`;
window.matchMedia(str_mq_250).addEventListener('change', e => {
if ( e.matches ) {
console.log('scaling 250%');
if ( !me.$el.find('svg.icon').length ) {
const re_icon_name = /btn-[^\s]+/.exec(me.iconCls);
const icon_name = re_icon_name ? re_icon_name[0] : "null";
const svg_icon = `<svg class="icon"><use class="zoom-int" href="#${icon_name}"></use></svg>`;
me.$el.find('i.icon').after(svg_icon);
}
} else {
console.log('scaling less than 250%');
if ( !me.$el.find('i.icon') ) {
const png_icon = `<i class="icon ${me.iconCls}">&nbsp;</i>`;
me.$el.find('svg.icon').after(png_icon);
}
}
});
}, },
getCaptionWithBreaks: function (caption) { getCaptionWithBreaks: function (caption) {
var words = caption.split(' '), var words = caption.split(' '),
newCaption = null, newCaption = null,
maxWidth = 160 - 4, //85 - 4 maxWidth = 85 - 4;
containAnd = words.indexOf('&');
if (containAnd > -1) { // add & to previous word
words[containAnd - 1] += ' &';
words.splice(containAnd, 1);
}
if (words.length > 1) { if (words.length > 1) {
maxWidth = !!this.menu || this.split === true ? maxWidth - 10 : maxWidth; maxWidth = !!this.menu || this.split === true ? maxWidth - 10 : maxWidth;
if (words.length < 3) { if (words.length < 3) {
words[0] = getShortText(words[0], !!this.menu ? maxWidth + 10 : maxWidth);
words[1] = getShortText(words[1], maxWidth); words[1] = getShortText(words[1], maxWidth);
newCaption = words[0] + '<br>' + words[1]; newCaption = words[0] + '<br>' + words[1];
} else { } else {
var otherWords = '';
if (getWidthOfCaption(words[0] + ' ' + words[1]) < maxWidth) { // first and second words in first line if (getWidthOfCaption(words[0] + ' ' + words[1]) < maxWidth) { // first and second words in first line
for (var i = 2; i < words.length; i++) { words[2] = getShortText(words[2], maxWidth);
otherWords += words[i] + ' '; newCaption = words[0] + ' ' + words[1] + '<br>' + words[2];
} } else if (getWidthOfCaption(words[1] + ' ' + words[2]) < maxWidth) { // second and third words in second line
if (getWidthOfCaption(otherWords + (!!this.menu ? 10 : 0))*2 < getWidthOfCaption(words[0] + ' ' + words[1])) { words[2] = getShortText(words[2], maxWidth);
otherWords = getShortText((words[1] + ' ' + otherWords).trim(), maxWidth); newCaption = words[0] + '<br>' + words[1] + ' ' + words[2];
newCaption = words[0] + '<br>' + otherWords; } else {
} else { words[1] = getShortText(words[1] + ' ' + words[2], maxWidth);
otherWords = getShortText(otherWords.trim(), maxWidth); newCaption = words[0] + '<br>' + words[1];
newCaption = words[0] + ' ' + words[1] + '<br>' + otherWords;
}
} else { // only first word is in first line
for (var j = 1; j < words.length; j++) {
otherWords += words[j] + ' ';
}
otherWords = getShortText(otherWords.trim(), maxWidth);
newCaption = words[0] + '<br>' + otherWords;
} }
} }
} else { } else {
@ -792,7 +754,7 @@ define([
return (this.cmpEl) ? this.cmpEl.is(":visible") : $(this.el).is(":visible"); return (this.cmpEl) ? this.cmpEl.is(":visible") : $(this.el).is(":visible");
}, },
updateHint: function(hint, isHtml) { updateHint: function(hint) {
this.options.hint = hint; this.options.hint = hint;
if (!this.rendered) return; if (!this.rendered) return;
@ -818,12 +780,10 @@ define([
this.btnMenuEl.removeData('bs.tooltip'); this.btnMenuEl.removeData('bs.tooltip');
this.btnEl.tooltip({ this.btnEl.tooltip({
html: !!isHtml,
title : (typeof hint == 'string') ? hint : hint[0], title : (typeof hint == 'string') ? hint : hint[0],
placement : this.options.hintAnchor||'cursor' placement : this.options.hintAnchor||'cursor'
}); });
this.btnMenuEl && this.btnMenuEl.tooltip({ this.btnMenuEl && this.btnMenuEl.tooltip({
html: !!isHtml,
title : hint[1], title : hint[1],
placement : this.options.hintAnchor||'cursor' placement : this.options.hintAnchor||'cursor'
}); });

View file

@ -56,7 +56,6 @@ define([
itemWidth : 80, itemWidth : 80,
itemHeight : 40, itemHeight : 40,
menuMaxHeight : 300, menuMaxHeight : 300,
autoWidth : false,
enableKeyEvents : false, enableKeyEvents : false,
beforeOpenHandler : null, beforeOpenHandler : null,
additionalMenuItems : null, additionalMenuItems : null,
@ -88,13 +87,11 @@ define([
this.menuMaxHeight = this.options.menuMaxHeight; this.menuMaxHeight = this.options.menuMaxHeight;
this.beforeOpenHandler = this.options.beforeOpenHandler; this.beforeOpenHandler = this.options.beforeOpenHandler;
this.showLast = this.options.showLast; this.showLast = this.options.showLast;
this.wrapWidth = 0;
this.rootWidth = 0; this.rootWidth = 0;
this.rootHeight = 0; this.rootHeight = 0;
this.rendered = false; this.rendered = false;
this.needFillComboView = false; this.needFillComboView = false;
this.minWidth = this.options.minWidth; this.minWidth = this.options.minWidth;
this.autoWidth = this.initAutoWidth = (Common.Utils.isIE10 || Common.Utils.isIE11) ? false : this.options.autoWidth;
this.delayRenderTips = this.options.delayRenderTips || false; this.delayRenderTips = this.options.delayRenderTips || false;
this.itemTemplate = this.options.itemTemplate || _.template([ this.itemTemplate = this.options.itemTemplate || _.template([
'<div class="style" id="<%= id %>">', '<div class="style" id="<%= id %>">',
@ -211,8 +208,6 @@ define([
me.fieldPicker.el.addEventListener('contextmenu', _.bind(me.onPickerComboContextMenu, me), false); me.fieldPicker.el.addEventListener('contextmenu', _.bind(me.onPickerComboContextMenu, me), false);
me.menuPicker.el.addEventListener('contextmenu', _.bind(me.onPickerComboContextMenu, me), false); me.menuPicker.el.addEventListener('contextmenu', _.bind(me.onPickerComboContextMenu, me), false);
Common.NotificationCenter.on('more:toggle', _.bind(this.onMoreToggle, this));
me.onResize(); me.onResize();
me.rendered = true; me.rendered = true;
@ -226,26 +221,8 @@ define([
return this; return this;
}, },
onMoreToggle: function(btn, state) {
if(state) {
this.checkSize();
}
},
checkSize: function() { checkSize: function() {
if (this.cmpEl && this.cmpEl.is(':visible')) { if (this.cmpEl && this.cmpEl.is(':visible')) {
if(this.autoWidth && this.menuPicker.store.length > 0) {
var wrapWidth = this.$el.width();
if(wrapWidth != this.wrapWidth || this.needFillComboView){
this.wrapWidth = wrapWidth;
this.autoChangeWidth();
var picker = this.menuPicker;
var record = picker.getSelectedRec();
this.fillComboView(record || picker.store.at(0), !!record, true);
}
}
var me = this, var me = this,
width = this.cmpEl.width(), width = this.cmpEl.width(),
height = this.cmpEl.height(); height = this.cmpEl.height();
@ -289,45 +266,6 @@ define([
this.trigger('resize', this); this.trigger('resize', this);
}, },
autoChangeWidth: function() {
if(this.menuPicker.dataViewItems[0]){
var wrapEl = this.$el;
var wrapWidth = wrapEl.width();
var itemEl = this.menuPicker.dataViewItems[0].$el;
var itemWidth = this.itemWidth + parseFloat(itemEl.css('padding-left')) + parseFloat(itemEl.css('padding-right')) + 2 * parseFloat(itemEl.css('border-width'));
var itemMargins = parseFloat(itemEl.css('margin-left')) + parseFloat(itemEl.css('margin-right'));
var fieldPickerEl = this.fieldPicker.$el;
var fieldPickerPadding = parseFloat(fieldPickerEl.css('padding-right'));
var fieldPickerBorder = parseFloat(fieldPickerEl.css('border-width'));
var dataviewPaddings = parseFloat(this.fieldPicker.$el.find('.dataview').css('padding-left')) + parseFloat(this.fieldPicker.$el.find('.dataview').css('padding-right'));
var cmbDataViewEl = this.cmpEl;
var cmbDataViewPaddings = parseFloat(cmbDataViewEl.css('padding-left')) + parseFloat(cmbDataViewEl.css('padding-right'));
var itemsCount = Math.floor((wrapWidth - fieldPickerPadding - dataviewPaddings - 2 * fieldPickerBorder - cmbDataViewPaddings) / (itemWidth + itemMargins));
if(itemsCount > this.store.length)
itemsCount = this.store.length;
var widthCalc = Math.ceil((itemsCount * (itemWidth + itemMargins) + fieldPickerPadding + dataviewPaddings + 2 * fieldPickerBorder + cmbDataViewPaddings) * 10) / 10;
var maxWidth = parseFloat(cmbDataViewEl.css('max-width'));
if(widthCalc > maxWidth)
widthCalc = maxWidth;
cmbDataViewEl.css('width', widthCalc);
if(this.initAutoWidth) {
this.initAutoWidth = false;
cmbDataViewEl.css('position', 'absolute');
cmbDataViewEl.css('top', '50%');
cmbDataViewEl.css('bottom', '50%');
cmbDataViewEl.css('margin', 'auto 0');
}
}
},
onBeforeShowMenu: function(e) { onBeforeShowMenu: function(e) {
var me = this; var me = this;

View file

@ -328,7 +328,6 @@ define([
if (this.listenStoreEvents) { if (this.listenStoreEvents) {
this.listenTo(this.store, 'add', this.onAddItem); this.listenTo(this.store, 'add', this.onAddItem);
this.listenTo(this.store, 'reset', this.onResetItems); this.listenTo(this.store, 'reset', this.onResetItems);
this.groups && this.listenTo(this.groups, 'add', this.onAddGroup);
} }
this.onResetItems(); this.onResetItems();
@ -511,35 +510,6 @@ define([
} }
}, },
onAddGroup: function(group) {
var el = $(_.template([
'<% if (group.headername !== undefined) { %>',
'<div class="header-name"><%= group.headername %></div>',
'<% } %>',
'<div class="grouped-data <% if (group.inline) { %> group.inline <% } %> <% if (!_.isEmpty(group.caption)) { %> margin <% } %>" id="<%= group.id %>">',
'<% if (!_.isEmpty(group.caption)) { %>',
'<div class="group-description">',
'<span><%= group.caption %></span>',
'</div>',
'<% } %>',
'<div class="group-items-container">',
'</div>',
'</div>'
].join(''))({
group: group.toJSON()
}));
var innerEl = $(this.el).find('.inner').addBack().filter('.inner');
if (innerEl) {
var idx = _.indexOf(this.groups.models, group);
var innerDivs = innerEl.find('.grouped-data');
if (idx > 0)
$(innerDivs.get(idx - 1)).after(el);
else {
(innerDivs.length > 0) ? $(innerDivs[idx]).before(el) : innerEl.append(el);
}
}
},
onResetItems: function() { onResetItems: function() {
_.each(this.dataViewItems, function(item) { _.each(this.dataViewItems, function(item) {
var tip = item.$el.data('bs.tooltip'); var tip = item.$el.data('bs.tooltip');

View file

@ -793,7 +793,7 @@ define([
hideMoreBtns: function() { hideMoreBtns: function() {
for (var btn in btnsMore) { for (var btn in btnsMore) {
btnsMore[btn] && btnsMore[btn].isActive() && btnsMore[btn].toggle(false); btnsMore[btn] && btnsMore[btn].toggle(false);
} }
} }
}; };

View file

@ -144,20 +144,10 @@ define([
} }
}, this, area); }, this, area);
}.bind(this)); }.bind(this));
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
}, },
onLaunch: function () { onLaunch: function () {
var filter = Common.localStorage.getKeysFilter(); var filter = Common.localStorage.getKeysFilter();
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : ''; this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
this._state = {
disableEditing: false, // disable editing when disconnect/signed file/mail merge preview/review final or original/forms preview
docProtection: {
isReadOnly: false,
isReviewOnly: false,
isFormsOnly: false,
isCommentsOnly: false
}
};
this.collection = this.getApplication().getCollection('Common.Collections.Comments'); this.collection = this.getApplication().getCollection('Common.Collections.Comments');
this.setComparator(); this.setComparator();
@ -1655,25 +1645,16 @@ define([
}, },
setPreviewMode: function(mode) { setPreviewMode: function(mode) {
this._state.disableEditing = mode; if (this.viewmode === mode) return;
this.updatePreviewMode(); this.viewmode = mode;
}, if (mode)
updatePreviewMode: function() {
var docProtection = this._state.docProtection;
var viewmode = this._state.disableEditing || docProtection.isReadOnly || docProtection.isFormsOnly;
if (this.viewmode === viewmode) return;
this.viewmode = viewmode;
if (viewmode)
this.prevcanComments = this.mode.canComments; this.prevcanComments = this.mode.canComments;
this.mode.canComments = (viewmode) ? false : this.prevcanComments; this.mode.canComments = (mode) ? false : this.prevcanComments;
this.closeEditing(); this.closeEditing();
this.setMode(this.mode); this.setMode(this.mode);
this.updateComments(true); this.updateComments(true);
if (this.getPopover()) if (this.getPopover())
viewmode ? this.getPopover().hide() : this.getPopover().update(true); mode ? this.getPopover().hide() : this.getPopover().update(true);
}, },
clearCollections: function() { clearCollections: function() {
@ -1737,27 +1718,6 @@ define([
} }
} }
this.updateComments(true); this.updateComments(true);
},
onAppReady: function (config) {
var me = this;
(new Promise(function (accept, reject) {
accept();
})).then(function(){
me.onChangeProtectDocument();
Common.NotificationCenter.on('protect:doclock', _.bind(me.onChangeProtectDocument, me));
});
},
onChangeProtectDocument: function(props) {
if (!props) {
var docprotect = this.getApplication().getController('DocProtection');
props = docprotect ? docprotect.getDocProps() : null;
}
if (props) {
this._state.docProtection = props;
this.updatePreviewMode();
}
} }
}, Common.Controllers.Comments || {})); }, Common.Controllers.Comments || {}));

View file

@ -45,7 +45,8 @@ define([
version: '{{PRODUCT_VERSION}}', version: '{{PRODUCT_VERSION}}',
eventloading: true, eventloading: true,
titlebuttons: true, titlebuttons: true,
uithemes: true uithemes: true,
quickprint: true,
}; };
var native = window.desktop || window.AscDesktopEditor; var native = window.desktop || window.AscDesktopEditor;
@ -90,8 +91,11 @@ define([
$('.asc-window.modal').css('top', obj.skiptoparea); $('.asc-window.modal').css('top', obj.skiptoparea);
Common.Utils.InternalSettings.set('window-inactive-area-top', obj.skiptoparea); Common.Utils.InternalSettings.set('window-inactive-area-top', obj.skiptoparea);
} else
if ( obj.lockthemes != undefined ) {
// TODO: remove after 7.0.2. depricated. used is_win_xp variable instead
// Common.UI.Themes.setAvailable(!obj.lockthemes);
} }
if ( obj.singlewindow !== undefined ) { if ( obj.singlewindow !== undefined ) {
$('#box-document-title .hedset')[obj.singlewindow ? 'hide' : 'show'](); $('#box-document-title .hedset')[obj.singlewindow ? 'hide' : 'show']();
native.features.singlewindow = obj.singlewindow; native.features.singlewindow = obj.singlewindow;
@ -163,7 +167,8 @@ define([
action: action, action: action,
icon: config.icon || undefined, icon: config.icon || undefined,
hint: config.btn.options.hint, hint: config.btn.options.hint,
disabled: config.btn.isDisabled() disabled: config.btn.isDisabled(),
visible: config.visible,
}; };
}; };
@ -198,6 +203,7 @@ define([
if ( !!titlebuttons ) { if ( !!titlebuttons ) {
info.hints = {}; info.hints = {};
!!titlebuttons['print'] && (info.hints['print'] = titlebuttons['print'].btn.btnEl.attr('data-hint-title')); !!titlebuttons['print'] && (info.hints['print'] = titlebuttons['print'].btn.btnEl.attr('data-hint-title'));
!!titlebuttons['quickprint'] && (info.hints['quickprint'] = titlebuttons['quickprint'].btn.btnEl.attr('data-hint-title'));
!!titlebuttons['undo'] && (info.hints['undo'] = titlebuttons['undo'].btn.btnEl.attr('data-hint-title')); !!titlebuttons['undo'] && (info.hints['undo'] = titlebuttons['undo'].btn.btnEl.attr('data-hint-title'));
!!titlebuttons['redo'] && (info.hints['redo'] = titlebuttons['redo'].btn.btnEl.attr('data-hint-title')); !!titlebuttons['redo'] && (info.hints['redo'] = titlebuttons['redo'].btn.btnEl.attr('data-hint-title'));
!!titlebuttons['save'] && (info.hints['save'] = titlebuttons['save'].btn.btnEl.attr('data-hint-title')); !!titlebuttons['save'] && (info.hints['save'] = titlebuttons['save'].btn.btnEl.attr('data-hint-title'));
@ -213,6 +219,24 @@ define([
} }
} }
const _onApplySettings = function (menu) {
if ( !!titlebuttons.quickprint ) {
const var_name = window.SSE ? 'sse-settings-quick-print-button' :
window.PE ? 'pe-settings-quick-print-button' : 'de-settings-quick-print-button';
const is_btn_visible = Common.localStorage.getBool(var_name, false);
if ( titlebuttons.quickprint.visible != is_btn_visible ) {
titlebuttons.quickprint.visible = is_btn_visible;
const obj = {
visible: {
quickprint: is_btn_visible,
}
};
native.execCommand('title:button', JSON.stringify(obj));
}
}
}
return { return {
init: function (opts) { init: function (opts) {
_.extend(config, opts); _.extend(config, opts);
@ -230,9 +254,45 @@ define([
Common.NotificationCenter.on('document:ready', function () { Common.NotificationCenter.on('document:ready', function () {
if ( config.isEdit ) { if ( config.isEdit ) {
var maincontroller = webapp.getController('Main'); function get_locked_message (t) {
if (maincontroller.api.asc_isReadOnly && maincontroller.api.asc_isReadOnly()) { switch (t) {
maincontroller.warningDocumentIsLocked(); // case Asc.c_oAscLocalRestrictionType.Nosafe:
case Asc.c_oAscLocalRestrictionType.ReadOnly:
return Common.Locale.get("tipFileReadOnly",{name:"Common.Translation", default: "Document is read only. You can make changes and save its local copy later."});
default: return Common.Locale.get("tipFileLocked",{name:"Common.Translation", default: "Document is locked for editing. You can make changes and save its local copy later."});
}
}
const header = webapp.getController('Viewport').getView('Common.Views.Header');
const api = webapp.getController('Main').api;
const locktype = api.asc_getLocalRestrictions ? api.asc_getLocalRestrictions() : Asc.c_oAscLocalRestrictionType.None;
if ( Asc.c_oAscLocalRestrictionType.None !== locktype ) {
features.readonly = true;
header.setDocumentReadOnly(true);
api.asc_setLocalRestrictions(Asc.c_oAscLocalRestrictionType.None);
(new Common.UI.SynchronizeTip({
extCls: 'no-arrow',
placement: 'bottom',
target: $('.toolbar'),
text: get_locked_message(locktype),
showLink: false,
})).on('closeclick', function () {
this.close();
}).show();
native.execCommand('webapps:features', JSON.stringify(features));
api.asc_registerCallback('asc_onDocumentName', function () {
if ( features.readonly ) {
if ( api.asc_getLocalRestrictions() == Asc.c_oAscLocalRestrictionType.None ) {
features.readonly = false;
header.setDocumentReadOnly(false);
native.execCommand('webapps:features', JSON.stringify(features));
}
}
});
} }
} }
}); });
@ -244,7 +304,7 @@ define([
titlebuttons = {}; titlebuttons = {};
if ( mode.isEdit ) { if ( mode.isEdit ) {
var header = webapp.getController('Viewport').getView('Common.Views.Header'); const header = webapp.getController('Viewport').getView('Common.Views.Header');
if (!!header.btnSave) { if (!!header.btnSave) {
titlebuttons['save'] = {btn: header.btnSave}; titlebuttons['save'] = {btn: header.btnSave};
@ -255,6 +315,13 @@ define([
if (!!header.btnPrint) if (!!header.btnPrint)
titlebuttons['print'] = {btn: header.btnPrint}; titlebuttons['print'] = {btn: header.btnPrint};
if (!!header.btnPrintQuick) {
titlebuttons['quickprint'] = {
btn: header.btnPrintQuick,
visible: header.btnPrintQuick.isVisible(),
};
}
if (!!header.btnUndo) if (!!header.btnUndo)
titlebuttons['undo'] = {btn: header.btnUndo}; titlebuttons['undo'] = {btn: header.btnUndo};
@ -285,6 +352,7 @@ define([
Common.NotificationCenter.on({ Common.NotificationCenter.on({
'modal:show': _onModalDialog.bind(this, 'open'), 'modal:show': _onModalDialog.bind(this, 'open'),
'modal:close': _onModalDialog.bind(this, 'close'), 'modal:close': _onModalDialog.bind(this, 'close'),
'modal:hide': _onModalDialog.bind(this, 'hide'),
'uitheme:changed' : function (name) { 'uitheme:changed' : function (name) {
if (Common.localStorage.getBool('ui-theme-use-system', false)) { if (Common.localStorage.getBool('ui-theme-use-system', false)) {
native.execCommand("uitheme:changed", JSON.stringify({name:'theme-system'})); native.execCommand("uitheme:changed", JSON.stringify({name:'theme-system'}));
@ -309,6 +377,7 @@ define([
menu.hide(); menu.hide();
} }
}, },
'settings:apply': _onApplySettings.bind(this),
}, },
}, {id: 'desktop'}); }, {id: 'desktop'});
@ -366,7 +435,10 @@ define([
} }
return undefined; return undefined;
} },
getDefaultPrinterName: function () {
return nativevars ? nativevars.defaultPrinterName : '';
},
}; };
}; };

View file

@ -98,14 +98,12 @@ define([
'drag': _.bind(function(o, state){ 'drag': _.bind(function(o, state){
externalEditor && externalEditor.serviceCommand('window:drag', state == 'start'); externalEditor && externalEditor.serviceCommand('window:drag', state == 'start');
},this), },this),
'resize': _.bind(function(o, state){
externalEditor && externalEditor.serviceCommand('window:resize', state == 'start');
},this),
'show': _.bind(function(cmp){ 'show': _.bind(function(cmp){
var h = this.diagramEditorView.getHeight(), var h = this.diagramEditorView.getHeight(),
innerHeight = Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top'); innerHeight = Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top');
if (innerHeight<h) { if (innerHeight>h && h<700 || innerHeight<h) {
this.diagramEditorView.setHeight(innerHeight); h = Math.min(innerHeight, 700);
this.diagramEditorView.setHeight(h);
} }
if (externalEditor) { if (externalEditor) {
@ -229,21 +227,13 @@ define([
if (eventData.type == "processMouse") { if (eventData.type == "processMouse") {
if (eventData.data.event == 'mouse:up') { if (eventData.data.event == 'mouse:up') {
this.diagramEditorView.binding.dragStop(); this.diagramEditorView.binding.dragStop();
if (this.diagramEditorView.binding.resizeStop) this.diagramEditorView.binding.resizeStop();
} else } else
if (eventData.data.event == 'mouse:move') { if (eventData.data.event == 'mouse:move') {
var x = parseInt(this.diagramEditorView.$window.css('left')) + eventData.data.pagex, var x = parseInt(this.diagramEditorView.$window.css('left')) + eventData.data.pagex,
y = parseInt(this.diagramEditorView.$window.css('top')) + eventData.data.pagey + 34; y = parseInt(this.diagramEditorView.$window.css('top')) + eventData.data.pagey + 34;
this.diagramEditorView.binding.drag({pageX:x, pageY:y}); this.diagramEditorView.binding.drag({pageX:x, pageY:y});
if (this.diagramEditorView.binding.resize) this.diagramEditorView.binding.resize({pageX:x, pageY:y});
} }
} else } else
if (eventData.type == "resize") {
var w = eventData.data.width,
h = eventData.data.height;
if (w>0 && h>0)
this.diagramEditorView.setInnerSize(w, h);
} else
if (eventData.type == "frameToGeneralData") { if (eventData.type == "frameToGeneralData") {
this.api && this.api.asc_getInformationBetweenFrameAndGeneralEditor(eventData.data); this.api && this.api.asc_getInformationBetweenFrameAndGeneralEditor(eventData.data);
} else } else

View file

@ -51,8 +51,7 @@ define([
var appLang = '{{DEFAULT_LANG}}', var appLang = '{{DEFAULT_LANG}}',
customization = undefined, customization = undefined,
targetApp = '', targetApp = '',
externalEditor = null, externalEditor = null;
isAppFirstOpened = true;
var createExternalEditor = function() { var createExternalEditor = function() {
@ -97,22 +96,16 @@ define([
'drag': _.bind(function(o, state){ 'drag': _.bind(function(o, state){
externalEditor && externalEditor.serviceCommand('window:drag', state == 'start'); externalEditor && externalEditor.serviceCommand('window:drag', state == 'start');
},this), },this),
'resize': _.bind(function(o, state){
externalEditor && externalEditor.serviceCommand('window:resize', state == 'start');
},this),
'show': _.bind(function(cmp){ 'show': _.bind(function(cmp){
var h = this.mergeEditorView.getHeight(), var h = this.mergeEditorView.getHeight(),
innerHeight = Common.Utils.innerHeight(); innerHeight = Common.Utils.innerHeight();
if (innerHeight<h) { if (innerHeight>h && h<700 || innerHeight<h) {
this.mergeEditorView.setHeight(innerHeight); h = Math.min(innerHeight, 700);
this.mergeEditorView.setHeight(h);
} }
if (externalEditor) { if (externalEditor) {
externalEditor.serviceCommand('setAppDisabled',false); externalEditor.serviceCommand('setAppDisabled',false);
if (isAppFirstOpened && this.mergeEditorView._isExternalDocReady) {
isAppFirstOpened = false;
this.mergeEditorView._mergeData && this.setMergeData();
}
if (this.needDisableEditing && this.mergeEditorView._isExternalDocReady) { if (this.needDisableEditing && this.mergeEditorView._isExternalDocReady) {
this.onMergeEditingDisabled(); this.onMergeEditingDisabled();
} }
@ -121,7 +114,6 @@ define([
createExternalEditor.apply(this); createExternalEditor.apply(this);
} }
this.isExternalEditorVisible = true; this.isExternalEditorVisible = true;
this.isHandlerCalled = false;
}, this), }, this),
'hide': _.bind(function(cmp){ 'hide': _.bind(function(cmp){
if (externalEditor) { if (externalEditor) {
@ -147,22 +139,14 @@ define([
}, },
handler: function(result, value) { handler: function(result, value) {
if (this.isHandlerCalled) return; externalEditor && externalEditor.serviceCommand('queryClose',{mr:result});
this.isHandlerCalled = true; return true;
if (this.mergeEditorView._isExternalDocReady)
externalEditor && externalEditor.serviceCommand('queryClose',{mr:result});
else {
this.mergeEditorView.hide();
this.isHandlerCalled = false;
}
}, },
setMergeData: function() { setMergeData: function() {
if (!isAppFirstOpened) { externalEditor && externalEditor.serviceCommand('setMergeData', this.mergeEditorView._mergeData);
externalEditor && externalEditor.serviceCommand('setMergeData', this.mergeEditorView._mergeData); this.mergeEditorView.setEditMode(true);
this.mergeEditorView.setEditMode(true); this.mergeEditorView._mergeData = null;
this.mergeEditorView._mergeData = null;
}
}, },
loadConfig: function(data) { loadConfig: function(data) {
@ -201,7 +185,6 @@ define([
if (this.mergeEditorView) { if (this.mergeEditorView) {
if (eventData.type == 'documentReady') { if (eventData.type == 'documentReady') {
this.mergeEditorView._isExternalDocReady = true; this.mergeEditorView._isExternalDocReady = true;
this.isExternalEditorVisible && (isAppFirstOpened = false);
this.mergeEditorView.setControlsDisabled(false); this.mergeEditorView.setControlsDisabled(false);
if (this.mergeEditorView._mergeData) { if (this.mergeEditorView._mergeData) {
externalEditor && externalEditor.serviceCommand('setMergeData', this.mergeEditorView._mergeData); externalEditor && externalEditor.serviceCommand('setMergeData', this.mergeEditorView._mergeData);
@ -224,26 +207,17 @@ define([
} }
this.mergeEditorView.hide(); this.mergeEditorView.hide();
} }
this.isHandlerCalled = false;
} else } else
if (eventData.type == "processMouse") { if (eventData.type == "processMouse") {
if (eventData.data.event == 'mouse:up') { if (eventData.data.event == 'mouse:up') {
this.mergeEditorView.binding.dragStop(); this.mergeEditorView.binding.dragStop();
if (this.mergeEditorView.binding.resizeStop) this.mergeEditorView.binding.resizeStop();
} else } else
if (eventData.data.event == 'mouse:move') { if (eventData.data.event == 'mouse:move') {
var x = parseInt(this.mergeEditorView.$window.css('left')) + eventData.data.pagex, var x = parseInt(this.mergeEditorView.$window.css('left')) + eventData.data.pagex,
y = parseInt(this.mergeEditorView.$window.css('top')) + eventData.data.pagey + 34; y = parseInt(this.mergeEditorView.$window.css('top')) + eventData.data.pagey + 34;
this.mergeEditorView.binding.drag({pageX:x, pageY:y}); this.mergeEditorView.binding.drag({pageX:x, pageY:y});
if (this.mergeEditorView.binding.resize) this.mergeEditorView.binding.resize({pageX:x, pageY:y});
} }
} else } else
if (eventData.type == "resize") {
var w = eventData.data.width,
h = eventData.data.height;
if (w>0 && h>0)
this.mergeEditorView.setInnerSize(w, h);
} else
if (eventData.type == "frameToGeneralData") { if (eventData.type == "frameToGeneralData") {
this.api && this.api.asc_getInformationBetweenFrameAndGeneralEditor(eventData.data); this.api && this.api.asc_getInformationBetweenFrameAndGeneralEditor(eventData.data);
} else } else

View file

@ -98,14 +98,12 @@ define([
'drag': _.bind(function(o, state){ 'drag': _.bind(function(o, state){
externalEditor && externalEditor.serviceCommand('window:drag', state == 'start'); externalEditor && externalEditor.serviceCommand('window:drag', state == 'start');
},this), },this),
'resize': _.bind(function(o, state){
externalEditor && externalEditor.serviceCommand('window:resize', state == 'start');
},this),
'show': _.bind(function(cmp){ 'show': _.bind(function(cmp){
var h = this.oleEditorView.getHeight(), var h = this.oleEditorView.getHeight(),
innerHeight = Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top'); innerHeight = Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top');
if (innerHeight<h) { if (innerHeight>h && h<700 || innerHeight<h) {
this.oleEditorView.setHeight(innerHeight); h = Math.min(innerHeight, 700);
this.oleEditorView.setHeight(h);
} }
if (externalEditor) { if (externalEditor) {
@ -133,6 +131,8 @@ define([
}, this) }, this)
} }
}); });
}, },
onLaunch: function() { onLaunch: function() {
@ -228,20 +228,12 @@ define([
if (eventData.type == "processMouse") { if (eventData.type == "processMouse") {
if (eventData.data.event == 'mouse:up') { if (eventData.data.event == 'mouse:up') {
this.oleEditorView.binding.dragStop(); this.oleEditorView.binding.dragStop();
if (this.oleEditorView.binding.resizeStop) this.oleEditorView.binding.resizeStop();
} else } else
if (eventData.data.event == 'mouse:move') { if (eventData.data.event == 'mouse:move') {
var x = parseInt(this.oleEditorView.$window.css('left')) + eventData.data.pagex, var x = parseInt(this.oleEditorView.$window.css('left')) + eventData.data.pagex,
y = parseInt(this.oleEditorView.$window.css('top')) + eventData.data.pagey + 34; y = parseInt(this.oleEditorView.$window.css('top')) + eventData.data.pagey + 34;
this.oleEditorView.binding.drag({pageX:x, pageY:y}); this.oleEditorView.binding.drag({pageX:x, pageY:y});
if (this.oleEditorView.binding.resize) this.oleEditorView.binding.resize({pageX:x, pageY:y});
} }
} else
if (eventData.type == "resize") {
var w = eventData.data.width,
h = eventData.data.height;
if (w>0 && h>0)
this.oleEditorView.setInnerSize(w, h);
} else } else
if (eventData.type == "frameToGeneralData") { if (eventData.type == "frameToGeneralData") {
this.api && this.api.asc_getInformationBetweenFrameAndGeneralEditor(eventData.data); this.api && this.api.asc_getInformationBetweenFrameAndGeneralEditor(eventData.data);

View file

@ -457,8 +457,6 @@ Common.UI.HintManager = new(function() {
}; };
var _init = function(api) { var _init = function(api) {
if (Common.Utils.isIE || Common.UI.isMac && Common.Utils.isGecko) // turn off hints on IE and FireFox (shortcut F6 selects link in address bar)
return;
_api = api; _api = api;
var filter = Common.localStorage.getKeysFilter(); var filter = Common.localStorage.getKeysFilter();
@ -480,7 +478,7 @@ Common.UI.HintManager = new(function() {
_clearHints(); _clearHints();
}); });
$(document).on('keyup', function(e) { $(document).on('keyup', function(e) {
if ((e.keyCode == Common.UI.Keys.ALT || e.keyCode === 91) && _needShow && !(window.SSE && window.SSE.getController('Statusbar').getIsDragDrop())) { if (e.keyCode == Common.UI.Keys.ALT && _needShow && !(window.SSE && window.SSE.getController('Statusbar').getIsDragDrop())) {
e.preventDefault(); e.preventDefault();
if (!_hintVisible) { if (!_hintVisible) {
$('input:focus').blur(); // to change value in inputField $('input:focus').blur(); // to change value in inputField
@ -622,11 +620,10 @@ Common.UI.HintManager = new(function() {
} }
} }
_needShow = (Common.Utils.InternalSettings.get(_appPrefix + "settings-show-alt-hints") && !e.shiftKey && _needShow = (Common.Utils.InternalSettings.get(_appPrefix + "settings-show-alt-hints") && !e.shiftKey && e.keyCode == Common.UI.Keys.ALT &&
(!Common.Utils.isMac && e.keyCode == Common.UI.Keys.ALT || Common.Utils.isMac && e.metaKey && e.keyCode === Common.UI.Keys.F6) &&
!Common.Utils.ModalWindow.isVisible() && _isDocReady && _arrAlphabet.length > 0 && !Common.Utils.ModalWindow.isVisible() && _isDocReady && _arrAlphabet.length > 0 &&
!(window.PE && $('#pe-preview').is(':visible'))); !(window.PE && $('#pe-preview').is(':visible')));
if (Common.Utils.InternalSettings.get(_appPrefix + "settings-show-alt-hints") && !Common.Utils.isMac && e.altKey && e.keyCode !== 115) { if (Common.Utils.InternalSettings.get(_appPrefix + "settings-show-alt-hints") && e.altKey && e.keyCode !== 115) {
e.preventDefault(); e.preventDefault();
} }
}); });
@ -664,8 +661,6 @@ Common.UI.HintManager = new(function() {
}; };
var _clearHints = function (isComplete) { var _clearHints = function (isComplete) {
if (Common.Utils.isIE || Common.UI.isMac && Common.Utils.isGecko)
return;
_hintVisible && _hideHints(); _hintVisible && _hideHints();
if (_currentHints.length > 0) { if (_currentHints.length > 0) {
_resetToDefault(); _resetToDefault();

View file

@ -105,7 +105,6 @@ define([
Common.NotificationCenter.on('app:face', this.onAppShowed.bind(this)); Common.NotificationCenter.on('app:face', this.onAppShowed.bind(this));
Common.NotificationCenter.on('uitheme:changed', this.updatePluginsButtons.bind(this)); Common.NotificationCenter.on('uitheme:changed', this.updatePluginsButtons.bind(this));
Common.NotificationCenter.on('window:resize', this.updatePluginsButtons.bind(this)); Common.NotificationCenter.on('window:resize', this.updatePluginsButtons.bind(this));
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
}, },
loadConfig: function(data) { loadConfig: function(data) {
@ -152,16 +151,6 @@ define([
onAppShowed: function (config) { onAppShowed: function (config) {
}, },
onAppReady: function (config) {
var me = this;
(new Promise(function (accept, reject) {
accept();
})).then(function(){
me.onChangeProtectDocument();
Common.NotificationCenter.on('protect:doclock', _.bind(me.onChangeProtectDocument, me));
});
},
setApi: function(api) { setApi: function(api) {
this.api = api; this.api = api;
@ -236,10 +225,6 @@ define([
var _group = $('> .group', me.$toolbarPanelPlugins); var _group = $('> .group', me.$toolbarPanelPlugins);
var $slot = $('<span class="btn-slot text x-huge"></span>').appendTo(_group); var $slot = $('<span class="btn-slot text x-huge"></span>').appendTo(_group);
btn.render($slot); btn.render($slot);
var docProtection = me.panelPlugins._state.docProtection;
Common.Utils.lockControls(Common.enumLock.docLockView, docProtection.isReadOnly, {array: btn});
Common.Utils.lockControls(Common.enumLock.docLockForms, docProtection.isFormsOnly, {array: btn});
Common.Utils.lockControls(Common.enumLock.docLockComments, docProtection.isCommentsOnly, {array: btn});
} }
}, },
@ -274,10 +259,6 @@ define([
rank = new_rank; rank = new_rank;
}); });
_group.appendTo(me.$toolbarPanelPlugins); _group.appendTo(me.$toolbarPanelPlugins);
var docProtection = me.panelPlugins._state.docProtection;
Common.Utils.lockControls(Common.enumLock.docLockView, docProtection.isReadOnly, {array: me.panelPlugins.lockedControls});
Common.Utils.lockControls(Common.enumLock.docLockForms, docProtection.isFormsOnly, {array: me.panelPlugins.lockedControls});
Common.Utils.lockControls(Common.enumLock.docLockComments, docProtection.isCommentsOnly, {array: me.panelPlugins.lockedControls});
} else { } else {
console.error('toolbar panel isnot created'); console.error('toolbar panel isnot created');
} }
@ -537,13 +518,10 @@ define([
} }
var variationsArr = [], var variationsArr = [],
pluginVisible = false, pluginVisible = false;
isDisplayedInViewer = false;
item.variations.forEach(function(itemVar){ item.variations.forEach(function(itemVar){
var visible = (isEdit || itemVar.isViewer && (itemVar.isDisplayedInViewer!==false)) && _.contains(itemVar.EditorsSupport, editor) && !itemVar.isSystem; var visible = (isEdit || itemVar.isViewer && (itemVar.isDisplayedInViewer!==false)) && _.contains(itemVar.EditorsSupport, editor) && !itemVar.isSystem;
if ( visible ) pluginVisible = true; if ( visible ) pluginVisible = true;
if (itemVar.isViewer && (itemVar.isDisplayedInViewer!==false))
isDisplayedInViewer = true;
if (item.isUICustomizer ) { if (item.isUICustomizer ) {
visible && arrUI.push({ visible && arrUI.push({
@ -593,8 +571,7 @@ define([
groupName: (item.group) ? item.group.name : '', groupName: (item.group) ? item.group.name : '',
groupRank: (item.group) ? item.group.rank : 0, groupRank: (item.group) ? item.group.rank : 0,
minVersion: item.minVersion, minVersion: item.minVersion,
original: item, original: item
isDisplayedInViewer: isDisplayedInViewer
})); }));
} }
}); });
@ -743,19 +720,6 @@ define([
}, funcComplete); }, funcComplete);
} else } else
funcComplete(); funcComplete();
},
onChangeProtectDocument: function(props) {
if (!props) {
var docprotect = this.getApplication().getController('DocProtection');
props = docprotect ? docprotect.getDocProps() : null;
}
if (props && this.panelPlugins) {
this.panelPlugins._state.docProtection = props;
Common.Utils.lockControls(Common.enumLock.docLockView, props.isReadOnly, {array: this.panelPlugins.lockedControls});
Common.Utils.lockControls(Common.enumLock.docLockForms, props.isFormsOnly, {array: this.panelPlugins.lockedControls});
Common.Utils.lockControls(Common.enumLock.docLockComments, props.isCommentsOnly, {array: this.panelPlugins.lockedControls});
}
} }
}, Common.Controllers.Plugins || {})); }, Common.Controllers.Plugins || {}));
}); });

View file

@ -82,8 +82,7 @@ define([
'reviewchange:view': _.bind(this.onReviewViewClick, this), 'reviewchange:view': _.bind(this.onReviewViewClick, this),
'reviewchange:compare': _.bind(this.onCompareClick, this), 'reviewchange:compare': _.bind(this.onCompareClick, this),
'lang:document': _.bind(this.onDocLanguage, this), 'lang:document': _.bind(this.onDocLanguage, this),
'collaboration:coauthmode': _.bind(this.onCoAuthMode, this), 'collaboration:coauthmode': _.bind(this.onCoAuthMode, this)
'protect:update': _.bind(this.onChangeProtectDocument, this)
}, },
'Common.Views.ReviewChangesDialog': { 'Common.Views.ReviewChangesDialog': {
'reviewchange:accept': _.bind(this.onAcceptClick, this), 'reviewchange:accept': _.bind(this.onAcceptClick, this),
@ -103,15 +102,7 @@ define([
this.userCollection = this.getApplication().getCollection('Common.Collections.Users'); this.userCollection = this.getApplication().getCollection('Common.Collections.Users');
this.viewmode = false; this.viewmode = false;
this._state = { posx: -1000, posy: -1000, popoverVisible: false, previewMode: false, compareSettings: null, wsLock: false, wsProps: [], this._state = {posx: -1000, posy: -1000, popoverVisible: false, previewMode: false, compareSettings: null, wsLock: false, wsProps: []};
disableEditing: false, // disable editing when disconnect/signed file/mail merge preview/review final or original/forms preview
docProtection: {
isReadOnly: false,
isReviewOnly: false,
isFormsOnly: false,
isCommentsOnly: false
}
};
Common.NotificationCenter.on('reviewchanges:turn', this.onTurnPreview.bind(this)); Common.NotificationCenter.on('reviewchanges:turn', this.onTurnPreview.bind(this));
Common.NotificationCenter.on('spelling:turn', this.onTurnSpelling.bind(this)); Common.NotificationCenter.on('spelling:turn', this.onTurnSpelling.bind(this));
@ -173,35 +164,26 @@ define([
SetDisabled: function(state, reviewMode, fillFormMode) { SetDisabled: function(state, reviewMode, fillFormMode) {
if (this.dlgChanges) if (this.dlgChanges)
this.dlgChanges.close(); this.dlgChanges.close();
if (reviewMode) { if (reviewMode)
this.lockToolbar(Common.enumLock.previewReviewMode, state); this.lockToolbar(Common.enumLock.previewReviewMode, state);
this.dlgChanges && Common.Utils.lockControls(Common.enumLock.previewReviewMode, state, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]}); else if (fillFormMode)
} else if (fillFormMode) {
this.lockToolbar(Common.enumLock.viewFormMode, state); this.lockToolbar(Common.enumLock.viewFormMode, state);
this.dlgChanges && Common.Utils.lockControls(Common.enumLock.viewFormMode, state, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]}); else
} else {
this.lockToolbar(Common.enumLock.viewMode, state); this.lockToolbar(Common.enumLock.viewMode, state);
}
this.setPreviewMode(state); this.setPreviewMode(state);
}, },
lockToolbar: function (causes, lock, opts) { lockToolbar: function (causes, lock, opts) {
this.view && Common.Utils.lockControls(causes, lock, opts, this.view.getButtons()); Common.Utils.lockControls(causes, lock, opts, this.view.getButtons());
}, },
setPreviewMode: function(mode) { //disable accept/reject in popover setPreviewMode: function(mode) { //disable accept/reject in popover
this._state.disableEditing = mode; if (this.viewmode === mode) return;
this.updatePreviewMode(); this.viewmode = mode;
}, if (mode)
updatePreviewMode: function() {
var viewmode = this._state.disableEditing || this._state.docProtection.isReadOnly || this._state.docProtection.isFormsOnly || this._state.docProtection.isCommentsOnly;
if (this.viewmode === viewmode) return;
this.viewmode = viewmode;
if (viewmode)
this.prevcanReview = this.appConfig.canReview; this.prevcanReview = this.appConfig.canReview;
this.appConfig.canReview = (viewmode) ? false : this.prevcanReview; this.appConfig.canReview = (mode) ? false : this.prevcanReview;
var me = this; var me = this;
this.popoverChanges && this.popoverChanges.each(function (model) { this.popoverChanges && this.popoverChanges.each(function (model) {
model.set('hint', !me.appConfig.canReview); model.set('hint', !me.appConfig.canReview);
@ -225,14 +207,17 @@ define([
onApiShowChange: function (sdkchange, isShow) { onApiShowChange: function (sdkchange, isShow) {
var btnlock = true, var btnlock = true,
changes; changes;
if (this.appConfig.canReview && !(this.appConfig.isReviewOnly || this._state.docProtection.isReviewOnly)) { if (this.appConfig.canReview && !this.appConfig.isReviewOnly) {
if (sdkchange && sdkchange.length>0) { if (sdkchange && sdkchange.length>0) {
changes = this.readSDKChange(sdkchange); changes = this.readSDKChange(sdkchange);
btnlock = this.isSelectedChangesLocked(changes, isShow); btnlock = this.isSelectedChangesLocked(changes, isShow);
} }
if (this._state.lock !== btnlock) { if (this._state.lock !== btnlock) {
Common.Utils.lockControls(Common.enumLock.reviewChangelock, btnlock, {array: [this.view.btnAccept, this.view.btnReject]}); Common.Utils.lockControls(Common.enumLock.reviewChangelock, btnlock, {array: [this.view.btnAccept, this.view.btnReject]});
this.dlgChanges && Common.Utils.lockControls(Common.enumLock.reviewChangelock, btnlock, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]}); if (this.dlgChanges) {
this.dlgChanges.btnAccept.setDisabled(btnlock);
this.dlgChanges.btnReject.setDisabled(btnlock);
}
this._state.lock = btnlock; this._state.lock = btnlock;
Common.Utils.InternalSettings.set(this.view.appPrefix + "accept-reject-lock", btnlock); Common.Utils.InternalSettings.set(this.view.appPrefix + "accept-reject-lock", btnlock);
} }
@ -500,7 +485,6 @@ define([
} }
var date = (item.get_DateTime() == '') ? new Date() : new Date(item.get_DateTime()), var date = (item.get_DateTime() == '') ? new Date() : new Date(item.get_DateTime()),
user = me.userCollection.findOriginalUser(item.get_UserId()), user = me.userCollection.findOriginalUser(item.get_UserId()),
isProtectedReview = me._state.docProtection.isReviewOnly,
change = new Common.Models.ReviewChange({ change = new Common.Models.ReviewChange({
uid : Common.UI.getId(), uid : Common.UI.getId(),
userid : item.get_UserId(), userid : item.get_UserId(),
@ -515,9 +499,8 @@ define([
changedata : item, changedata : item,
scope : me.view, scope : me.view,
hint : !me.appConfig.canReview, hint : !me.appConfig.canReview,
docProtection: me._state.docProtection,
goto : (item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveTo || item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveFrom), goto : (item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveTo || item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveFrom),
editable : (me.appConfig.isReviewOnly || isProtectedReview) && (item.get_UserId() == me.currentUserId) || !(me.appConfig.isReviewOnly || isProtectedReview) && (!me.appConfig.canUseReviewPermissions || AscCommon.UserInfoParser.canEditReview(item.get_UserName())) editable : me.appConfig.isReviewOnly && (item.get_UserId() == me.currentUserId) || !me.appConfig.isReviewOnly && (!me.appConfig.canUseReviewPermissions || AscCommon.UserInfoParser.canEditReview(item.get_UserName()))
}); });
arr.push(change); arr.push(change);
@ -606,7 +589,7 @@ define([
}, },
onTurnPreview: function(state, global, fromApi) { onTurnPreview: function(state, global, fromApi) {
if ( this.appConfig.isReviewOnly) { if ( this.appConfig.isReviewOnly ) {
this.view.turnChanges(true); this.view.turnChanges(true);
} else } else
if ( this.appConfig.canReview ) { if ( this.appConfig.canReview ) {
@ -620,7 +603,7 @@ define([
}, },
onApiTrackRevisionsChange: function(localFlag, globalFlag, userId) { onApiTrackRevisionsChange: function(localFlag, globalFlag, userId) {
if ( this.appConfig.isReviewOnly || this._state.docProtection.isReviewOnly) { if ( this.appConfig.isReviewOnly ) {
this.view.turnChanges(true); this.view.turnChanges(true);
} else } else
if ( this.appConfig.canReview ) { if ( this.appConfig.canReview ) {
@ -651,10 +634,8 @@ define([
this.turnDisplayMode(item.value); this.turnDisplayMode(item.value);
if (!this.appConfig.isEdit && !this.appConfig.isRestrictedEdit) if (!this.appConfig.isEdit && !this.appConfig.isRestrictedEdit)
Common.localStorage.setItem(this.view.appPrefix + "review-mode", item.value); // for viewer Common.localStorage.setItem(this.view.appPrefix + "review-mode", item.value); // for viewer
else if (item.value=='markup' || item.value=='simple') { else if (item.value=='markup' || item.value=='simple')
Common.localStorage.setItem(this.view.appPrefix + "review-mode-editor", item.value); // for editor save only markup modes Common.localStorage.setItem(this.view.appPrefix + "review-mode-editor", item.value); // for editor save only markup modes
Common.Utils.InternalSettings.set(this.view.appPrefix + "review-mode-editor", item.value);
}
Common.NotificationCenter.trigger('edit:complete', this.view); Common.NotificationCenter.trigger('edit:complete', this.view);
}, },
@ -848,10 +829,10 @@ define([
onAppReady: function (config) { onAppReady: function (config) {
var me = this; var me = this;
(new Promise(function (resolve) { if ( config.canReview ) {
resolve(); (new Promise(function (resolve) {
})).then(function () { resolve();
if ( config.canReview ) { })).then(function () {
// function _setReviewStatus(state, global) { // function _setReviewStatus(state, global) {
// me.view.turnChanges(state, global); // me.view.turnChanges(state, global);
// !global && me.api.asc_SetLocalTrackRevisions(state); // !global && me.api.asc_SetLocalTrackRevisions(state);
@ -873,7 +854,7 @@ define([
!val && (val = me.appConfig.customization ? me.appConfig.customization.reviewDisplay : undefined); !val && (val = me.appConfig.customization ? me.appConfig.customization.reviewDisplay : undefined);
val = /^(original|final|markup|simple)$/i.test(val) ? val.toLocaleLowerCase() : 'markup'; val = /^(original|final|markup|simple)$/i.test(val) ? val.toLocaleLowerCase() : 'markup';
} }
Common.Utils.InternalSettings.set(me.view.appPrefix + "review-mode-editor", val);
me.turnDisplayMode(val); // load display mode for all modes (viewer or editor) me.turnDisplayMode(val); // load display mode for all modes (viewer or editor)
me.view.turnDisplayMode(val); me.view.turnDisplayMode(val);
@ -881,49 +862,46 @@ define([
(!me.appConfig.customization.review || me.appConfig.customization.review.showReviewChanges===undefined) && me.appConfig.customization.showReviewChanges==true) ) { (!me.appConfig.customization.review || me.appConfig.customization.review.showReviewChanges===undefined) && me.appConfig.customization.showReviewChanges==true) ) {
me.dlgChanges = (new Common.Views.ReviewChangesDialog({ me.dlgChanges = (new Common.Views.ReviewChangesDialog({
popoverChanges : me.popoverChanges, popoverChanges : me.popoverChanges,
mode : me.appConfig, mode : me.appConfig
docProtection : me._state.docProtection
})); }));
var sdk = $('#editor_sdk'), var sdk = $('#editor_sdk'),
offset = sdk.offset(); offset = sdk.offset();
me.dlgChanges.show(Math.max(10, offset.left + sdk.width() - 300), Math.max(10, offset.top + sdk.height() - 150)); me.dlgChanges.show(Math.max(10, offset.left + sdk.width() - 300), Math.max(10, offset.top + sdk.height() - 150));
} }
} else if (config.canViewReview) { });
config.canViewReview = (config.isEdit || me.api.asc_HaveRevisionsChanges(true)); // check revisions from all users } else if (config.canViewReview) {
if (config.canViewReview) { config.canViewReview = (config.isEdit || me.api.asc_HaveRevisionsChanges(true)); // check revisions from all users
var val = Common.localStorage.getItem(me.view.appPrefix + (config.isEdit || config.isRestrictedEdit ? "review-mode-editor" : "review-mode")); if (config.canViewReview) {
if (val===null) { var val = Common.localStorage.getItem(me.view.appPrefix + (config.isEdit || config.isRestrictedEdit ? "review-mode-editor" : "review-mode"));
val = me.appConfig.customization && me.appConfig.customization.review ? me.appConfig.customization.review.reviewDisplay : undefined; if (val===null) {
!val && (val = me.appConfig.customization ? me.appConfig.customization.reviewDisplay : undefined); val = me.appConfig.customization && me.appConfig.customization.review ? me.appConfig.customization.review.reviewDisplay : undefined;
val = /^(original|final|markup|simple)$/i.test(val) ? val.toLocaleLowerCase() : (config.isEdit || config.isRestrictedEdit ? 'markup' : 'original'); !val && (val = me.appConfig.customization ? me.appConfig.customization.reviewDisplay : undefined);
} val = /^(original|final|markup|simple)$/i.test(val) ? val.toLocaleLowerCase() : (config.isEdit || config.isRestrictedEdit ? 'markup' : 'original');
me.turnDisplayMode(val);
me.view.turnDisplayMode(val);
} }
me.turnDisplayMode(val);
me.view.turnDisplayMode(val);
} }
}
if (me.view && me.view.btnChat) { if (me.view && me.view.btnChat) {
me.getApplication().getController('LeftMenu').leftMenu.btnChat.on('toggle', function(btn, state){ me.getApplication().getController('LeftMenu').leftMenu.btnChat.on('toggle', function(btn, state){
if (state !== me.view.btnChat.pressed) if (state !== me.view.btnChat.pressed)
me.view.turnChat(state); me.view.turnChat(state);
}); });
} }
me.onChangeProtectSheet(); me.onChangeProtectSheet();
if (me.view) { if (me.view) {
me.lockToolbar(Common.enumLock.hideComments, !Common.localStorage.getBool(me.view.appPrefix + "settings-livecomment", true), {array: [me.view.btnCommentRemove, me.view.btnCommentResolve]}); me.lockToolbar(Common.enumLock.hideComments, !Common.localStorage.getBool(me.view.appPrefix + "settings-livecomment", true), {array: [me.view.btnCommentRemove, me.view.btnCommentResolve]});
me.lockToolbar(Common.enumLock['Objects'], !!me._state.wsProps['Objects'], {array: [me.view.btnCommentRemove, me.view.btnCommentResolve]}); me.lockToolbar(Common.enumLock['Objects'], !!this._state.wsProps['Objects'], {array: [me.view.btnCommentRemove, me.view.btnCommentResolve]});
} }
var val = Common.localStorage.getItem(me.view.appPrefix + "settings-review-hover-mode"); var val = Common.localStorage.getItem(me.view.appPrefix + "settings-review-hover-mode");
if (val === null) { if (val === null) {
val = me.appConfig.customization && me.appConfig.customization.review ? !!me.appConfig.customization.review.hoverMode : false; val = me.appConfig.customization && me.appConfig.customization.review ? !!me.appConfig.customization.review.hoverMode : false;
} else } else
val = !!parseInt(val); val = !!parseInt(val);
Common.Utils.InternalSettings.set(me.view.appPrefix + "settings-review-hover-mode", val); Common.Utils.InternalSettings.set(me.view.appPrefix + "settings-review-hover-mode", val);
me.appConfig.reviewHoverMode = val; me.appConfig.reviewHoverMode = val;
me.view && me.view.onAppReady(config);
});
}, },
applySettings: function(menu) { applySettings: function(menu) {
@ -993,8 +971,7 @@ define([
}, },
onCoAuthoringDisconnect: function() { onCoAuthoringDisconnect: function() {
this.lockToolbar(Common.enumLock.lostConnect, true); this.lockToolbar(Common.enumLock.lostConnect, true)
this.dlgChanges && Common.Utils.lockControls(Common.enumLock.lostConnect, true, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]});
}, },
onUpdateUsers: function() { onUpdateUsers: function() {
@ -1034,37 +1011,6 @@ define([
this.lockToolbar(Common.enumLock['Objects'], !!this._state.wsProps['Objects'], {array: [this.view.btnCommentRemove, this.view.btnCommentResolve]}); this.lockToolbar(Common.enumLock['Objects'], !!this._state.wsProps['Objects'], {array: [this.view.btnCommentRemove, this.view.btnCommentResolve]});
}, },
onChangeProtectDocument: function(props) {
if (!props) {
var docprotect = this.getApplication().getController('DocProtection');
props = docprotect ? docprotect.getDocProps() : null;
}
if (props) {
this._state.docProtection = props;
this.lockToolbar(Common.enumLock.docLockView, props.isReadOnly);
this.lockToolbar(Common.enumLock.docLockForms, props.isFormsOnly);
this.lockToolbar(Common.enumLock.docLockReview, props.isReviewOnly);
this.lockToolbar(Common.enumLock.docLockComments, props.isCommentsOnly);
if (this.dlgChanges) {
Common.Utils.lockControls(Common.enumLock.docLockView, props.isReadOnly, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]});
Common.Utils.lockControls(Common.enumLock.docLockForms, props.isFormsOnly, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]});
Common.Utils.lockControls(Common.enumLock.docLockReview, props.isReviewOnly, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]});
Common.Utils.lockControls(Common.enumLock.docLockComments, props.isCommentsOnly, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]});
}
if (this.appConfig.canReview) {
if (props.isReviewOnly) {
this.onTurnPreview(true);
this.onApiShowChange();
} else if (this._state.prevReviewProtected) {
this.onTurnPreview(false);
this.onApiShowChange();
}
this._state.prevReviewProtected = props.isReviewOnly;
}
this.updatePreviewMode();
}
},
textInserted: '<b>Inserted:</b>', textInserted: '<b>Inserted:</b>',
textDeleted: '<b>Deleted:</b>', textDeleted: '<b>Deleted:</b>',
textParaInserted: '<b>Paragraph Inserted</b> ', textParaInserted: '<b>Paragraph Inserted</b> ',

View file

@ -9,7 +9,7 @@
<div class="btn-goto img-commonctrl"></div> <div class="btn-goto img-commonctrl"></div>
<% } %> <% } %>
<% if (!hint) { %> <% if (!hint) { %>
<% if (scope.appConfig.isReviewOnly || docProtection.isReviewOnly) { %> <% if (scope.appConfig.isReviewOnly) { %>
<% if (editable) { %> <% if (editable) { %>
<div class="btn-delete img-commonctrl"></div> <div class="btn-delete img-commonctrl"></div>
<% } %> <% } %>

View file

@ -597,4 +597,776 @@ define(function(){ 'use strict';
textValue: 'Value is' textValue: 'Value is'
} }
})(), Common.define.conditionalData || {}); })(), Common.define.conditionalData || {});
Common.define.effectData = _.extend(new (function () {
return {
textEntrance: 'Entrance Effect',
textEmphasis: 'Emphasis Effect',
textExit: 'Exit Effect',
textPath: 'Motion Path',
textAppear: 'Appear',
textFade: 'Fade',
textFlyIn: 'Fly in',
textFloatIn: 'Float In',
textSplit: 'Split',
textWipe: 'Wipe',
textShape: 'Shape',
textWheel: 'Wheel',
textRandomBars: 'Random Bars ',
textGrowTurn: 'Grow & Turn',
textZoom: 'Zoom',
textSwivel: 'Swivel',
textBounce: 'Bounce',
textPulse: 'Pulse',
textColorPulse: 'Color Pulse',
textTeeter: 'Teeter',
textSpin: 'Spin',
textGrowShrink: 'Grow/Shrink',
textShrinkTurn: 'Shrink & Turn',
textDesaturate: 'Desaturate',
textDarken: 'Darken',
textLighten: 'Lighten',
textTransparency: 'Transparency',
textObjectColor: 'Object Color',
textComplementaryColor: 'Complementary Color',
textComplementaryColor2: 'Complementary Color 2',
textLineColor: 'Line Color',
textFillColor: 'Fill Color',
textBrushColor: 'Brush Color',
textFontColor: 'Font Color',
textUnderline: 'Underline',
textBoldFlash: 'Bold Flash',
textBoldReveal: 'Bold Reveal',
textWave: 'Wave',
textDisappear: 'Disappear',
textFlyOut: 'Fly Out',
textFloatOut: 'Float Out',
textBasic: 'Basic',
textSubtle: 'Subtle',
textModerate: 'Moderate',
textExciting: 'Exciting',
textLinesCurves: 'Lines Curves',
textSpecial: 'Special',
textBox: 'Box',
textCircle: 'Circle',
textPlus: 'Plus',
textDiamond: 'Diamond',
textDissolveIn: 'Dissolve In',
textBlinds: 'Blinds',
textCheckerboard: 'Checkerboard',
textPeekIn: 'Peek In',
textStrips: 'Strips',
textExpand: 'Expand',
textBasicZoom: 'Basic Zoom',
textCompress: 'Compress',
textFloatUp: 'Float Up',
textRiseUp: 'Rise Up',
textStretch: 'Stretch',
textCenterRevolve: 'Center Revolve',
textFloatDown: 'Float Down',
textSpinner: 'Spinner',
textBasicSwivel: 'Basic Swivel',
textBoomerang: 'Boomerang',
textCredits: 'Credits',
textCuverUp: 'Cuver Up',
textDrop: 'Drop',
textFloat: 'Float',
textPinwheel: 'Pinwheel',
textSpiralIn: 'Spiral In',
textWhip: 'Whip',
textGrowWithColor: 'Grow With Color',
textShimmer: 'Shimmer',
textBlink: 'Blink',
textDissolveOut: 'Dissolve Out',
textPeekOut: 'Peek Out',
textContrast: 'Contrast',
textCollapse: 'Collapse',
textSinkDown: 'Sink Down',
textCurveDown: 'CurveDown',
textSpiralOut: 'Spiral Out',
textContrastingColor: 'Contrasting Color',
textPointStar4: '4 Point Star',
textPointStar5: '5 Point Star',
textPointStar6: '6 Point Star',
textPointStar8: '8 Point Star',
textCrescentMoon: 'Crescent Moon',
textEqualTriangle: 'Equal Triangle',
textFootball: 'Football',
textHeart: 'Heart',
textHexagon: 'Hexagon',
textOctagon: 'Octagon',
textParallelogram: 'Parallelogram',
textPentagon: 'Pentagon',
textSquare: 'Square',
textTeardrop: 'Teardrop',
textTrapezoid: 'Trapezoid',
textArcDown: 'Arc Down',
textArcLeft: 'Arc Left',
textArcRight: 'Arc Right',
textArcUp: 'Arc Up',
textBounceLeft: 'Bounce Left',
textBounceRight: 'Bounce Right',
textCurvyLeft: 'Curvy Left',
textCurvyRight: 'Curvy Right',
textDecayingWave: 'Decaying Wave',
textDiagonalDownRight: 'Diagonal Down Right',
textDiagonalUpRight: 'Diagonal Up Right',
textDown: 'Down',
textFunnel: 'Funnel',
textHeartbeat: 'Heartbeat',
textLeft: 'Left',
textRight: 'Right',
textSCurve1: 'S Curve 1',
textSCurve2: 'S Curve 2',
textSineWave: 'Sine Wave',
textSpiralLeft: 'Spiral Left',
textSpiralRight: 'Spiral Right',
textSpring: 'Spring:',
textStairsDown: 'Stairs Down',
textTurnDown: 'Turn Down',
textTurnDownRight: 'Turn Down Right',
textTurnUp: 'Turn Up',
textTurnUpRight: 'Turn Up Right',
textUp: 'Up',
textZigzag: 'Zigzag',
textBean: 'Bean',
textCurvedSquare: 'CurvedSquare',
textCurvedX: 'Curved X',
textCurvyStar: 'Curvy Star',
textFigureFour: 'Figure 8 Four',
textHorizontalFigure: 'Horizontal Figure 8',
textInvertedSquare: 'Inverted Square',
textInvertedTriangle: 'Inverted Triangle',
textLoopDeLoop: 'Loop de Loop',
textNeutron: 'Neutron',
textPeanut: 'Peanut',
textPointStar: 'Point Star',
textSwoosh: 'Swoosh',
textVerticalFigure: 'Vertical Figure 8',
textRightTriangle: 'Right Triangle',
textAcross: 'Across',
textFromBottom: 'From Bottom',
textFromBottomLeft: 'From Bottom-Left',
textFromLeft: 'From Left',
textFromTopLeft: 'From Top-Left',
textFromTop: 'From Top',
textFromTopRight: 'From Top-Right',
textFromRight: 'From Right',
textFromBottomRight: 'From Bottom-Right',
textLeftDown: ' Left Down',
textLeftUp: ' Left Up',
textRightDown: ' Right Down',
textRightUp: ' Right Up',
textObjectCenter: 'Object Center',
textSlideCenter: 'Slide Center',
textInFromScreenCenter: 'In From Screen Center',
textOutFromScreenBottom: 'Out From Screen Bottom',
textInSlightly: 'In Slightly',
textInToScreenBottom: 'In To Screen Bottom',
textOutToScreenCenter: 'Out To Screen Center',
textOutSlightly: 'Out Slightly',
textToBottom: 'To Bottom',
textToBottomLeft: 'To Bottom-Left',
textToLeft: 'To Left',
textToTopLeft: 'To Top-Left',
textToTop: 'To Top',
textToTopRight: 'To Top-Right',
textToRight: 'To Right',
textToBottomRight: 'To Bottom-Right',
textSpoke1: '1 Spoke',
textSpoke2: '2 Spokes',
textSpoke3: '3 Spokes',
textSpoke4: '4 Spokes',
textSpoke8: '8 Spokes',
textCustomPath: 'Custom Path',
textHorizontalIn: 'Horizontal In',
textHorizontalOut: 'Horizontal Out',
textVerticalIn: 'Vertical In',
textVerticalOut: 'Vertical Out',
textVertical: 'Vertical',
textHorizontal: 'Horizontal',
textIn: 'In',
textOut: 'Out',
textWedge: 'Wedge',
textFlip: 'Flip',
textLines: 'Lines',
textArcs: 'Arcs',
textTurns: 'Turns',
textShapes: 'Shapes',
textLoops: 'Loops',
textPathCurve: 'Curve',
textPathLine: 'Line',
textPathScribble: 'Scribble',
getEffectGroupData: function () {
return [
{id: 'menu-effect-group-entrance', value: AscFormat.PRESET_CLASS_ENTR, caption: this.textEntrance, iconClsCustom: 'animation-entrance-custom'},
{id: 'menu-effect-group-emphasis', value: AscFormat.PRESET_CLASS_EMPH, caption: this.textEmphasis, iconClsCustom: 'animation-emphasis-custom'},
{id: 'menu-effect-group-exit', value: AscFormat.PRESET_CLASS_EXIT, caption: this.textExit, iconClsCustom: 'animation-exit-custom'},
{id: 'menu-effect-group-path', value: AscFormat.PRESET_CLASS_PATH, caption: this.textPath, iconClsCustom: 'animation-motion-paths-custom'}
];
},
getEffectData: function () {
return [
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_APPEAR, iconCls: 'animation-entrance-appear', displayValue: this.textAppear},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_FADE, iconCls: 'animation-entrance-fade', displayValue: this.textFade},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_FLY_IN_FROM, iconCls: 'animation-entrance-fly-in', displayValue: this.textFlyIn},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_FLOAT_UP, iconCls: 'animation-entrance-float-in', displayValue: this.textFloatIn, familyEffect: 'entrfloat'},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_SPLIT, iconCls: 'animation-entrance-split', displayValue: this.textSplit},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_WIPE_FROM, iconCls: 'animation-entrance-wipe', displayValue: this.textWipe},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_CIRCLE, iconCls: 'animation-entrance-shape', displayValue: this.textShape, familyEffect: 'entrshape'},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_WHEEL, iconCls: 'animation-entrance-wheel', displayValue: this.textWheel},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_RANDOM_BARS, iconCls: 'animation-entrance-random-bars', displayValue: this.textRandomBars},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_GROW_AND_TURN, iconCls: 'animation-entrance-grow-turn', displayValue: this.textGrowTurn},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_ZOOM, iconCls: 'animation-entrance-zoom', displayValue: this.textZoom},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_SWIVEL, iconCls: 'animation-entrance-swivel', displayValue: this.textSwivel},
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_BOUNCE, iconCls: 'animation-entrance-bounce', displayValue: this.textBounce},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_PULSE, iconCls: 'animation-emphasis-pulse', displayValue: this.textPulse},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_COLOR_PULSE, iconCls: 'animation-emphasis-color-pulse', displayValue: this.textColorPulse},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_TEETER, iconCls: 'animation-emphasis-teeter', displayValue: this.textTeeter},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_SPIN, iconCls: 'animation-emphasis-spin', displayValue: this.textSpin},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_GROW_SHRINK, iconCls: 'animation-emphasis-grow-or-shrink', displayValue: this.textGrowShrink},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_DESATURATE, iconCls: 'animation-emphasis-desaturate', displayValue: this.textDesaturate},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_CONTRASTING_DARKEN, iconCls: 'animation-emphasis-darken', displayValue: this.textDarken},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_LIGHTEN, iconCls: 'animation-emphasis-lighten', displayValue: this.textLighten},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_TRANSPARENCY, iconCls: 'animation-emphasis-transparency', displayValue: this.textTransparency},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_OBJECT_COLOR, iconCls: 'animation-emphasis-object-color', displayValue: this.textObjectColor},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_COMPLEMENTARY_COLOR, iconCls: 'animation-emphasis-complementary-color', displayValue: this.textComplementaryColor},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_LINE_COLOR, iconCls: 'animation-emphasis-line-color', displayValue: this.textLineColor},
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_FILL_COLOR, iconCls: 'animation-emphasis-fill-color', displayValue: this.textFillColor},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_DISAPPEAR, iconCls: 'animation-exit-disappear', displayValue: this.textDisappear},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_FADE, iconCls: 'animation-exit-fade', displayValue: this.textFade},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_FLY_OUT_TO, iconCls: 'animation-exit-fly-out', displayValue: this.textFlyOut},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_FLOAT_DOWN, iconCls: 'animation-exit-float-out', displayValue: this.textFloatOut, familyEffect: 'exitfloat'},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_SPLIT, iconCls: 'animation-exit-split', displayValue: this.textSplit},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_WIPE_FROM, iconCls: 'animation-exit-wipe', displayValue: this.textWipe},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_CIRCLE, iconCls: 'animation-exit-shape', displayValue: this.textShape, familyEffect: 'shape'},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_WHEEL, iconCls: 'animation-exit-wheel', displayValue: this.textWheel},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_RANDOM_BARS, iconCls: 'animation-exit-random-bars', displayValue: this.textRandomBars},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_SHRINK_AND_TURN, iconCls: 'animation-exit-shrink-turn', displayValue: this.textShrinkTurn},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_ZOOM, iconCls: 'animation-exit-zoom', displayValue: this.textZoom},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_SWIVEL, iconCls: 'animation-exit-swivel', displayValue: this.textSwivel},
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_BOUNCE, iconCls: 'animation-exit-bounce', displayValue: this.textBounce},
{group: 'menu-effect-group-path', value: AscFormat.MOTION_DOWN, iconCls: 'animation-motion-paths-lines', displayValue: this.textLines, familyEffect: 'pathlines'},
{group: 'menu-effect-group-path', value: AscFormat.MOTION_ARC_DOWN, iconCls: 'animation-motion-paths-arcs', displayValue: this.textArcs, familyEffect: 'patharcs'},
{group: 'menu-effect-group-path', value: AscFormat.MOTION_TURN_DOWN, iconCls: 'animation-motion-paths-turns', displayValue: this.textTurns, familyEffect: 'pathturns'},
{group: 'menu-effect-group-path', value: AscFormat.MOTION_CIRCLE, iconCls: 'animation-motion-paths-shapes', displayValue: this.textShapes, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', value: AscFormat.MOTION_HORIZONTAL_FIGURE_8_FOUR, iconCls: 'animation-motion-paths-loops', displayValue: this.textLoops, familyEffect: 'pathloops'},
{group: 'menu-effect-group-path', value: AscFormat.MOTION_CUSTOM_PATH, iconCls: 'animation-motion-paths-custom-path', displayValue: this.textCustomPath}
];
},
getLevelEffect: function (isPath) {
if (!isPath)
return [
{id: 'menu-effect-level-basic', displayValue: this.textBasic},
{id: 'menu-effect-level-subtle', displayValue: this.textSubtle},
{id: 'menu-effect-level-moderate', displayValue: this.textModerate},
{id: 'menu-effect-level-exciting', displayValue: this.textExciting}
];
else
return [
{id: 'menu-effect-level-basic', displayValue: this.textBasic},
{id: 'menu-effect-level-lines_curves', displayValue: this.textSubtle},
{id: 'menu-effect-level-special', displayValue: this.textModerate}
];
},
getEffectFullData: function () {
return [
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_APPEAR, displayValue: this.textAppear},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_BLINDS, displayValue: this.textBlinds},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_BOX, displayValue: this.textBox, familyEffect: 'entrshape'},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_CHECKERBOARD, displayValue: this.textCheckerboard},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_CIRCLE, displayValue: this.textCircle, familyEffect: 'entrshape'},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_DIAMOND, displayValue: this.textDiamond, familyEffect: 'entrshape'},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_DISSOLVE_IN, displayValue: this.textDissolveIn},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_FLY_IN_FROM, displayValue: this.textFlyIn},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_PEEK_IN_FROM, displayValue: this.textPeekIn},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_PLUS, displayValue: this.textPlus, familyEffect: 'entrshape'},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_RANDOM_BARS, displayValue: this.textRandomBars},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_SPLIT, displayValue: this.textSplit},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_STRIPS, displayValue: this.textStrips},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_WEDGE, displayValue: this.textWedge},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_WHEEL, displayValue: this.textWheel},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_WIPE_FROM, displayValue: this.textWipe},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-subtle', value: AscFormat.ENTRANCE_EXPAND, displayValue: this.textExpand},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-subtle', value: AscFormat.ENTRANCE_FADE, displayValue: this.textFade},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-subtle', value: AscFormat.ENTRANCE_SWIVEL, displayValue: this.textSwivel},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-subtle', value: AscFormat.ENTRANCE_ZOOM, displayValue: this.textZoom},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_BASIC_ZOOM, displayValue: this.textBasicZoom},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_CENTER_REVOLVE, displayValue: this.textCenterRevolve},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_CENTER_COMPRESS, displayValue: this.textCompress},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_FLOAT_DOWN, displayValue: this.textFloatDown, familyEffect: 'entrfloat'},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_FLOAT_UP, displayValue: this.textFloatUp, familyEffect: 'entrfloat'},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_GROW_AND_TURN, displayValue: this.textGrowTurn},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_RISE_UP, displayValue: this.textRiseUp},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_SPINNER, displayValue: this.textSpinner},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_STRETCH, displayValue: this.textStretch},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_BASIC_SWIVEL, displayValue: this.textBasicSwivel},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_BOOMERANG, displayValue: this.textBoomerang},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_BOUNCE, displayValue: this.textBounce},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_CREDITS, displayValue: this.textCredits},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_CURVE_UP, displayValue: this.textCuverUp},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_DROP, displayValue: this.textDrop},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_FLIP, displayValue: this.textFlip},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_FLOAT, displayValue: this.textFloat},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_PINWHEEL, displayValue: this.textPinwheel},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_SPIRAL_IN, displayValue: this.textSpiralIn},
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_WHIP, displayValue: this.textWhip},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_FILL_COLOR, displayValue: this.textFillColor},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_GROW_SHRINK, displayValue: this.textGrowShrink},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_FONT_COLOR, displayValue: this.textFontColor, notsupported: true},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_LINE_COLOR, displayValue: this.textLineColor},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_SPIN, displayValue: this.textSpin},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_TRANSPARENCY, displayValue: this.textTransparency},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_BOLD_FLASH, displayValue: this.textBoldFlash, notsupported: true},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_COMPLEMENTARY_COLOR, displayValue: this.textComplementaryColor},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_COMPLEMENTARY_COLOR_2, displayValue: this.textComplementaryColor2},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_CONTRASTING_COLOR, displayValue: this.textContrastingColor},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_CONTRASTING_DARKEN, displayValue: this.textDarken},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_DESATURATE, displayValue: this.textDesaturate},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_LIGHTEN, displayValue: this.textLighten},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_OBJECT_COLOR, displayValue: this.textObjectColor},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_PULSE, displayValue: this.textPulse},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_UNDERLINE, displayValue: this.textUnderline, notsupported: true},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_BRUSH_COLOR, displayValue: this.textBrushColor, notsupported: true},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_COLOR_PULSE, displayValue: this.textColorPulse},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_GROW_WITH_COLOR, displayValue: this.textGrowWithColor},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_SHIMMER, displayValue: this.textShimmer},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_TEETER, displayValue: this.textTeeter},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-exciting', value: AscFormat.EMPHASIS_BLINK, displayValue: this.textBlink},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-exciting', value: AscFormat.EMPHASIS_BOLD_REVEAL, displayValue: this.textBoldReveal, notsupported: true},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-exciting', value: AscFormat.EMPHASIS_WAVE, displayValue: this.textWave, notsupported: true},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_BLINDS, displayValue: this.textBlinds},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_BOX, displayValue: this.textBox, familyEffect: 'shape'},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_CHECKERBOARD, displayValue: this.textCheckerboard},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_CIRCLE, displayValue: this.textCircle, familyEffect: 'shape'},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_DIAMOND, displayValue: this.textDiamond, familyEffect: 'shape'},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_DISAPPEAR, displayValue: this.textDisappear},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_DISSOLVE_OUT, displayValue: this.textDissolveOut},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_FLY_OUT_TO, displayValue: this.textFlyOut},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_PEEK_OUT_TO, displayValue: this.textPeekOut},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_PLUS, displayValue: this.textPlus, familyEffect: 'shape'},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_RANDOM_BARS, displayValue: this.textRandomBars},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_SPLIT, displayValue: this.textSplit},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_STRIPS, displayValue: this.textStrips},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_WEDGE, displayValue: this.textWedge},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_WHEEL, displayValue: this.textWheel},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_WIPE_FROM, displayValue: this.textWipe},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-subtle', value: AscFormat.EXIT_CONTRACT, displayValue: this.textContrast},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-subtle', value: AscFormat.EXIT_FADE, displayValue: this.textFade},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-subtle', value: AscFormat.EXIT_SWIVEL, displayValue: this.textSwivel},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-subtle', value: AscFormat.EXIT_ZOOM, displayValue: this.textZoom},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_BASIC_ZOOM, displayValue: this.textBasicZoom},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_CENTER_REVOLVE, displayValue: this.textCenterRevolve},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_COLLAPSE, displayValue: this.textCollapse},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_FLOAT_DOWN, displayValue: this.textFloatDown, familyEffect: 'exitfloat'},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_FLOAT_UP, displayValue: this.textFloatUp, familyEffect: 'exitfloat'},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_SHRINK_AND_TURN, displayValue: this.textShrinkTurn},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_SINK_DOWN, displayValue: this.textSinkDown},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_SPINNER, displayValue: this.textSpinner},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_STRETCHY, displayValue: this.textStretch},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_BASIC_SWIVEL, displayValue: this.textBasicSwivel},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_BOOMERANG, displayValue: this.textBoomerang},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_BOUNCE, displayValue: this.textBounce},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_CREDITS, displayValue: this.textCredits},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_CURVE_DOWN, displayValue: this.textCurveDown},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_DROP, displayValue: this.textDrop},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_FLIP, displayValue: this.textFlip},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_FLOAT, displayValue: this.textFloat},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_PINWHEEL, displayValue: this.textPinwheel},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_SPIRAL_OUT, displayValue: this.textSpiralOut},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_WHIP, displayValue: this.textWhip},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PATH_4_POINT_STAR, displayValue: this.textPointStar4},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PATH_5_POINT_STAR, displayValue: this.textPointStar5},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PATH_6_POINT_STAR, displayValue: this.textPointStar6},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PATH_8_POINT_STAR, displayValue: this.textPointStar8},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_CIRCLE, displayValue: this.textCircle, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_CRESCENT_MOON, displayValue: this.textCrescentMoon},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_DIAMOND, displayValue: this.textDiamond, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_EQUAL_TRIANGLE, displayValue: this.textEqualTriangle, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_FOOTBALL, displayValue: this.textFootball},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_HEART, displayValue: this.textHeart},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_HEXAGON, displayValue: this.textHexagon, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_OCTAGON, displayValue: this.textOctagon, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PARALLELOGRAM, displayValue: this.textParallelogram, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PENTAGON, displayValue: this.textPentagon, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_RIGHT_TRIANGLE, displayValue: this.textRightTriangle, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_SQUARE, displayValue: this.textSquare, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_TEARDROP, displayValue: this.textTeardrop},
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_TRAPEZOID, displayValue: this.textTrapezoid, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_ARC_DOWN, displayValue: this.textArcDown, familyEffect: 'patharcs'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_ARC_LEFT, displayValue: this.textArcLeft, familyEffect: 'patharcs'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_ARC_RIGHT, displayValue: this.textArcRight, familyEffect: 'patharcs'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_ARC_UP, displayValue: this.textArcUp, familyEffect: 'patharcs'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_BOUNCE_LEFT, displayValue: this.textBounceLeft},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_BOUNCE_RIGHT, displayValue: this.textBounceRight},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_CURVY_LEFT, displayValue: this.textCurvyLeft},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_CURVY_RIGHT, displayValue: this.textCurvyRight},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_DECAYING_WAVE, displayValue: this.textDecayingWave},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_DIAGONAL_DOWN_RIGHT, displayValue: this.textDiagonalDownRight},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_DIAGONAL_UP_RIGHT, displayValue: this.textDiagonalUpRight},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_DOWN, displayValue: this.textDown, familyEffect: 'pathlines'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_FUNNEL, displayValue: this.textFunnel},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_HEARTBEAT, displayValue: this.textHeartbeat},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_LEFT, displayValue: this.textLeft, familyEffect: 'pathlines'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_RIGHT, displayValue: this.textRight, familyEffect: 'pathlines'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_S_CURVE_1, displayValue: this.textSCurve1},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_S_CURVE_2, displayValue: this.textSCurve2},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_SINE_WAVE, displayValue: this.textSineWave},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_SINE_SPIRAL_LEFT, displayValue: this.textSpiralLeft},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_SINE_SPIRAL_RIGHT, displayValue: this.textSpiralRight},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_SPRING, displayValue: this.textSpring},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_STAIRS_DOWN, displayValue: this.textStairsDown},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_TURN_DOWN, displayValue: this.textTurnDown, familyEffect: 'pathturns'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_TURN_DOWN_RIGHT, displayValue: this.textTurnDownRight, familyEffect: 'pathturns'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_TURN_UP, displayValue: this.textTurnUp, familyEffect: 'pathturns'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_TURN_UP_RIGHT, displayValue: this.textTurnUpRight, familyEffect: 'pathturns'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_UP, displayValue: this.textUp, familyEffect: 'pathlines'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_WAVE, displayValue: this.textWave},
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_ZIGZAG, displayValue: this.textZigzag},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_BEAN, displayValue: this.textBean},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_CURVED_SQUARE, displayValue: this.textCurvedSquare},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_CURVED_X, displayValue: this.textCurvedX},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_CURVY_STAR, displayValue: this.textCurvyStar},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_FIGURE_8_FOUR, displayValue: this.textFigureFour},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_HORIZONTAL_FIGURE_8_FOUR, displayValue: this.textHorizontalFigure, familyEffect: 'pathloops'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_INVERTED_SQUARE, displayValue: this.textInvertedSquare},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_INVERTED_TRIANGLE, displayValue: this.textInvertedTriangle},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_LOOP_DE_LOOP, displayValue: this.textLoopDeLoop, familyEffect: 'pathloops'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_NEUTRON, displayValue: this.textNeutron},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_PEANUT, displayValue: this.textPeanut},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_POINTY_STAR, displayValue: this.textPointStar},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_SWOOSH, displayValue: this.textSwoosh},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_VERTICAL_FIGURE_8, displayValue: this.textVerticalFigure, familyEffect: 'pathloops'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_CUSTOM_PATH, displayValue: this.textCustomPath, notsupported: true}
];
},
getEffectOptionsData: function (group, type) {
switch (group) {
case 'menu-effect-group-entrance':
switch (type) {
case AscFormat.ENTRANCE_BLINDS:
return [
{value: AscFormat.ENTRANCE_BLINDS_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
{value: AscFormat.ENTRANCE_BLINDS_VERTICAL, caption: this.textVertical}
];
case AscFormat.ENTRANCE_BOX:
return [
{value: AscFormat.ENTRANCE_BOX_IN, caption: this.textIn, defvalue: true},
{value: AscFormat.ENTRANCE_BOX_OUT, caption: this.textOut}
];
case AscFormat.ENTRANCE_CHECKERBOARD:
return [
{value: AscFormat.ENTRANCE_CHECKERBOARD_ACROSS, caption: this.textAcross, defvalue: true},
{value: AscFormat.ENTRANCE_CHECKERBOARD_DOWN, caption: this.textDown}
];
case AscFormat.ENTRANCE_CIRCLE:
return [
{value: AscFormat.ENTRANCE_CIRCLE_IN, caption: this.textIn, defvalue: true},
{value: AscFormat.ENTRANCE_CIRCLE_OUT, caption: this.textOut}
];
case AscFormat.ENTRANCE_DIAMOND:
return [
{value: AscFormat.ENTRANCE_DIAMOND_IN, caption: this.textIn, defvalue: true},
{value: AscFormat.ENTRANCE_DIAMOND_OUT, caption: this.textOut}
];
case AscFormat.ENTRANCE_FLY_IN_FROM:
return [
{value: AscFormat.ENTRANCE_FLY_IN_FROM_BOTTOM, caption: this.textFromBottom, defvalue: true},
{value: AscFormat.ENTRANCE_FLY_IN_FROM_BOTTOM_LEFT, caption: this.textFromBottomLeft},
{value: AscFormat.ENTRANCE_FLY_IN_FROM_LEFT, caption: this.textFromLeft},
{value: AscFormat.ENTRANCE_FLY_IN_FROM_TOP_LEFT, caption: this.textFromTopLeft},
{value: AscFormat.ENTRANCE_FLY_IN_FROM_TOP, caption: this.textFromTop},
{value: AscFormat.ENTRANCE_FLY_IN_FROM_TOP_RIGHT, caption: this.textFromTopRight},
{value: AscFormat.ENTRANCE_FLY_IN_FROM_RIGHT, caption: this.textFromRight},
{value: AscFormat.ENTRANCE_FLY_IN_FROM_BOTTOM_RIGHT, caption: this.textFromBottomRight}
];
case AscFormat.ENTRANCE_PEEK_IN_FROM:
return [
{value: AscFormat.ENTRANCE_PEEK_IN_FROM_BOTTOM, caption: this.textFromBottom, defvalue: true},
{value: AscFormat.ENTRANCE_PEEK_IN_FROM_LEFT, caption: this.textFromLeft},
{value: AscFormat.ENTRANCE_PEEK_IN_FROM_RIGHT, caption: this.textFromRight},
{value: AscFormat.ENTRANCE_PEEK_IN_FROM_TOP, caption: this.textFromTop}
];
case AscFormat.ENTRANCE_PLUS:
return [
{value: AscFormat.ENTRANCE_PLUS_IN, caption: this.textIn, defvalue: true},
{value: AscFormat.ENTRANCE_PLUS_OUT, caption: this.textOut}
];
case AscFormat.ENTRANCE_RANDOM_BARS:
return [
{value: AscFormat.ENTRANCE_RANDOM_BARS_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
{value: AscFormat.ENTRANCE_RANDOM_BARS_VERTICAL, caption: this.textVertical}
];
case AscFormat.ENTRANCE_SPLIT:
return [
{value: AscFormat.ENTRANCE_SPLIT_HORIZONTAL_IN, caption: this.textHorizontalIn},
{value: AscFormat.ENTRANCE_SPLIT_HORIZONTAL_OUT, caption: this.textHorizontalOut},
{value: AscFormat.ENTRANCE_SPLIT_VERTICAL_IN, caption: this.textVerticalIn, defvalue: true},
{value: AscFormat.ENTRANCE_SPLIT_VERTICAL_OUT, caption: this.textVerticalOut}
];
case AscFormat.ENTRANCE_STRIPS:
return [
{value: AscFormat.ENTRANCE_STRIPS_LEFT_DOWN, caption: this.textLeftDown, defvalue: true},
{value: AscFormat.ENTRANCE_STRIPS_LEFT_UP, caption: this.textLeftUp},
{value: AscFormat.ENTRANCE_STRIPS_RIGHT_DOWN, caption: this.textRightDown},
{value: AscFormat.ENTRANCE_STRIPS_RIGHT_UP, caption: this.textRightUp}
];
case AscFormat.ENTRANCE_WHEEL:
return [
{value: AscFormat.ENTRANCE_WHEEL_1_SPOKE, caption: this.textSpoke1, defvalue: true},
{value: AscFormat.ENTRANCE_WHEEL_2_SPOKES, caption: this.textSpoke2},
{value: AscFormat.ENTRANCE_WHEEL_3_SPOKES, caption: this.textSpoke3},
{value: AscFormat.ENTRANCE_WHEEL_4_SPOKES, caption: this.textSpoke4},
{value: AscFormat.ENTRANCE_WHEEL_8_SPOKES, caption: this.textSpoke8}
];
case AscFormat.ENTRANCE_WIPE_FROM:
return [
{value: AscFormat.ENTRANCE_WIPE_FROM_BOTTOM, caption: this.textFromBottom, defvalue: true},
{value: AscFormat.ENTRANCE_WIPE_FROM_LEFT, caption: this.textFromLeft},
{value: AscFormat.ENTRANCE_WIPE_FROM_RIGHT, caption: this.textFromRight},
{value: AscFormat.ENTRANCE_WIPE_FROM_TOP, caption: this.textFromTop}
];
case AscFormat.ENTRANCE_ZOOM:
return [
{value: AscFormat.ENTRANCE_ZOOM_OBJECT_CENTER, caption: this.textObjectCenter, defvalue: true},
{value: AscFormat.ENTRANCE_ZOOM_SLIDE_CENTER, caption: this.textSlideCenter}
];
case AscFormat.ENTRANCE_BASIC_ZOOM:
return [
{value: AscFormat.ENTRANCE_BASIC_ZOOM_IN, caption: this.textIn, defvalue: true},
{value: AscFormat.ENTRANCE_BASIC_ZOOM_IN_FROM_SCREEN_CENTER, caption: this.textInFromScreenCenter},
{value: AscFormat.ENTRANCE_BASIC_ZOOM_IN_SLIGHTLY, caption: this.textInSlightly},
{value: AscFormat.ENTRANCE_BASIC_ZOOM_OUT, caption: this.textOut},
{value: AscFormat.ENTRANCE_BASIC_ZOOM_OUT_FROM_SCREEN_BOTTOM, caption: this.textOutFromScreenBottom},
{value: AscFormat.ENTRANCE_BASIC_ZOOM_OUT_SLIGHTLY, caption: this.textOutSlightly}
];
case AscFormat.ENTRANCE_STRETCH:
return [
{value: AscFormat.ENTRANCE_STRETCH_ACROSS, caption: this.textAcross, defvalue: true},
{value: AscFormat.ENTRANCE_STRETCH_FROM_BOTTOM, caption: this.textFromBottom},
{value: AscFormat.ENTRANCE_STRETCH_FROM_LEFT, caption: this.textFromLeft},
{value: AscFormat.ENTRANCE_STRETCH_FROM_RIGHT, caption: this.textFromRight},
{value: AscFormat.ENTRANCE_STRETCH_FROM_TOP, caption: this.textFromTop}
];
case AscFormat.ENTRANCE_BASIC_SWIVEL:
return [
{value: AscFormat.ENTRANCE_BASIC_SWIVEL_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
{value: AscFormat.ENTRANCE_BASIC_SWIVEL_VERTICAL, caption: this.textVertical}
];
default:
return undefined;
}
break;
case 'menu-effect-group-exit':
switch (type){
case AscFormat.EXIT_BLINDS:
return [
{value: AscFormat.EXIT_BLINDS_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
{value: AscFormat.EXIT_BLINDS_VERTICAL, caption: this.textVertical}
];
case AscFormat.EXIT_BOX:
return [
{value: AscFormat.EXIT_BOX_IN, caption: this.textIn},
{value: AscFormat.EXIT_BOX_OUT, caption: this.textOut, defvalue: true}
];
case AscFormat.EXIT_CHECKERBOARD:
return [
{value: AscFormat.EXIT_CHECKERBOARD_ACROSS, caption: this.textAcross, defvalue: true},
{value: AscFormat.EXIT_CIRCLE_OUT, caption: this.textUp}
];
case AscFormat.EXIT_CIRCLE:
return [
{value: AscFormat.EXIT_CIRCLE_IN, caption: this.textIn},
{value: AscFormat.EXIT_CIRCLE_OUT, caption: this.textOut, defvalue: true}
];
case AscFormat.EXIT_DIAMOND:
return [
{value: AscFormat.EXIT_DIAMOND_IN, caption: this.textIn},
{value: AscFormat.EXIT_DIAMOND_OUT, caption: this.textOut, defvalue: true}
];
case AscFormat.EXIT_FLY_OUT_TO:
return [
{value: AscFormat.EXIT_FLY_OUT_TO_BOTTOM, caption: this.textToBottom, defvalue: true},
{value: AscFormat.EXIT_FLY_OUT_TO_BOTTOM_LEFT, caption: this.textToBottomLeft},
{value: AscFormat.EXIT_FLY_OUT_TO_LEFT, caption: this.textToLeft},
{value: AscFormat.EXIT_FLY_OUT_TO_TOP_LEFT, caption: this.textToTopLeft},
{value: AscFormat.EXIT_FLY_OUT_TO_TOP, caption: this.textToTop},
{value: AscFormat.EXIT_FLY_OUT_TO_TOP_RIGHT, caption: this.textToTopRight},
{value: AscFormat.EXIT_FLY_OUT_TO_RIGHT, caption: this.textToRight},
{value: AscFormat.EXIT_FLY_OUT_TO_BOTTOM_RIGHT, caption: this.textToBottomRight}
];
case AscFormat.EXIT_PEEK_OUT_TO:
return [
{value: AscFormat.EXIT_PEEK_OUT_TO_BOTTOM, caption: this.textToBottom, defvalue: true},
{value: AscFormat.EXIT_PEEK_OUT_TO_LEFT, caption: this.textToLeft},
{value: AscFormat.EXIT_PEEK_OUT_TO_RIGHT, caption: this.textToRight},
{value: AscFormat.EXIT_PEEK_OUT_TO_TOP, caption: this.textToTop}
];
case AscFormat.EXIT_PLUS:
return [
{value: AscFormat.EXIT_PLUS_IN, caption: this.textIn},
{value: AscFormat.EXIT_PLUS_OUT, caption: this.textOut, defvalue: true}
];
case AscFormat.EXIT_RANDOM_BARS:
return [
{value: AscFormat.EXIT_RANDOM_BARS_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
{value: AscFormat.EXIT_RANDOM_BARS_VERTICAL, caption: this.textVertical}
];
case AscFormat.EXIT_SPLIT:
return [
{value: AscFormat.EXIT_SPLIT_HORIZONTAL_IN, caption: this.textHorizontalIn},
{value: AscFormat.EXIT_SPLIT_HORIZONTAL_OUT, caption: this.textHorizontalOut},
{value: AscFormat.EXIT_SPLIT_VERTICAL_IN, caption: this.textVerticalIn, defvalue: true},
{value: AscFormat.EXIT_SPLIT_VERTICAL_OUT, caption: this.textVerticalOut}
];
case AscFormat.EXIT_STRIPS:
return [
{value: AscFormat.EXIT_STRIPS_LEFT_DOWN, caption: this.textLeftDown, defvalue: true},
{value: AscFormat.EXIT_STRIPS_LEFT_UP, caption: this.textLeftUp},
{value: AscFormat.EXIT_STRIPS_RIGHT_DOWN, caption: this.textRightDown},
{value: AscFormat.EXIT_STRIPS_RIGHT_UP, caption: this.textRightUp}
];
case AscFormat.EXIT_WHEEL:
return [
{value: AscFormat.EXIT_WHEEL_1_SPOKE, caption: this.textSpoke1, defvalue: true},
{value: AscFormat.EXIT_WHEEL_2_SPOKES, caption: this.textSpoke2},
{value: AscFormat.EXIT_WHEEL_3_SPOKES, caption: this.textSpoke3},
{value: AscFormat.EXIT_WHEEL_4_SPOKES, caption: this.textSpoke4},
{value: AscFormat.EXIT_WHEEL_8_SPOKES, caption: this.textSpoke8}
];
case AscFormat.EXIT_WIPE_FROM:
return [
{value: AscFormat.EXIT_WIPE_FROM_BOTTOM, caption: this.textFromBottom, defvalue: true},
{value: AscFormat.EXIT_WIPE_FROM_LEFT, caption: this.textFromLeft},
{value: AscFormat.EXIT_WIPE_FROM_RIGHT, caption: this.textFromRight},
{value: AscFormat.EXIT_WIPE_FROM_TOP, caption: this.textFromTop}
];
case AscFormat.EXIT_ZOOM:
return [
{value: AscFormat.EXIT_ZOOM_OBJECT_CENTER, caption: this.textObjectCenter, defvalue: true},
{value: AscFormat.EXIT_ZOOM_SLIDE_CENTER, caption: this.textSlideCenter}
];
case AscFormat.EXIT_BASIC_ZOOM:
return [
{value: AscFormat.EXIT_BASIC_ZOOM_OUT, caption: this.textOut, defvalue: true},
{value: AscFormat.EXIT_BASIC_ZOOM_OUT_TO_SCREEN_CENTER, caption: this.textOutToScreenCenter},
{value: AscFormat.EXIT_BASIC_ZOOM_OUT_SLIGHTLY, caption: this.textOutSlightly},
{value: AscFormat.EXIT_BASIC_ZOOM_IN, caption: this.textIn},
{value: AscFormat.EXIT_BASIC_ZOOM_IN_TO_SCREEN_BOTTOM, caption: this.textInToScreenBottom},
{value: AscFormat.EXIT_BASIC_ZOOM_IN_SLIGHTLY, caption: this.textInSlightly}
];
case AscFormat.EXIT_COLLAPSE:
return [
{value: AscFormat.EXIT_COLLAPSE_ACROSS, caption: this.textAcross, defvalue: true},
{value: AscFormat.EXIT_COLLAPSE_TO_BOTTOM, caption: this.textToBottom},
{value: AscFormat.EXIT_COLLAPSE_TO_LEFT, caption: this.textToLeft},
{value: AscFormat.EXIT_COLLAPSE_TO_RIGHT, caption: this.textToRight},
{value: AscFormat.EXIT_COLLAPSE_TO_TOP, caption: this.textToTop}
];
case AscFormat.EXIT_BASIC_SWIVEL:
return [
{value: AscFormat.EXIT_BASIC_SWIVEL_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
{value: AscFormat.EXIT_BASIC_SWIVEL_VERTICAL, caption: this.textVertical}
];
default:
return undefined;
}
break;
case 'menu-effect-group-path':
switch (type) {
case AscFormat.MOTION_CUSTOM_PATH:
return [
{value: AscFormat.MOTION_CUSTOM_PATH_CURVE, caption: this.textPathCurve, isCustom: true},
{value: AscFormat.MOTION_CUSTOM_PATH_LINE, caption: this.textPathLine, isCustom: true},
{value: AscFormat.MOTION_CUSTOM_PATH_SCRIBBLE, caption: this.textPathScribble, isCustom: true}
];
}
break;
default:
return undefined;
}
},
getSimilarEffectsArray: function (familyEffect) {
switch (familyEffect){
case 'shape':
return [
{value: AscFormat.EXIT_CIRCLE, caption: this.textCircle},
{value: AscFormat.EXIT_BOX, caption: this.textBox},
{value: AscFormat.EXIT_DIAMOND, caption: this.textDiamond},
{value: AscFormat.EXIT_PLUS, caption: this.textPlus}
];
case 'entrshape':
return [
{value: AscFormat.ENTRANCE_CIRCLE, caption: this.textCircle},
{value: AscFormat.ENTRANCE_BOX, caption: this.textBox},
{value: AscFormat.ENTRANCE_DIAMOND, caption: this.textDiamond},
{value: AscFormat.ENTRANCE_PLUS, caption: this.textPlus}
];
case 'pathlines':
return[
{value: AscFormat.MOTION_DOWN, caption: this.textDown},
{value: AscFormat.MOTION_LEFT, caption: this.textLeft},
{value: AscFormat.MOTION_RIGHT, caption: this.textRight},
{value: AscFormat.MOTION_UP, caption: this.textUp}
];
case 'patharcs':
return [
{value: AscFormat.MOTION_ARC_DOWN, caption: this.textArcDown},
{value: AscFormat.MOTION_ARC_LEFT, caption: this.textArcLeft},
{value: AscFormat.MOTION_ARC_RIGHT, caption: this.textArcRight},
{value: AscFormat.MOTION_ARC_UP, caption: this.textArcUp}
];
case 'pathturns':
return [
{value: AscFormat.MOTION_TURN_DOWN, caption: this.textTurnDown},
{value: AscFormat.MOTION_TURN_DOWN_RIGHT, caption: this.textTurnDownRight},
{value: AscFormat.MOTION_TURN_UP, caption: this.textTurnUp},
{value: AscFormat.MOTION_TURN_UP_RIGHT, caption: this.textTurnUpRight}
];
case 'pathshapes':
return [
{value: AscFormat.MOTION_CIRCLE, caption: this.textCircle},
{value: AscFormat.MOTION_DIAMOND, caption: this.textDiamond},
{value: AscFormat.MOTION_EQUAL_TRIANGLE, caption: this.textEqualTriangle},
{value: AscFormat.MOTION_HEXAGON, caption: this.textHexagon},
{value: AscFormat.MOTION_OCTAGON, caption: this.textOctagon},
{value: AscFormat.MOTION_PARALLELOGRAM, caption: this.textParallelogram},
{value: AscFormat.MOTION_PENTAGON, caption: this.textPentagon},
{value: AscFormat.MOTION_RIGHT_TRIANGLE, caption: this.textRightTriangle},
{value: AscFormat.MOTION_SQUARE, caption: this.textSquare},
{value: AscFormat.MOTION_TRAPEZOID, caption: this.textTrapezoid}
];
case 'pathloops':
return [
{value: AscFormat.MOTION_HORIZONTAL_FIGURE_8_FOUR, caption: this.textHorizontalFigure},
{value: AscFormat.MOTION_VERTICAL_FIGURE_8, caption: this.textVerticalFigure},
{value: AscFormat.MOTION_LOOP_DE_LOOP, caption: this.textLoopDeLoop}
];
case 'entrfloat':
return [
{value: AscFormat.ENTRANCE_FLOAT_UP, caption: this.textFloatUp},
{value: AscFormat.ENTRANCE_FLOAT_DOWN, caption: this.textFloatDown}
];
case 'exitfloat':
return [
{value: AscFormat.EXIT_FLOAT_UP, caption: this.textFloatUp},
{value: AscFormat.EXIT_FLOAT_DOWN, caption: this.textFloatDown}
];
default:
return [];
}
}
}
})(), Common.define.effectData || {});
}); });

View file

@ -16,34 +16,13 @@ function checkScaling() {
} }
} }
matches = { if ( !window.matchMedia("screen and (-webkit-device-pixel-ratio: 1.5)," +
'pixel-ratio__2_5': `screen and (-webkit-min-device-pixel-ratio: 2.5), screen and (min-resolution: 2.5dppx)`, "screen and (-webkit-device-pixel-ratio: 1)," +
}; "screen and (-webkit-device-pixel-ratio: 2)").matches )
for (let c in matches) { {
if ( window.matchMedia(matches[c]).matches ) { // don't add zoom for mobile devices
document.body.classList.add(c); // if (!(/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent || navigator.vendor || window.opera)))
Common.Utils.injectSvgIcons(); // document.getElementsByTagName('html')[0].setAttribute('style', 'zoom: ' + (1 / window.devicePixelRatio) + ';');
break;
}
}
}
window.Common = {
Utils: {
injectSvgIcons: function () {
const el = document.querySelector('div.inlined-svg');
if (!el || !el.innerHTML.firstChild) {
fetch('./resources/img/iconssmall@2.5x.svg')
.then(r => {
if (r.ok) return r.text();
else {/* error */
}
}).then(text => {
const el = document.querySelector('div.inlined-svg')
el.innerHTML = text;
}).catch(console.error.bind(console));
}
}
} }
} }

View file

@ -144,8 +144,6 @@ var utils = new(function() {
"screen and (min-resolution: 1.75dppx) and (max-resolution: 1.99dppx)"; "screen and (min-resolution: 1.75dppx) and (max-resolution: 1.99dppx)";
var str_mq_200 = "screen and (-webkit-min-device-pixel-ratio: 2), " + var str_mq_200 = "screen and (-webkit-min-device-pixel-ratio: 2), " +
"screen and (min-resolution: 2dppx), screen and (min-resolution: 192dpi)"; "screen and (min-resolution: 2dppx), screen and (min-resolution: 192dpi)";
const str_mq_250 = "screen and (-webkit-min-device-pixel-ratio: 2.5), " +
"screen and (min-resolution: 2.5dppx), screen and (min-resolution: 240dpi)";
if ( window.matchMedia(str_mq_125).matches ) { if ( window.matchMedia(str_mq_125).matches ) {
scale.devicePixelRatio = 1.5; scale.devicePixelRatio = 1.5;
@ -159,10 +157,6 @@ var utils = new(function() {
if ( window.matchMedia(str_mq_200).matches ) if ( window.matchMedia(str_mq_200).matches )
scale.devicePixelRatio = 2; scale.devicePixelRatio = 2;
else scale.devicePixelRatio = 1; else scale.devicePixelRatio = 1;
if ( window.matchMedia(str_mq_250).matches ) {
scale.devicePixelRatio = 2.5;
}
} }
var $root = $(document.body); var $root = $(document.body);
@ -187,15 +181,10 @@ var utils = new(function() {
if ( !/pixel-ratio__1_75/.test(classes) ) { if ( !/pixel-ratio__1_75/.test(classes) ) {
document.body.className = clear_list + ' pixel-ratio__1_75'; document.body.className = clear_list + ' pixel-ratio__1_75';
} }
} else
if ( !(scale.devicePixelRatio < 2) && scale.devicePixelRatio < 2.5 ) {
if ( !/pixel-ratio__2\b/.test(classes) ) {
document.body.className = clear_list + ' pixel-ratio__2';
}
} else { } else {
// $root.addClass('pixel-ratio__2_5'); $root.addClass('pixel-ratio__2');
if ( !/pixel-ratio__2_5/.test(classes) ) { if ( !/pixel-ratio__2/.test(classes) ) {
document.body.className = clear_list + ' pixel-ratio__2_5'; document.body.className = clear_list + ' pixel-ratio__2';
} }
} }
@ -990,7 +979,7 @@ Common.Utils.warningDocumentIsLocked = function (opts) {
callback: function(btn){ callback: function(btn){
if (btn == 'edit') { if (btn == 'edit') {
if ( opts.disablefunc ) opts.disablefunc(false); if ( opts.disablefunc ) opts.disablefunc(false);
app.getController('Main').api.asc_setIsReadOnly(false); app.getController('Main').api.asc_setLocalRestrictions(Asc.c_oAscLocalRestrictionType.None);
} }
} }
}); });

View file

@ -39,29 +39,59 @@
*/ */
define([ define([
'common/main/lib/view/ExternalEditor' 'common/main/lib/component/Window'
], function () { 'use strict'; ], function () { 'use strict';
Common.Views.ExternalDiagramEditor = Common.Views.ExternalEditor.extend(_.extend({ Common.Views.ExternalDiagramEditor = Common.UI.Window.extend(_.extend({
initialize : function(options) { initialize : function(options) {
var _options = {}; var _options = {};
var _inner_height = Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top');
_.extend(_options, { _.extend(_options, {
title: this.textTitle, title: this.textTitle,
storageName: 'diagram-editor', width: 910,
sdkplaceholder: 'id-diagram-editor-placeholder', height: (_inner_height - 700)<0 ? _inner_height : 700,
initwidth: 900, cls: 'advanced-settings-dlg',
initheight: 700, header: true,
minwidth: 730, toolclose: 'hide',
minheight: 275 toolcallback: _.bind(this.onToolClose, this)
}, options); }, options);
this.template = [
'<div id="id-diagram-editor-container" class="box" style="height:' + (_options.height-85) + 'px;">',
'<div id="id-diagram-editor-placeholder" style="width: 100%;height: 100%;"></div>',
'</div>',
'<div class="separator horizontal"></div>',
'<div class="footer" style="text-align: center;">',
'<button id="id-btn-diagram-editor-apply" class="btn normal dlg-btn primary custom" result="ok" data-hint="1" data-hint-direction="bottom" data-hint-offset="big">' + this.textSave + '</button>',
'<button id="id-btn-diagram-editor-cancel" class="btn normal dlg-btn" result="cancel" data-hint="1" data-hint-direction="bottom" data-hint-offset="big">' + this.textClose + '</button>',
'</div>'
].join('');
_options.tpl = _.template(this.template)(_options);
this.handler = _options.handler;
this._chartData = null; this._chartData = null;
Common.Views.ExternalEditor.prototype.initialize.call(this, _options); this._isNewChart = true;
Common.UI.Window.prototype.initialize.call(this, _options);
},
render: function() {
Common.UI.Window.prototype.render.call(this);
this.btnSave = new Common.UI.Button({
el: $('#id-btn-diagram-editor-apply'),
disabled: true
});
this.btnCancel = new Common.UI.Button({
el: $('#id-btn-diagram-editor-cancel')
});
this.$window.find('.dlg-btn').on('click', _.bind(this.onDlgBtnClick, this));
}, },
show: function() { show: function() {
this.setPlaceholder(); this.setPlaceholder();
Common.Views.ExternalEditor.prototype.show.apply(this, arguments); Common.UI.Window.prototype.show.apply(this, arguments);
}, },
setChartData: function(data) { setChartData: function(data) {
@ -70,6 +100,55 @@ define([
this.fireEvent('setchartdata', this); this.fireEvent('setchartdata', this);
}, },
setEditMode: function(mode) {
this._isNewChart = !mode;
},
isEditMode: function() {
return !this._isNewChart;
},
setControlsDisabled: function(disable) {
this.btnSave.setDisabled(disable);
this.btnCancel.setDisabled(disable);
(disable) ? this.$window.find('.tool.close').addClass('disabled') : this.$window.find('.tool.close').removeClass('disabled');
},
onDlgBtnClick: function(event) {
if ( this.handler ) {
this.handler.call(this, event.currentTarget.attributes['result'].value);
return;
}
this.hide();
},
onToolClose: function() {
if ( this.handler ) {
this.handler.call(this, 'cancel');
return;
}
this.hide();
},
setHeight: function(height) {
if (height >= 0) {
var min = parseInt(this.$window.css('min-height'));
height < min && (height = min);
this.$window.height(height);
var header_height = (this.initConfig.header) ? parseInt(this.$window.find('> .header').css('height')) : 0;
this.$window.find('> .body').css('height', height-header_height);
this.$window.find('> .body > .box').css('height', height-85);
var top = (Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top') - parseInt(height)) / 2;
var left = (Common.Utils.innerWidth() - parseInt(this.initConfig.width)) / 2;
this.$window.css('left',left);
this.$window.css('top', Common.Utils.InternalSettings.get('window-inactive-area-top') + top);
}
},
setPlaceholder: function(placeholder) { setPlaceholder: function(placeholder) {
this._placeholder = placeholder; this._placeholder = placeholder;
}, },
@ -78,6 +157,8 @@ define([
return this._placeholder; return this._placeholder;
}, },
textSave: 'Save & Exit',
textClose: 'Close',
textTitle: 'Chart Editor' textTitle: 'Chart Editor'
}, Common.Views.ExternalDiagramEditor || {})); }, Common.Views.ExternalDiagramEditor || {}));
}); });

View file

@ -1,195 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2022
*
* 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
*
*/
/**
* ExternalEditor.js
*
* Created by Julia Radzhabova on 22/06/22
* Copyright (c) 2022 Ascensio System SIA. All rights reserved.
*
*/
define([
'common/main/lib/component/Window'
], function () { 'use strict';
Common.Views.ExternalEditor = Common.UI.Window.extend(_.extend({
initialize : function(options) {
var filter = Common.localStorage.getKeysFilter(),
appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
this.storageName = appPrefix + (options.storageName || 'external-editor');
var _options = {},
width = options.initwidth || 900,
height = options.initheight || 700;
var value = Common.localStorage.getItem(this.storageName + '-width');
value && (width = parseInt(value));
value = Common.localStorage.getItem(this.storageName + '-height');
value && (height = parseInt(value));
var _inner_height = Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top');
_.extend(_options, {
width: width,
height: (_inner_height - height)<0 ? _inner_height : height,
cls: 'advanced-settings-dlg',
header: true,
toolclose: 'hide',
toolcallback: _.bind(this.onToolClose, this),
resizable: true
}, options);
this._headerFooterHeight = 85;
this.template = [
'<div id="id-editor-container" class="box" style="height:' + (_options.height-this._headerFooterHeight) + 'px; padding: 0 5px;">',
'<div id="' + (_options.sdkplaceholder || '') + '" style="width: 100%;height: 100%;"></div>',
'</div>',
'<div class="separator horizontal"></div>',
'<div class="footer" style="text-align: center;">',
'<button id="id-btn-editor-apply" class="btn normal dlg-btn primary custom" result="ok" data-hint="1" data-hint-direction="bottom" data-hint-offset="big">' + this.textSave + '</button>',
'<button id="id-btn-editor-cancel" class="btn normal dlg-btn" result="cancel" data-hint="1" data-hint-direction="bottom" data-hint-offset="big">' + this.textClose + '</button>',
'</div>'
].join('');
_options.tpl = _.template(this.template)(_options);
this.handler = _options.handler;
this._isNewObject = true;
this.on('resize', _.bind(this.onWindowResize, this));
Common.UI.Window.prototype.initialize.call(this, _options);
},
render: function() {
Common.UI.Window.prototype.render.call(this);
this.boxEl = this.$window.find('.body > .box');
this.btnSave = new Common.UI.Button({
el: this.$window.find('#id-btn-editor-apply'),
disabled: true
});
this.btnCancel = new Common.UI.Button({
el: this.$window.find('#id-btn-editor-cancel')
});
this.$window.find('.dlg-btn').on('click', _.bind(this.onDlgBtnClick, this));
},
show: function() {
Common.UI.Window.prototype.show.apply(this, arguments);
},
setEditMode: function(mode) {
this._isNewObject = !mode;
},
isEditMode: function() {
return !this._isNewObject;
},
setControlsDisabled: function(disable) {
this.btnSave.setDisabled(disable);
this.btnCancel.setDisabled(disable);
(disable) ? this.$window.find('.tool.close').addClass('disabled') : this.$window.find('.tool.close').removeClass('disabled');
},
onDlgBtnClick: function(event) {
if ( this.handler ) {
this.handler.call(this, event.currentTarget.attributes['result'].value);
return;
}
this.hide();
},
onToolClose: function() {
if ( this.handler ) {
this.handler.call(this, 'cancel');
return;
}
this.hide();
},
setHeight: function(height) {
if (height >= 0) {
var min = parseInt(this.$window.css('min-height'));
height < min && (height = min);
this.$window.height(height);
var header_height = (this.initConfig.header) ? parseInt(this.$window.find('> .header').css('height')) : 0;
this.$window.find('> .body').css('height', height-header_height);
this.$window.find('> .body > .box').css('height', height-this._headerFooterHeight);
}
},
setInCenter: function() {
var height = this.$window.height(),
top = (Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top') - parseInt(height)) / 2,
left = (Common.Utils.innerWidth() - parseInt(this.initConfig.width)) / 2;
this.$window.css('left',left);
this.$window.css('top', Common.Utils.InternalSettings.get('window-inactive-area-top') + top);
},
setInnerSize: function(width, height) {
var maxHeight = Common.Utils.innerHeight(),
maxWidth = Common.Utils.innerWidth(),
borders_width = (parseInt(this.$window.css('border-left-width')) + parseInt(this.$window.css('border-right-width'))),
paddings = (parseInt(this.boxEl.css('padding-left')) + parseInt(this.boxEl.css('padding-right')));
height += 90; // add toolbar and statusbar height
if (maxHeight<height + this._headerFooterHeight)
height = maxHeight - this._headerFooterHeight;
if (maxWidth<width + paddings + borders_width)
width = maxWidth - paddings - borders_width;
this.boxEl.css('height', height);
this.setHeight(height + this._headerFooterHeight);
this.setWidth(width + paddings + borders_width);
if (this.getLeft()<0)
this.$window.css('left', 0);
if (this.getTop() < Common.Utils.InternalSettings.get('window-inactive-area-top') )
this.$window.css('top', Common.Utils.InternalSettings.get('window-inactive-area-top'));
},
onWindowResize: function (args) {
if (args && args[1]=='end') {
var value = this.getSize();
Common.localStorage.setItem(this.storageName + '-width', value[0]);
Common.localStorage.setItem(this.storageName + '-height', value[1]);
}
},
textSave: 'Save & Exit',
textClose: 'Close'
}, Common.Views.ExternalEditor || {}));
});

View file

@ -39,24 +39,55 @@
*/ */
define([ define([
'common/main/lib/view/ExternalEditor' 'common/main/lib/component/Window'
], function () { 'use strict'; ], function () { 'use strict';
Common.Views.ExternalMergeEditor = Common.Views.ExternalEditor.extend(_.extend({ Common.Views.ExternalMergeEditor = Common.UI.Window.extend(_.extend({
initialize : function(options) { initialize : function(options) {
var _options = {}; var _options = {};
_.extend(_options, { _.extend(_options, {
title: this.textTitle, title: this.textTitle,
storageName: 'merge-editor', width: 910,
sdkplaceholder: 'id-merge-editor-placeholder', height: (Common.Utils.innerHeight()-700)<0 ? Common.Utils.innerHeight(): 700,
initwidth: 900, cls: 'advanced-settings-dlg',
initheight: 700, header: true,
minwidth: 370, toolclose: 'hide',
minheight: 275 toolcallback: _.bind(this.onToolClose, this)
}, options); }, options);
this.template = [
'<div id="id-merge-editor-container" class="box" style="height:' + (_options.height-85) + 'px;">',
'<div id="id-merge-editor-placeholder" style="width: 100%;height: 100%;"></div>',
'</div>',
'<div class="separator horizontal"></div>',
'<div class="footer" style="text-align: center;">',
'<button id="id-btn-merge-editor-apply" class="btn normal dlg-btn primary custom" result="ok" data-hint="1" data-hint-direction="bottom" data-hint-offset="big">' + this.textSave + '</button>',
'<button id="id-btn-merge-editor-cancel" class="btn normal dlg-btn" result="cancel" data-hint="1" data-hint-direction="bottom" data-hint-offset="big">' + this.textClose + '</button>',
'</div>'
].join('');
_options.tpl = _.template(this.template)(_options);
this.handler = _options.handler;
this._mergeData = null; this._mergeData = null;
Common.Views.ExternalEditor.prototype.initialize.call(this, _options); this._isNewMerge = true;
Common.UI.Window.prototype.initialize.call(this, _options);
},
render: function() {
Common.UI.Window.prototype.render.call(this);
this.btnSave = new Common.UI.Button({
el: $('#id-btn-merge-editor-apply'),
disabled: true
});
this.btnCancel = new Common.UI.Button({
el: $('#id-btn-merge-editor-cancel'),
disabled: true
});
this.$window.find('.tool.close').addClass('disabled');
this.$window.find('.dlg-btn').on('click', _.bind(this.onDlgBtnClick, this));
}, },
setMergeData: function(data) { setMergeData: function(data) {
@ -65,6 +96,54 @@ define([
this.fireEvent('setmergedata', this); this.fireEvent('setmergedata', this);
}, },
setEditMode: function(mode) {
this._isNewMerge = !mode;
},
isEditMode: function() {
return !this._isNewMerge;
},
setControlsDisabled: function(disable) {
this.btnSave.setDisabled(disable);
this.btnCancel.setDisabled(disable);
(disable) ? this.$window.find('.tool.close').addClass('disabled') : this.$window.find('.tool.close').removeClass('disabled');
},
onDlgBtnClick: function(event) {
var state = event.currentTarget.attributes['result'].value;
if ( this.handler && this.handler.call(this, state) )
return;
this.hide();
},
onToolClose: function() {
if ( this.handler && this.handler.call(this, 'cancel') )
return;
this.hide();
},
setHeight: function(height) {
if (height >= 0) {
var min = parseInt(this.$window.css('min-height'));
height < min && (height = min);
this.$window.height(height);
var header_height = (this.initConfig.header) ? parseInt(this.$window.find('> .header').css('height')) : 0;
this.$window.find('> .body').css('height', height-header_height);
this.$window.find('> .body > .box').css('height', height-85);
var top = (Common.Utils.innerHeight() - parseInt(height)) / 2;
var left = (Common.Utils.innerWidth() - parseInt(this.initConfig.width)) / 2;
this.$window.css('left',left);
this.$window.css('top',top);
}
},
textSave: 'Save & Exit',
textClose: 'Close',
textTitle: 'Mail Merge Recipients' textTitle: 'Mail Merge Recipients'
}, Common.Views.ExternalMergeEditor || {})); }, Common.Views.ExternalMergeEditor || {}));
}); });

View file

@ -39,24 +39,59 @@
*/ */
define([ define([
'common/main/lib/view/ExternalEditor' 'common/main/lib/component/Window'
], function () { 'use strict'; ], function () { 'use strict';
Common.Views.ExternalOleEditor = Common.Views.ExternalEditor.extend(_.extend({ Common.Views.ExternalOleEditor = Common.UI.Window.extend(_.extend({
initialize : function(options) { initialize : function(options) {
var _options = {}; var _options = {};
var _inner_height = Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top');
_.extend(_options, { _.extend(_options, {
title: this.textTitle, title: this.textTitle,
storageName: 'ole-editor', width: 910,
sdkplaceholder: 'id-ole-editor-placeholder', height: (_inner_height - 700)<0 ? _inner_height : 700,
initwidth: 900, cls: 'advanced-settings-dlg',
initheight: 700, header: true,
minwidth: 860, toolclose: 'hide',
minheight: 275 toolcallback: _.bind(this.onToolClose, this)
}, options); }, options);
this.template = [
'<div id="id-ole-editor-container" class="box" style="height:' + (_options.height-85) + 'px;">',
'<div id="id-ole-editor-placeholder" style="width: 100%;height: 100%;"></div>',
'</div>',
'<div class="separator horizontal"></div>',
'<div class="footer" style="text-align: center;">',
'<button id="id-btn-ole-editor-apply" class="btn normal dlg-btn primary custom" result="ok" data-hint="1" data-hint-direction="bottom" data-hint-offset="big">' + this.textSave + '</button>',
'<button id="id-btn-ole-editor-cancel" class="btn normal dlg-btn" result="cancel" data-hint="1" data-hint-direction="bottom" data-hint-offset="big">' + this.textClose + '</button>',
'</div>'
].join('');
_options.tpl = _.template(this.template)(_options);
this.handler = _options.handler;
this._oleData = null; this._oleData = null;
Common.Views.ExternalEditor.prototype.initialize.call(this, _options); this._isNewOle = true;
Common.UI.Window.prototype.initialize.call(this, _options);
},
render: function() {
Common.UI.Window.prototype.render.call(this);
this.btnSave = new Common.UI.Button({
el: $('#id-btn-ole-editor-apply'),
disabled: true
});
this.btnCancel = new Common.UI.Button({
el: $('#id-btn-ole-editor-cancel')
});
this.$window.find('.dlg-btn').on('click', _.bind(this.onDlgBtnClick, this));
},
show: function() {
this.setPlaceholder();
Common.UI.Window.prototype.show.apply(this, arguments);
}, },
setOleData: function(data) { setOleData: function(data) {
@ -65,6 +100,65 @@ define([
this.fireEvent('setoledata', this); this.fireEvent('setoledata', this);
}, },
setEditMode: function(mode) {
this._isNewOle = !mode;
},
isEditMode: function() {
return !this._isNewOle;
},
setControlsDisabled: function(disable) {
this.btnSave.setDisabled(disable);
this.btnCancel.setDisabled(disable);
(disable) ? this.$window.find('.tool.close').addClass('disabled') : this.$window.find('.tool.close').removeClass('disabled');
},
onDlgBtnClick: function(event) {
if ( this.handler ) {
this.handler.call(this, event.currentTarget.attributes['result'].value);
return;
}
this.hide();
},
onToolClose: function() {
if ( this.handler ) {
this.handler.call(this, 'cancel');
return;
}
this.hide();
},
setHeight: function(height) {
if (height >= 0) {
var min = parseInt(this.$window.css('min-height'));
height < min && (height = min);
this.$window.height(height);
var header_height = (this.initConfig.header) ? parseInt(this.$window.find('> .header').css('height')) : 0;
this.$window.find('> .body').css('height', height-header_height);
this.$window.find('> .body > .box').css('height', height-85);
var top = (Common.Utils.innerHeight() - Common.Utils.InternalSettings.get('window-inactive-area-top') - parseInt(height)) / 2;
var left = (Common.Utils.innerWidth() - parseInt(this.initConfig.width)) / 2;
this.$window.css('left',left);
this.$window.css('top', Common.Utils.InternalSettings.get('window-inactive-area-top') + top);
}
},
setPlaceholder: function(placeholder) {
this._placeholder = placeholder;
},
getPlaceholder: function() {
return this._placeholder;
},
textSave: 'Save & Exit',
textClose: 'Close',
textTitle: 'Spreadsheet Editor' textTitle: 'Spreadsheet Editor'
}, Common.Views.ExternalOleEditor || {})); }, Common.Views.ExternalOleEditor || {}));
}); });

View file

@ -81,6 +81,7 @@ define([
'<div class="hedset">' + '<div class="hedset">' +
'<div class="btn-slot" id="slot-hbtn-edit"></div>' + '<div class="btn-slot" id="slot-hbtn-edit"></div>' +
'<div class="btn-slot" id="slot-hbtn-print"></div>' + '<div class="btn-slot" id="slot-hbtn-print"></div>' +
'<div class="btn-slot" id="slot-hbtn-print-quick"></div>' +
'<div class="btn-slot" id="slot-hbtn-download"></div>' + '<div class="btn-slot" id="slot-hbtn-download"></div>' +
'</div>' + '</div>' +
'<div class="hedset" data-layout-name="header-users">' + '<div class="hedset" data-layout-name="header-users">' +
@ -128,6 +129,7 @@ define([
'<div class="hedset">' + '<div class="hedset">' +
'<div class="btn-slot" id="slot-btn-dt-save" data-layout-name="header-save"></div>' + '<div class="btn-slot" id="slot-btn-dt-save" data-layout-name="header-save"></div>' +
'<div class="btn-slot" id="slot-btn-dt-print"></div>' + '<div class="btn-slot" id="slot-btn-dt-print"></div>' +
'<div class="btn-slot" id="slot-btn-dt-print-quick"></div>' +
'<div class="btn-slot" id="slot-btn-dt-undo"></div>' + '<div class="btn-slot" id="slot-btn-dt-undo"></div>' +
'<div class="btn-slot" id="slot-btn-dt-redo"></div>' + '<div class="btn-slot" id="slot-btn-dt-redo"></div>' +
'</div>' + '</div>' +
@ -332,6 +334,13 @@ define([
}); });
} }
if ( me.btnPrintQuick ) {
me.btnPrintQuick.updateHint(me.tipPrintQuick);
me.btnPrintQuick.on('click', function (e) {
me.fireEvent('print-quick', me);
});
}
if ( me.btnSave ) { if ( me.btnSave ) {
me.btnSave.updateHint(me.tipSave + Common.Utils.String.platformKey('Ctrl+S')); me.btnSave.updateHint(me.tipSave + Common.Utils.String.platformKey('Ctrl+S'));
me.btnSave.on('click', function (e) { me.btnSave.on('click', function (e) {
@ -572,6 +581,9 @@ define([
if ( config.canPrint ) if ( config.canPrint )
this.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-hbtn-print'), undefined, 'bottom', 'big', 'P'); this.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-hbtn-print'), undefined, 'bottom', 'big', 'P');
if ( config.canQuickPrint )
this.btnPrintQuick = createTitleButton('toolbar__icon icon--inverse btn-quick-print', $html.findById('#slot-hbtn-print-quick'), undefined, 'bottom', 'big', 'Q');
if ( config.canEdit && config.canRequestEditRights ) if ( config.canEdit && config.canRequestEditRights )
this.btnEdit = createTitleButton('toolbar__icon icon--inverse btn-edit', $html.findById('#slot-hbtn-edit'), undefined, 'bottom', 'big'); this.btnEdit = createTitleButton('toolbar__icon icon--inverse btn-edit', $html.findById('#slot-hbtn-edit'), undefined, 'bottom', 'big');
} }
@ -646,6 +658,8 @@ define([
if ( config.canPrint && config.isEdit ) { if ( config.canPrint && config.isEdit ) {
me.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-btn-dt-print'), true, undefined, undefined, 'P'); me.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-btn-dt-print'), true, undefined, undefined, 'P');
} }
if ( config.canQuickPrint && config.isEdit )
me.btnPrintQuick = createTitleButton('toolbar__icon icon--inverse btn-quick-print', $html.findById('#slot-btn-dt-print-quick'), true, undefined, undefined, 'Q');
me.btnSave = createTitleButton('toolbar__icon icon--inverse btn-save', $html.findById('#slot-btn-dt-save'), true, undefined, undefined, 'S'); me.btnSave = createTitleButton('toolbar__icon icon--inverse btn-save', $html.findById('#slot-btn-dt-save'), true, undefined, undefined, 'S');
me.btnUndo = createTitleButton('toolbar__icon icon--inverse btn-undo', $html.findById('#slot-btn-dt-undo'), true, undefined, undefined, 'Z'); me.btnUndo = createTitleButton('toolbar__icon icon--inverse btn-undo', $html.findById('#slot-btn-dt-undo'), true, undefined, undefined, 'Z');
@ -695,6 +709,7 @@ define([
if (idx>0) if (idx>0)
this.fileExtention = this.documentCaption.substring(idx); this.fileExtention = this.documentCaption.substring(idx);
this.isModified && (value += '*'); this.isModified && (value += '*');
this.readOnly && (value += ' (' + this.textReadOnly + ')');
if ( $labelDocName ) { if ( $labelDocName ) {
this.setDocTitle( value ); this.setDocTitle( value );
} }
@ -887,6 +902,11 @@ define([
return initials; return initials;
}, },
setDocumentReadOnly: function (readonly) {
this.readOnly = readonly;
this.setDocumentCaption(this.documentCaption);
},
textBack: 'Go to Documents', textBack: 'Go to Documents',
txtRename: 'Rename', txtRename: 'Rename',
txtAccessRights: 'Change access rights', txtAccessRights: 'Change access rights',
@ -910,7 +930,9 @@ define([
textAddFavorite: 'Mark as favorite', textAddFavorite: 'Mark as favorite',
textHideNotes: 'Hide Notes', textHideNotes: 'Hide Notes',
tipSearch: 'Search', tipSearch: 'Search',
textShare: 'Share' textShare: 'Share',
tipPrintQuick: 'Quick print',
textReadOnly: 'Read only'
} }
}(), Common.Views.Header || {})) }(), Common.Views.Header || {}))
}); });

View file

@ -207,7 +207,6 @@ define([
type: 'password', type: 'password',
showCls: (this.options.iconType==='svg' ? 'svg-icon' : 'toolbar__icon') + ' btn-sheet-view', showCls: (this.options.iconType==='svg' ? 'svg-icon' : 'toolbar__icon') + ' btn-sheet-view',
hideCls: (this.options.iconType==='svg' ? 'svg-icon' : 'toolbar__icon') + ' hide-password', hideCls: (this.options.iconType==='svg' ? 'svg-icon' : 'toolbar__icon') + ' hide-password',
maxLength: this.options.maxPasswordLength,
validateOnBlur: false, validateOnBlur: false,
showPwdOnClick: true, showPwdOnClick: true,
validation : function(value) { validation : function(value) {

View file

@ -154,8 +154,6 @@ define([
this.$window.css('left',(maxWidth - width - borders_width) / 2); this.$window.css('left',(maxWidth - width - borders_width) / 2);
this.$window.css('top',(maxHeight - height - this._headerFooterHeight) / 2); this.$window.css('top',(maxHeight - height - this._headerFooterHeight) / 2);
this._restoreHeight = this._restoreWidth = undefined;
}, },
onWindowResize: function() { onWindowResize: function() {
@ -164,38 +162,26 @@ define([
win_width = this.getWidth(), win_width = this.getWidth(),
win_height = this.getHeight(), win_height = this.getHeight(),
bordersOffset = (this.resizable) ? 0 : this.bordersOffset; bordersOffset = (this.resizable) ? 0 : this.bordersOffset;
if (win_height<main_height-bordersOffset*2+0.1 ) { if (win_height<main_height-bordersOffset*2+0.1 && win_width<main_width-bordersOffset*2+0.1) {
if (!this.resizable && this._restoreHeight>0 && win_height < this._restoreHeight) { var left = this.getLeft(),
var height = Math.max(Math.min(this._restoreHeight, main_height-bordersOffset*2), this.initConfig.minheight); top = this.getTop();
this.setHeight(height);
this.boxEl.css('height', height - this._headerFooterHeight);
}
var top = this.getTop();
if (top<bordersOffset) this.$window.css('top', bordersOffset); if (top<bordersOffset) this.$window.css('top', bordersOffset);
else if (top+win_height>main_height-bordersOffset) else if (top+win_height>main_height-bordersOffset)
this.$window.css('top', main_height-bordersOffset - win_height); this.$window.css('top', main_height-bordersOffset - win_height);
} else {
if (this._restoreHeight===undefined) {
this._restoreHeight = win_height;
}
this.setHeight(Math.max(main_height-bordersOffset*2, this.initConfig.minheight));
this.boxEl.css('height', Math.max(main_height-bordersOffset*2, this.initConfig.minheight) - this._headerFooterHeight);
this.$window.css('top', bordersOffset);
}
if (win_width<main_width-bordersOffset*2+0.1) {
if (!this.resizable && this._restoreWidth>0 && win_width < this._restoreWidth) {
this.setWidth(Math.max(Math.min(this._restoreWidth, main_width-bordersOffset*2), this.initConfig.minwidth));
}
var left = this.getLeft();
if (left<bordersOffset) this.$window.css('left', bordersOffset); if (left<bordersOffset) this.$window.css('left', bordersOffset);
else if (left+win_width>main_width-bordersOffset) else if (left+win_width>main_width-bordersOffset)
this.$window.css('left', main_width-bordersOffset-win_width); this.$window.css('left', main_width-bordersOffset-win_width);
} else { } else {
if (this._restoreWidth===undefined) { if (win_height>main_height-bordersOffset*2) {
this._restoreWidth = win_width; this.setHeight(Math.max(main_height-bordersOffset*2, this.initConfig.minheight));
this.boxEl.css('height', Math.max(main_height-bordersOffset*2, this.initConfig.minheight) - this._headerFooterHeight);
this.$window.css('top', bordersOffset);
}
if (win_width>main_width-bordersOffset*2) {
this.setWidth(Math.max(main_width-bordersOffset*2, this.initConfig.minwidth));
this.$window.css('left', bordersOffset);
} }
this.setWidth(Math.max(main_width-bordersOffset*2, this.initConfig.minwidth));
this.$window.css('left', bordersOffset);
} }
}, },

View file

@ -74,16 +74,14 @@ define([
_.extend(this, options); _.extend(this, options);
this._locked = false; this._locked = false;
this._state = { this._state = {
DisabledControls: false, DisabledControls: false
docProtection: {
isReadOnly: false,
isReviewOnly: false,
isFormsOnly: false,
isCommentsOnly: false
}
}; };
this.lockedControls = []; this.lockedControls = [];
Common.UI.BaseView.prototype.initialize.call(this, arguments); Common.UI.BaseView.prototype.initialize.call(this, arguments);
Common.NotificationCenter.on('app:ready', function (mode) {
Common.Utils.asyncCall(this._onAppReady, this, mode);
}.bind(this));
}, },
render: function(el) { render: function(el) {
@ -155,7 +153,6 @@ define([
if ( !this.storePlugins.isEmpty() ) { if ( !this.storePlugins.isEmpty() ) {
var me = this; var me = this;
var _group = $('<div class="group"></div>'); var _group = $('<div class="group"></div>');
var _set = Common.enumLock;
this.storePlugins.each(function (model) { this.storePlugins.each(function (model) {
if (model.get('visible')) { if (model.get('visible')) {
var modes = model.get('variations'), var modes = model.get('variations'),
@ -170,7 +167,6 @@ define([
split: modes && modes.length > 1, split: modes && modes.length > 1,
value: guid, value: guid,
hint: model.get('name'), hint: model.get('name'),
lock: model.get('isDisplayedInViewer') ? [_set.viewMode, _set.previewReviewMode, _set.viewFormMode, _set.selRangeEdit, _set.editFormula] : [_set.viewMode, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView, _set.docLockForms, _set.docLockComments, _set.selRangeEdit, _set.editFormula],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'
@ -183,10 +179,6 @@ define([
me.lockedControls.push(btn); me.lockedControls.push(btn);
} }
}); });
var docProtection = me._state.docProtection
Common.Utils.lockControls(Common.enumLock.docLockView, docProtection.isReadOnly, {array: me.lockedControls});
Common.Utils.lockControls(Common.enumLock.docLockForms, docProtection.isFormsOnly, {array: me.lockedControls});
Common.Utils.lockControls(Common.enumLock.docLockComments, docProtection.isCommentsOnly, {array: me.lockedControls});
parent.html(_group); parent.html(_group);
$('<div class="separator long"></div>').prependTo(parent); $('<div class="separator long"></div>').prependTo(parent);
@ -212,16 +204,6 @@ define([
} }
}, },
SetDisabled: function(disable, reviewMode, fillFormMode) {
if (reviewMode) {
Common.Utils.lockControls(Common.enumLock.previewReviewMode, disable, {array: this.lockedControls});
} else if (fillFormMode) {
Common.Utils.lockControls(Common.enumLock.viewFormMode, disable, {array: this.lockedControls});
} else {
Common.Utils.lockControls(Common.enumLock.viewMode, disable, {array: this.lockedControls});
}
},
openInsideMode: function(name, url, frameId) { openInsideMode: function(name, url, frameId) {
if (!this.pluginsPanel) return false; if (!this.pluginsPanel) return false;
@ -307,6 +289,9 @@ define([
this.loadMask.hide(); this.loadMask.hide();
}, },
_onAppReady: function (mode) {
},
parseIcons: function(icons) { parseIcons: function(icons) {
if (icons.length && typeof icons[0] !== 'string') { if (icons.length && typeof icons[0] !== 'string') {
var theme = Common.UI.Themes.currentThemeId().toLowerCase(), var theme = Common.UI.Themes.currentThemeId().toLowerCase(),
@ -404,7 +389,6 @@ define([
}); });
}); });
var _set = Common.enumLock;
var btn = new Common.UI.Button({ var btn = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconImg: icon_url, iconImg: icon_url,
@ -413,7 +397,6 @@ define([
split: _menu_items.length > 1, split: _menu_items.length > 1,
value: guid, value: guid,
hint: model.get('name'), hint: model.get('name'),
lock: model.get('isDisplayedInViewer') ? [_set.viewMode, _set.previewReviewMode, _set.viewFormMode, _set.selRangeEdit, _set.editFormula] : [_set.viewMode, _set.previewReviewMode, _set.viewFormMode, _set.docLockView, _set.docLockForms, _set.docLockComments, _set.selRangeEdit, _set.editFormula ],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'

View file

@ -78,9 +78,6 @@ define([
}); });
}); });
this.btnPwd.on('click', function (b, e) {
!b.pressed && me.fireEvent('protect:password', [b, 'delete']);
});
this.btnPwd.menu.on('item:click', function (menu, item, e) { this.btnPwd.menu.on('item:click', function (menu, item, e) {
me.fireEvent('protect:password', [menu, item.value]); me.fireEvent('protect:password', [menu, item.value]);
}); });
@ -135,8 +132,6 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-ic-protect', iconCls: 'toolbar__icon btn-ic-protect',
caption: this.txtEncrypt, caption: this.txtEncrypt,
split: true,
enableToggle: true,
menu: true, menu: true,
visible: false, visible: false,
dataHint : '1', dataHint : '1',
@ -177,7 +172,7 @@ define([
if ( config.canProtect) { if ( config.canProtect) {
if ( config.isPasswordSupport) { if ( config.isPasswordSupport) {
me.btnAddPwd.updateHint(me.hintAddPwd); me.btnAddPwd.updateHint(me.hintAddPwd);
me.btnPwd.updateHint([me.hintDelPwd, me.hintPwd]); me.btnPwd.updateHint(me.hintPwd);
me.btnPwd.setMenu( me.btnPwd.setMenu(
new Common.UI.Menu({ new Common.UI.Menu({
@ -347,7 +342,6 @@ define([
} }
}, this); }, this);
this.btnPwd.setVisible(hasPassword); this.btnPwd.setVisible(hasPassword);
this.btnPwd.toggle(hasPassword, true);
}, },
txtEncrypt: 'Encrypt', txtEncrypt: 'Encrypt',
@ -359,8 +353,7 @@ define([
txtDeletePwd: 'Delete password', txtDeletePwd: 'Delete password',
txtAddPwd: 'Add password', txtAddPwd: 'Add password',
txtInvisibleSignature: 'Add digital signature', txtInvisibleSignature: 'Add digital signature',
txtSignatureLine: 'Add Signature line', txtSignatureLine: 'Add Signature line'
hintDelPwd: 'Delete password'
} }
}()), Common.Views.Protection || {})); }()), Common.Views.Protection || {}));
}); });

View file

@ -238,10 +238,6 @@ define([
me.fireEvent('comment:resolveComments', [item.value]); me.fireEvent('comment:resolveComments', [item.value]);
}); });
} }
Common.NotificationCenter.on('protect:doclock', function (e) {
me.fireEvent('protect:update');
});
me.fireEvent('protect:update');
} }
return { return {
@ -263,7 +259,7 @@ define([
caption: this.txtAccept, caption: this.txtAccept,
split: !this.appConfig.canUseReviewPermissions, split: !this.appConfig.canUseReviewPermissions,
iconCls: 'toolbar__icon btn-review-save', iconCls: 'toolbar__icon btn-review-save',
lock: [_set.reviewChangelock, _set.isReviewOnly, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView, _set.docLockForms, _set.docLockComments, _set.docLockReview], lock: [_set.reviewChangelock, _set.isReviewOnly, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'
@ -275,7 +271,7 @@ define([
caption: this.txtReject, caption: this.txtReject,
split: !this.appConfig.canUseReviewPermissions, split: !this.appConfig.canUseReviewPermissions,
iconCls: 'toolbar__icon btn-review-deny', iconCls: 'toolbar__icon btn-review-deny',
lock: [_set.reviewChangelock, _set.isReviewOnly, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView, _set.docLockForms, _set.docLockComments, _set.docLockReview], lock: [_set.reviewChangelock, _set.isReviewOnly, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'
@ -288,7 +284,7 @@ define([
caption: this.txtCompare, caption: this.txtCompare,
split: true, split: true,
iconCls: 'toolbar__icon btn-compare', iconCls: 'toolbar__icon btn-compare',
lock: [_set.hasCoeditingUsers, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView, _set.docLockForms, _set.docLockComments], lock: [_set.hasCoeditingUsers, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'
@ -298,7 +294,7 @@ define([
this.btnTurnOn = new Common.UI.Button({ this.btnTurnOn = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-ic-review', iconCls: 'toolbar__icon btn-ic-review',
lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView, _set.docLockForms, _set.docLockComments, _set.docLockReview], lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect],
caption: this.txtTurnon, caption: this.txtTurnon,
split: !this.appConfig.isReviewOnly, split: !this.appConfig.isReviewOnly,
enableToggle: true, enableToggle: true,
@ -313,7 +309,7 @@ define([
this.btnPrev = new Common.UI.Button({ this.btnPrev = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-review-prev', iconCls: 'toolbar__icon btn-review-prev',
lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView, _set.docLockForms, _set.docLockComments], lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect],
caption: this.txtPrev, caption: this.txtPrev,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -324,7 +320,7 @@ define([
this.btnNext = new Common.UI.Button({ this.btnNext = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-review-next', iconCls: 'toolbar__icon btn-review-next',
lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView, _set.docLockForms, _set.docLockComments], lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect],
caption: this.txtNext, caption: this.txtNext,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -340,7 +336,7 @@ define([
this.btnReviewView = new Common.UI.Button({ this.btnReviewView = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-ic-reviewview', iconCls: 'toolbar__icon btn-ic-reviewview',
lock: [_set.viewFormMode, _set.lostConnect, _set.docLockView, _set.docLockForms, _set.docLockComments], lock: [_set.viewFormMode, _set.lostConnect],
caption: this.txtView, caption: this.txtView,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
cls: 'ppm-toolbar', cls: 'ppm-toolbar',
@ -408,7 +404,7 @@ define([
this.btnCoAuthMode = new Common.UI.Button({ this.btnCoAuthMode = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-ic-coedit', iconCls: 'toolbar__icon btn-ic-coedit',
lock: [_set.viewFormMode, _set.lostConnect, _set.docLockView], lock: [_set.viewFormMode, _set.lostConnect],
caption: this.txtCoAuthMode, caption: this.txtCoAuthMode,
menu: true, menu: true,
dataHint: '1', dataHint: '1',
@ -454,7 +450,7 @@ define([
caption: this.txtCommentRemove, caption: this.txtCommentRemove,
split: true, split: true,
iconCls: 'toolbar__icon btn-rem-comment', iconCls: 'toolbar__icon btn-rem-comment',
lock: [_set.previewReviewMode, _set.viewFormMode, _set.hideComments, _set['Objects'], _set.lostConnect, _set.docLockView, _set.docLockForms], lock: [_set.previewReviewMode, _set.viewFormMode, _set.hideComments, _set['Objects'], _set.lostConnect],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'
@ -465,13 +461,15 @@ define([
caption: this.txtCommentResolve, caption: this.txtCommentResolve,
split: true, split: true,
iconCls: 'toolbar__icon btn-resolve-all', iconCls: 'toolbar__icon btn-resolve-all',
lock: [_set.previewReviewMode, _set.viewFormMode, _set.hideComments, _set['Objects'], _set.lostConnect, _set.docLockView, _set.docLockForms], lock: [_set.previewReviewMode, _set.viewFormMode, _set.hideComments, _set['Objects'], _set.lostConnect],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'
}); });
this.lockedControls.push(this.btnCommentResolve); this.lockedControls.push(this.btnCommentResolve);
} }
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
}, },
render: function (el) { render: function (el) {
@ -695,6 +693,7 @@ define([
me.$el.find(separator_last).hide(); me.$el.find(separator_last).hide();
Common.NotificationCenter.trigger('tab:visible', 'review', (config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments) && Common.UI.LayoutManager.isElementVisible('toolbar-collaboration')); Common.NotificationCenter.trigger('tab:visible', 'review', (config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments) && Common.UI.LayoutManager.isElementVisible('toolbar-collaboration'));
setEvents.call(me); setEvents.call(me);
}); });
}, },
@ -732,7 +731,7 @@ define([
var button = new Common.UI.Button({ var button = new Common.UI.Button({
cls : 'btn-toolbar', cls : 'btn-toolbar',
iconCls : 'toolbar__icon btn-ic-review', iconCls : 'toolbar__icon btn-ic-review',
lock: [Common.enumLock.viewMode, Common.enumLock.previewReviewMode, Common.enumLock.viewFormMode, Common.enumLock.lostConnect, Common.enumLock.docLockView, Common.enumLock.docLockForms, Common.enumLock.docLockComments, Common.enumLock.docLockReview], lock: [Common.enumLock.viewMode, Common.enumLock.previewReviewMode, Common.enumLock.viewFormMode, Common.enumLock.lostConnect],
hintAnchor : 'top', hintAnchor : 'top',
hint : this.tipReview, hint : this.tipReview,
split : !this.appConfig.isReviewOnly, split : !this.appConfig.isReviewOnly,
@ -779,7 +778,7 @@ define([
button = new Common.UI.Button({ button = new Common.UI.Button({
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-ic-docspell', iconCls: 'toolbar__icon btn-ic-docspell',
lock: [Common.enumLock.viewMode, Common.enumLock.viewFormMode, Common.enumLock.previewReviewMode, Common.enumLock.docLockView, Common.enumLock.docLockForms, Common.enumLock.docLockComments], lock: [Common.enumLock.viewMode, Common.enumLock.viewFormMode, Common.enumLock.previewReviewMode],
hintAnchor : 'top', hintAnchor : 'top',
hint: this.tipSetSpelling, hint: this.tipSetSpelling,
enableToggle: true, enableToggle: true,
@ -795,7 +794,7 @@ define([
button = new Common.UI.Button({ button = new Common.UI.Button({
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-ic-doclang', iconCls: 'toolbar__icon btn-ic-doclang',
lock: [Common.enumLock.viewMode, Common.enumLock.previewReviewMode, Common.enumLock.viewFormMode, Common.enumLock.noSpellcheckLangs, Common.enumLock.lostConnect, Common.enumLock.docLockView, Common.enumLock.docLockForms, Common.enumLock.docLockComments], lock: [Common.enumLock.viewMode, Common.enumLock.previewReviewMode, Common.enumLock.viewFormMode, Common.enumLock.noSpellcheckLangs, Common.enumLock.lostConnect],
hintAnchor : 'top', hintAnchor : 'top',
hint: this.tipSetDocLang, hint: this.tipSetDocLang,
dataHint: '0', dataHint: '0',
@ -974,7 +973,6 @@ define([
this.options.tpl = _.template(this.template)(this.options); this.options.tpl = _.template(this.template)(this.options);
this.popoverChanges = this.options.popoverChanges; this.popoverChanges = this.options.popoverChanges;
this.mode = this.options.mode; this.mode = this.options.mode;
this.docProtection = this.options.docProtection;
var filter = Common.localStorage.getKeysFilter(); var filter = Common.localStorage.getKeysFilter();
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : ''; this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
@ -985,7 +983,6 @@ define([
render: function() { render: function() {
Common.UI.Window.prototype.render.call(this); Common.UI.Window.prototype.render.call(this);
var _set = Common.enumLock;
this.btnPrev = new Common.UI.Button({ this.btnPrev = new Common.UI.Button({
cls: 'dlg-btn iconic', cls: 'dlg-btn iconic',
iconCls: 'img-commonctrl prev', iconCls: 'img-commonctrl prev',
@ -1006,8 +1003,7 @@ define([
cls : 'btn-toolbar', cls : 'btn-toolbar',
caption : this.txtAccept, caption : this.txtAccept,
split : true, split : true,
disabled : this.mode.isReviewOnly || this.docProtection.isReviewOnly || !!Common.Utils.InternalSettings.get(this.appPrefix + "accept-reject-lock"), disabled : this.mode.isReviewOnly || !!Common.Utils.InternalSettings.get(this.appPrefix + "accept-reject-lock"),
lock : [_set.reviewChangelock, _set.isReviewOnly, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView, _set.docLockForms, _set.docLockComments, _set.docLockReview],
menu : this.mode.canUseReviewPermissions ? false : new Common.UI.Menu({ menu : this.mode.canUseReviewPermissions ? false : new Common.UI.Menu({
items: [ items: [
this.mnuAcceptCurrent = new Common.UI.MenuItem({ this.mnuAcceptCurrent = new Common.UI.MenuItem({
@ -1027,7 +1023,7 @@ define([
cls : 'btn-toolbar', cls : 'btn-toolbar',
caption : this.txtReject, caption : this.txtReject,
split : true, split : true,
lock : [_set.reviewChangelock, _set.isReviewOnly, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView, _set.docLockForms, _set.docLockComments, _set.docLockReview], disabled : this.mode.isReviewOnly || !!Common.Utils.InternalSettings.get(this.appPrefix + "accept-reject-lock"),
menu : this.mode.canUseReviewPermissions ? false : new Common.UI.Menu({ menu : this.mode.canUseReviewPermissions ? false : new Common.UI.Menu({
items: [ items: [
this.mnuRejectCurrent = new Common.UI.MenuItem({ this.mnuRejectCurrent = new Common.UI.MenuItem({
@ -1042,13 +1038,6 @@ define([
}) })
}); });
this.btnReject.render(this.$window.find('#id-review-button-reject')); this.btnReject.render(this.$window.find('#id-review-button-reject'));
var arr = [this.btnAccept, this.btnReject];
Common.Utils.lockControls(Common.enumLock.isReviewOnly, this.mode.isReviewOnly, {array: arr});
Common.Utils.lockControls(Common.enumLock.docLockView, this.docProtection.isReadOnly, {array: arr});
Common.Utils.lockControls(Common.enumLock.docLockForms, this.docProtection.isFormsOnly, {array: arr});
Common.Utils.lockControls(Common.enumLock.docLockReview, this.docProtection.isReviewOnly, {array: arr});
Common.Utils.lockControls(Common.enumLock.docLockComments, this.docProtection.isCommentsOnly, {array: arr});
Common.Utils.lockControls(Common.enumLock.reviewChangelock, !!Common.Utils.InternalSettings.get(this.appPrefix + "accept-reject-lock"), {array: arr});
var me = this; var me = this;
this.btnPrev.on('click', function (e) { this.btnPrev.on('click', function (e) {

View file

@ -63,7 +63,10 @@ define([
}, options || {}); }, options || {});
this.template = [ this.template = [
'<div class="box" style="height: 250px;">', '<div class="box" style="height: 260px;">',
'<div class="input-row">',
'<label>' + this.textInfo + '</label>',
'</div>',
'<div class="input-row">', '<div class="input-row">',
'<label>' + this.textInfoName + '</label>', '<label>' + this.textInfoName + '</label>',
'</div>', '</div>',
@ -122,7 +125,6 @@ define([
}); });
me.textareaInstructions = this.$window.find('textarea'); me.textareaInstructions = this.$window.find('textarea');
me.textareaInstructions.val(this.textDefInstruction);
me.textareaInstructions.keydown(function (event) { me.textareaInstructions.keydown(function (event) {
if (event.keyCode == Common.UI.Keys.RETURN) { if (event.keyCode == Common.UI.Keys.RETURN) {
event.stopPropagation(); event.stopPropagation();
@ -134,8 +136,7 @@ define([
this.chDate = new Common.UI.CheckBox({ this.chDate = new Common.UI.CheckBox({
el: $('#id-dlg-sign-settings-date'), el: $('#id-dlg-sign-settings-date'),
labelText: this.textShowDate, labelText: this.textShowDate,
disabled: this.type=='view', disabled: this.type=='view'
value: 'checked'
}); });
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
@ -197,14 +198,13 @@ define([
}, },
textInfo: 'Signer Info', textInfo: 'Signer Info',
textInfoName: 'Suggested signer', textInfoName: 'Name',
textInfoTitle: 'Suggested signer\'s title', textInfoTitle: 'Signer Title',
textInfoEmail: 'Suggested signer\'s e-mail', textInfoEmail: 'E-mail',
textInstructions: 'Instructions for signer', textInstructions: 'Instructions for Signer',
txtEmpty: 'This field is required', txtEmpty: 'This field is required',
textAllowComment: 'Allow signer to add comment in the signature dialog', textAllowComment: 'Allow signer to add comment in the signature dialog',
textShowDate: 'Show sign date in signature line', textShowDate: 'Show sign date in signature line',
textTitle: 'Signature Setup', textTitle: 'Signature Setup'
textDefInstruction: 'Before signing this document, verify that the content you are signing is correct.'
}, Common.Views.SignSettingsDialog || {})) }, Common.Views.SignSettingsDialog || {}))
}); });

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

View file

@ -25,7 +25,7 @@
} }
{{/spritesheet}} {{/spritesheet}}
{{#sprites}} {{#sprites}}
{{#parselang name}}.x-huge .{{name}}{{/parselang}}:not(.menu__icon), {{#parselang name}}.x-huge .{{name}}{{/parselang}},
.toolbar__icon-big.{{name}} .toolbar__icon-big.{{name}}
{ {
background-position: 0 {{px.offset_y}}; background-position: 0 {{px.offset_y}};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

View file

@ -1,14 +1,15 @@
{{#spritesheet}} {{#spritesheet}}
.btn { .btn {
.options__icon.options__icon-huge { .options__icon.options__icon-huge {
background-position-x: 0; background-position-x: -40px;
background-position-x: var(--button-huge-normal-icon-offset-x,0); background-position-x: var(--button-huge-normal-icon-offset-x,0);
} }
&.active, &:active { &.active, &:active {
&:not(:disabled):not(.disabled) { &:not(:disabled):not(.disabled) {
.options__icon.options__icon-huge { .options__icon.options__icon-huge {
background-position-x: 0; @btn-active-icon-offset: -40px;
background-position-x: @btn-active-icon-offset;
background-position-x: var(--button-huge-active-icon-offset-x,0); background-position-x: var(--button-huge-active-icon-offset-x,0);
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

View file

@ -1,4 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20">
<path fill="#000" d="M7 6a4 4 0 1 0 0 8h2v-1H7a3 3 0 1 1 0-6h2V6H7Zm6 0a4 4 0 1 1 0 8h-2v-1h2a3 3 0 1 0 0-6h-2V6h2Z"/>
<path fill="#000" d="M13 9H7v2h6V9Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 265 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20">
<path fill="#000" fill-rule="evenodd" d="M8 4H4v4h4V4ZM4 3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H4Zm2 10v-3h4v4H7a1 1 0 0 1-1-1Zm4-3V6h3a1 1 0 0 1 1 1v3h-4Zm1 2a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-4Zm1 0h4v4h-4v-4Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 395 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20">
<path fill="#000" fill-rule="evenodd" d="M3 4a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v3H7v5H4a1 1 0 0 1-1-1V4Zm6 5h7v7H9V9ZM8 9a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V9Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 311 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20">
<path fill="#000" fill-rule="evenodd" d="M4 3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H4Zm4 13v-3h1v3h7V9h-3V8h3a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 309 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20">
<path fill="#000" fill-rule="evenodd" d="M4 4h4v1h1V4a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h1V8H4V4Zm2 3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7Zm5 9v-1h1v1h4v-4h-1v-1h1a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 378 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28">
<path fill="#000" fill-rule="evenodd" d="M10.325 17a1 1 0 0 1 .624.22L15 20.46V7.54l-4.05 3.24a1 1 0 0 1-.625.22H6v6h4.325Zm0 1H5.5a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5h4.825l4.863-3.89A.5.5 0 0 1 16 6.5v15a.5.5 0 0 1-.812.39L10.325 18Zm7.912-7.925a.5.5 0 0 1 .688.162A7.099 7.099 0 0 1 20 14c0 1.378-.417 2.68-1.073 3.76a.5.5 0 1 1-.854-.52c.57-.94.927-2.063.927-3.24a6.1 6.1 0 0 0-.925-3.237.5.5 0 0 1 .162-.688Zm1.633-3.911a.5.5 0 0 0-.74.672C20.932 8.818 22 11.293 22 14c0 2.686-1.088 5.188-2.871 7.165a.5.5 0 0 0 .742.67C21.798 19.698 23 16.964 23 14c0-2.982-1.18-5.691-3.13-7.836Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 715 B

View file

@ -1,6 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28">
<path fill="#000" fill-rule="evenodd" d="M23 5H5v18h18V5ZM4 4v20h20V4H4Z" clip-rule="evenodd"/>
<path fill="#000" d="M5 5h9v9H5z" opacity=".2"/>
<path fill="#000" d="M5 14h9v9H5z" opacity=".4"/>
<path fill="#000" d="M14 14h9v9h-9z" opacity=".6"/>
</svg>

Before

Width:  |  Height:  |  Size: 358 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28">
<path fill="#000" fill-rule="evenodd" d="M12 4h11v15h-5v1h5a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H12a1 1 0 0 0-1 1v4h1V4Zm9 12h-3v-1h3v1Zm0-3h-3v-1h3v1Zm0-3h-3V9h3v1Zm0-4h-7v1h7V6ZM5 10h11v15H5V10Zm-1 0a1 1 0 0 1 1-1h11a1 1 0 0 1 1 1v15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V10Zm10 2H7v1h7v-1Zm-7 3h7v1H7v-1Zm7 3H7v1h7v-1Zm-7 3h7v1H7v-1Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 450 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28">
<path fill="#000" fill-rule="evenodd" d="M6 4H5v1H4a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h7v-1H4V6h1v1h1V6h2v1h1V6h3v1h1V6h2v1h1V6h1v4h1V6a1 1 0 0 0-1-1h-1V4h-1v1h-2V4h-1v1H9V4H8v1H6V4ZM5 8h1v1H5V8Zm2 0h1v1H7V8Zm3 0H9v1h1V8Zm1 0h1v1h-1V8Zm3 0h-1v1h1V8Zm1 0h1v1h-1V8Zm-9 2H5v1h1v-1Zm1 0h1v1H7v-1Zm3 0H9v1h1v-1Zm1 0h1v1h-1v-1Zm3 0h-1v1h1v-1Zm1 0h1v1h-1v-1Zm-9 2H5v1h1v-1Zm1 0h1v1H7v-1Zm3 0H9v1h1v-1Zm1 0h1v1h-1v-1Zm-5 2H5v1h1v-1Zm1 0h1v1H7v-1Zm17 3.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Zm1 0a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0Zm-6 .5h2v-1h-2v-4h-1v5h1Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 677 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28">
<path fill="#000" fill-rule="evenodd" d="M22 24V4H6v20h16ZM6 3h16c.5 0 1 .4 1 1v20c0 .6-.4 1-1 1H6c-.6 0-1-.4-1-1V4c0-.6.4-1 1-1Zm15 2H7v3h14V5Zm0 15H7v3h14v-3Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 289 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28">
<path fill="#000" fill-rule="evenodd" d="M7 16h1v-1H6.667l-.267.2L4 17V7h16v3h1V7a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12l1-.75L7 16Zm14 5H10a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v12l-4-3Zm3 1-2.667-2H10v-8h14v10Zm-11-5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm4 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm5-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 446 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28">
<path fill="#000" fill-rule="evenodd" d="M10 3h12c.6 0 1 .4 1 1v5h-1V4H10V3Zm2 3h8v1h-8V6ZM8 16v-1h8v1H8Zm12-7h-7v1h7V9Zm-6 3h4v1h-4v-1Zm0 6H8v1h6v-1Zm-6 3h5v1H8v-1Zm14 3H6V9H5v15c0 .6.4 1 1 1h16c.6 0 1-.4 1-1v-6h-1v6Zm-5-1.9h-1.2l-.5-1.1 4.4-7.1 1.7 1.1-4.4 7.1Zm3.196-9.03 1.05-1.702 1.702 1.051-1.05 1.702-1.702-1.05Zm-7.696.13-.6 1h-1.2l-4-7.3 1.7-1 4.1 7.3ZM5.215 4.203l1.745-.977.978 1.745-1.745.977-.978-1.745Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 546 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28">
<path fill="#000" fill-rule="evenodd" d="M14.493 23.095c4.75 0 8.602-3.848 8.602-8.595 0-4.747-3.851-8.595-8.601-8.595A8.586 8.586 0 0 0 7.883 9H11v1H6V5h1v3.654A9.492 9.492 0 0 1 14.493 5C19.743 5 24 9.253 24 14.5S19.744 24 14.493 24C9.412 24 5.26 20.014 5 15h.907a8.599 8.599 0 0 0 8.586 8.095ZM14 8h1v6h3v1h-4V8Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 444 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28">
<path fill="#000" fill-rule="evenodd" d="M21 12h-1V8.5C20 6 17.3 4 14 4S8 6 8 8.5V12H7c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2ZM9 8.5C9 6.6 11.3 5 14 5s5 1.6 5 3.5V12H9V8.5ZM22 23c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1v-9c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v9Zm-9-4.268V22h2v-3.268A2 2 0 0 0 14 15a2 2 0 0 0-1 3.732Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 459 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28">
<path fill="#000" fill-rule="evenodd" d="M14 10c0-1.7-1.3-3-3-3s-3 1.3-3 3 1.3 3 3 3 3-1.3 3-3Zm-7 0c0-2.2 1.8-4 4-4s4 1.8 4 4-1.8 4-4 4-4-1.8-4-4Zm10 9c-.1-.4-.9-3-6-3s-5.9 2.6-6 3v2h12v-2ZM4 19s.6-4 7-4 7 4 7 4v3H4v-3Zm15-3a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm0 6v-5c4 0 5 3 5 3v2h-5Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 408 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none" viewBox="0 0 28 28">
<path fill="#000" fill-rule="evenodd" d="M8.606 4.653a5.618 5.618 0 0 0-.639-.766c-.174-.166-.406-.347-.68-.381a.694.694 0 0 0-.475.11.789.789 0 0 0-.274.326c-.097.207-.127.462-.135.7-.03.96.301 2.707.76 4.643.106.447.22.907.34 1.375a23.493 23.493 0 0 1-1.252 2.58 39.845 39.845 0 0 1-2.437 3.802 41.822 41.822 0 0 1-1.18 1.56l-.016.02-.004.005-.001.001a.5.5 0 1 0 .775.633l.006-.008.018-.023.07-.086.256-.326c.219-.283.527-.69.888-1.192a40.84 40.84 0 0 0 2.498-3.9c.274-.492.54-1 .785-1.515.171.633.347 1.267.523 1.888a6.026 6.026 0 0 0-.412.676c-.688 1.308-1.086 3.155-.607 5.182.216.97.675 1.943 1.196 2.736.51.778 1.126 1.452 1.693 1.755.275.147.664.271 1.037.093.385-.184.537-.583.586-.961.1-.757-.126-2.018-.75-3.893a147.78 147.78 0 0 1-1.64-5.37c.11-.122.219-.227.325-.313.322-.261.53-.29.608-.276.053.02.125.076.209.254.09.192.15.432.22.714l.005.02c.034.136.072.284.117.42.043.131.104.286.198.42a.81.81 0 0 0 .502.345.904.904 0 0 0 .615-.114 1.01 1.01 0 0 0 .389-.381c.084-.138.147-.295.199-.445.074-.219.142-.484.207-.743l.067-.258c.093-.352.193-.688.328-.978.095-.205.2-.37.317-.496l.01.038c.023.088.043.176.066.274.01.047.021.096.034.148.035.15.077.32.135.474.055.146.144.338.304.483.19.173.445.249.72.184.233-.055.443-.203.63-.375a.5.5 0 0 0-.68-.735l-.053.048a3.51 3.51 0 0 1-.083-.307l-.028-.121a9.847 9.847 0 0 0-.078-.328 2.147 2.147 0 0 0-.174-.471c-.079-.145-.233-.358-.513-.43-.286-.072-.539.042-.718.167l-.007.005c-.37.27-.615.646-.79 1.02a6.9 6.9 0 0 0-.387 1.145l-.079.305c-.062.243-.114.45-.175.628a2.28 2.28 0 0 1-.034.095 7.649 7.649 0 0 1-.068-.26l-.014-.052c-.062-.253-.144-.58-.277-.863-.144-.309-.392-.658-.838-.792l-.011-.003-.012-.003c-.53-.133-1.069.125-1.49.467l-.005.003c-.232-.832-.461-1.678-.675-2.505.225-.588.413-1.175.547-1.75.364-1.557.358-3.12-.49-4.319l-.002-.003ZM3 18.945l.388.316L3 18.945ZM8.124 8.748l-.03.126c-.429-1.83-.7-3.337-.692-4.134.108.121.238.283.391.495.601.851.67 2.062.331 3.513Zm.263 10.982c-.398-1.678-.104-3.203.426-4.307.576 1.968 1.11 3.673 1.413 4.58.624 1.875.774 2.94.708 3.447a.774.774 0 0 1-.038.17.69.69 0 0 1-.123-.054c-.345-.184-.849-.691-1.328-1.422-.47-.716-.873-1.58-1.057-2.408l-.001-.006ZM26.03 7.317l-3.464-2-7.79 13.494-1.268 6.196 4.732-4.196 5.29-9.164.866.5-2.5 4.33.866.5 3-5.196-1.732-1 2-3.464Zm-1.366.366-1.5 2.598-1.732-1 1.5-2.598 1.732 1Zm-2 3.464-1.732-1-5 8.66 1.732 1 5-8.66ZM15.09 22.268l.51-2.498 1.397.806-1.907 1.692Z" clip-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

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