Merge branch 'develop' into feature/optimization

This commit is contained in:
Julia Radzhabova 2019-09-18 16:32:26 +03:00
commit 8d3ec85ca2
92 changed files with 9277 additions and 747 deletions

View file

@ -128,7 +128,8 @@
compactHeader: false,
toolbarNoTabs: false,
toolbarHideFileName: false,
reviewDisplay: 'original'
reviewDisplay: 'original',
spellcheck: true
},
plugins: {
autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'],

View file

@ -36,27 +36,34 @@ if (Common === undefined) {
Common.Locale = new(function() {
"use strict";
var l10n = {};
var l10n = null;
var loadcallback,
apply = false;
var _applyLocalization = function() {
var _applyLocalization = function(callback) {
try {
for (var prop in l10n) {
var p = prop.split('.');
if (p && p.length > 2) {
callback && (loadcallback = callback);
if (l10n) {
for (var prop in l10n) {
var p = prop.split('.');
if (p && p.length > 2) {
var obj = window;
for (var i = 0; i < p.length - 1; ++i) {
if (obj[p[i]] === undefined) {
obj[p[i]] = new Object();
var obj = window;
for (var i = 0; i < p.length - 1; ++i) {
if (obj[p[i]] === undefined) {
obj[p[i]] = new Object();
}
obj = obj[p[i]];
}
obj = obj[p[i]];
}
if (obj) {
obj[p[p.length - 1]] = l10n[prop];
if (obj) {
obj[p[p.length - 1]] = l10n[prop];
}
}
}
}
loadcallback && loadcallback();
} else
apply = true;
}
catch (e) {
}
@ -64,7 +71,7 @@ Common.Locale = new(function() {
var _get = function(prop, scope) {
var res = '';
if (scope && scope.name) {
if (l10n && scope && scope.name) {
res = l10n[scope.name + '.' + prop];
}
@ -99,10 +106,12 @@ Common.Locale = new(function() {
throw new Error('loaded');
}
}).then(function(json) {
if ( !!json ) l10n = json;
l10n = json || {};
apply && _applyLocalization();
}).catch(function(e) {
l10n = l10n || {};
apply && _applyLocalization();
if ( e.message == 'loaded' ) {
} else
console.log('fetch error: ' + e);
});
@ -110,7 +119,13 @@ Common.Locale = new(function() {
if ( !window.fetch ) {
/* use fetch polifill if native method isn't supported */
require(['../vendor/fetch/fetch.umd'], _requireLang);
var polyfills = ['../vendor/fetch/fetch.umd'];
if ( !window.Promise ) {
require(['../vendor/es6-promise/es6-promise.auto.min.js'],
function () {
require(polyfills, _requireLang);
});
} else require(polyfills, _requireLang);
} else _requireLang();
return {

View file

@ -386,6 +386,18 @@ define([
if (modalParents.length > 0) {
me.btnEl.data('bs.tooltip').tip().css('z-index', parseInt(modalParents.css('z-index')) + 10);
me.btnMenuEl && me.btnMenuEl.data('bs.tooltip').tip().css('z-index', parseInt(modalParents.css('z-index')) + 10);
var onModalClose = function(dlg) {
if (modalParents[0] !== dlg.$window[0]) return;
var tip = me.btnEl.data('bs.tooltip');
if (tip) {
if (tip.dontShow===undefined)
tip.dontShow = true;
tip.hide();
}
Common.NotificationCenter.off({'modal:close': onModalClose});
};
Common.NotificationCenter.on({'modal:close': onModalClose});
}
}

View file

@ -193,6 +193,18 @@ define([
var modalParents = el.closest('.asc-window');
if (modalParents.length > 0) {
el.data('bs.tooltip').tip().css('z-index', parseInt(modalParents.css('z-index')) + 10);
var onModalClose = function(dlg) {
if (modalParents[0] !== dlg.$window[0]) return;
var tip = el.data('bs.tooltip');
if (tip) {
if (tip.dontShow===undefined)
tip.dontShow = true;
tip.hide();
}
Common.NotificationCenter.off({'modal:close': onModalClose});
};
Common.NotificationCenter.on({'modal:close': onModalClose});
}
el.find('.dropdown-menu').on('mouseenter', function(){ // hide tooltip when mouse is over menu

View file

@ -71,7 +71,7 @@ define([
disabled : false,
rendered : false,
template : _.template('<label class="radiobox"><input type="button" name="<%= name %>" class="img-commonctrl"><%= labelText %></label>'),
template : _.template('<label class="radiobox"><input type="button" name="<%= name %>" class="img-commonctrl"><span><%= labelText %></span></label>'),
initialize : function(options) {
Common.UI.BaseView.prototype.initialize.call(this, options);
@ -100,6 +100,7 @@ define([
}));
this.$radio = el.find('input[type=button]');
this.$label = el.find('label');
this.rendered = true;
return this;
@ -144,6 +145,10 @@ define([
getValue: function() {
return this.$radio.hasClass('checked');
},
setCaption: function(text) {
this.$label.find('span').text(text);
}
});
});

View file

@ -643,7 +643,7 @@ define([
onAppReady: function (config) {
var me = this;
if ( me.view && Common.localStorage.getBool(me.view.appPrefix + "settings-spellcheck", true) )
if ( me.view && Common.localStorage.getBool(me.view.appPrefix + "settings-spellcheck", !(config.customization && config.customization.spellcheck===false)))
me.view.turnSpelling(true);
if ( config.canReview ) {

View file

@ -74,7 +74,7 @@ define([
var templateRightBox = '<section>' +
'<section id="box-doc-name">' +
'<input type="text" id="rib-doc-name" spellcheck="false" data-can-copy="false" style="pointer-events: none;">' +
'<input type="text" id="rib-doc-name" spellcheck="false" data-can-copy="false" style="pointer-events: none;" disabled="disabled">' +
'</section>' +
'<a id="rib-save-status" class="status-label locked"><%= textSaveEnd %></a>' +
'<div class="hedset">' +
@ -116,7 +116,7 @@ define([
'<div class="btn-slot" id="slot-btn-dt-redo"></div>' +
'</div>' +
'<div class="lr-separator"></div>' +
'<input type="text" id="title-doc-name" spellcheck="false" data-can-copy="false" style="pointer-events: none;">' +
'<input type="text" id="title-doc-name" spellcheck="false" data-can-copy="false" style="pointer-events: none;" disabled="disabled">' +
'<label id="title-user-name" style="pointer-events: none;"></label>' +
'</section>';

View file

@ -1118,7 +1118,7 @@ define([
return (item.email && 0 === item.email.toLowerCase().indexOf(str) || item.name && 0 === item.name.toLowerCase().indexOf(str))
});
}
var tpl = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem" style="font-size: 12px;"><div><%= caption %></div><div style="color: #909090;"><%= options.value %></div></a>'),
var tpl = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem" style="font-size: 12px;"><div><%= Common.Utils.String.htmlEncode(caption) %></div><div style="color: #909090;"><%= Common.Utils.String.htmlEncode(options.value) %></div></a>'),
divider = false;
_.each(users, function(menuItem, index) {
if (divider && !menuItem.hasAccess) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View file

@ -57,6 +57,9 @@
margin-left: -18px;
background-position: @menu-check-offset-x @menu-check-offset-y;
}
&.custom-scale:before {
margin-top: 3px;
}
}
.menu-item-icon {

View file

@ -530,6 +530,8 @@
.button-normal-icon(btn-func-math, 73, @toolbar-big-icon-size);
.button-normal-icon(btn-more, 74, @toolbar-big-icon-size);
.button-normal-icon(btn-pagenum, 75, @toolbar-big-icon-size);
.button-normal-icon(btn-calculation, 80, @toolbar-big-icon-size);
.button-normal-icon(btn-scale, 81, @toolbar-big-icon-size);
[applang=ru] {
.btn-toolbar {

View file

@ -59,7 +59,8 @@ define([
_userId,
editUsers = [],
editor = !!window.DE ? 'DE' : !!window.PE ? 'PE' : 'SSE',
displayMode = "Markup",
displayMode = "markup",
canViewReview,
arrChangeReview = [],
dateChange = [],
_fileKey;
@ -208,11 +209,8 @@ define([
me.initComments();
Common.Utils.addScrollIfNeed('.page[data-page=comments-view]', '.page[data-page=comments-view] .page-content');
} else {
if(editor === 'DE' && !this.appConfig.canReview) {
this.canViewReview = me.api.asc_HaveRevisionsChanges(true);
if (!this.canViewReview) {
$('#reviewing-settings').hide();
}
if(editor === 'DE' && !this.appConfig.canReview && !canViewReview) {
$('#reviewing-settings').hide();
}
}
},
@ -276,7 +274,7 @@ define([
$('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me));
$('#settings-accept-all').single('click', _.bind(me.onAcceptAllClick, me));
$('#settings-reject-all').single('click', _.bind(me.onRejectAllClick, me));
if(this.appConfig.isReviewOnly || displayMode == "Final" || displayMode == "Original" ) {
if(this.appConfig.isReviewOnly || displayMode == "final" || displayMode == "original" ) {
$('#settings-accept-all').addClass('disabled');
$('#settings-reject-all').addClass('disabled');
$('#settings-review').addClass('disabled');
@ -320,12 +318,12 @@ define([
var me = this;
$('input:radio').single('change', _.bind(me.onReviewViewClick, me));
var value = displayMode;
if (value == null || value === "Markup") {
$('input[value="Markup"]').attr('checked', true);
} else if (value === 'Final') {
$('input[value="Final"]').attr('checked', true);
} else if (value === 'Original') {
$('input[value="Original"]').attr('checked', true);
if (value == null || value === "markup") {
$('input[value="markup"]').attr('checked', true);
} else if (value === 'final') {
$('input[value="final"]').attr('checked', true);
} else if (value === 'original') {
$('input[value="original"]').attr('checked', true);
}
},
@ -333,24 +331,29 @@ define([
return displayMode;
},
setCanViewReview: function(config) {
canViewReview = config;
},
onReviewViewClick: function(event) {
var value = $(event.currentTarget).val();
this.turnDisplayMode(value);
!this.appConfig.canReview && Common.localStorage.setItem("de-view-review-mode", value);
},
turnDisplayMode: function(value) {
displayMode = value;
turnDisplayMode: function(value, suppressEvent) {
displayMode = value.toLocaleLowerCase();
if (this.api) {
if (value === 'Final')
if (displayMode === 'final')
this.api.asc_BeginViewModeInReview(true);
else if (value === 'Original')
else if (displayMode === 'original')
this.api.asc_BeginViewModeInReview(false);
else
this.api.asc_EndViewModeInReview();
}
this.initReviewingSettingsView();
DE.getController('Toolbar').setDisplayMode(value);
!suppressEvent && this.initReviewingSettingsView();
DE.getController('Toolbar').setDisplayMode(displayMode);
},
@ -386,7 +389,7 @@ define([
$('#btn-delete-change').single('click', _.bind(this.onDeleteChange, this));
}
}
if(displayMode == "Final" || displayMode == "Original") {
if(displayMode == "final" || displayMode == "original") {
$('#btn-accept-change').addClass('disabled');
$('#btn-reject-change').addClass('disabled');
$('#btn-prev-change').addClass('disabled');
@ -731,7 +734,7 @@ define([
time : date.getTime(),
replys : [],
groupName : (groupname && groupname.length>1) ? groupname[1] : null
}
};
if (comment) {
var replies = this.readSDKReplies(data);
if (replies.length) {
@ -818,6 +821,13 @@ define([
return 0;
},
stringUtcToLocalDate: function (date) {
if (typeof date === 'string')
return parseInt(date) + this.timeZoneOffsetInMs;
return 0;
},
addCommentToGroupCollection: function (comment) {
var groupname = comment.groupName;
if (!this.groupCollectionComments[groupname])

View file

@ -150,7 +150,7 @@
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="doc-orientation" value="Markup">
<input type="radio" name="doc-orientation" value="markup">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textMarkup %></div>
@ -159,7 +159,7 @@
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="doc-orientation" value="Final">
<input type="radio" name="doc-orientation" value="final">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textFinal %></div>
@ -168,7 +168,7 @@
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="doc-orientation" value="Original">
<input type="radio" name="doc-orientation" value="original">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textOriginal %></div>

View file

@ -115,7 +115,7 @@
<!-- debug begin -->
<script type="text/javascript">var less=less||{};less.env='development';</script>
<script src="../../../vendor/less/dist/less-1.5.1.js" type="text/javascript"></script>
<script src="../../../vendor/less/dist/less-2.7.1.js" type="text/javascript"></script>
<!-- debug end -->
<script>
@ -228,6 +228,13 @@
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<script type="text/javascript" src="../sdk_dev_scripts.js"></script>
<script>
window.sdk_dev_scrpipts.forEach(function(item){

View file

@ -214,10 +214,16 @@
<!--vendor-->
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<!--sdk-->
<script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script>

View file

@ -398,6 +398,10 @@ DE.ApplicationController = new(function(){
message = me.errorUserDrop;
break;
case Asc.c_oAscError.ID.ConvertationOpenLimitError:
message = me.errorFileSizeExceed;
break;
default:
message = me.errorDefaultMessage.replace('%1', id);
break;
@ -409,7 +413,7 @@ DE.ApplicationController = new(function(){
Common.Gateway.reportError(id, message);
$('#id-critical-error-title').text(me.criticalErrorTitle);
$('#id-critical-error-message').text(message);
$('#id-critical-error-message').html(message);
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
window.location.reload();
});
@ -418,7 +422,7 @@ DE.ApplicationController = new(function(){
Common.Gateway.reportWarning(id, message);
$('#id-critical-error-title').text(me.notcriticalErrorTitle);
$('#id-critical-error-message').text(message);
$('#id-critical-error-message').html(message);
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
$('#id-critical-error-dialog').modal('hide');
});
@ -553,6 +557,7 @@ DE.ApplicationController = new(function(){
downloadTextText: 'Downloading document...',
waitText: 'Please, wait...',
textLoadingDocument: 'Loading document',
txtClose: 'Close'
txtClose: 'Close',
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.'
}
})();

View file

@ -31,7 +31,8 @@
*
*/
+function ($) {
Common.Locale.apply();
DE.ApplicationView.create();
DE.ApplicationController.create();
Common.Locale.apply(function() {
DE.ApplicationView.create();
DE.ApplicationController.create();
});
}();

View file

@ -12,6 +12,7 @@
"DE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.",
"DE.ApplicationController.errorDefaultMessage": "Error code: %1",
"DE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.",
"DE.ApplicationController.errorFileSizeExceed": "The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.",
"DE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.",
"DE.ApplicationController.notcriticalErrorTitle": "Warning",
"DE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.",

View file

@ -169,44 +169,46 @@ require([
]
});
Common.Locale.apply();
require([
'documenteditor/main/app/controller/Viewport',
'documenteditor/main/app/controller/DocumentHolder',
'documenteditor/main/app/controller/Toolbar',
'documenteditor/main/app/controller/Statusbar',
'documenteditor/main/app/controller/Links',
'documenteditor/main/app/controller/Navigation',
'documenteditor/main/app/controller/RightMenu',
'documenteditor/main/app/controller/LeftMenu',
'documenteditor/main/app/controller/Main',
'documenteditor/main/app/view/FileMenuPanels',
'documenteditor/main/app/view/ParagraphSettings',
'documenteditor/main/app/view/HeaderFooterSettings',
'documenteditor/main/app/view/ImageSettings',
'documenteditor/main/app/view/TableSettings',
'documenteditor/main/app/view/ShapeSettings',
'documenteditor/main/app/view/TextArtSettings',
'documenteditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts',
'common/main/lib/controller/History'
/** coauthoring begin **/
,'common/main/lib/controller/Comments'
,'common/main/lib/controller/Chat'
/** coauthoring end **/
,'common/main/lib/controller/Plugins'
,'documenteditor/main/app/view/ChartSettings'
,'common/main/lib/controller/ExternalDiagramEditor'
,'common/main/lib/controller/ExternalMergeEditor'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
app.start();
});
Common.Locale.apply(
function() {
require([
'documenteditor/main/app/controller/Viewport',
'documenteditor/main/app/controller/DocumentHolder',
'documenteditor/main/app/controller/Toolbar',
'documenteditor/main/app/controller/Statusbar',
'documenteditor/main/app/controller/Links',
'documenteditor/main/app/controller/Navigation',
'documenteditor/main/app/controller/RightMenu',
'documenteditor/main/app/controller/LeftMenu',
'documenteditor/main/app/controller/Main',
'documenteditor/main/app/view/FileMenuPanels',
'documenteditor/main/app/view/ParagraphSettings',
'documenteditor/main/app/view/HeaderFooterSettings',
'documenteditor/main/app/view/ImageSettings',
'documenteditor/main/app/view/TableSettings',
'documenteditor/main/app/view/ShapeSettings',
'documenteditor/main/app/view/TextArtSettings',
'documenteditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts',
'common/main/lib/controller/History'
/** coauthoring begin **/
,'common/main/lib/controller/Comments'
,'common/main/lib/controller/Chat'
/** coauthoring end **/
,'common/main/lib/controller/Plugins'
,'documenteditor/main/app/view/ChartSettings'
,'common/main/lib/controller/ExternalDiagramEditor'
,'common/main/lib/controller/ExternalMergeEditor'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
app.start();
});
}
);
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
reqerr = window.requireTimeourError();

View file

@ -223,9 +223,11 @@ define([
});
$(document.body).on('blur', 'input, textarea', function(e) {
if (!me.isModalShowed && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) {
if (!me.isModalShowed) {
if (/form-control/.test(e.target.className))
me.inFormControl = false;
if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible())
return;
if (!e.relatedTarget ||
!/area_id/.test(e.target.id)
&& !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */
@ -687,7 +689,7 @@ define([
var action = {id: id, type: type};
this.stackLongActions.pop(action);
appHeader.setDocumentCaption(this.api.asc_getDocumentName());
appHeader && appHeader.setDocumentCaption(this.api.asc_getDocumentName());
this.updateWindowTitle(true);
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
@ -887,7 +889,7 @@ define([
value = Common.localStorage.getItem("de-show-tableline");
me.api.put_ShowTableEmptyLine((value!==null) ? eval(value) : true);
value = Common.localStorage.getBool("de-settings-spellcheck", true);
value = Common.localStorage.getBool("de-settings-spellcheck", !(this.appOptions.customization && this.appOptions.customization.spellcheck===false));
Common.Utils.InternalSettings.set("de-settings-spellcheck", value);
me.api.asc_setSpellCheck(value);
@ -1484,6 +1486,10 @@ define([
config.msg = this.errorEmailClient;
break;
case Asc.c_oAscError.ID.ConvertationOpenLimitError:
config.msg = this.errorFileSizeExceed;
break;
default:
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
break;
@ -1596,7 +1602,7 @@ define([
if (this._state.isDocModified !== isModified || force) {
var title = this.defaultTitleText;
if (!_.isEmpty(appHeader.getDocumentCaption()))
if (appHeader && !_.isEmpty(appHeader.getDocumentCaption()))
title = appHeader.getDocumentCaption() + ' - ' + title;
if (isModified) {
@ -2456,7 +2462,8 @@ define([
errorEmailClient: 'No email client could be found',
textCustomLoader: 'Please note that according to the terms of the license you are not entitled to change the loader.<br>Please contact our Sales Department to get a quote.',
txtHyperlink: 'Hyperlink',
waitText: 'Please, wait...'
waitText: 'Please, wait...',
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.'
}
})(), DE.Controllers.Main || {}))
});

View file

@ -1963,6 +1963,7 @@ define([
(new DE.Views.WatermarkSettingsDialog({
props: me.api.asc_GetWatermarkProps(),
api: me.api,
lang: me.mode.lang,
fontStore: me.fontstore,
handler: function(result, value) {
if (result == 'ok') {

View file

@ -0,0 +1,166 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* CellsAddDialog.js
*
* Created by Julia Radzhabova on 06.09.2019
* Copyright (c) 2019 Ascensio System SIA. All rights reserved.
*
*/
define([
'common/main/lib/component/Window',
'common/main/lib/component/ComboBox',
'common/main/lib/component/MetricSpinner',
'common/main/lib/component/RadioBox'
], function () { 'use strict';
DE.Views.CellsAddDialog = Common.UI.Window.extend(_.extend({
options: {
width: 214,
header: true,
style: 'min-width: 214px;',
cls: 'modal-dlg'
},
initialize : function(options) {
_.extend(this.options, {
title: this.textTitle
}, options || {});
this.template = [
'<div class="box">',
'<div style="margin-bottom: 10px;">',
'<div id="table-combo-row-col" class="input-group-nr" style="display: inline-block; margin-right: 5px;"></div>',
'<div id="table-spin-row-col" style="display: inline-block;"></div>',
'</div>',
'<div id="table-radio-before" style="padding-bottom: 8px;"></div>',
'<div id="table-radio-after" style="padding-bottom: 8px;"></div>',
'<div class="footer center">',
'<button class="btn normal dlg-btn primary" result="ok" style="margin-right: 10px;">' + this.okButtonText + '</button>',
'<button class="btn normal dlg-btn" result="cancel">' + this.cancelButtonText + '</button>',
'</div>'
].join('');
this.options.tpl = _.template(this.template)(this.options);
Common.UI.Window.prototype.initialize.call(this, this.options);
},
render: function() {
Common.UI.Window.prototype.render.call(this);
this.cmbRowCol = new Common.UI.ComboBox({
el: $('#table-combo-row-col'),
cls: 'input-group-nr',
style: 'width: 110px;',
menuStyle: 'min-width: 110px;',
editable: false,
scrollAlwaysVisible: true,
data: [
{ value: 0, displayValue: this.textRow},
{ value: 1, displayValue: this.textCol}
]
});
this.cmbRowCol.setValue(0);
this.cmbRowCol.on('selected', _.bind(function(combo, record) {
var row = record.value == 0;
this.spnCount.setMaxValue(row ? 100 : 64);
this.spnCount.setValue(this.spnCount.getNumberValue());
this.radioBefore.setCaption(row ? this.textUp : this.textLeft);
this.radioAfter.setCaption(row ? this.textDown : this.textRight);
}, this));
this.spnCount = new Common.UI.MetricSpinner({
el: $('#table-spin-row-col'),
step : 1,
width : 65,
value : 1,
defaultUnit : '',
maxValue : 100,
minValue : 1,
allowDecimal: false
});
this.radioBefore = new Common.UI.RadioBox({
el: $('#table-radio-before'),
labelText: this.textUp,
name: 'asc-radio-table-cells-add',
checked: true
});
this.radioAfter = new Common.UI.RadioBox({
el: $('#table-radio-after'),
labelText: this.textDown,
name: 'asc-radio-table-cells-add'
});
var $window = this.getChild();
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
},
_handleInput: function(state) {
if (this.options.handler) {
this.options.handler.call(this, state, this.getSettings());
}
this.close();
},
onBtnClick: function(event) {
this._handleInput(event.currentTarget.attributes['result'].value);
},
getSettings: function() {
var row = this.cmbRowCol.getValue()==0;
return {row: row, before: this.radioBefore.getValue(), count: this.spnCount.getNumberValue()};
},
onPrimary: function() {
this._handleInput('ok');
return false;
},
cancelButtonText: 'Cancel',
okButtonText: 'Ok',
textTitle: 'Insert Several',
textLeft: 'To the left',
textRight: 'To the right',
textUp: 'Above the cursor',
textDown: 'Below the cursor',
textRow: 'Rows',
textCol: 'Columns'
}, DE.Views.CellsAddDialog || {}))
});

View file

@ -0,0 +1,131 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* CellsRemoveDialog.js
*
* Created by Julia Radzhabova on 05.09.2019
* Copyright (c) 2019 Ascensio System SIA. All rights reserved.
*
*/
define([
'common/main/lib/component/Window',
'common/main/lib/component/RadioBox'
], function () { 'use strict';
DE.Views.CellsRemoveDialog = Common.UI.Window.extend(_.extend({
options: {
width: 214,
header: true,
style: 'min-width: 214px;',
cls: 'modal-dlg'
},
initialize : function(options) {
_.extend(this.options, {
title: this.textTitle
}, options || {});
this.template = [
'<div class="box">',
'<div id="table-radio-cells-left" style="padding-bottom: 8px;"></div>',
'<div id="table-radio-cells-row" style="padding-bottom: 8px;"></div>',
'<div id="table-radio-cells-col" style="padding-bottom: 8px;"></div>',
'<div class="footer center">',
'<button class="btn normal dlg-btn primary" result="ok" style="margin-right: 10px;">' + this.okButtonText + '</button>',
'<button class="btn normal dlg-btn" result="cancel">' + this.cancelButtonText + '</button>',
'</div>'
].join('');
this.options.tpl = _.template(this.template)(this.options);
Common.UI.Window.prototype.initialize.call(this, this.options);
},
render: function() {
Common.UI.Window.prototype.render.call(this);
this.radioLeft = new Common.UI.RadioBox({
el: $('#table-radio-cells-left'),
labelText: this.textLeft,
name: 'asc-radio-table-cells-rem',
checked: true
});
this.radioRow = new Common.UI.RadioBox({
el: $('#table-radio-cells-row'),
labelText: this.textRow,
name: 'asc-radio-table-cells-rem'
});
this.radioCol = new Common.UI.RadioBox({
el: $('#table-radio-cells-col'),
labelText: this.textCol,
name: 'asc-radio-table-cells-rem'
});
var $window = this.getChild();
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
},
_handleInput: function(state) {
if (this.options.handler) {
this.options.handler.call(this, state, this.getSettings());
}
this.close();
},
onBtnClick: function(event) {
this._handleInput(event.currentTarget.attributes['result'].value);
},
getSettings: function() {
return this.radioRow.getValue() ? 'row' : (this.radioCol.getValue() ? 'col' : 'left') ;
},
onPrimary: function() {
this._handleInput('ok');
return false;
},
cancelButtonText: 'Cancel',
okButtonText: 'Ok',
textTitle: 'Delete Cells',
textLeft: 'Shift cells left',
textRow: 'Delete entire row',
textCol: 'Delete entire column'
}, DE.Views.CellsRemoveDialog || {}))
});

View file

@ -54,7 +54,9 @@ define([
'documenteditor/main/app/view/ParagraphSettingsAdvanced',
'documenteditor/main/app/view/TableSettingsAdvanced',
'documenteditor/main/app/view/ControlSettingsDialog',
'documenteditor/main/app/view/NumberingValueDialog'
'documenteditor/main/app/view/NumberingValueDialog',
'documenteditor/main/app/view/CellsRemoveDialog',
'documenteditor/main/app/view/CellsAddDialog'
], function ($, _, Backbone, gateway) { 'use strict';
DE.Views.DocumentHolder = Backbone.View.extend(_.extend({
@ -1914,6 +1916,41 @@ define([
this.fireEvent('editcomplete', this);
},
onCellsRemove: function() {
var me = this;
(new DE.Views.CellsRemoveDialog({
handler: function (result, value) {
if (result == 'ok') {
if (value == 'row')
me.api.remRow();
else if (value == 'col')
me.api.remColumn();
else
me.api.asc_RemoveTableCells();
}
me.fireEvent('editcomplete', me);
}
})).show();
this.fireEvent('editcomplete', this);
},
onCellsAdd: function() {
var me = this;
(new DE.Views.CellsAddDialog({
handler: function (result, settings) {
if (result == 'ok') {
if (settings.row) {
settings.before ? me.api.addRowAbove(settings.count) : me.api.addRowBelow(settings.count);
} else {
settings.before ? me.api.addColumnLeft(settings.count) : me.api.addColumnRight(settings.count);
}
}
me.fireEvent('editcomplete', me);
}
})).show();
this.fireEvent('editcomplete', this);
},
createDelayedElementsViewer: function() {
var me = this;
@ -3131,6 +3168,11 @@ define([
}).on('click', function(item) {
if (me.api)
me.api.addRowBelow();
}),
new Common.UI.MenuItem({
caption: me.textSeveral
}).on('click', function(item) {
me.onCellsAdd();
})
]
})
@ -3158,6 +3200,11 @@ define([
}).on('click', function(item) {
if (me.api)
me.api.remTable();
}),
new Common.UI.MenuItem({
caption: me.textCells
}).on('click', function(item) {
me.onCellsRemove();
})
]
})
@ -4085,7 +4132,9 @@ define([
textCropFit: 'Fit',
textFollow: 'Follow move',
toDictionaryText: 'Add to Dictionary',
txtPrintSelection: 'Print Selection'
txtPrintSelection: 'Print Selection',
textCells: 'Cells',
textSeveral: 'Several Rows/Columns'
}, DE.Views.DocumentHolder || {}));
});

View file

@ -770,6 +770,11 @@ define([
'</table>',
'</div></td>',
'</tr>',
'<tr class="divider"></tr>',
'<tr>',
'<td class="left"></td>',
'<td class="right"><button id="fminfo-btn-apply" class="btn normal dlg-btn primary"><%= scope.okButtonText %></button></td>',
'</tr>',
'</table>'
].join(''));
@ -778,6 +783,7 @@ define([
this.menu = options.menu;
this.coreProps = null;
this.authors = [];
this._locked = false;
},
render: function(node) {
@ -814,33 +820,18 @@ define([
style : 'width: 200px;',
placeHolder : this.txtAddText,
validateOnBlur: false
}).on('changed:after', function(input, newValue, oldValue) {
if (newValue !== oldValue && me.coreProps && me.api) {
me.coreProps.asc_putTitle(me.inputTitle.getValue());
me.api.asc_setCoreProps(me.coreProps);
}
}).on('keydown:before', keyDownBefore);
this.inputSubject = new Common.UI.InputField({
el : $markup.findById('#id-info-subject'),
style : 'width: 200px;',
placeHolder : this.txtAddText,
validateOnBlur: false
}).on('changed:after', function(input, newValue, oldValue) {
if (newValue !== oldValue && me.coreProps && me.api) {
me.coreProps.asc_putSubject(me.inputSubject.getValue());
me.api.asc_setCoreProps(me.coreProps);
}
}).on('keydown:before', keyDownBefore);
this.inputComment = new Common.UI.InputField({
el : $markup.findById('#id-info-comment'),
style : 'width: 200px;',
placeHolder : this.txtAddText,
validateOnBlur: false
}).on('changed:after', function(input, newValue, oldValue) {
if (newValue !== oldValue && me.coreProps && me.api) {
me.coreProps.asc_putDescription(me.inputComment.getValue());
me.api.asc_setCoreProps(me.coreProps);
}
}).on('keydown:before', keyDownBefore);
// modify info
@ -861,10 +852,6 @@ define([
idx = me.tblAuthor.find('tr').index(el);
el.remove();
me.authors.splice(idx, 1);
if (me.coreProps && me.api) {
me.coreProps.asc_putCreator(me.authors.join(';'));
me.api.asc_setCoreProps(me.coreProps);
}
}
});
@ -873,27 +860,31 @@ define([
style : 'width: 200px;',
validateOnBlur: false,
placeHolder: this.txtAddAuthor
}).on('changed:after', function(input, newValue, oldValue) {
}).on('changed:after', function(input, newValue, oldValue, e) {
if (newValue == oldValue) return;
var val = newValue.trim();
if (!!val && val !== oldValue.trim()) {
var isFromApply = e && e.relatedTarget && (e.relatedTarget.id == 'fminfo-btn-apply');
val.split(/\s*[,;]\s*/).forEach(function(item){
var str = item.trim();
if (str) {
var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(str)));
me.trAuthor.before(div);
me.authors.push(item);
if (!isFromApply) {
var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(str)));
me.trAuthor.before(div);
}
}
});
me.inputAuthor.setValue('');
if (me.coreProps && me.api) {
me.coreProps.asc_putCreator(me.authors.join(';'));
me.api.asc_setCoreProps(me.coreProps);
}
!isFromApply && me.inputAuthor.setValue('');
}
}).on('keydown:before', keyDownBefore);
this.btnApply = new Common.UI.Button({
el: '#fminfo-btn-apply'
});
this.btnApply.on('click', _.bind(this.applySettings, this));
this.rendered = true;
this.updateInfo(this.doc);
@ -1002,6 +993,7 @@ define([
value = props.asc_getDescription();
this.inputComment.setValue(value || '');
this.inputAuthor.setValue('');
this.tblAuthor.find('tr:not(:last-of-type)').remove();
this.authors = [];
value = props.asc_getCreator();//"123\"\"\"\<\>,456";
@ -1010,7 +1002,9 @@ define([
me.trAuthor.before(div);
me.authors.push(item);
});
this.tblAuthor.find('.close').toggleClass('hidden', !this.mode.isEdit);
}
this.SetDisabled();
},
_ShowHideInfoItem: function(el, visible) {
@ -1049,6 +1043,11 @@ define([
},
setMode: function(mode) {
this.mode = mode;
this.inputAuthor.setVisible(mode.isEdit);
this.btnApply.setVisible(mode.isEdit);
this.tblAuthor.find('.close').toggleClass('hidden', !mode.isEdit);
this.SetDisabled();
return this;
},
@ -1096,12 +1095,30 @@ define([
},
onLockCore: function(lock) {
this.inputTitle.setDisabled(lock);
this.inputSubject.setDisabled(lock);
this.inputComment.setDisabled(lock);
this.inputAuthor.setDisabled(lock);
this.tblAuthor.find('.close').toggleClass('disabled', lock);
!lock && this.updateFileInfo();
this._locked = lock;
this.updateFileInfo();
},
SetDisabled: function() {
var disable = !this.mode.isEdit || this._locked;
this.inputTitle.setDisabled(disable);
this.inputSubject.setDisabled(disable);
this.inputComment.setDisabled(disable);
this.inputAuthor.setDisabled(disable);
this.tblAuthor.find('.close').toggleClass('disabled', this._locked);
this.tblAuthor.toggleClass('disabled', disable);
this.btnApply.setDisabled(this._locked);
},
applySettings: function() {
if (this.coreProps && this.api) {
this.coreProps.asc_putTitle(this.inputTitle.getValue());
this.coreProps.asc_putSubject(this.inputSubject.getValue());
this.coreProps.asc_putDescription(this.inputComment.getValue());
this.coreProps.asc_putCreator(this.authors.join(';'));
this.api.asc_setCoreProps(this.coreProps);
}
this.menu.hide();
},
txtPlacement: 'Location',
@ -1124,7 +1141,8 @@ define([
txtAuthor: 'Author',
txtAddAuthor: 'Add Author',
txtAddText: 'Add Text',
txtMinutes: 'min'
txtMinutes: 'min',
okButtonText: 'Apply'
}, DE.Views.FileMenuPanels.DocumentInfo || {}));
DE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({

View file

@ -105,7 +105,7 @@ define([
this.cmbNextStyle = new Common.UI.ComboBox({
el : $('#id-dlg-style-next-par'),
style : 'width: 100%;',
menuStyle : 'width: 100%; max-height: 290px;',
menuStyle : 'width: 100%; max-height: 210px;',
editable : false,
cls : 'input-group-nr',
data : this.options.formats,

View file

@ -111,11 +111,14 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
this.textControls = [];
this.imageControls = [];
this.fontName = 'Arial';
this.lang = {value: 'en', displayValue: 'English'};
this.text = '';
this.isAutoColor = false;
this.isImageLoaded = false;
var lang = options.lang || 'en',
val = Common.util.LanguageInfo.getLocalLanguageCode(lang);
this.lang = val ? {value: lang, displayValue: Common.util.LanguageInfo.getLocalLanguageName(val)[1], default: true} : {value: 'en', displayValue: 'English', default: true};
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
},
@ -430,8 +433,11 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
});
if (data.length) {
me.cmbLang.setData(data);
me.cmbLang.setValue(me.lang.displayValue);
me.loadWMText(me.lang.value);
var res = me.loadWMText(me.lang.value);
if (res && me.lang.default)
me.cmbLang.setValue(res);
else
me.cmbLang.setValue(me.lang.displayValue);
me.cmbLang.setDisabled(!me.radioText.getValue());
me.text && me.cmbText.setValue(me.text);
} else
@ -477,6 +483,7 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
this.cmbText.setData(data);
this.cmbText.setValue(data[0].value);
}
return item ? item.get('displayValue') : null;
},
insertFromUrl: function() {

View file

@ -159,45 +159,47 @@ require([
]
});
Common.Locale.apply();
require([
'documenteditor/main/app/controller/Viewport',
'documenteditor/main/app/controller/DocumentHolder',
'documenteditor/main/app/controller/Toolbar',
'documenteditor/main/app/controller/Links',
'documenteditor/main/app/controller/Navigation',
'documenteditor/main/app/controller/Statusbar',
'documenteditor/main/app/controller/RightMenu',
'documenteditor/main/app/controller/LeftMenu',
'documenteditor/main/app/controller/Main',
'documenteditor/main/app/view/FileMenuPanels',
'documenteditor/main/app/view/ParagraphSettings',
'documenteditor/main/app/view/HeaderFooterSettings',
'documenteditor/main/app/view/ImageSettings',
'documenteditor/main/app/view/TableSettings',
'documenteditor/main/app/view/ShapeSettings',
'documenteditor/main/app/view/TextArtSettings',
'documenteditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts',
'common/main/lib/controller/History'
/** coauthoring begin **/
,'common/main/lib/controller/Comments'
,'common/main/lib/controller/Chat'
/** coauthoring end **/
,'common/main/lib/controller/Plugins'
,'documenteditor/main/app/view/ChartSettings'
,'common/main/lib/controller/ExternalDiagramEditor'
,'common/main/lib/controller/ExternalMergeEditor'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
window.compareVersions = true;
app.start();
});
Common.Locale.apply(
function() {
require([
'documenteditor/main/app/controller/Viewport',
'documenteditor/main/app/controller/DocumentHolder',
'documenteditor/main/app/controller/Toolbar',
'documenteditor/main/app/controller/Links',
'documenteditor/main/app/controller/Navigation',
'documenteditor/main/app/controller/Statusbar',
'documenteditor/main/app/controller/RightMenu',
'documenteditor/main/app/controller/LeftMenu',
'documenteditor/main/app/controller/Main',
'documenteditor/main/app/view/FileMenuPanels',
'documenteditor/main/app/view/ParagraphSettings',
'documenteditor/main/app/view/HeaderFooterSettings',
'documenteditor/main/app/view/ImageSettings',
'documenteditor/main/app/view/TableSettings',
'documenteditor/main/app/view/ShapeSettings',
'documenteditor/main/app/view/TextArtSettings',
'documenteditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts',
'common/main/lib/controller/History'
/** coauthoring begin **/
,'common/main/lib/controller/Comments'
,'common/main/lib/controller/Chat'
/** coauthoring end **/
,'common/main/lib/controller/Plugins'
,'documenteditor/main/app/view/ChartSettings'
,'common/main/lib/controller/ExternalDiagramEditor'
,'common/main/lib/controller/ExternalMergeEditor'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
window.compareVersions = true;
app.start();
});
}
);
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
reqerr = window.requireTimeourError();

View file

@ -665,6 +665,7 @@
"DE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"DE.Controllers.Main.errorFileSizeExceed": "The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.",
"DE.Controllers.Navigation.txtBeginning": "Beginning of document",
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
"DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked",
@ -1021,6 +1022,21 @@
"DE.Views.BookmarksDialog.textSort": "Sort by",
"DE.Views.BookmarksDialog.textTitle": "Bookmarks",
"DE.Views.BookmarksDialog.txtInvalidName": "Bookmark name can only contain letters, digits and underscores, and should begin with the letter",
"DE.Views.CellsRemoveDialog.cancelButtonText": "Cancel",
"DE.Views.CellsRemoveDialog.okButtonText": "Ok",
"DE.Views.CellsRemoveDialog.textTitle": "Delete Cells",
"DE.Views.CellsRemoveDialog.textLeft": "Shift cells left",
"DE.Views.CellsRemoveDialog.textRow": "Delete entire row",
"DE.Views.CellsRemoveDialog.textCol": "Delete entire column",
"DE.Views.CellsAddDialog.cancelButtonText": "Cancel",
"DE.Views.CellsAddDialog.okButtonText": "Ok",
"DE.Views.CellsAddDialog.textTitle": "Insert Several",
"DE.Views.CellsAddDialog.textLeft": "To the left",
"DE.Views.CellsAddDialog.textRight": "To the right",
"DE.Views.CellsAddDialog.textUp": "Above the cursor",
"DE.Views.CellsAddDialog.textDown": "Below the cursor",
"DE.Views.CellsAddDialog.textRow": "Rows",
"DE.Views.CellsAddDialog.textCol": "Columns",
"DE.Views.ChartSettings.textAdvanced": "Show advanced settings",
"DE.Views.ChartSettings.textArea": "Area",
"DE.Views.ChartSettings.textBar": "Bar",
@ -1278,6 +1294,8 @@
"DE.Views.DocumentHolder.txtUngroup": "Ungroup",
"DE.Views.DocumentHolder.updateStyleText": "Update %1 style",
"DE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
"DE.Views.DocumentHolder.textCells": "Cells",
"DE.Views.DocumentHolder.textSeveral": "Several Rows/Columns",
"DE.Views.DropcapSettingsAdvanced.cancelButtonText": "Cancel",
"DE.Views.DropcapSettingsAdvanced.okButtonText": "OK",
"DE.Views.DropcapSettingsAdvanced.strBorders": "Borders & Fill",
@ -1368,6 +1386,7 @@
"DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Title",
"DE.Views.FileMenuPanels.DocumentInfo.txtUploaded": "Uploaded",
"DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Words",
"DE.Views.FileMenuPanels.DocumentInfo.okButtonText": "Apply",
"DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights",
"DE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights",
"DE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Warning",

View file

@ -49,6 +49,9 @@
"Common.Controllers.ReviewChanges.textParaDeleted": "<b>Usunięty akapit</b>",
"Common.Controllers.ReviewChanges.textParaFormatted": "Sformatowany akapit",
"Common.Controllers.ReviewChanges.textParaInserted": "<b>Wstawiony akapit</b>",
"Common.Controllers.ReviewChanges.textParaMoveFromDown": "<b>Przesunięto w dół:</b>",
"Common.Controllers.ReviewChanges.textParaMoveFromUp": "<b>Przesunięto w górę:</b>",
"Common.Controllers.ReviewChanges.textParaMoveTo": "<b>Przesunięto:</b>",
"Common.Controllers.ReviewChanges.textPosition": "Pozycja",
"Common.Controllers.ReviewChanges.textRight": "Wyrównaj do prawej",
"Common.Controllers.ReviewChanges.textShape": "Kształt",
@ -60,6 +63,7 @@
"Common.Controllers.ReviewChanges.textStrikeout": "Skreślenie",
"Common.Controllers.ReviewChanges.textSubScript": "Indeks",
"Common.Controllers.ReviewChanges.textSuperScript": "Indeks górny",
"Common.Controllers.ReviewChanges.textTableChanged": "<b>Ustawienia tabeli zmienione</b>",
"Common.Controllers.ReviewChanges.textTabs": "Zmień zakładki",
"Common.Controllers.ReviewChanges.textUnderline": "Podkreśl",
"Common.Controllers.ReviewChanges.textWidow": "Kontrola okna",
@ -150,6 +154,7 @@
"Common.Views.Header.tipDownload": "Pobierz plik",
"Common.Views.Header.tipGoEdit": "Edytuj bieżący plik",
"Common.Views.Header.tipPrint": "Drukuj plik",
"Common.Views.Header.tipViewSettings": "Wyświetl ustawienia",
"Common.Views.Header.tipViewUsers": "Wyświetl użytkowników i zarządzaj prawami dostępu do dokumentu",
"Common.Views.Header.txtAccessRights": "Zmień prawa dostępu",
"Common.Views.Header.txtRename": "Zmień nazwę",
@ -186,6 +191,8 @@
"Common.Views.OpenDialog.txtTitleProtected": "Plik chroniony",
"Common.Views.PasswordDialog.cancelButtonText": "Anuluj",
"Common.Views.PasswordDialog.okButtonText": "OK",
"Common.Views.PasswordDialog.txtDescription": "Ustaw hasło aby zabezpieczyć ten dokument",
"Common.Views.PasswordDialog.txtIncorrectPwd": "Hasła nie są takie same",
"Common.Views.PluginDlg.textLoading": "Ładowanie",
"Common.Views.Plugins.groupCaption": "Wtyczki",
"Common.Views.Plugins.strPlugins": "Wtyczki",
@ -196,6 +203,7 @@
"Common.Views.Protection.hintPwd": "Zmień lub usuń hasło",
"Common.Views.Protection.txtAddPwd": "Dodaj hasło",
"Common.Views.Protection.txtChangePwd": "Zmień hasło",
"Common.Views.Protection.txtDeletePwd": "Usuń hasło",
"Common.Views.Protection.txtEncrypt": "Szyfruj",
"Common.Views.Protection.txtInvisibleSignature": "Dodaj podpis cyfrowy",
"Common.Views.Protection.txtSignatureLine": "Dodaj linię do podpisu",
@ -222,6 +230,7 @@
"Common.Views.ReviewChanges.txtCoAuthMode": "Tryb współtworzenia",
"Common.Views.ReviewChanges.txtDocLang": "Język",
"Common.Views.ReviewChanges.txtFinal": "Wszystkie zmiany zostały zaakceptowane (podgląd)",
"Common.Views.ReviewChanges.txtHistory": "Historia wersji",
"Common.Views.ReviewChanges.txtMarkup": "Wszystkie zmiany (edycja)",
"Common.Views.ReviewChanges.txtNext": "Do następnej zmiany",
"Common.Views.ReviewChanges.txtOriginal": "Wszystkie zmiany odrzucone (podgląd)",
@ -247,11 +256,14 @@
"Common.Views.ReviewPopover.textCancel": "Anuluj",
"Common.Views.ReviewPopover.textClose": "Zamknij",
"Common.Views.ReviewPopover.textEdit": "OK",
"Common.Views.ReviewPopover.textResolve": "Rozwiąż",
"Common.Views.SignDialog.cancelButtonText": "Anuluj",
"Common.Views.SignDialog.okButtonText": "OK",
"Common.Views.SignDialog.textBold": "Pogrubienie",
"Common.Views.SignDialog.textCertificate": "Certyfikat",
"Common.Views.SignDialog.textChange": "Zmień",
"Common.Views.SignDialog.textItalic": "Kursywa",
"Common.Views.SignDialog.textPurpose": "Cel podpisywania tego dokumentu",
"Common.Views.SignDialog.textTitle": "Podpisz dokument",
"Common.Views.SignSettingsDialog.cancelButtonText": "Anuluj",
"Common.Views.SignSettingsDialog.okButtonText": "OK",
@ -360,6 +372,8 @@
"DE.Controllers.Main.txtFiguredArrows": "Strzałki",
"DE.Controllers.Main.txtFirstPage": "Pierwsza strona",
"DE.Controllers.Main.txtFooter": "Stopka",
"DE.Controllers.Main.txtHeader": "Nagłówek",
"DE.Controllers.Main.txtHyperlink": "Link",
"DE.Controllers.Main.txtLines": "Linie",
"DE.Controllers.Main.txtMath": "Matematyczne",
"DE.Controllers.Main.txtNeedSynchronize": "Masz aktualizacje",
@ -397,6 +411,7 @@
"DE.Controllers.Main.txtShape_star7": "Gwiazda 7-ramienna",
"DE.Controllers.Main.txtShape_star8": "Gwiazda 8-ramienna",
"DE.Controllers.Main.txtStarsRibbons": "Gwiazdy i wstążki",
"DE.Controllers.Main.txtStyle_footnote_text": "Przypis",
"DE.Controllers.Main.txtStyle_Heading_1": "Nagłówek 1",
"DE.Controllers.Main.txtStyle_Heading_2": "Nagłówek 2",
"DE.Controllers.Main.txtStyle_Heading_3": "Nagłówek 3",
@ -812,6 +827,8 @@
"DE.Views.ControlSettingsDialog.textNewColor": "Nowy niestandardowy kolor",
"DE.Views.ControlSettingsDialog.textNone": "Brak",
"DE.Views.ControlSettingsDialog.textShowAs": "Pokaż jako",
"DE.Views.ControlSettingsDialog.textTitle": "Ustawienia kontroli treści",
"DE.Views.ControlSettingsDialog.txtLockDelete": "Nie można usunąć kontroli treści",
"DE.Views.CustomColumnsDialog.cancelButtonText": "Anuluj",
"DE.Views.CustomColumnsDialog.okButtonText": "OK",
"DE.Views.CustomColumnsDialog.textColumns": "Ilość kolumn",
@ -827,6 +844,7 @@
"DE.Views.DocumentHolder.alignmentText": "Wyrównanie",
"DE.Views.DocumentHolder.belowText": "Poniżej",
"DE.Views.DocumentHolder.breakBeforeText": "Przerwanie strony przed",
"DE.Views.DocumentHolder.bulletsText": "Punktory i numeracja",
"DE.Views.DocumentHolder.cellAlignText": "Wyrównanie pionowe komórki",
"DE.Views.DocumentHolder.cellText": "Komórka",
"DE.Views.DocumentHolder.centerText": "Środek",
@ -843,9 +861,9 @@
"DE.Views.DocumentHolder.editChartText": "Edytuj dane",
"DE.Views.DocumentHolder.editFooterText": "Edytuj stopkę",
"DE.Views.DocumentHolder.editHeaderText": "Edytuj nagłówek",
"DE.Views.DocumentHolder.editHyperlinkText": "Edytuj hiperlink",
"DE.Views.DocumentHolder.editHyperlinkText": "Edytuj link",
"DE.Views.DocumentHolder.guestText": "Gość",
"DE.Views.DocumentHolder.hyperlinkText": "Hiperlink",
"DE.Views.DocumentHolder.hyperlinkText": "Link",
"DE.Views.DocumentHolder.ignoreAllSpellText": "Ignoruj wszystko",
"DE.Views.DocumentHolder.ignoreSpellText": "Ignoruj",
"DE.Views.DocumentHolder.imageText": "Zaawansowane ustawienia obrazu",
@ -865,7 +883,7 @@
"DE.Views.DocumentHolder.noSpellVariantsText": "Brak wariantów",
"DE.Views.DocumentHolder.originalSizeText": "Domyślny rozmiar",
"DE.Views.DocumentHolder.paragraphText": "Akapit",
"DE.Views.DocumentHolder.removeHyperlinkText": "Usuń hiperlink",
"DE.Views.DocumentHolder.removeHyperlinkText": "Usuń link",
"DE.Views.DocumentHolder.rightText": "Prawy",
"DE.Views.DocumentHolder.rowText": "Wiersz",
"DE.Views.DocumentHolder.saveStyleText": "Utwórz nowy styl",
@ -878,6 +896,7 @@
"DE.Views.DocumentHolder.spellcheckText": "Sprawdzanie pisowni",
"DE.Views.DocumentHolder.splitCellsText": "Podziel komórkę...",
"DE.Views.DocumentHolder.splitCellTitleText": "Podziel komórkę",
"DE.Views.DocumentHolder.strDelete": "Usuń podpis",
"DE.Views.DocumentHolder.styleText": "Formatowanie jako Styl",
"DE.Views.DocumentHolder.tableText": "Tabela",
"DE.Views.DocumentHolder.textAlign": "Wyrównaj",
@ -886,16 +905,22 @@
"DE.Views.DocumentHolder.textArrangeBackward": "Przenieś do tyłu",
"DE.Views.DocumentHolder.textArrangeForward": "Przenieś do przodu",
"DE.Views.DocumentHolder.textArrangeFront": "Przejdź na pierwszy plan",
"DE.Views.DocumentHolder.textContentControls": "Kontrola treści",
"DE.Views.DocumentHolder.textCopy": "Kopiuj",
"DE.Views.DocumentHolder.textCrop": "Przytnij",
"DE.Views.DocumentHolder.textCropFill": "Wypełnij",
"DE.Views.DocumentHolder.textCut": "Wytnij",
"DE.Views.DocumentHolder.textEditControls": "Ustawienia kontroli treści",
"DE.Views.DocumentHolder.textEditWrapBoundary": "Edytuj granicę owinięcia",
"DE.Views.DocumentHolder.textFlipH": "Odwróć w poziomie",
"DE.Views.DocumentHolder.textFlipV": "Odwróć w pionie",
"DE.Views.DocumentHolder.textNextPage": "Następna strona",
"DE.Views.DocumentHolder.textPaste": "Wklej",
"DE.Views.DocumentHolder.textPrevPage": "Poprzednia strona",
"DE.Views.DocumentHolder.textRefreshField": "Odśwież pole",
"DE.Views.DocumentHolder.textRemove": "Usuń",
"DE.Views.DocumentHolder.textRemoveControl": "Usuń kontrolę treści",
"DE.Views.DocumentHolder.textSettings": "Ustawienia",
"DE.Views.DocumentHolder.textShapeAlignBottom": "Wyrównaj do dołu",
"DE.Views.DocumentHolder.textShapeAlignCenter": "Wyrównaj do środka",
"DE.Views.DocumentHolder.textShapeAlignLeft": "Wyrównaj do lewej",
@ -903,9 +928,14 @@
"DE.Views.DocumentHolder.textShapeAlignRight": "Wyrównaj do prawej",
"DE.Views.DocumentHolder.textShapeAlignTop": "Wyrównaj do góry",
"DE.Views.DocumentHolder.textTOC": "Spis treści",
"DE.Views.DocumentHolder.textTOCSettings": "Ustawienia tabeli zawartości",
"DE.Views.DocumentHolder.textUndo": "Cofnij",
"DE.Views.DocumentHolder.textUpdateAll": "Odśwież całą tabelę",
"DE.Views.DocumentHolder.textUpdatePages": "Odśwież wyłącznie numery stron",
"DE.Views.DocumentHolder.textUpdateTOC": "Odśwież tabelę zawartości",
"DE.Views.DocumentHolder.textWrap": "Styl zawijania",
"DE.Views.DocumentHolder.tipIsLocked": "Ten element jest obecnie edytowany przez innego użytkownika.",
"DE.Views.DocumentHolder.toDictionaryText": "Dodaj do słownika",
"DE.Views.DocumentHolder.txtAddBottom": "Dodaj dolną krawędź",
"DE.Views.DocumentHolder.txtAddFractionBar": "Dadaj pasek ułamka",
"DE.Views.DocumentHolder.txtAddHor": "Dodaj poziomą linie",
@ -1060,6 +1090,8 @@
"DE.Views.FileMenuPanels.DocumentInfo.txtAppName": "Aplikacja",
"DE.Views.FileMenuPanels.DocumentInfo.txtAuthor": "Autor",
"DE.Views.FileMenuPanels.DocumentInfo.txtBtnAccessRights": "Zmień prawa dostępu",
"DE.Views.FileMenuPanels.DocumentInfo.txtComment": "Komentarz",
"DE.Views.FileMenuPanels.DocumentInfo.txtCreated": "Utworzono",
"DE.Views.FileMenuPanels.DocumentInfo.txtLoading": "Ładowanie...",
"DE.Views.FileMenuPanels.DocumentInfo.txtPages": "Strony",
"DE.Views.FileMenuPanels.DocumentInfo.txtParagraphs": "Akapity",
@ -1075,6 +1107,8 @@
"DE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Ostrzeżenie",
"DE.Views.FileMenuPanels.ProtectDoc.txtEdit": "Edytuj dokument",
"DE.Views.FileMenuPanels.ProtectDoc.txtEditWarning": "Rozpoczęcie edycji usunie z pliku wszelkie podpisy - czy na pewno kontynuować?",
"DE.Views.FileMenuPanels.ProtectDoc.txtEncrypted": "Ten dokument został zabezpieczony hasłem",
"DE.Views.FileMenuPanels.ProtectDoc.txtRequestedSignatures": "Ten dokument musi zostać podpisany.",
"DE.Views.FileMenuPanels.Settings.okButtonText": "Zatwierdź",
"DE.Views.FileMenuPanels.Settings.strAlignGuides": "Włącz prowadnice wyrównania",
"DE.Views.FileMenuPanels.Settings.strAutoRecover": "Włącz auto odzyskiwanie",
@ -1100,6 +1134,7 @@
"DE.Views.FileMenuPanels.Settings.textAlignGuides": "Porady wyrównania",
"DE.Views.FileMenuPanels.Settings.textAutoRecover": "Automatyczne odzyskiwanie",
"DE.Views.FileMenuPanels.Settings.textAutoSave": "Automatyczny zapis",
"DE.Views.FileMenuPanels.Settings.textCompatible": "Kompatybilność",
"DE.Views.FileMenuPanels.Settings.textDisabled": "Wyłączony",
"DE.Views.FileMenuPanels.Settings.textForceSave": "Zapisz na serwer",
"DE.Views.FileMenuPanels.Settings.textMinute": "Każda minuta",
@ -1136,7 +1171,8 @@
"DE.Views.HyperlinkSettingsDialog.okButtonText": "OK",
"DE.Views.HyperlinkSettingsDialog.textDefault": "Wybrany fragment tekstu",
"DE.Views.HyperlinkSettingsDialog.textDisplay": "Pokaż",
"DE.Views.HyperlinkSettingsDialog.textTitle": "Ustawienia hiperlinku",
"DE.Views.HyperlinkSettingsDialog.textExternal": "Link zewnętrzny",
"DE.Views.HyperlinkSettingsDialog.textTitle": "Ustawienia linków",
"DE.Views.HyperlinkSettingsDialog.textTooltip": "Tekst wskazówki na ekranie",
"DE.Views.HyperlinkSettingsDialog.textUrl": "Link do",
"DE.Views.HyperlinkSettingsDialog.txtBeginning": "Początek dokumentu",
@ -1239,16 +1275,29 @@
"DE.Views.LeftMenu.tipAbout": "O programie",
"DE.Views.LeftMenu.tipChat": "Czat",
"DE.Views.LeftMenu.tipComments": "Komentarze",
"DE.Views.LeftMenu.tipNavigation": "Nawigacja",
"DE.Views.LeftMenu.tipPlugins": "Wtyczki",
"DE.Views.LeftMenu.tipSearch": "Szukaj",
"DE.Views.LeftMenu.tipSupport": "Opinie i wsparcie",
"DE.Views.LeftMenu.tipTitles": "Tytuły",
"DE.Views.LeftMenu.txtDeveloper": "TRYB DEWELOPERA",
"DE.Views.Links.capBtnBookmarks": "Zakładka",
"DE.Views.Links.capBtnContentsUpdate": "Odśwież",
"DE.Views.Links.capBtnInsContents": "Spis treści",
"DE.Views.Links.capBtnInsFootnote": "Przypis",
"DE.Views.Links.capBtnInsLink": "Link",
"DE.Views.Links.confirmDeleteFootnotes": "Czy chcesz usunąć wszystkie przypisy?",
"DE.Views.Links.mniDelFootnote": "Usuń wszystkie przypisy",
"DE.Views.Links.mniInsFootnote": "Wstaw przypis",
"DE.Views.Links.mniNoteSettings": "Ustawienia notatek",
"DE.Views.Links.textContentsRemove": "Usuń tabelę zawartości",
"DE.Views.Links.textContentsSettings": "Ustawienia",
"DE.Views.Links.textGotoFootnote": "Idź do przypisów",
"DE.Views.Links.textUpdateAll": "Odśwież całą tabelę",
"DE.Views.Links.textUpdatePages": "Odśwież wyłącznie numery stron",
"DE.Views.Links.tipBookmarks": "Utwórz zakładkę",
"DE.Views.Links.tipInsertHyperlink": "Dodaj hiperłącze",
"DE.Views.Links.tipContentsUpdate": "Odśwież tabelę zawartości",
"DE.Views.Links.tipInsertHyperlink": "Dodaj link",
"DE.Views.Links.tipNotes": "Wstawianie lub edytowanie przypisów",
"DE.Views.MailMergeEmailDlg.cancelButtonText": "Anuluj",
"DE.Views.MailMergeEmailDlg.filePlaceholder": "PDF",
@ -1299,6 +1348,7 @@
"DE.Views.MailMergeSettings.txtUntitled": "Niezatytułowany",
"DE.Views.MailMergeSettings.warnProcessMailMerge": "Rozpoczęcie scalania nie powiodło się",
"DE.Views.Navigation.txtCollapse": "Zwiń wszystko",
"DE.Views.Navigation.txtEmpty": "Ten dokument nie zawiera nagłówków",
"DE.Views.Navigation.txtExpand": "Rozwiń wszystko",
"DE.Views.NoteSettingsDialog.textApply": "Zatwierdź",
"DE.Views.NoteSettingsDialog.textApplyTo": "Zatwierdź zmiany do",
@ -1360,6 +1410,8 @@
"DE.Views.ParagraphSettingsAdvanced.strIndentsFirstLine": "Pierwszy wiersz",
"DE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Lewy",
"DE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Prawy",
"DE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "po",
"DE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Przed",
"DE.Views.ParagraphSettingsAdvanced.strKeepLines": "Trzymaj wiersze razem",
"DE.Views.ParagraphSettingsAdvanced.strKeepNext": "Trzymaj dalej",
"DE.Views.ParagraphSettingsAdvanced.strMargins": "Wewnętrzne pola",
@ -1368,22 +1420,26 @@
"DE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Wcięcia i miejsca docelowe",
"DE.Views.ParagraphSettingsAdvanced.strParagraphPosition": "Umieszczenie",
"DE.Views.ParagraphSettingsAdvanced.strSmallCaps": "Małe litery",
"DE.Views.ParagraphSettingsAdvanced.strSomeParagraphSpace": "Nie dodawaj odstępu między akapitami tego samego stylu",
"DE.Views.ParagraphSettingsAdvanced.strStrike": "Przekreślony",
"DE.Views.ParagraphSettingsAdvanced.strSubscript": "Indeks",
"DE.Views.ParagraphSettingsAdvanced.strSuperscript": "Indeks górny",
"DE.Views.ParagraphSettingsAdvanced.strTabs": "Karta",
"DE.Views.ParagraphSettingsAdvanced.textAlign": "Wyrównanie",
"DE.Views.ParagraphSettingsAdvanced.textAtLeast": "Co najmniej",
"DE.Views.ParagraphSettingsAdvanced.textBackColor": "Kolor tła",
"DE.Views.ParagraphSettingsAdvanced.textBorderColor": "Kolor obramowania",
"DE.Views.ParagraphSettingsAdvanced.textBorderDesc": "Kliknij na diagram lub użyj przycisków, aby wybrać granice i zastosuj do nich wybrany styl",
"DE.Views.ParagraphSettingsAdvanced.textBorderWidth": "Rozmiar obramowania",
"DE.Views.ParagraphSettingsAdvanced.textBottom": "Dół",
"DE.Views.ParagraphSettingsAdvanced.textCentered": "Wyśrodkowane",
"DE.Views.ParagraphSettingsAdvanced.textCharacterSpacing": "Rozstaw znaków",
"DE.Views.ParagraphSettingsAdvanced.textDefault": "Domyślna zakładka",
"DE.Views.ParagraphSettingsAdvanced.textEffects": "Efekty",
"DE.Views.ParagraphSettingsAdvanced.textLeft": "Lewy",
"DE.Views.ParagraphSettingsAdvanced.textNewColor": "Nowy niestandardowy kolor",
"DE.Views.ParagraphSettingsAdvanced.textNone": "Brak",
"DE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(brak)",
"DE.Views.ParagraphSettingsAdvanced.textPosition": "Pozycja",
"DE.Views.ParagraphSettingsAdvanced.textRemove": "Usuń",
"DE.Views.ParagraphSettingsAdvanced.textRemoveAll": "Usuń wszystko",
@ -1404,6 +1460,7 @@
"DE.Views.ParagraphSettingsAdvanced.tipOuter": "Ustaw tylko obramowanie zewnętrzne",
"DE.Views.ParagraphSettingsAdvanced.tipRight": "Ustaw tylko obramowanie prawej krawędzi",
"DE.Views.ParagraphSettingsAdvanced.tipTop": "Ustaw tylko górną krawędź",
"DE.Views.ParagraphSettingsAdvanced.txtAutoText": "Automatyczny",
"DE.Views.ParagraphSettingsAdvanced.txtNoBorders": "Bez krawędzi",
"DE.Views.RightMenu.txtChartSettings": "Ustawienia wykresu",
"DE.Views.RightMenu.txtHeaderFooterSettings": "Ustawienia nagłówka i stopki",
@ -1411,6 +1468,7 @@
"DE.Views.RightMenu.txtMailMergeSettings": "Ustawienia korespondencji seryjnej",
"DE.Views.RightMenu.txtParagraphSettings": "Ustawienia akapitu",
"DE.Views.RightMenu.txtShapeSettings": "Ustawienia kształtu",
"DE.Views.RightMenu.txtSignatureSettings": "Ustawienia podpisów",
"DE.Views.RightMenu.txtTableSettings": "Ustawienia tabeli",
"DE.Views.RightMenu.txtTextArtSettings": "Ustawienia tekstu",
"DE.Views.ShapeSettings.strBackground": "Kolor tła",
@ -1466,8 +1524,10 @@
"DE.Views.ShapeSettings.txtTopAndBottom": "Góra i dół",
"DE.Views.ShapeSettings.txtWood": "Drewno",
"DE.Views.SignatureSettings.notcriticalErrorTitle": "Ostrzeżenie",
"DE.Views.SignatureSettings.strDelete": "Usuń podpis",
"DE.Views.SignatureSettings.txtContinueEditing": "Edytuj mimo wszystko",
"DE.Views.SignatureSettings.txtEditWarning": "Rozpoczęcie edycji usunie z pliku wszelkie podpisy - czy na pewno kontynuować?",
"DE.Views.SignatureSettings.txtRequestedSignatures": "Ten dokument musi zostać podpisany.",
"DE.Views.Statusbar.goToPageText": "Idź do strony",
"DE.Views.Statusbar.pageIndexText": "Strona {0} z {1}",
"DE.Views.Statusbar.tipFitPage": "Dopasuj do strony",
@ -1485,6 +1545,7 @@
"DE.Views.TableFormulaDialog.cancelButtonText": "Anuluj",
"DE.Views.TableFormulaDialog.okButtonText": "OK",
"DE.Views.TableFormulaDialog.textInsertFunction": "Wklej funkcję",
"DE.Views.TableFormulaDialog.textTitle": "Ustawienia formuł",
"DE.Views.TableOfContentsSettings.cancelButtonText": "Anuluj",
"DE.Views.TableOfContentsSettings.okButtonText": "OK",
"DE.Views.TableOfContentsSettings.strShowPages": "Pokaż numery stron",
@ -1661,6 +1722,7 @@
"DE.Views.Toolbar.mniEditHeader": "Edytuj nagłówek",
"DE.Views.Toolbar.mniHiddenBorders": "Ukryte obramowanie tabeli",
"DE.Views.Toolbar.mniHiddenChars": "Znaki niedrukowane",
"DE.Views.Toolbar.mniHighlightControls": "Ustawienia wyróżniania",
"DE.Views.Toolbar.mniImageFromFile": "Obraz z pliku",
"DE.Views.Toolbar.mniImageFromUrl": "Obraz z URL",
"DE.Views.Toolbar.strMenuNoFill": "Brak wypełnienia",
@ -1678,6 +1740,7 @@
"DE.Views.Toolbar.textColumnsThree": "Trzy",
"DE.Views.Toolbar.textColumnsTwo": "Dwa",
"DE.Views.Toolbar.textContPage": "Ciągła strona",
"DE.Views.Toolbar.textEditWatermark": "Własny znak wodny",
"DE.Views.Toolbar.textEvenPage": "Z parzystej strony",
"DE.Views.Toolbar.textInMargin": "W marginesie",
"DE.Views.Toolbar.textInsColumnBreak": "Wstaw podział kolumny",
@ -1698,6 +1761,7 @@
"DE.Views.Toolbar.textMarginsWide": "Szeroki",
"DE.Views.Toolbar.textNewColor": "Nowy niestandardowy kolor",
"DE.Views.Toolbar.textNextPage": "Następna strona",
"DE.Views.Toolbar.textNoHighlight": "Brak wyróżnienia",
"DE.Views.Toolbar.textNone": "Żaden",
"DE.Views.Toolbar.textOddPage": "Nieparzysta strona",
"DE.Views.Toolbar.textPageMarginsCustom": "Niestandardowe marginesy",
@ -1705,6 +1769,8 @@
"DE.Views.Toolbar.textPie": "Kołowe",
"DE.Views.Toolbar.textPoint": "XY (Punktowy)",
"DE.Views.Toolbar.textPortrait": "Portret",
"DE.Views.Toolbar.textRemoveControl": "Usuń kontrolę treści",
"DE.Views.Toolbar.textRemWatermark": "Usuń znak wodny",
"DE.Views.Toolbar.textRight": "Prawo:",
"DE.Views.Toolbar.textStock": "Zbiory",
"DE.Views.Toolbar.textStrikeout": "Skreślenie",
@ -1783,7 +1849,10 @@
"DE.Views.Toolbar.tipShowHiddenChars": "Znaki niedrukowane",
"DE.Views.Toolbar.tipSynchronize": "Dokument został zmieniony przez innego użytkownika. Kliknij, aby zapisać swoje zmiany i ponownie załadować zmiany.",
"DE.Views.Toolbar.tipUndo": "Cofnij",
"DE.Views.Toolbar.tipWatermark": "Edytuj znak wodny",
"DE.Views.Toolbar.txtMarginAlign": "Wyrównaj do marginesów",
"DE.Views.Toolbar.txtObjectsAlign": "Wyrównaj zaznaczone obiekty",
"DE.Views.Toolbar.txtPageAlign": "Wyrównaj do strony",
"DE.Views.Toolbar.txtScheme1": "Biuro",
"DE.Views.Toolbar.txtScheme10": "Mediana",
"DE.Views.Toolbar.txtScheme11": "Metro",
@ -1805,5 +1874,9 @@
"DE.Views.Toolbar.txtScheme7": "Kapitał",
"DE.Views.Toolbar.txtScheme8": "Przepływ",
"DE.Views.Toolbar.txtScheme9": "Odlewnia",
"DE.Views.WatermarkSettingsDialog.textNewColor": "Nowy niestandardowy kolor"
"DE.Views.WatermarkSettingsDialog.cancelButtonText": "Anuluj",
"DE.Views.WatermarkSettingsDialog.textAuto": "Automatyczny",
"DE.Views.WatermarkSettingsDialog.textBold": "Pogrubienie",
"DE.Views.WatermarkSettingsDialog.textNewColor": "Nowy niestandardowy kolor",
"DE.Views.WatermarkSettingsDialog.textTitle": "Ustawienia znaków wodnych"
}

View file

@ -13,7 +13,7 @@
"Common.Controllers.ReviewChanges.textAtLeast": "Минимум",
"Common.Controllers.ReviewChanges.textAuto": "Авто",
"Common.Controllers.ReviewChanges.textBaseline": "Базовая линия",
"Common.Controllers.ReviewChanges.textBold": "Жирный",
"Common.Controllers.ReviewChanges.textBold": "Полужирный",
"Common.Controllers.ReviewChanges.textBreakBefore": "С новой страницы",
"Common.Controllers.ReviewChanges.textCaps": "Все прописные",
"Common.Controllers.ReviewChanges.textCenter": "Выравнивание по центру",
@ -293,7 +293,7 @@
"Common.Views.SelectFileDlg.textTitle": "Выбрать источник данных",
"Common.Views.SignDialog.cancelButtonText": "Отмена",
"Common.Views.SignDialog.okButtonText": "ОК",
"Common.Views.SignDialog.textBold": "Жирный",
"Common.Views.SignDialog.textBold": "Полужирный",
"Common.Views.SignDialog.textCertificate": "Сертификат",
"Common.Views.SignDialog.textChange": "Изменить",
"Common.Views.SignDialog.textInputName": "Введите имя подписывающего",
@ -1209,7 +1209,7 @@
"DE.Views.DocumentHolder.txtDeleteBreak": "Удалить принудительный разрыв",
"DE.Views.DocumentHolder.txtDeleteChars": "Удалить вложенные знаки",
"DE.Views.DocumentHolder.txtDeleteCharsAndSeparators": "Удалить вложенные знаки и разделители",
"DE.Views.DocumentHolder.txtDeleteEq": "Удалить формулу",
"DE.Views.DocumentHolder.txtDeleteEq": "Удалить уравнение",
"DE.Views.DocumentHolder.txtDeleteGroupChar": "Удалить символ",
"DE.Views.DocumentHolder.txtDeleteRadical": "Удалить радикал",
"DE.Views.DocumentHolder.txtDistribHor": "Распределить по горизонтали",
@ -1240,8 +1240,8 @@
"DE.Views.DocumentHolder.txtInsertArgAfter": "Вставить аргумент после",
"DE.Views.DocumentHolder.txtInsertArgBefore": "Вставить аргумент перед",
"DE.Views.DocumentHolder.txtInsertBreak": "Вставить принудительный разрыв",
"DE.Views.DocumentHolder.txtInsertEqAfter": "Вставить формулу после",
"DE.Views.DocumentHolder.txtInsertEqBefore": "Вставить формулу перед",
"DE.Views.DocumentHolder.txtInsertEqAfter": "Вставить уравнение после",
"DE.Views.DocumentHolder.txtInsertEqBefore": "Вставить уравнение перед",
"DE.Views.DocumentHolder.txtKeepTextOnly": "Сохранить только текст",
"DE.Views.DocumentHolder.txtLimitChange": "Изменить положение пределов",
"DE.Views.DocumentHolder.txtLimitOver": "Предел над текстом",
@ -2084,7 +2084,7 @@
"DE.Views.Toolbar.textArea": "С областями",
"DE.Views.Toolbar.textAutoColor": "Автоматический",
"DE.Views.Toolbar.textBar": "Линейчатая",
"DE.Views.Toolbar.textBold": "Жирный",
"DE.Views.Toolbar.textBold": "Полужирный",
"DE.Views.Toolbar.textBottom": "Нижнее: ",
"DE.Views.Toolbar.textCharts": "Диаграммы",
"DE.Views.Toolbar.textColumn": "Гистограмма",
@ -2238,7 +2238,7 @@
"DE.Views.WatermarkSettingsDialog.cancelButtonText": "Отмена",
"DE.Views.WatermarkSettingsDialog.okButtonText": "OK",
"DE.Views.WatermarkSettingsDialog.textAuto": "Авто",
"DE.Views.WatermarkSettingsDialog.textBold": "Жирный",
"DE.Views.WatermarkSettingsDialog.textBold": "Полужирный",
"DE.Views.WatermarkSettingsDialog.textColor": "Цвет текста",
"DE.Views.WatermarkSettingsDialog.textDiagonal": "По диагонали",
"DE.Views.WatermarkSettingsDialog.textFont": "Шрифт",

View file

@ -155,8 +155,6 @@ require([
]
});
Common.Locale.apply();
var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link');
@ -198,34 +196,36 @@ require([
//Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'documenteditor/mobile/app/controller/Editor',
'documenteditor/mobile/app/controller/Toolbar',
'documenteditor/mobile/app/controller/Search',
'documenteditor/mobile/app/controller/Main',
'documenteditor/mobile/app/controller/DocumentHolder',
'documenteditor/mobile/app/controller/Settings',
'documenteditor/mobile/app/controller/edit/EditContainer',
'documenteditor/mobile/app/controller/edit/EditText',
'documenteditor/mobile/app/controller/edit/EditParagraph',
'documenteditor/mobile/app/controller/edit/EditHeader',
'documenteditor/mobile/app/controller/edit/EditTable',
'documenteditor/mobile/app/controller/edit/EditImage',
'documenteditor/mobile/app/controller/edit/EditShape',
'documenteditor/mobile/app/controller/edit/EditChart',
'documenteditor/mobile/app/controller/edit/EditHyperlink',
'documenteditor/mobile/app/controller/add/AddContainer',
'documenteditor/mobile/app/controller/add/AddTable',
'documenteditor/mobile/app/controller/add/AddShape',
'documenteditor/mobile/app/controller/add/AddImage',
'documenteditor/mobile/app/controller/add/AddOther',
'common/mobile/lib/controller/Collaboration'
], function() {
window.compareVersions = true;
app.start();
Common.Locale.apply(function() {
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'documenteditor/mobile/app/controller/Editor',
'documenteditor/mobile/app/controller/Toolbar',
'documenteditor/mobile/app/controller/Search',
'documenteditor/mobile/app/controller/Main',
'documenteditor/mobile/app/controller/DocumentHolder',
'documenteditor/mobile/app/controller/Settings',
'documenteditor/mobile/app/controller/edit/EditContainer',
'documenteditor/mobile/app/controller/edit/EditText',
'documenteditor/mobile/app/controller/edit/EditParagraph',
'documenteditor/mobile/app/controller/edit/EditHeader',
'documenteditor/mobile/app/controller/edit/EditTable',
'documenteditor/mobile/app/controller/edit/EditImage',
'documenteditor/mobile/app/controller/edit/EditShape',
'documenteditor/mobile/app/controller/edit/EditChart',
'documenteditor/mobile/app/controller/edit/EditHyperlink',
'documenteditor/mobile/app/controller/add/AddContainer',
'documenteditor/mobile/app/controller/add/AddTable',
'documenteditor/mobile/app/controller/add/AddShape',
'documenteditor/mobile/app/controller/add/AddImage',
'documenteditor/mobile/app/controller/add/AddOther',
'common/mobile/lib/controller/Collaboration'
], function() {
window.compareVersions = true;
app.start();
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -166,8 +166,6 @@ require([
]
});
Common.Locale.apply();
var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link');
@ -209,33 +207,35 @@ require([
//Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'documenteditor/mobile/app/controller/Editor',
'documenteditor/mobile/app/controller/Toolbar',
'documenteditor/mobile/app/controller/Search',
'documenteditor/mobile/app/controller/Main',
'documenteditor/mobile/app/controller/DocumentHolder',
'documenteditor/mobile/app/controller/Settings',
'documenteditor/mobile/app/controller/edit/EditContainer',
'documenteditor/mobile/app/controller/edit/EditText',
'documenteditor/mobile/app/controller/edit/EditParagraph',
'documenteditor/mobile/app/controller/edit/EditHeader',
'documenteditor/mobile/app/controller/edit/EditTable',
'documenteditor/mobile/app/controller/edit/EditImage',
'documenteditor/mobile/app/controller/edit/EditShape',
'documenteditor/mobile/app/controller/edit/EditChart',
'documenteditor/mobile/app/controller/edit/EditHyperlink',
'documenteditor/mobile/app/controller/add/AddContainer',
'documenteditor/mobile/app/controller/add/AddTable',
'documenteditor/mobile/app/controller/add/AddShape',
'documenteditor/mobile/app/controller/add/AddImage',
'documenteditor/mobile/app/controller/add/AddOther',
'common/mobile/lib/controller/Collaboration'
], function() {
app.start();
Common.Locale.apply(function() {
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'documenteditor/mobile/app/controller/Editor',
'documenteditor/mobile/app/controller/Toolbar',
'documenteditor/mobile/app/controller/Search',
'documenteditor/mobile/app/controller/Main',
'documenteditor/mobile/app/controller/DocumentHolder',
'documenteditor/mobile/app/controller/Settings',
'documenteditor/mobile/app/controller/edit/EditContainer',
'documenteditor/mobile/app/controller/edit/EditText',
'documenteditor/mobile/app/controller/edit/EditParagraph',
'documenteditor/mobile/app/controller/edit/EditHeader',
'documenteditor/mobile/app/controller/edit/EditTable',
'documenteditor/mobile/app/controller/edit/EditImage',
'documenteditor/mobile/app/controller/edit/EditShape',
'documenteditor/mobile/app/controller/edit/EditChart',
'documenteditor/mobile/app/controller/edit/EditHyperlink',
'documenteditor/mobile/app/controller/add/AddContainer',
'documenteditor/mobile/app/controller/add/AddTable',
'documenteditor/mobile/app/controller/add/AddShape',
'documenteditor/mobile/app/controller/add/AddImage',
'documenteditor/mobile/app/controller/add/AddOther',
'common/mobile/lib/controller/Collaboration'
], function() {
app.start();
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -538,7 +538,8 @@ define([
value = Common.localStorage.getItem("de-show-tableline");
me.api.put_ShowTableEmptyLine((value!==null) ? eval(value) : true);
value = Common.localStorage.getBool("de-mobile-spellcheck", false);
value = Common.localStorage.getBool("de-mobile-spellcheck", !(this.appOptions.customization && this.appOptions.customization.spellcheck===false));
Common.Utils.InternalSettings.set("de-mobile-spellcheck", value);
me.api.asc_setSpellCheck(value);
me.api.asc_registerCallback('asc_onStartAction', _.bind(me.onLongActionBegin, me));
@ -607,6 +608,19 @@ define([
me.applyLicense();
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
if (!me.appOptions.canReview) {
var canViewReview = me.appOptions.isEdit || me.api.asc_HaveRevisionsChanges(true);
DE.getController('Common.Controllers.Collaboration').setCanViewReview(canViewReview);
if (canViewReview) {
var viewReviewMode = Common.localStorage.getItem("de-view-review-mode");
if (viewReviewMode===null)
viewReviewMode = me.appOptions.customization && /^(original|final|markup)$/i.test(me.appOptions.customization.reviewDisplay) ? me.appOptions.customization.reviewDisplay.toLocaleLowerCase() : 'original';
viewReviewMode = me.appOptions.isEdit ? 'markup' : viewReviewMode;
DE.getController('Common.Controllers.Collaboration').turnDisplayMode(viewReviewMode);
}
}
Common.Gateway.documentReady();
$('.doc-placeholder').remove();
@ -953,6 +967,10 @@ define([
config.msg = this.errorEditingDownloadas;
break;
case Asc.c_oAscError.ID.ConvertationOpenLimitError:
config.msg = this.errorFileSizeExceed;
break;
default:
config.msg = this.errorDefaultMessage.replace('%1', id);
break;
@ -1437,7 +1455,8 @@ define([
errorEditingDownloadas: 'An error occurred during the work with the document.<br>Use the \'Download\' option to save the file backup copy to your computer hard drive.',
textPaidFeature: 'Paid feature',
textCustomLoader: 'Please note that according to the terms of the license you are not entitled to change the loader.<br>Please contact our Sales Department to get a quote.',
waitText: 'Please, wait...'
waitText: 'Please, wait...',
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.'
}
})(), DE.Controllers.Main || {}))
});

View file

@ -229,7 +229,7 @@ define([
Common.Utils.addScrollIfNeed('.page[data-page=settings-about-view]', '.page[data-page=settings-about-view] .page-content');
} else if ('#settings-advanced-view' == pageId) {
me.initPageAdvancedSettings();
$('#settings-spellcheck input:checkbox').attr('checked', Common.localStorage.getBool("de-mobile-spellcheck", false));
$('#settings-spellcheck input:checkbox').attr('checked', Common.Utils.InternalSettings.get("de-mobile-spellcheck"));
$('#settings-spellcheck input:checkbox').single('change', _.bind(me.onSpellcheck, me));
$('#settings-no-characters input:checkbox').attr('checked', (Common.localStorage.getItem("de-mobile-no-characters") == 'true') ? true : false);
$('#settings-no-characters input:checkbox').single('change', _.bind(me.onNoCharacters, me));
@ -262,7 +262,7 @@ define([
$('#settings-print').single('click', _.bind(me.onPrint, me));
$('#settings-collaboration').single('click', _.bind(me.clickCollaboration, me));
var _stateDisplayMode = DE.getController('Common.Controllers.Collaboration').getDisplayMode();
if(_stateDisplayMode == "Final" || _stateDisplayMode == "Original") {
if(_stateDisplayMode == "final" || _stateDisplayMode == "original") {
$('#settings-document').addClass('disabled');
}
var _userCount = DE.getController('Main').returnUserCount();
@ -378,7 +378,7 @@ define([
value = (value!==null) ? parseInt(value) : Common.Utils.Metric.getDefaultMetric();
$unitMeasurement.val([value]);
var _stateDisplayMode = DE.getController('Common.Controllers.Collaboration').getDisplayMode();
if(_stateDisplayMode == "Final" || _stateDisplayMode == "Original") {
if(_stateDisplayMode == "final" || _stateDisplayMode == "original") {
$('#settings-no-characters').addClass('disabled');
$('#settings-hidden-borders').addClass('disabled');
}
@ -543,6 +543,7 @@ define([
var $checkbox = $(e.currentTarget),
state = $checkbox.is(':checked');
Common.localStorage.setItem("de-mobile-spellcheck", state ? 1 : 0);
Common.Utils.InternalSettings.set("de-mobile-spellcheck", state);
this.api && this.api.asc_setSpellCheck(state);
},

View file

@ -153,7 +153,7 @@ define([
},
setDisplayMode: function(displayMode) {
stateDisplayMode = displayMode == "Final" || displayMode == "Original" ? true : false;
stateDisplayMode = displayMode == "final" || displayMode == "original" ? true : false;
var selected = this.api.getSelectedElements();
this.onApiFocusObject(selected);
},

View file

@ -247,6 +247,7 @@
"DE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"DE.Controllers.Main.errorFileSizeExceed": "The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.",
"DE.Controllers.Search.textNoTextFound": "Text not Found",
"DE.Controllers.Search.textReplaceAll": "Replace All",
"DE.Controllers.Settings.notcriticalErrorTitle": "Warning",

View file

@ -2,7 +2,7 @@
"Common.Controllers.Collaboration.textAtLeast": "минимум",
"Common.Controllers.Collaboration.textAuto": "авто",
"Common.Controllers.Collaboration.textBaseline": "Базовая линия",
"Common.Controllers.Collaboration.textBold": "Жирный",
"Common.Controllers.Collaboration.textBold": "Полужирный",
"Common.Controllers.Collaboration.textBreakBefore": "С новой страницы",
"Common.Controllers.Collaboration.textCaps": "Все прописные",
"Common.Controllers.Collaboration.textCenter": "Выравнивание по центру",

View file

@ -162,7 +162,7 @@
</div>
<!-- debug begin -->
<script type="text/javascript">var less=less||{};less.env='development';</script>
<script src="../../../vendor/less/dist/less-1.5.1.js" type="text/javascript"></script>
<script src="../../../vendor/less/dist/less-2.7.1.js" type="text/javascript"></script>
<!-- debug end -->
<script>
@ -278,6 +278,13 @@
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<script type="text/javascript" src="../sdk_dev_scripts.js"></script>
<script>
window.sdk_dev_scrpipts.forEach(function(item){

View file

@ -219,11 +219,16 @@
<!--vendor-->
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<!--sdk-->
<script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/sdk-all-min.js"></script>

View file

@ -498,6 +498,10 @@ PE.ApplicationController = new(function(){
message = me.errorUserDrop;
break;
case Asc.c_oAscError.ID.ConvertationOpenLimitError:
message = me.errorFileSizeExceed;
break;
default:
message = me.errorDefaultMessage.replace('%1', id);
break;
@ -509,7 +513,7 @@ PE.ApplicationController = new(function(){
Common.Gateway.reportError(id, message);
$('#id-critical-error-title').text(me.criticalErrorTitle);
$('#id-critical-error-message').text(message);
$('#id-critical-error-message').html(message);
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
window.location.reload();
});
@ -518,7 +522,7 @@ PE.ApplicationController = new(function(){
Common.Gateway.reportWarning(id, message);
$('#id-critical-error-title').text(me.notcriticalErrorTitle);
$('#id-critical-error-message').text(message);
$('#id-critical-error-message').html(message);
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
$('#id-critical-error-dialog').modal('hide');
});
@ -624,6 +628,7 @@ PE.ApplicationController = new(function(){
downloadTextText: 'Downloading presentation...',
waitText: 'Please, wait...',
textLoadingDocument: 'Loading presentation',
txtClose: 'Close'
txtClose: 'Close',
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.'
}
})();

View file

@ -31,8 +31,8 @@
*
*/
(function ($) {
Common.Locale.apply();
PE.ApplicationView.create();
PE.ApplicationController.create();
Common.Locale.apply(function() {
PE.ApplicationView.create();
PE.ApplicationController.create();
});
})(window.jQuery);

View file

@ -12,6 +12,7 @@
"PE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.",
"PE.ApplicationController.errorDefaultMessage": "Error code: %1",
"PE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.",
"PE.ApplicationController.errorFileSizeExceed": "The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.",
"PE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.",
"PE.ApplicationController.notcriticalErrorTitle": "Warning",
"PE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.",

View file

@ -160,39 +160,39 @@ require([
]
});
Common.Locale.apply();
require([
'presentationeditor/main/app/controller/Viewport',
'presentationeditor/main/app/controller/DocumentHolder',
'presentationeditor/main/app/controller/Toolbar',
'presentationeditor/main/app/controller/Statusbar',
'presentationeditor/main/app/controller/RightMenu',
'presentationeditor/main/app/controller/LeftMenu',
'presentationeditor/main/app/controller/Main',
'presentationeditor/main/app/view/FileMenuPanels',
'presentationeditor/main/app/view/ParagraphSettings',
'presentationeditor/main/app/view/ImageSettings',
'presentationeditor/main/app/view/ShapeSettings',
'presentationeditor/main/app/view/SlideSettings',
'presentationeditor/main/app/view/TableSettings',
'presentationeditor/main/app/view/TextArtSettings',
'presentationeditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts'
/** coauthoring begin **/
,'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat',
/** coauthoring end **/
'common/main/lib/controller/Plugins',
'presentationeditor/main/app/view/ChartSettings',
'common/main/lib/controller/ExternalDiagramEditor'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
app.start();
Common.Locale.apply(function(){
require([
'presentationeditor/main/app/controller/Viewport',
'presentationeditor/main/app/controller/DocumentHolder',
'presentationeditor/main/app/controller/Toolbar',
'presentationeditor/main/app/controller/Statusbar',
'presentationeditor/main/app/controller/RightMenu',
'presentationeditor/main/app/controller/LeftMenu',
'presentationeditor/main/app/controller/Main',
'presentationeditor/main/app/view/FileMenuPanels',
'presentationeditor/main/app/view/ParagraphSettings',
'presentationeditor/main/app/view/ImageSettings',
'presentationeditor/main/app/view/ShapeSettings',
'presentationeditor/main/app/view/SlideSettings',
'presentationeditor/main/app/view/TableSettings',
'presentationeditor/main/app/view/TextArtSettings',
'presentationeditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts'
/** coauthoring begin **/
,'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat',
/** coauthoring end **/
'common/main/lib/controller/Plugins',
'presentationeditor/main/app/view/ChartSettings',
'common/main/lib/controller/ExternalDiagramEditor'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
app.start();
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -421,6 +421,10 @@ define([
this.dlgSearch = (new Common.UI.SearchDialog({
matchcase: true
}));
var me = this;
Common.NotificationCenter.on('preview:start', function() {
me.dlgSearch.hide();
});
}
if (show) {

View file

@ -205,9 +205,11 @@ define([
});
$(document.body).on('blur', 'input, textarea', function(e) {
if (!me.isModalShowed && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) {
if (!me.isModalShowed) {
if (/form-control/.test(e.target.className))
me.inFormControl = false;
if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible())
return;
if (!e.relatedTarget ||
!/area_id/.test(e.target.id)
&& !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */
@ -474,7 +476,7 @@ define([
var action = {id: id, type: type};
this.stackLongActions.pop(action);
appHeader.setDocumentCaption(this.api.asc_getDocumentName());
appHeader && appHeader.setDocumentCaption(this.api.asc_getDocumentName());
this.updateWindowTitle(true);
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
@ -646,7 +648,7 @@ define([
var zf = (value!==null) ? parseInt(value) : (this.appOptions.customization && this.appOptions.customization.zoom ? parseInt(this.appOptions.customization.zoom) : -1);
(zf == -1) ? this.api.zoomFitToPage() : ((zf == -2) ? this.api.zoomFitToWidth() : this.api.zoom(zf>0 ? zf : 100));
value = Common.localStorage.getBool("pe-settings-spellcheck", true);
value = Common.localStorage.getBool("pe-settings-spellcheck", !(this.appOptions.customization && this.appOptions.customization.spellcheck===false));
Common.Utils.InternalSettings.set("pe-settings-spellcheck", value);
me.api.asc_setSpellCheck(value);
@ -1195,6 +1197,10 @@ define([
config.msg = this.errorEmailClient;
break;
case Asc.c_oAscError.ID.ConvertationOpenLimitError:
config.msg = this.errorFileSizeExceed;
break;
default:
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
break;
@ -1311,7 +1317,7 @@ define([
if (this._state.isDocModified !== isModified || force) {
var title = this.defaultTitleText;
if (!_.isEmpty(appHeader.getDocumentCaption()))
if (appHeader && !_.isEmpty(appHeader.getDocumentCaption()))
title = appHeader.getDocumentCaption() + ' - ' + title;
if (isModified) {
@ -2179,7 +2185,8 @@ define([
txtShape_polyline2: 'Freeform',
errorEmailClient: 'No email client could be found',
textCustomLoader: 'Please note that according to the terms of the license you are not entitled to change the loader.<br>Please contact our Sales Department to get a quote.',
waitText: 'Please, wait...'
waitText: 'Please, wait...',
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.'
}
})(), PE.Controllers.Main || {}))
});

View file

@ -657,12 +657,18 @@ define([
'</table>',
'</div></td>',
'</tr>',
'<tr class="divider"></tr>',
'<tr>',
'<td class="left"></td>',
'<td class="right"><button id="fminfo-btn-apply" class="btn normal dlg-btn primary"><%= scope.okButtonText %></button></td>',
'</tr>',
'</table>'
].join(''));
this.menu = options.menu;
this.coreProps = null;
this.authors = [];
this._locked = false;
},
render: function(node) {
@ -691,33 +697,18 @@ define([
style : 'width: 200px;',
placeHolder : this.txtAddText,
validateOnBlur: false
}).on('changed:after', function(input, newValue, oldValue) {
if (newValue !== oldValue && me.coreProps && me.api) {
me.coreProps.asc_putTitle(me.inputTitle.getValue());
me.api.asc_setCoreProps(me.coreProps);
}
}).on('keydown:before', keyDownBefore);
this.inputSubject = new Common.UI.InputField({
el : $markup.findById('#id-info-subject'),
style : 'width: 200px;',
placeHolder : this.txtAddText,
validateOnBlur: false
}).on('changed:after', function(input, newValue, oldValue) {
if (newValue !== oldValue && me.coreProps && me.api) {
me.coreProps.asc_putSubject(me.inputSubject.getValue());
me.api.asc_setCoreProps(me.coreProps);
}
}).on('keydown:before', keyDownBefore);
this.inputComment = new Common.UI.InputField({
el : $markup.findById('#id-info-comment'),
style : 'width: 200px;',
placeHolder : this.txtAddText,
validateOnBlur: false
}).on('changed:after', function(input, newValue, oldValue) {
if (newValue !== oldValue && me.coreProps && me.api) {
me.coreProps.asc_putDescription(me.inputComment.getValue());
me.api.asc_setCoreProps(me.coreProps);
}
}).on('keydown:before', keyDownBefore);
// modify info
@ -738,10 +729,6 @@ define([
idx = me.tblAuthor.find('tr').index(el);
el.remove();
me.authors.splice(idx, 1);
if (me.coreProps && me.api) {
me.coreProps.asc_putCreator(me.authors.join(';'));
me.api.asc_setCoreProps(me.coreProps);
}
}
});
@ -750,27 +737,31 @@ define([
style : 'width: 200px;',
validateOnBlur: false,
placeHolder: this.txtAddAuthor
}).on('changed:after', function(input, newValue, oldValue) {
}).on('changed:after', function(input, newValue, oldValue, e) {
if (newValue == oldValue) return;
var val = newValue.trim();
if (!!val && val !== oldValue.trim()) {
var isFromApply = e && e.relatedTarget && (e.relatedTarget.id == 'fminfo-btn-apply');
val.split(/\s*[,;]\s*/).forEach(function(item){
var str = item.trim();
if (str) {
var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(str)));
me.trAuthor.before(div);
me.authors.push(item);
if (!isFromApply) {
var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(str)));
me.trAuthor.before(div);
}
}
});
me.inputAuthor.setValue('');
if (me.coreProps && me.api) {
me.coreProps.asc_putCreator(me.authors.join(';'));
me.api.asc_setCoreProps(me.coreProps);
}
!isFromApply && me.inputAuthor.setValue('');
}
}).on('keydown:before', keyDownBefore);
this.btnApply = new Common.UI.Button({
el: '#fminfo-btn-apply'
});
this.btnApply.on('click', _.bind(this.applySettings, this));
this.rendered = true;
this.updateInfo(this.doc);
@ -877,6 +868,7 @@ define([
value = props.asc_getDescription();
this.inputComment.setValue(value || '');
this.inputAuthor.setValue('');
this.tblAuthor.find('tr:not(:last-of-type)').remove();
this.authors = [];
value = props.asc_getCreator();//"123\"\"\"\<\>,456";
@ -885,7 +877,9 @@ define([
me.trAuthor.before(div);
me.authors.push(item);
});
this.tblAuthor.find('.close').toggleClass('hidden', !this.mode.isEdit);
}
this.SetDisabled();
},
_ShowHideInfoItem: function(el, visible) {
@ -900,6 +894,11 @@ define([
},
setMode: function(mode) {
this.mode = mode;
this.inputAuthor.setVisible(mode.isEdit);
this.btnApply.setVisible(mode.isEdit);
this.tblAuthor.find('.close').toggleClass('hidden', !mode.isEdit);
this.SetDisabled();
return this;
},
@ -911,12 +910,30 @@ define([
},
onLockCore: function(lock) {
this.inputTitle.setDisabled(lock);
this.inputSubject.setDisabled(lock);
this.inputComment.setDisabled(lock);
this.inputAuthor.setDisabled(lock);
this.tblAuthor.find('.close').toggleClass('disabled', lock);
!lock && this.updateFileInfo();
this._locked = lock;
this.updateFileInfo();
},
SetDisabled: function() {
var disable = !this.mode.isEdit || this._locked;
this.inputTitle.setDisabled(disable);
this.inputSubject.setDisabled(disable);
this.inputComment.setDisabled(disable);
this.inputAuthor.setDisabled(disable);
this.tblAuthor.find('.close').toggleClass('disabled', this._locked);
this.tblAuthor.toggleClass('disabled', disable);
this.btnApply.setDisabled(this._locked);
},
applySettings: function() {
if (this.coreProps && this.api) {
this.coreProps.asc_putTitle(this.inputTitle.getValue());
this.coreProps.asc_putSubject(this.inputSubject.getValue());
this.coreProps.asc_putDescription(this.inputComment.getValue());
this.coreProps.asc_putCreator(this.authors.join(';'));
this.api.asc_setCoreProps(this.coreProps);
}
this.menu.hide();
},
txtPlacement: 'Location',
@ -933,7 +950,8 @@ define([
txtAuthor: 'Author',
txtAddAuthor: 'Add Author',
txtAddText: 'Add Text',
txtMinutes: 'min'
txtMinutes: 'min',
okButtonText: 'Apply'
}, PE.Views.FileMenuPanels.DocumentInfo || {}));
PE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({

View file

@ -151,40 +151,40 @@ require([
]
});
Common.Locale.apply();
require([
'presentationeditor/main/app/controller/Viewport',
'presentationeditor/main/app/controller/DocumentHolder',
'presentationeditor/main/app/controller/Toolbar',
'presentationeditor/main/app/controller/Statusbar',
'presentationeditor/main/app/controller/RightMenu',
'presentationeditor/main/app/controller/LeftMenu',
'presentationeditor/main/app/controller/Main',
'presentationeditor/main/app/view/FileMenuPanels',
'presentationeditor/main/app/view/ParagraphSettings',
'presentationeditor/main/app/view/ImageSettings',
'presentationeditor/main/app/view/ShapeSettings',
'presentationeditor/main/app/view/SlideSettings',
'presentationeditor/main/app/view/TableSettings',
'presentationeditor/main/app/view/TextArtSettings',
'presentationeditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts'
/** coauthoring begin **/
,'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat',
/** coauthoring end **/
'common/main/lib/controller/Plugins',
'presentationeditor/main/app/view/ChartSettings',
'common/main/lib/controller/ExternalDiagramEditor'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
window.compareVersions = true;
app.start();
Common.Locale.apply(function(){
require([
'presentationeditor/main/app/controller/Viewport',
'presentationeditor/main/app/controller/DocumentHolder',
'presentationeditor/main/app/controller/Toolbar',
'presentationeditor/main/app/controller/Statusbar',
'presentationeditor/main/app/controller/RightMenu',
'presentationeditor/main/app/controller/LeftMenu',
'presentationeditor/main/app/controller/Main',
'presentationeditor/main/app/view/FileMenuPanels',
'presentationeditor/main/app/view/ParagraphSettings',
'presentationeditor/main/app/view/ImageSettings',
'presentationeditor/main/app/view/ShapeSettings',
'presentationeditor/main/app/view/SlideSettings',
'presentationeditor/main/app/view/TableSettings',
'presentationeditor/main/app/view/TextArtSettings',
'presentationeditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts'
/** coauthoring begin **/
,'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat',
/** coauthoring end **/
'common/main/lib/controller/Plugins',
'presentationeditor/main/app/view/ChartSettings',
'common/main/lib/controller/ExternalDiagramEditor'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
window.compareVersions = true;
app.start();
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -586,6 +586,7 @@
"PE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"PE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"PE.Controllers.Main.errorFileSizeExceed": "The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.",
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
"PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
"PE.Controllers.Toolbar.textAccent": "Accents",
@ -1175,6 +1176,7 @@
"PE.Views.FileMenuPanels.DocumentInfo.txtSubject": "Subject",
"PE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Title",
"PE.Views.FileMenuPanels.DocumentInfo.txtUploaded": "Uploaded",
"PE.Views.FileMenuPanels.DocumentInfo.okButtonText": "Apply",
"PE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights",
"PE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights",
"PE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Warning",

View file

@ -208,7 +208,7 @@
"Common.Views.SelectFileDlg.textTitle": "Выбрать источник данных",
"Common.Views.SignDialog.cancelButtonText": "Отмена",
"Common.Views.SignDialog.okButtonText": "ОК",
"Common.Views.SignDialog.textBold": "Жирный",
"Common.Views.SignDialog.textBold": "Полужирный",
"Common.Views.SignDialog.textCertificate": "Сертификат",
"Common.Views.SignDialog.textChange": "Изменить",
"Common.Views.SignDialog.textInputName": "Введите имя подписывающего",
@ -1054,7 +1054,7 @@
"PE.Views.DocumentHolder.txtDeleteBreak": "Удалить принудительный разрыв",
"PE.Views.DocumentHolder.txtDeleteChars": "Удалить вложенные знаки",
"PE.Views.DocumentHolder.txtDeleteCharsAndSeparators": "Удалить вложенные знаки и разделители",
"PE.Views.DocumentHolder.txtDeleteEq": "Удалить формулу",
"PE.Views.DocumentHolder.txtDeleteEq": "Удалить уравнение",
"PE.Views.DocumentHolder.txtDeleteGroupChar": "Удалить символ",
"PE.Views.DocumentHolder.txtDeleteRadical": "Удалить радикал",
"PE.Views.DocumentHolder.txtDeleteSlide": "Удалить слайд",
@ -1085,8 +1085,8 @@
"PE.Views.DocumentHolder.txtInsertArgAfter": "Вставить аргумент после",
"PE.Views.DocumentHolder.txtInsertArgBefore": "Вставить аргумент перед",
"PE.Views.DocumentHolder.txtInsertBreak": "Вставить принудительный разрыв",
"PE.Views.DocumentHolder.txtInsertEqAfter": "Вставить формулу после",
"PE.Views.DocumentHolder.txtInsertEqBefore": "Вставить формулу перед",
"PE.Views.DocumentHolder.txtInsertEqAfter": "Вставить уравнение после",
"PE.Views.DocumentHolder.txtInsertEqBefore": "Вставить уравнение перед",
"PE.Views.DocumentHolder.txtKeepTextOnly": "Сохранить только текст",
"PE.Views.DocumentHolder.txtLimitChange": "Изменить положение пределов",
"PE.Views.DocumentHolder.txtLimitOver": "Предел над текстом",
@ -1719,7 +1719,7 @@
"PE.Views.Toolbar.textArrangeForward": "Перенести вперед",
"PE.Views.Toolbar.textArrangeFront": "Перенести на передний план",
"PE.Views.Toolbar.textBar": "Линейчатая",
"PE.Views.Toolbar.textBold": "Жирный",
"PE.Views.Toolbar.textBold": "Полужирный",
"PE.Views.Toolbar.textCancel": "Отмена",
"PE.Views.Toolbar.textCharts": "Диаграммы",
"PE.Views.Toolbar.textColumn": "Гистограмма",

View file

@ -153,8 +153,6 @@ require([
]
});
Common.Locale.apply();
var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link');
@ -193,36 +191,38 @@ require([
//Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'presentationeditor/mobile/app/controller/Editor',
'presentationeditor/mobile/app/controller/Toolbar',
'presentationeditor/mobile/app/controller/Search',
'presentationeditor/mobile/app/controller/Main',
'presentationeditor/mobile/app/controller/DocumentHolder',
'presentationeditor/mobile/app/controller/DocumentPreview',
'presentationeditor/mobile/app/controller/Settings',
'presentationeditor/mobile/app/controller/edit/EditContainer',
'presentationeditor/mobile/app/controller/edit/EditText',
'presentationeditor/mobile/app/controller/edit/EditTable',
'presentationeditor/mobile/app/controller/edit/EditImage',
'presentationeditor/mobile/app/controller/edit/EditShape',
'presentationeditor/mobile/app/controller/edit/EditSlide',
'presentationeditor/mobile/app/controller/edit/EditChart',
'presentationeditor/mobile/app/controller/edit/EditLink',
'presentationeditor/mobile/app/controller/add/AddContainer',
'presentationeditor/mobile/app/controller/add/AddTable',
'presentationeditor/mobile/app/controller/add/AddShape',
'presentationeditor/mobile/app/controller/add/AddImage',
'presentationeditor/mobile/app/controller/add/AddLink',
'presentationeditor/mobile/app/controller/add/AddSlide',
'common/mobile/lib/controller/Collaboration'
Common.Locale.apply(function(){
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'presentationeditor/mobile/app/controller/Editor',
'presentationeditor/mobile/app/controller/Toolbar',
'presentationeditor/mobile/app/controller/Search',
'presentationeditor/mobile/app/controller/Main',
'presentationeditor/mobile/app/controller/DocumentHolder',
'presentationeditor/mobile/app/controller/DocumentPreview',
'presentationeditor/mobile/app/controller/Settings',
'presentationeditor/mobile/app/controller/edit/EditContainer',
'presentationeditor/mobile/app/controller/edit/EditText',
'presentationeditor/mobile/app/controller/edit/EditTable',
'presentationeditor/mobile/app/controller/edit/EditImage',
'presentationeditor/mobile/app/controller/edit/EditShape',
'presentationeditor/mobile/app/controller/edit/EditSlide',
'presentationeditor/mobile/app/controller/edit/EditChart',
'presentationeditor/mobile/app/controller/edit/EditLink',
'presentationeditor/mobile/app/controller/add/AddContainer',
'presentationeditor/mobile/app/controller/add/AddTable',
'presentationeditor/mobile/app/controller/add/AddShape',
'presentationeditor/mobile/app/controller/add/AddImage',
'presentationeditor/mobile/app/controller/add/AddLink',
'presentationeditor/mobile/app/controller/add/AddSlide',
'common/mobile/lib/controller/Collaboration'
], function() {
window.compareVersions = true;
app.start();
], function() {
window.compareVersions = true;
app.start();
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -164,8 +164,6 @@ require([
]
});
Common.Locale.apply();
var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link');
@ -204,34 +202,36 @@ require([
//Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'presentationeditor/mobile/app/controller/Editor',
'presentationeditor/mobile/app/controller/Toolbar',
'presentationeditor/mobile/app/controller/Search',
'presentationeditor/mobile/app/controller/Main',
'presentationeditor/mobile/app/controller/DocumentHolder',
'presentationeditor/mobile/app/controller/DocumentPreview',
'presentationeditor/mobile/app/controller/Settings',
'presentationeditor/mobile/app/controller/edit/EditContainer',
'presentationeditor/mobile/app/controller/edit/EditText',
'presentationeditor/mobile/app/controller/edit/EditTable',
'presentationeditor/mobile/app/controller/edit/EditImage',
'presentationeditor/mobile/app/controller/edit/EditShape',
'presentationeditor/mobile/app/controller/edit/EditSlide',
'presentationeditor/mobile/app/controller/edit/EditChart',
'presentationeditor/mobile/app/controller/edit/EditLink',
'presentationeditor/mobile/app/controller/add/AddContainer',
'presentationeditor/mobile/app/controller/add/AddTable',
'presentationeditor/mobile/app/controller/add/AddShape',
'presentationeditor/mobile/app/controller/add/AddImage',
'presentationeditor/mobile/app/controller/add/AddLink',
'presentationeditor/mobile/app/controller/add/AddSlide',
'common/mobile/lib/controller/Collaboration'
], function() {
app.start();
Common.Locale.apply(function(){
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'presentationeditor/mobile/app/controller/Editor',
'presentationeditor/mobile/app/controller/Toolbar',
'presentationeditor/mobile/app/controller/Search',
'presentationeditor/mobile/app/controller/Main',
'presentationeditor/mobile/app/controller/DocumentHolder',
'presentationeditor/mobile/app/controller/DocumentPreview',
'presentationeditor/mobile/app/controller/Settings',
'presentationeditor/mobile/app/controller/edit/EditContainer',
'presentationeditor/mobile/app/controller/edit/EditText',
'presentationeditor/mobile/app/controller/edit/EditTable',
'presentationeditor/mobile/app/controller/edit/EditImage',
'presentationeditor/mobile/app/controller/edit/EditShape',
'presentationeditor/mobile/app/controller/edit/EditSlide',
'presentationeditor/mobile/app/controller/edit/EditChart',
'presentationeditor/mobile/app/controller/edit/EditLink',
'presentationeditor/mobile/app/controller/add/AddContainer',
'presentationeditor/mobile/app/controller/add/AddTable',
'presentationeditor/mobile/app/controller/add/AddShape',
'presentationeditor/mobile/app/controller/add/AddImage',
'presentationeditor/mobile/app/controller/add/AddLink',
'presentationeditor/mobile/app/controller/add/AddSlide',
'common/mobile/lib/controller/Collaboration'
], function() {
app.start();
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -500,7 +500,8 @@ define([
var zf = (value!==null) ? parseInt(value) : (me.appOptions.customization && me.appOptions.customization.zoom ? parseInt(me.appOptions.customization.zoom) : -1);
(zf == -1) ? me.api.zoomFitToPage() : ((zf == -2) ? me.api.zoomFitToWidth() : me.api.zoom(zf>0 ? zf : 100));
value = Common.localStorage.getBool("pe-mobile-spellcheck", false);
value = Common.localStorage.getBool("pe-mobile-spellcheck", !(this.appOptions.customization && this.appOptions.customization.spellcheck===false));
Common.Utils.InternalSettings.set("pe-mobile-spellcheck", value);
me.api.asc_setSpellCheck(value);
me.api.asc_registerCallback('asc_onStartAction', _.bind(me.onLongActionBegin, me));
@ -885,6 +886,10 @@ define([
config.msg = this.errorEditingDownloadas;
break;
case Asc.c_oAscError.ID.ConvertationOpenLimitError:
config.msg = this.errorFileSizeExceed;
break;
default:
config.msg = this.errorDefaultMessage.replace('%1', id);
break;
@ -1392,7 +1397,8 @@ define([
errorEditingDownloadas: 'An error occurred during the work with the document.<br>Use the \'Download\' option to save the file backup copy to your computer hard drive.',
textPaidFeature: 'Paid feature',
textCustomLoader: 'Please note that according to the terms of the license you are not entitled to change the loader.<br>Please contact our Sales Department to get a quote.',
waitText: 'Please, wait...'
waitText: 'Please, wait...',
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.'
}
})(), PE.Controllers.Main || {}))
});

View file

@ -156,7 +156,7 @@ define([
onPageShow: function(view, pageId) {
var me = this;
$('#settings-spellcheck input:checkbox').attr('checked', Common.localStorage.getBool("pe-mobile-spellcheck", false));
$('#settings-spellcheck input:checkbox').attr('checked', Common.Utils.InternalSettings.get("pe-mobile-spellcheck"));
$('#settings-search').single('click', _.bind(me._onSearch, me));
$('#settings-readermode input:checkbox').single('change', _.bind(me._onReaderMode, me));
$('#settings-spellcheck input:checkbox').single('change', _.bind(me._onSpellcheck, me));
@ -357,6 +357,7 @@ define([
var $checkbox = $(e.currentTarget),
state = $checkbox.is(':checked');
Common.localStorage.setItem("pe-mobile-spellcheck", state ? 1 : 0);
Common.Utils.InternalSettings.set("pe-mobile-spellcheck", state);
this.api && this.api.asc_setSpellCheck(state);
},

View file

@ -223,6 +223,7 @@
"PE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"PE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"PE.Controllers.Main.errorFileSizeExceed": "The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.",
"PE.Controllers.Search.textNoTextFound": "Text not Found",
"PE.Controllers.Search.textReplaceAll": "Replace All",
"PE.Controllers.Settings.notcriticalErrorTitle": "Warning",

View file

@ -140,7 +140,7 @@
<!-- debug begin -->
<script type="text/javascript">var less=less||{};less.env='development';</script>
<script src="../../../vendor/less/dist/less-1.5.1.js" type="text/javascript"></script>
<script src="../../../vendor/less/dist/less-2.7.1.js" type="text/javascript"></script>
<!-- debug end -->
<script>
@ -256,6 +256,13 @@
<script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script>
<script type="text/javascript" src="../../../vendor/jszip-utils/jszip-utils.min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<script type="text/javascript" src="../sdk_dev_scripts.js"></script>
<script>
window.sdk_dev_scrpipts.forEach(function(item){

View file

@ -240,14 +240,19 @@
<!--vendor-->
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/underscore/underscore-min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script>
<script type="text/javascript" src="../../../vendor/jszip-utils/jszip-utils.min.js"></script>
<script src="../../../vendor/requirejs/require.js"></script>
<script>
require.config({
baseUrl: '../../'
});
</script>
<!--sdk-->
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/>
<script type="text/javascript" src="../../../../sdkjs/common/AllFonts.js"></script>

View file

@ -406,6 +406,10 @@ SSE.ApplicationController = new(function(){
message = me.errorUserDrop;
break;
case Asc.c_oAscError.ID.ConvertationOpenLimitError:
message = me.errorFileSizeExceed;
break;
default:
message = me.errorDefaultMessage.replace('%1', id);
break;
@ -417,7 +421,7 @@ SSE.ApplicationController = new(function(){
Common.Gateway.reportError(id, message);
$('#id-critical-error-title').text(me.criticalErrorTitle);
$('#id-critical-error-message').text(message);
$('#id-critical-error-message').html(message);
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
window.location.reload();
});
@ -426,7 +430,7 @@ SSE.ApplicationController = new(function(){
Common.Gateway.reportWarning(id, message);
$('#id-critical-error-title').text(me.notcriticalErrorTitle);
$('#id-critical-error-message').text(message);
$('#id-critical-error-message').html(message);
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
$('#id-critical-error-dialog').modal('hide');
});
@ -571,6 +575,7 @@ SSE.ApplicationController = new(function(){
downloadTextText: 'Downloading spreadsheet...',
waitText: 'Please, wait...',
textLoadingDocument: 'Loading spreadsheet',
txtClose: 'Close'
txtClose: 'Close',
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.'
}
})();

View file

@ -33,9 +33,10 @@
(function ($) {
$(function(){
Common.Locale.apply();
SSE.ApplicationView.create();
SSE.ApplicationController.create();
Common.Locale.apply(function() {
SSE.ApplicationView.create();
SSE.ApplicationController.create();
});
})
})(window.jQuery);

View file

@ -12,6 +12,7 @@
"SSE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.",
"SSE.ApplicationController.errorDefaultMessage": "Error code: %1",
"SSE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.",
"SSE.ApplicationController.errorFileSizeExceed": "The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.",
"SSE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.",
"SSE.ApplicationController.notcriticalErrorTitle": "Warning",
"SSE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.",

View file

@ -167,42 +167,42 @@ require([
]
});
Common.Locale.apply();
require([
'spreadsheeteditor/main/app/controller/Viewport',
'spreadsheeteditor/main/app/controller/DocumentHolder',
'spreadsheeteditor/main/app/controller/CellEditor',
'spreadsheeteditor/main/app/controller/Toolbar',
'spreadsheeteditor/main/app/controller/Statusbar',
'spreadsheeteditor/main/app/controller/Spellcheck',
'spreadsheeteditor/main/app/controller/RightMenu',
'spreadsheeteditor/main/app/controller/LeftMenu',
'spreadsheeteditor/main/app/controller/Main',
'spreadsheeteditor/main/app/controller/Print',
'spreadsheeteditor/main/app/controller/PivotTable',
'spreadsheeteditor/main/app/controller/DataTab',
'spreadsheeteditor/main/app/view/FileMenuPanels',
'spreadsheeteditor/main/app/view/ParagraphSettings',
'spreadsheeteditor/main/app/view/ImageSettings',
'spreadsheeteditor/main/app/view/ChartSettings',
'spreadsheeteditor/main/app/view/ShapeSettings',
'spreadsheeteditor/main/app/view/TextArtSettings',
'spreadsheeteditor/main/app/view/PivotSettings',
'spreadsheeteditor/main/app/view/FieldSettingsDialog',
'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog',
'spreadsheeteditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts',
'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat',
'common/main/lib/controller/Plugins'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
app.start();
Common.Locale.apply(function(){
require([
'spreadsheeteditor/main/app/controller/Viewport',
'spreadsheeteditor/main/app/controller/DocumentHolder',
'spreadsheeteditor/main/app/controller/CellEditor',
'spreadsheeteditor/main/app/controller/Toolbar',
'spreadsheeteditor/main/app/controller/Statusbar',
'spreadsheeteditor/main/app/controller/Spellcheck',
'spreadsheeteditor/main/app/controller/RightMenu',
'spreadsheeteditor/main/app/controller/LeftMenu',
'spreadsheeteditor/main/app/controller/Main',
'spreadsheeteditor/main/app/controller/Print',
'spreadsheeteditor/main/app/controller/PivotTable',
'spreadsheeteditor/main/app/controller/DataTab',
'spreadsheeteditor/main/app/view/FileMenuPanels',
'spreadsheeteditor/main/app/view/ParagraphSettings',
'spreadsheeteditor/main/app/view/ImageSettings',
'spreadsheeteditor/main/app/view/ChartSettings',
'spreadsheeteditor/main/app/view/ShapeSettings',
'spreadsheeteditor/main/app/view/TextArtSettings',
'spreadsheeteditor/main/app/view/PivotSettings',
'spreadsheeteditor/main/app/view/FieldSettingsDialog',
'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog',
'spreadsheeteditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts',
'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat',
'common/main/lib/controller/Plugins'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
app.start();
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -56,18 +56,6 @@ define([
sdkViewName : '#id_main',
initialize: function () {
this.addListeners({
'DataTab': {
'data:group': this.onGroup,
'data:ungroup': this.onUngroup,
'data:tocolumns': this.onTextToColumn,
'data:show': this.onShowClick,
'data:hide': this.onHideClick,
'data:groupsettings': this.onGroupSettings
}
});
this._state = {
CSVOptions: new Asc.asc_CTextOptions(0, 4, '')
};
@ -91,6 +79,19 @@ define([
this.view = this.createView('DataTab', {
toolbar: this.toolbar.toolbar
});
this.addListeners({
'DataTab': {
'data:group': this.onGroup,
'data:ungroup': this.onUngroup,
'data:tocolumns': this.onTextToColumn,
'data:show': this.onShowClick,
'data:hide': this.onHideClick,
'data:groupsettings': this.onGroupSettings
},
'Statusbar': {
'sheet:changed': this.onApiSheetChanged
}
});
},
SetDisabled: function(state) {
@ -217,6 +218,13 @@ define([
}
},
onApiSheetChanged: function() {
if (!this.toolbar.mode || !this.toolbar.mode.isEdit || this.toolbar.mode.isEditDiagram || this.toolbar.mode.isEditMailMerge) return;
var currentSheet = this.api.asc_getActiveWorksheetIndex();
this.onWorksheetLocked(currentSheet, this.api.asc_isWorksheetLockedOrDeleted(currentSheet));
},
textWizard: 'Text to Columns Wizard'
}, SSE.Controllers.DataTab || {}));

View file

@ -80,7 +80,8 @@ define([
}
},
'FormulaTab': {
'function:apply': this.applyFunction
'function:apply': this.applyFunction,
'function:calculate': this.onCalculate
},
'Toolbar': {
'function:apply': this.applyFunction,
@ -353,6 +354,13 @@ define([
}
},
onCalculate: function(calc) {
var type = calc.type;
if (type === Asc.c_oAscCalculateType.All || type === Asc.c_oAscCalculateType.ActiveSheet) {
this.api && this.api.asc_calculate(type);
}
},
sCategoryAll: 'All',
sCategoryLast10: '10 last used',
sCategoryLogical: 'Logical',

View file

@ -213,9 +213,11 @@ define([
$(document.body).on('blur', 'input, textarea', function(e) {
if (me.isAppDisabled === true || me.isFrameClosed) return;
if ((!me.isModalShowed || $('.asc-window.enable-key-events:visible').length>0) && !(me.loadMask && me.loadMask.isVisible()) && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) {
if ((!me.isModalShowed || $('.asc-window.enable-key-events:visible').length>0) && !(me.loadMask && me.loadMask.isVisible())) {
if (/form-control/.test(e.target.className))
me.inFormControl = false;
if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible())
return;
if (!e.relatedTarget ||
!/area_id/.test(e.target.id)
&& !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */
@ -391,7 +393,7 @@ define([
docInfo.put_Token(data.doc.token);
docInfo.put_Permissions(_permissions);
this.headerView.setDocumentCaption(data.doc.title);
this.headerView && this.headerView.setDocumentCaption(data.doc.title);
}
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
@ -507,7 +509,7 @@ define([
var action = {id: id, type: type};
this.stackLongActions.pop(action);
this.headerView.setDocumentCaption(this.api.asc_getDocumentName());
this.headerView && this.headerView.setDocumentCaption(this.api.asc_getDocumentName());
this.updateWindowTitle(this.api.asc_isDocumentModified(), true);
if (type === Asc.c_oAscAsyncActionType.BlockInteraction && id == Asc.c_oAscAsyncAction.Open) {
@ -1398,6 +1400,10 @@ define([
config.maxwidth = 600;
break;
case Asc.c_oAscError.ID.ConvertationOpenLimitError:
config.msg = this.errorFileSizeExceed;
break;
default:
config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id);
break;
@ -1491,30 +1497,31 @@ define([
updateWindowTitle: function(change, force) {
if (this._state.isDocModified !== change || force) {
var title = this.defaultTitleText;
if (this.headerView) {
var title = this.defaultTitleText;
if (!_.isEmpty(this.headerView.getDocumentCaption()))
title = this.headerView.getDocumentCaption() + ' - ' + title;
if (!_.isEmpty(this.headerView.getDocumentCaption()))
title = this.headerView.getDocumentCaption() + ' - ' + title;
if (change) {
clearTimeout(this._state.timerCaption);
if (!_.isUndefined(title)) {
title = '* ' + title;
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), true);
if (change) {
clearTimeout(this._state.timerCaption);
if (!_.isUndefined(title)) {
title = '* ' + title;
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), true);
}
} else {
if (this._state.fastCoauth && this._state.usersCount>1) {
var me = this;
this._state.timerCaption = setTimeout(function () {
me.headerView.setDocumentCaption(me.headerView.getDocumentCaption(), false);
}, 500);
} else
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), false);
}
} else {
if (this._state.fastCoauth && this._state.usersCount>1) {
var me = this;
this._state.timerCaption = setTimeout(function () {
me.headerView.setDocumentCaption(me.headerView.getDocumentCaption(), false);
}, 500);
} else
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), false);
if (window.document.title != title)
window.document.title = title;
}
if (window.document.title != title)
window.document.title = title;
Common.Gateway.setDocumentModified(change);
this._state.isDocModified = change;
@ -2425,7 +2432,8 @@ define([
txtDate: 'Date',
txtTime: 'Time',
txtTab: 'Tab',
txtFile: 'File'
txtFile: 'File',
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.'
}
})(), SSE.Controllers.Main || {}))
});

View file

@ -138,15 +138,13 @@ define([
if (item)
panel.cmbPaperSize.setValue(item.get('value'));
else
panel.cmbPaperSize.setValue('Custom (' + parseFloat(Common.Utils.Metric.fnRecalcFromMM(w).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ' x ' +
panel.cmbPaperSize.setValue(this.txtCustom + ' (' + parseFloat(Common.Utils.Metric.fnRecalcFromMM(w).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ' x ' +
parseFloat(Common.Utils.Metric.fnRecalcFromMM(h).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ')');
var fitwidth = opt.asc_getFitToWidth(),
fitheight = opt.asc_getFitToHeight();
if (!fitwidth && !fitheight) panel.cmbLayout.setValue(0);
else if (fitwidth && fitheight) panel.cmbLayout.setValue(1);
else if (fitwidth && !fitheight) panel.cmbLayout.setValue(2);
else panel.cmbLayout.setValue(3);
fitheight = opt.asc_getFitToHeight(),
fitscale = opt.asc_getScale();
this.setScaling(panel, fitwidth, fitheight, fitscale);
item = panel.cmbPaperOrientation.store.findWhere({value: opt.asc_getOrientation()});
if (item) panel.cmbPaperOrientation.setValue(item.get('value'));
@ -194,9 +192,17 @@ define([
opt.asc_setHeight(pageh? parseFloat(pageh[0]) : (this._originalPageSettings ? this._originalPageSettings.asc_getHeight() : undefined));
var value = panel.cmbLayout.getValue();
opt.asc_setFitToWidth(value==1 || value==2);
opt.asc_setFitToHeight(value==1 || value==3);
if (value !== 4) {
var fitToWidth = (value==1 || value==2) ? 1 : 0,
fitToHeight = (value==1 || value==3) ? 1 : 0;
opt.asc_setFitToWidth(fitToWidth);
opt.asc_setFitToHeight(fitToHeight);
!fitToWidth && !fitToHeight && opt.asc_setScale(100);
} else {
opt.asc_setFitToWidth(this.fitWidth);
opt.asc_setFitToHeight(this.fitHeight);
opt.asc_setScale(this.fitScale);
}
props.asc_setPageSetup(opt);
opt = new Asc.asc_CPageMargins();
@ -339,7 +345,7 @@ define([
registerControlEvents: function(panel) {
panel.cmbPaperSize.on('selected', _.bind(this.propertyChange, this, panel));
panel.cmbPaperOrientation.on('selected', _.bind(this.propertyChange, this, panel));
panel.cmbLayout.on('selected', _.bind(this.propertyChange, this, panel));
panel.cmbLayout.on('selected', _.bind(this.propertyChange, this, panel, 'scale'));
panel.spnMarginTop.on('change', _.bind(this.propertyChange, this, panel));
panel.spnMarginBottom.on('change', _.bind(this.propertyChange, this, panel));
panel.spnMarginLeft.on('change', _.bind(this.propertyChange, this, panel));
@ -348,9 +354,40 @@ define([
panel.chPrintRows.on('change', _.bind(this.propertyChange, this, panel));
},
propertyChange: function(panel) {
if (this._changedProps) {
this._changedProps[panel.cmbSheet.getValue()] = this.getPageOptions(panel);
propertyChange: function(panel, scale, combo, record) {
if (scale === 'scale' && record.value === 4) {
var me = this,
props = (me._changedProps.length > 0 && me._changedProps[panel.cmbSheet.getValue()]) ? me._changedProps[panel.cmbSheet.getValue()] : me.api.asc_getPageOptions(panel.cmbSheet.getValue());
var win = new SSE.Views.ScaleDialog({
api: me.api,
props: props,
handler: function(dlg, result) {
if (dlg == 'ok') {
if (me.api && result) {
me.fitWidth = result.width;
me.fitHeight = result.height;
me.fitScale = result.scale;
me.setScaling(panel, me.fitWidth, me.fitHeight, me.fitScale);
if (me._changedProps) {
me._changedProps[panel.cmbSheet.getValue()] = me.getPageOptions(panel);
}
}
} else {
var opt = props.asc_getPageSetup(),
fitwidth = opt.asc_getFitToWidth(),
fitheight = opt.asc_getFitToHeight(),
fitscale = opt.asc_getScale();
me.setScaling(panel, fitwidth, fitheight, fitscale);
}
Common.NotificationCenter.trigger('edit:complete');
}
});
win.show();
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
} else {
if (this._changedProps) {
this._changedProps[panel.cmbSheet.getValue()] = this.getPageOptions(panel);
}
}
},
@ -358,6 +395,14 @@ define([
return this.adjPrintParams;
},
setScaling: function (panel, width, height, scale) {
if (!width && !height && scale === 100) panel.cmbLayout.setValue(0, true);
else if (width === 1 && height === 1) panel.cmbLayout.setValue(1, true);
else if (width === 1 && !height) panel.cmbLayout.setValue(2, true);
else if (!width && height === 1) panel.cmbLayout.setValue(3, true);
else panel.cmbLayout.setValue(4, true);
},
warnCheckMargings: 'Margins are incorrect',
strAllSheets: 'All Sheets',
textWarning: 'Warning',

View file

@ -103,6 +103,7 @@ define([
if (this.api) {
this.api.asc_nextWord();
}
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
},
onDictionary: function() {
@ -172,6 +173,7 @@ define([
this.api.asc_setDefaultLanguage(lang);
Common.localStorage.setItem("sse-spellcheck-locale", this.panelSpellcheck.cmbDictionaryLanguage.getValue());
}
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
},
onClickChange: function (btn, e) {
@ -179,6 +181,7 @@ define([
var rec = this.panelSpellcheck.suggestionList.getSelectedRec();
rec && this.api.asc_replaceMisspelledWord(rec.get('value'), this._currentSpellObj);
}
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
},
onClickChangeMenu: function (menu, item) {
@ -190,12 +193,14 @@ define([
rec && this.api.asc_replaceMisspelledWord(rec.get('value'), this._currentSpellObj, true);
}
}
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
},
onClickIgnore: function () {
if (this.api) {
this.api.asc_ignoreMisspelledWord(this._currentSpellObj, false)
}
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
},
onClickIgnoreMenu: function (menu, item) {
@ -206,6 +211,7 @@ define([
this.api.asc_ignoreMisspelledWord(this._currentSpellObj, true);
}
}
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
},
onSpellCheckVariantsFound: function (property) {

View file

@ -55,7 +55,8 @@ define([
'spreadsheeteditor/main/app/view/NameManagerDlg',
'spreadsheeteditor/main/app/view/FormatSettingsDialog',
'spreadsheeteditor/main/app/view/PageMarginsDialog',
'spreadsheeteditor/main/app/view/HeaderFooterDialog'
'spreadsheeteditor/main/app/view/HeaderFooterDialog',
'spreadsheeteditor/main/app/view/ScaleDialog'
], function () { 'use strict';
SSE.Controllers.Toolbar = Backbone.Controller.extend(_.extend({
@ -72,7 +73,9 @@ define([
'Toolbar': {
'change:compact': this.onClickChangeCompact.bind(me),
'add:chart' : this.onSelectChart,
'insert:textart': this.onInsertTextart
'insert:textart': this.onInsertTextart,
'change:scalespn': this.onClickChangeScaleInMenu.bind(me),
'click:customscale': this.onScaleClick.bind(me)
},
'FileMenu': {
'menu:hide': me.onFileMenu.bind(me, 'hide'),
@ -359,6 +362,7 @@ define([
toolbar.btnPageOrient.menu.on('item:click', _.bind(this.onPageOrientSelect, this));
toolbar.btnPageMargins.menu.on('item:click', _.bind(this.onPageMarginsSelect, this));
toolbar.mnuPageSize.on('item:click', _.bind(this.onPageSizeClick, this));
toolbar.mnuScale.on('item:click', _.bind(this.onScaleClick, this));
toolbar.btnPrintArea.menu.on('item:click', _.bind(this.onPrintAreaClick, this));
toolbar.btnPrintArea.menu.on('show:after', _.bind(this.onPrintAreaMenuOpen, this));
toolbar.btnImgGroup.menu.on('item:click', _.bind(this.onImgGroupSelect, this));
@ -367,7 +371,10 @@ define([
toolbar.btnImgAlign.menu.on('item:click', _.bind(this.onImgAlignSelect, this));
toolbar.btnImgForward.on('click', this.onImgArrangeSelect.bind(this, 'forward'));
toolbar.btnImgBackward.on('click', this.onImgArrangeSelect.bind(this, 'backward'));
toolbar.btnEditHeader.on('click', _.bind(this.onEditHeaderClick, this));
toolbar.btnsEditHeader.forEach(function(button) {
button.on('click', _.bind(me.onEditHeaderClick, me));
});
Common.Gateway.on('insertimage', _.bind(this.insertImage, this));
this.onSetupCopyStyleButton();
@ -833,6 +840,7 @@ define([
},
onInsertImageMenu: function(menu, item, e) {
var me = this;
if (item.value === 'file') {
this.toolbar.fireEvent('insertimage', this.toolbar);
@ -842,8 +850,6 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
Common.component.Analytics.trackEvent('ToolBar', 'Image');
} else if (item.value === 'url') {
var me = this;
(new Common.Views.ImageFromUrlDialog({
handler: function(result, value) {
if (result == 'ok') {
@ -1768,6 +1774,7 @@ define([
this.onApiPageOrient(opt.asc_getOrientation());
this.onApiPageSize(opt.asc_getWidth(), opt.asc_getHeight());
this.onApiPageMargins(props.asc_getPageMargins());
this.onChangeScaleSettings(opt.asc_getFitToWidth(),opt.asc_getFitToHeight(),opt.asc_getScale());
this.api.asc_isLayoutLocked(currentSheet) ? this.onApiLockDocumentProps(currentSheet) : this.onApiUnLockDocumentProps(currentSheet);
this.toolbar.lockToolbar(SSE.enumLock.printAreaLock, this.api.asc_isPrintAreaLocked(currentSheet), {array: [this.toolbar.btnPrintArea]});
@ -1830,16 +1837,47 @@ define([
}
},
onChangeScaleSettings: function(width, height, scale) {
var me = this;
if (this.toolbar.btnScale.menu) {
this.toolbar.btnScale.menu.clearAll();
if (width !== undefined) {
if ((width === 0 || width === null) && (height === 0 || height === null) && scale === 100) {
this._state.scale = 0;
} else if (width === 1 && height === 1) {
this._state.scale = 1;
} else if (width === 1 && (height === 0 || height === null)) {
this._state.scale = 2;
} else if ((width === 0 || width === null) && height === 1) {
this._state.scale = 3;
} else if ((width === 0 || width === null) && (height === 0 || height === null)) {
this._state.scale = 4;
} else {
this._state.scale = 5;
}
this.toolbar.setValueCustomScale(scale);
} else if (scale === undefined) {
this.toolbar.setValueCustomScale(this.api.asc_getPageOptions().asc_getPageSetup().asc_getScale());
}
_.each(this.toolbar.btnScale.menu.items, function(item){
if (item.value === me._state.scale) {
item.setChecked(true);
return false;
}
}, this);
}
},
onApiLockDocumentProps: function(nIndex) {
if (this._state.lock_doc!==true && nIndex == this.api.asc_getActiveWorksheetIndex()) {
this.toolbar.lockToolbar(SSE.enumLock.docPropsLock, true, {array: [this.toolbar.btnPageSize, this.toolbar.btnPageMargins, this.toolbar.btnPageOrient]});
this.toolbar.lockToolbar(SSE.enumLock.docPropsLock, true, {array: [this.toolbar.btnPageSize, this.toolbar.btnPageMargins, this.toolbar.btnPageOrient, this.toolbar.btnScale]});
this._state.lock_doc = true;
}
},
onApiUnLockDocumentProps: function(nIndex) {
if (this._state.lock_doc!==false && nIndex == this.api.asc_getActiveWorksheetIndex()) {
this.toolbar.lockToolbar(SSE.enumLock.docPropsLock, false, {array: [this.toolbar.btnPageSize, this.toolbar.btnPageMargins, this.toolbar.btnPageOrient]});
this.toolbar.lockToolbar(SSE.enumLock.docPropsLock, false, {array: [this.toolbar.btnPageSize, this.toolbar.btnPageMargins, this.toolbar.btnPageOrient, this.toolbar.btnScale]});
this._state.lock_doc = false;
}
},
@ -2355,7 +2393,7 @@ define([
toolbar.lockToolbar(SSE.enumLock.commentLock, (selectionType == Asc.c_oAscSelectionType.RangeCells) && (info.asc_getComments().length>0 || info.asc_getLocked()),
{ array: this.btnsComment });
toolbar.lockToolbar(SSE.enumLock.headerLock, info.asc_getLockedHeaderFooter(), {array: [this.toolbar.btnEditHeader]});
toolbar.lockToolbar(SSE.enumLock.headerLock, info.asc_getLockedHeaderFooter(), {array: this.toolbar.btnsEditHeader});
},
onApiSelectionChanged_DiagramEditor: function(info) {
@ -3321,6 +3359,81 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
},
onClickChangeScaleInMenu: function(type, curScale) {
if (this.api) {
var scale;
if (type === 'up') {
if (curScale % 5 > 0.001) {
scale = Math.ceil(curScale / 5) * 5;
} else {
scale = curScale + 5;
}
} else {
if (curScale % 5 > 0.001) {
scale = Math.floor(curScale / 5) * 5;
} else {
scale = curScale - 5;
}
}
if (scale > 400) {
scale = 400;
} else if (scale < 10) {
scale = 10;
}
this.onChangeScaleSettings(0, 0, scale);
}
},
onScaleClick: function(menu, item, event, scale) {
var me = this;
if (me.api) {
if (scale !== undefined) {
me.api.asc_SetPrintScale(0, 0, scale);
me._state.scale = 4;
} else {
switch (item.value) {
case 0:
me.api.asc_SetPrintScale(0, 0, 100);
me._state.scale = 0;
break;
case 1:
me.api.asc_SetPrintScale(1, 1, 100);
me._state.scale = 1;
break;
case 2:
me.api.asc_SetPrintScale(1, 0, 100);
me._state.scale = 2;
break;
case 3:
me.api.asc_SetPrintScale(0, 1, 100);
me._state.scale = 3;
break;
case 5:
var win = new SSE.Views.ScaleDialog({
api: me.api,
props: null,
handler: function (dlg, result) {
if (dlg == 'ok') {
if (me.api && result) {
me.api.asc_SetPrintScale(result.width, result.height, result.scale);
me.onChangeScaleSettings(result.width, result.height, result.scale);
}
me._state.scale = 5;
} else {
me.onChangeScaleSettings();
}
Common.NotificationCenter.trigger('edit:complete');
}
});
win.show();
break;
}
}
}
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
},
textEmptyImgUrl : 'You need to specify image URL.',
warnMergeLostData : 'Operation can destroy data in the selected cells.<br>Continue?',
textWarning : 'Warning',

View file

@ -1,4 +1,66 @@
<table cols="2">
<tr>
<td>
<label class="header"><%= scope.textFill %></label>
</td>
</tr>
<tr>
<td class="padding-small">
<div id="cell-combo-fill-src" style="width: 100%;"></div>
</td>
</tr>
<tr>
<td>
<div id="cell-panel-color-fill" class="padding-small" style="width: 100%;">
<div id="cell-back-color-btn" style=""></div>
</div>
<div id="cell-panel-pattern-fill" class="settings-hidden padding-small" style="width: 100%;">
<label class="input-label" style="margin-top: 3px;"><%= scope.textPattern %></label>
<div id="cell-combo-pattern" style="width: 100%; height: 42px; margin-bottom: 8px;"></div>
<div style="width: 100%; height: 25px; margin-bottom: 8px;">
<label class="input-label" style="margin-top: 3px;"><%= scope.textForeground %></label>
<div id="cell-foreground-color-btn" style="display: inline-block; float:right;"></div>
</div>
<div style="width: 100%; height: 25px;">
<label class="input-label" style="margin-top: 3px;"><%= scope.textBackground %></label>
<div id="cell-background-color-btn" style="display: inline-block; float:right;"></div>
</div>
</div>
<div id="cell-panel-gradient-fill" class="settings-hidden padding-small" style="width: 100%;">
<div style="height:80px;">
<div style="display: inline-block;">
<label class="input-label" style=""><%= scope.textStyle %></label>
<div id="cell-combo-grad-type" style="width: 90px;"></div>
</div>
<div style="display: inline-block;float: right;">
<label class="input-label" style=""><%= scope.textDirection %></label>
<div id="cell-button-direction" style=""></div>
</div>
</div>
<div style="height: 28px;">
<div style="display: inline-block;">
<label class="input-label" style="width: 90px; padding-top: 3px;"><%= scope.textColor1 %></label>
</div>
<div style="display: inline-block;float: right;">
<div id="cell-grad-btn-color-1" style=""></div>
</div>
</div>
<div style="height: 28px;">
<div style="display: inline-block;">
<label class="input-label" style="width: 90px; padding-top: 3px;"><%= scope.textColor2 %></label>
</div>
<div style="display: inline-block;float: right;">
<div id="cell-grad-btn-color-2" style=""></div>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td class="padding-small" colspan=2>
<div class="separator horizontal"></div>
</td>
</tr>
<tr>
<td colspan=2 class="padding-small">
<label class="header"><%= scope.textBorders %></label>
@ -38,12 +100,6 @@
<div id="cell-button-border-bottom" style="display: inline-block;"></div>
</td>
</tr>
<tr>
<td class="padding-small" colspan=2 align="right">
<label class="input-label" style="margin-right: 5px;"><%= scope.textBackColor %></label>
<div id="cell-back-color-btn" style="display: inline-block;text-align:left;"></div>
</td>
</tr>
<tr>
<td class="padding-small" colspan=2>
<div class="separator horizontal"></div>

View file

@ -136,6 +136,10 @@
<span class="btn-slot text x-huge" id="slot-btn-inshyperlink"></span>
</div>
<div class="separator long"></div>
<div class="group">
<span class="btn-slot text x-huge slot-editheader"></span>
</div>
<div class="separator long"></div>
<div class="group">
<span class="btn-slot text x-huge" id="slot-btn-insequation"></span>
</div>
@ -146,7 +150,8 @@
<span class="btn-slot text x-huge" id="slot-btn-pageorient"></span>
<span class="btn-slot text x-huge" id="slot-btn-pagesize"></span>
<span class="btn-slot text x-huge" id="slot-btn-printarea"></span>
<span class="btn-slot text x-huge" id="slot-btn-editheader"></span>
<span class="btn-slot text x-huge slot-editheader"></span>
<span class="btn-slot text x-huge" id="slot-btn-scale"></span>
</div>
<div class="separator long"></div>
<div class="group">
@ -172,6 +177,10 @@
<span class="btn-slot text x-huge" id="slot-btn-math"></span>
<span class="btn-slot text x-huge" id="slot-btn-more"></span>
</div>
<div class="separator long"></div>
<div class="group">
<span class="btn-slot text x-huge" id="slot-btn-calculate"></span>
</div>
</section>
<section class="panel" data-tab="data">
<div class="group">

View file

@ -67,20 +67,37 @@ define([
initialize: function () {
this._initSettings = true;
this._noApply = true;
this._state = {
BackColor: undefined,
DisabledControls: true,
CellAngle: undefined
DisabledFillPanels: false,
CellAngle: undefined,
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
CellColor: 'transparent',
FillType: Asc.c_oAscFill.FILL_TYPE_SOLID,
FGColor: '000000',
BGColor: 'ffffff',
GradColor1: '000000',
GradColor2: 'ffffff'
};
this.lockedControls = [];
this._locked = true;
this.isEditCell = false;
this.BorderType = 1;
this.GradFillType = Asc.c_oAscFillGradType.GRAD_LINEAR;
this.GradLinearDirectionType = 0;
this.GradRadialDirectionIdx = 0;
this.GradColors = [];
this.fillControls = [];
this.render();
this.createDelayedControls();
this.FillColorContainer = $('#cell-panel-color-fill');
this.FillPatternContainer = $('#cell-panel-pattern-fill');
this.FillGradientContainer = $('#cell-panel-gradient-fill');
},
onColorsBackSelect: function(picker, color) {
@ -155,6 +172,138 @@ define([
},
createDelayedControls: function() {
var me = this;
this._arrFillSrc = [
{displayValue: this.textColor, value: Asc.c_oAscFill.FILL_TYPE_SOLID},
{displayValue: this.textGradientFill, value: Asc.c_oAscFill.FILL_TYPE_GRAD},
{displayValue: this.textPatternFill, value: Asc.c_oAscFill.FILL_TYPE_PATT},
{displayValue: this.textNoFill, value: Asc.c_oAscFill.FILL_TYPE_NOFILL}
];
this.cmbFillSrc = new Common.UI.ComboBox({
el: $('#cell-combo-fill-src'),
cls: 'input-group-nr',
style: 'width: 100%;',
menuStyle: 'min-width: 100%;',
editable: false,
data: this._arrFillSrc
});
this.cmbFillSrc.setValue(this._arrFillSrc[0].value);
this.fillControls.push(this.cmbFillSrc);
this.cmbFillSrc.on('selected', _.bind(this.onFillSrcSelect, this));
this._arrGradType = [
{displayValue: this.textLinear, value: Asc.c_oAscFillGradType.GRAD_LINEAR},
{displayValue: this.textRadial, value: Asc.c_oAscFillGradType.GRAD_PATH}
];
this.cmbGradType = new Common.UI.ComboBox({
el: $('#cell-combo-grad-type'),
cls: 'input-group-nr',
menuStyle: 'min-width: 90px;',
editable: false,
data: this._arrGradType
});
this.cmbGradType.setValue(this._arrGradType[0].value);
this.fillControls.push(this.cmbGradType);
this.cmbGradType.on('selected', _.bind(this.onGradTypeSelect, this));
this._viewDataLinear = [
{ offsetx: 0, offsety: 0, type:45, subtype:-1, iconcls:'gradient-left-top' },
{ offsetx: 50, offsety: 0, type:90, subtype:4, iconcls:'gradient-top'},
{ offsetx: 100, offsety: 0, type:135, subtype:5, iconcls:'gradient-right-top'},
{ offsetx: 0, offsety: 50, type:0, subtype:6, iconcls:'gradient-left', cls: 'item-gradient-separator', selected: true},
{ offsetx: 100, offsety: 50, type:180, subtype:1, iconcls:'gradient-right'},
{ offsetx: 0, offsety: 100, type:315, subtype:2, iconcls:'gradient-left-bottom'},
{ offsetx: 50, offsety: 100, type:270, subtype:3, iconcls:'gradient-bottom'},
{ offsetx: 100, offsety: 100, type:225, subtype:7, iconcls:'gradient-right-bottom'}
];
this._viewDataRadial = [
{ offsetx: 100, offsety: 150, type:2, subtype:5, iconcls:'gradient-radial-center'}
];
this.btnDirection = new Common.UI.Button({
cls : 'btn-large-dataview',
iconCls : 'item-gradient gradient-left',
menu : new Common.UI.Menu({
style: 'min-width: 60px;',
menuAlign: 'tr-br',
items: [
{ template: _.template('<div id="id-cell-menu-direction" style="width: 175px; margin: 0 5px;"></div>') }
]
})
});
this.btnDirection.on('render:after', function(btn) {
me.mnuDirectionPicker = new Common.UI.DataView({
el: $('#id-cell-menu-direction'),
parentMenu: btn.menu,
restoreHeight: 174,
store: new Common.UI.DataViewStore(me._viewDataLinear),
itemTemplate: _.template('<div id="<%= id %>" class="item-gradient" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
});
this.btnDirection.render($('#cell-button-direction'));
this.fillControls.push(this.btnDirection);
this.mnuDirectionPicker.on('item:click', _.bind(this.onSelectGradient, this, this.btnDirection));
this.cmbPattern = new Common.UI.ComboDataView({
itemWidth: 28,
itemHeight: 28,
menuMaxHeight: 300,
enableKeyEvents: true,
cls: 'combo-pattern'
});
this.cmbPattern.menuPicker.itemTemplate = this.cmbPattern.fieldPicker.itemTemplate = _.template([
'<div class="style" id="<%= id %>">',
'<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class="combo-pattern-item" ',
'width="' + this.cmbPattern.itemWidth + '" height="' + this.cmbPattern.itemHeight + '" ',
'style="background-position: -<%= offsetx %>px -<%= offsety %>px;"/>',
'</div>'
].join(''));
this.cmbPattern.render($('#cell-combo-pattern'));
this.cmbPattern.openButton.menu.cmpEl.css({
'min-width': 178,
'max-width': 178
});
this.cmbPattern.on('click', _.bind(this.onPatternSelect, this));
this.cmbPattern.openButton.menu.on('show:after', function () {
me.cmbPattern.menuPicker.scroller.update({alwaysVisibleY: true});
});
this.fillControls.push(this.cmbPattern);
var global_hatch_menu_map = [
-1,-1,-1,-1,-1,
-1,-1,-1,-1,8,
9,10,11,-1,-1,
-1,21,-1,-1,-1,
-1,20,22,23,-1,
-1,27,28,29,30,
-1,-1,33,-1,35,
-1,-1,-1,-1,-1,
41,-1,43,-1,-1,
46,-1,-1,-1,-1
];
this.patternViewData = [];
var idx = 0;
for (var i=0; i<13; i++) {
for (var j=0; j<4; j++) {
var num = i*4+j;
if (global_hatch_menu_map[num]>-1)
this.patternViewData[idx++] = {offsetx: j*28, offsety: i*28, type: global_hatch_menu_map[num]};
}
}
for ( var i=0; i<this.patternViewData.length; i++ ) {
this.patternViewData[i].id = Common.UI.getId();
}
this.cmbPattern.menuPicker.store.add(this.patternViewData);
if (this.cmbPattern.menuPicker.store.length > 0) {
this.cmbPattern.fillComboView(this.cmbPattern.menuPicker.store.at(0),true);
this.PatternFillType = this.patternViewData[0].type;
}
var _arrBorderPosition = [
[Asc.c_oAscBorderOptions.Left, 'btn-borders-small btn-position-left', 'cell-button-border-left', this.tipLeft],
[Asc.c_oAscBorderOptions.InnerV,'btn-borders-small btn-position-inner-vert','cell-button-border-inner-vert', this.tipInnerVert],
@ -246,6 +395,7 @@ define([
},
ChangeSettings: function(props) {
var me = this;
if (this._initSettings)
this.createDelayedElements();
@ -253,46 +403,259 @@ define([
if (props )
{
var color = props.asc_getFill().asc_getColor(),
clr;
if (color) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
} else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
}
} else {
clr = 'transparent';
}
var type1 = typeof(clr);
var type2 = typeof(this._state.BackColor);
if ( (type1 !== type2) || (type1=='object' &&
(clr.effectValue!==this._state.BackColor.effectValue || this._state.BackColor.color.indexOf(clr.color)<0)) ||
(type1!='object' && this._state.BackColor!==undefined && this._state.BackColor.indexOf(clr)<0 )) {
this.btnBackColor.setColor(clr);
if (_.isObject(clr)) {
var isselected = false;
for (var i = 0; i < 10; i++) {
if (Common.Utils.ThemeColor.ThemeValues[i] == clr.effectValue) {
this.colorsBack.select(clr,true);
isselected = true;
break;
}
}
if (!isselected) this.colorsBack.clearSelection();
} else {
this.colorsBack.select(clr, true);
}
this._state.BackColor = clr;
}
this._noApply = true;
var value = props.asc_getAngle();
if ( Math.abs(this._state.CellAngle-value)>0.1 || (this._state.CellAngle===undefined)&&(this._state.CellAngle!==value)) {
this.spnAngle.setValue((value !== null) ? value : '', true);
this._state.CellAngle=value;
}
this.fill = props.asc_getFill2();
this.pattern = this.fill.asc_getPatternFill();
this.gradient = this.fill.asc_getGradientFill();
if (this.pattern === null && this.gradient === null) {
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
this.CellColor = {Value: 0, Color: 'transparent'};
this.FGColor = {Value: 1, Color: {color: '4f81bd', effectId: 24}};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColors[0] = {Value: 1, Color: {color: '4f81bd', effectId: 24}, Position: 0};
this.GradColors[1] = {Value: 1, Color: 'ffffff', Position: 1};
} else if (this.pattern !== null) {
if(this.pattern.asc_getType() === -1) {
var color = this.pattern.asc_getFgColor();
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.CellColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else {
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
}
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.CellColor.Color)};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.GradColors[0] = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.CellColor.Color), Position: 0};
this.GradColors[1] = {Value: 1, Color: 'ffffff', Position: 1};
} else {
this.PatternFillType = this.pattern.asc_getType();
if (this._state.PatternFillType !== this.PatternFillType) {
this.cmbPattern.suspendEvents();
var rec = this.cmbPattern.menuPicker.store.findWhere({
type: this.PatternFillType
});
this.cmbPattern.menuPicker.selectRecord(rec);
this.cmbPattern.resumeEvents();
this._state.PatternFillType = this.PatternFillType;
}
var color = this.pattern.asc_getFgColor();
if (color) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else {
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
}
} else
this.FGColor = {Value: 1, Color: {color: '4f81bd', effectId: 24}};
color = this.pattern.asc_getBgColor();
if (color) {
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
} else {
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
}
} else
this.BGColor = {Value: 1, Color: 'ffffff'};
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
this.GradColors[0] = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color), Position: 0};
this.GradColors[1] = {Value: 1, Color: 'ffffff', Position: 1};
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
}
} else if (this.gradient !== null) {
var gradFillType = this.gradient.asc_getType();
if (this._state.GradFillType !== gradFillType || this.GradFillType !== gradFillType) {
this.GradFillType = gradFillType;
rec = undefined;
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR || this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.cmbGradType.setValue(this.GradFillType);
rec = this.cmbGradType.store.findWhere({value: this.GradFillType});
this.onGradTypeSelect(this.cmbGradType, rec.attributes);
} else {
this.cmbGradType.setValue('');
this.btnDirection.setIconCls('');
}
this._state.GradFillType = this.GradFillType;
}
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
var value = this.gradient.asc_getDegree();
if (Math.abs(this.GradLinearDirectionType-value)>0.001) {
this.GradLinearDirectionType=value;
var record = this.mnuDirectionPicker.store.findWhere({type: value});
this.mnuDirectionPicker.selectRecord(record, true);
if (record)
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else
this.btnDirection.setIconCls('');
}
}
var gradientStops;
this.GradColors.length = 0;
gradientStops = this.gradient.asc_getGradientStops();
gradientStops.forEach(function (color) {
var clr = color.asc_getColor(),
position = color.asc_getPosition(),
itemColor;
if (clr.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
itemColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(clr.asc_getR(), clr.asc_getG(), clr.asc_getB()), effectValue: clr.asc_getValue()}, Position: position};
} else {
itemColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(clr.asc_getR(), clr.asc_getG(), clr.asc_getB()), Position: position};
}
me.GradColors.push(itemColor);
});
this.GradColors = _.sortBy(this.GradColors, 'Position');
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.GradColors[0].Color)};
this.BGColor = {Value: 1, Color: 'ffffff'};
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.GradColors[0].Color)};
}
if ( this._state.FillType !== this.OriginalFillType ) {
this.cmbFillSrc.setValue((this.OriginalFillType === null) ? '' : this.OriginalFillType);
this._state.FillType = this.OriginalFillType;
this.ShowHideElem(this.OriginalFillType);
}
// Color Back
var type1 = typeof(this.CellColor.Color),
type2 = typeof(this._state.CellColor);
if ( (type1 !== type2) || (type1=='object' &&
(this.CellColor.Color.effectValue!==this._state.CellColor.effectValue || this._state.CellColor.color.indexOf(this.CellColor.Color)<0)) ||
(type1!='object' && this._state.CellColor!==undefined && this._state.CellColor.indexOf(this.CellColor.Color)<0 )) {
this.btnBackColor.setColor(this.CellColor.Color);
if (_.isObject(this.CellColor.Color)) {
var isselected = false;
for (var i = 0; i < 10; i++) {
if (Common.Utils.ThemeColor.ThemeValues[i] == this.CellColor.Color.effectValue) {
this.colorsBack.select(this.CellColor.Color,true);
isselected = true;
break;
}
}
if (!isselected) this.colorsBack.clearSelection();
} else {
this.colorsBack.select(this.CellColor.Color, true);
}
this._state.CellColor = this.CellColor.Color;
}
// Pattern colors
type1 = typeof(this.FGColor.Color);
type2 = typeof(this._state.FGColor);
if ( (type1 !== type2) || (type1=='object' &&
(this.FGColor.Color.effectValue!==this._state.FGColor.effectValue || this._state.FGColor.color.indexOf(this.FGColor.Color.color)<0)) ||
(type1!='object' && this._state.FGColor.indexOf(this.FGColor.Color)<0 )) {
this.btnFGColor.setColor(this.FGColor.Color);
if ( typeof(this.FGColor.Color) == 'object' ) {
var isselected = false;
for (var i=0; i<10; i++) {
if ( Common.Utils.ThemeColor.ThemeValues[i] == this.FGColor.Color.effectValue ) {
this.colorsFG.select(this.FGColor.Color,true);
isselected = true;
break;
}
}
if (!isselected) this.colorsFG.clearSelection();
} else
this.colorsFG.select(this.FGColor.Color,true);
this._state.FGColor = this.FGColor.Color;
}
type1 = typeof(this.BGColor.Color);
type2 = typeof(this._state.BGColor);
if ( (type1 !== type2) || (type1=='object' &&
(this.BGColor.Color.effectValue!==this._state.BGColor.effectValue || this._state.BGColor.color.indexOf(this.BGColor.Color.color)<0)) ||
(type1!='object' && this._state.BGColor.indexOf(this.BGColor.Color)<0 )) {
this.btnBGColor.setColor(this.BGColor.Color);
if ( typeof(this.BGColor.Color) == 'object' ) {
var isselected = false;
for (var i=0; i<10; i++) {
if ( Common.Utils.ThemeColor.ThemeValues[i] == this.BGColor.Color.effectValue ) {
this.colorsBG.select(this.BGColor.Color,true);
isselected = true;
break;
}
}
if (!isselected) this.colorsBG.clearSelection();
} else
this.colorsBG.select(this.BGColor.Color,true);
this._state.BGColor = this.BGColor.Color;
}
// Gradient colors
var gradColor1 = this.GradColors[0];
if (!gradColor1) {
gradColor1 = {Value: 1, Color: {color: '4f81bd', effectId: 24}};
}
type1 = typeof(gradColor1.Color);
type2 = typeof(this._state.GradColor1);
if ( (type1 !== type2) || (type1=='object' &&
(gradColor1.Color.effectValue!==this._state.GradColor1.effectValue || this._state.GradColor1.color.indexOf(gradColor1.Color.color)<0)) ||
(type1!='object' && this._state.GradColor1.indexOf(gradColor1.Color)<0 )) {
this.btnGradColor1.setColor(gradColor1.Color);
if ( typeof(gradColor1.Color) == 'object' ) {
var isselected = false;
for (var i=0; i<10; i++) {
if ( Common.Utils.ThemeColor.ThemeValues[i] == gradColor1.Color.effectValue ) {
this.colorsGrad1.select(gradColor1.Color,true);
isselected = true;
break;
}
}
if (!isselected) this.colorsGrad1.clearSelection();
} else
this.colorsGrad1.select(gradColor1.Color,true);
this._state.GradColor1 = gradColor1.Color;
}
var gradColor2 = this.GradColors[1];
if (!gradColor2) {
gradColor2 = {Value: 1, Color: 'ffffff'};
}
type1 = typeof(gradColor2.Color);
type2 = typeof(this._state.GradColor2);
if ( (type1 !== type2) || (type1=='object' &&
(gradColor2.Color.effectValue!==this._state.GradColor2.effectValue || this._state.GradColor2.color.indexOf(gradColor2.Color.color)<0)) ||
(type1!='object' && this._state.GradColor2.indexOf(gradColor2.Color)<0 )) {
this.btnGradColor2.setColor(gradColor2.Color);
if ( typeof(gradColor2.Color) == 'object' ) {
var isselected = false;
for (var i=0; i<10; i++) {
if ( Common.Utils.ThemeColor.ThemeValues[i] == gradColor2.Color.effectValue ) {
this.colorsGrad2.select(gradColor2.Color,true);
isselected = true;
break;
}
}
if (!isselected) this.colorsGrad2.clearSelection();
} else
this.colorsGrad2.select(gradColor2.Color,true);
this._state.GradColor2 = gradColor2.Color;
}
this._noApply = false;
}
},
@ -323,10 +686,91 @@ define([
});
this.colorsBack.on('select', _.bind(this.onColorsBackSelect, this));
this.btnBackColor.menu.items[1].on('click', _.bind(this.addNewColor, this, this.colorsBack, this.btnBackColor));
this.fillControls.push(this.btnBackColor);
this.btnGradColor1 = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="cell-gradient-color1-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="cell-gradient-color1-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnGradColor1.render( $('#cell-grad-btn-color-1'));
this.btnGradColor1.setColor('000000');
this.colorsGrad1 = new Common.UI.ThemeColorPalette({
el: $('#cell-gradient-color1-menu'),
value: '000000'
});
this.colorsGrad1.on('select', _.bind(this.onColorsGradientSelect, this));
this.btnGradColor1.menu.items[1].on('click', _.bind(this.addNewColor, this, this.colorsGrad1, this.btnGradColor1));
this.fillControls.push(this.btnGradColor1);
this.btnGradColor2 = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="cell-gradient-color2-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="cell-gradient-color2-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnGradColor2.render( $('#cell-grad-btn-color-2'));
this.btnGradColor2.setColor('ffffff');
this.colorsGrad2 = new Common.UI.ThemeColorPalette({
el: $('#cell-gradient-color2-menu'),
value: 'ffffff'
});
this.colorsGrad2.on('select', _.bind(this.onColorsGradientSelect, this));
this.btnGradColor2.menu.items[1].on('click', _.bind(this.addNewColor, this, this.colorsGrad2, this.btnGradColor2));
this.fillControls.push(this.btnGradColor2);
this.btnFGColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="cell-foreground-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="cell-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnFGColor.render( $('#cell-foreground-color-btn'));
this.btnFGColor.setColor('000000');
this.colorsFG = new Common.UI.ThemeColorPalette({
el: $('#cell-foreground-color-menu'),
value: '000000'
});
this.colorsFG.on('select', _.bind(this.onColorsFGSelect, this));
this.btnFGColor.menu.items[1].on('click', _.bind(this.addNewColor, this, this.colorsFG, this.btnFGColor));
this.fillControls.push(this.btnFGColor);
this.btnBGColor = new Common.UI.ColorButton({
style: "width:45px;",
menu : new Common.UI.Menu({
items: [
{ template: _.template('<div id="cell-background-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
{ template: _.template('<a id="cell-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
]
})
});
this.btnBGColor.render( $('#cell-background-color-btn'));
this.btnBGColor.setColor('ffffff');
this.colorsBG = new Common.UI.ThemeColorPalette({
el: $('#cell-background-color-menu'),
value: 'ffffff'
});
this.colorsBG.on('select', _.bind(this.onColorsBGSelect, this));
this.btnBGColor.menu.items[1].on('click', _.bind(this.addNewColor, this, this.colorsBG, this.btnBGColor));
this.fillControls.push(this.btnBGColor);
}
this.colorsBack.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
this.borderColor.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
this.btnBorderColor.setColor(this.borderColor.getColor());
this.colorsGrad1.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
this.colorsGrad2.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
this.colorsFG.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
this.colorsBG.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors());
},
onApiEditCell: function(state) {
@ -339,10 +783,20 @@ define([
this._locked = locked;
},
disableFillPanels: function(disable) {
if (this._state.DisabledFillPanels!==disable) {
this._state.DisabledFillPanels = disable;
_.each(this.fillControls, function(item) {
item.setDisabled(disable);
});
}
},
disableControls: function(disable) {
if (this._initSettings) return;
disable = disable || this.isEditCell;
this.disableFillPanels(disable);
if (this._state.DisabledControls!==disable) {
this._state.DisabledControls = disable;
_.each(this.lockedControls, function(item) {
@ -351,6 +805,263 @@ define([
}
},
onFillSrcSelect: function(combo, record) {
var me = this;
this.ShowHideElem(record.value);
switch (record.value){
case Asc.c_oAscFill.FILL_TYPE_SOLID:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
if (!this._noApply) {
if (this.pattern == null)
this.pattern = new Asc.asc_CPatternFill();
this.pattern.asc_setType(-1);
this.pattern.asc_setFgColor(Common.Utils.ThemeColor.getRgbColor((this.CellColor.Color=='transparent') ? {color: '4f81bd', effectId: 24} : this.CellColor.Color));
this.fill.asc_setPatternFill(this.pattern);
this.api.asc_setCellFill(this.fill);
}
break;
case Asc.c_oAscFill.FILL_TYPE_GRAD:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
if (!this._noApply) {
if (this.gradient == null)
this.gradient = new Asc.asc_CGradientFill();
this.gradient.asc_setType(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.gradient.asc_setDegree(this.GradLinearDirectionType);
}
if (this.OriginalFillType !== Asc.c_oAscFill.FILL_TYPE_GRAD) {
var HexColor0 = Common.Utils.ThemeColor.getRgbColor(this.GradColors[0].Color).get_color().get_hex(),
HexColor1 = Common.Utils.ThemeColor.getRgbColor(this.GradColors[1].Color).get_color().get_hex();
if (HexColor0 === 'ffffff' && HexColor1 === 'ffffff') {
this.GradColors[0].Color = {color: '4f81bd', effectId: 24}; // color accent1
}
var arrGradStop = [];
this.GradColors.forEach(function (item) {
var gradientStop = new Asc.asc_CGradientStop();
gradientStop.asc_setColor(Common.Utils.ThemeColor.getRgbColor(item.Color));
gradientStop.asc_setPosition(item.Position);
arrGradStop.push(gradientStop);
});
this.gradient.asc_putGradientStops(arrGradStop);
}
this.fill.asc_setGradientFill(this.gradient);
this.api.asc_setCellFill(this.fill);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
if (!this._noApply) {
var fHexColor = Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color).get_color().get_hex();
var bHexColor = Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color).get_color().get_hex();
if (bHexColor === 'ffffff' && fHexColor === 'ffffff') {
fHexColor = {color: '4f81bd', effectId: 24}; // color accent1
} else {
fHexColor = this.FGColor.Color;
}
if (this.pattern == null)
this.pattern = new Asc.asc_CPatternFill();
this.pattern.asc_setType(this.PatternFillType);
this.pattern.asc_setFgColor(Common.Utils.ThemeColor.getRgbColor(fHexColor));
this.pattern.asc_setBgColor(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
this.fill.asc_setPatternFill(this.pattern);
this.api.asc_setCellFill(this.fill);
}
break;
case Asc.c_oAscFill.FILL_TYPE_NOFILL:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_NOFILL;
if (!this._noApply) {
this.fill.asc_setPatternFill(null);
this.fill.asc_setGradientFill(null);
this.api.asc_setCellFill(this.fill);
}
break;
}
Common.NotificationCenter.trigger('edit:complete', this);
},
ShowHideElem: function(value) {
this.FillColorContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_SOLID);
this.FillPatternContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_PATT);
this.FillGradientContainer.toggleClass('settings-hidden', value !== Asc.c_oAscFill.FILL_TYPE_GRAD);
},
onGradTypeSelect: function(combo, record) {
this.GradFillType = record.value;
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.mnuDirectionPicker.store.reset(this._viewDataLinear);
this.mnuDirectionPicker.cmpEl.width(175);
this.mnuDirectionPicker.restoreHeight = 174;
var record = this.mnuDirectionPicker.store.findWhere({type: this.GradLinearDirectionType});
this.mnuDirectionPicker.selectRecord(record, true);
if (record)
this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls'));
else
this.btnDirection.setIconCls('');
} else if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_PATH) {
this.mnuDirectionPicker.store.reset(this._viewDataRadial);
this.mnuDirectionPicker.cmpEl.width(60);
this.mnuDirectionPicker.restoreHeight = 58;
this.mnuDirectionPicker.selectByIndex(this.GradRadialDirectionIdx, true);
if (this.GradRadialDirectionIdx>=0)
this.btnDirection.setIconCls('item-gradient ' + this._viewDataRadial[this.GradRadialDirectionIdx].iconcls);
else
this.btnDirection.setIconCls('');
}
if (this.api && !this._noApply) {
if (this.gradient == null) {
this.gradient = new Asc.asc_CGradientFill();
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.gradient.asc_setDegree(this.GradLinearDirectionType);
}
var arrGradStop = [];
this.GradColors.forEach(function (item) {
var gradientStop = new Asc.asc_CGradientStop();
gradientStop.asc_setColor(Common.Utils.ThemeColor.getRgbColor(item.Color));
gradientStop.asc_setPosition(item.Position);
arrGradStop.push(gradientStop);
});
this.gradient.asc_putGradientStops(arrGradStop);
}
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.gradient.asc_setDegree(this.GradLinearDirectionType);
}
this.gradient.asc_setType(this.GradFillType);
this.fill.asc_setGradientFill(this.gradient);
this.api.asc_setCellFill(this.fill);
}
Common.NotificationCenter.trigger('edit:complete', this);
},
onSelectGradient: function(btn, picker, itemView, record) {
var me = this;
if (this._noApply) return;
var rawData = {},
isPickerSelect = _.isFunction(record.toJSON);
if (isPickerSelect){
if (record.get('selected')) {
rawData = record.toJSON();
} else {
// record deselected
return;
}
} else {
rawData = record;
}
this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls);
(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0;
if (this.api) {
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
if (this.gradient == null) {
this.gradient = new Asc.asc_CGradientFill();
this.gradient.asc_setType(this.GradFillType);
var arrGradStop = [];
this.GradColors.forEach(function (item) {
var gradientStop = new Asc.asc_CGradientStop();
gradientStop.asc_setColor(Common.Utils.ThemeColor.getRgbColor(item.Color));
gradientStop.asc_setPosition(item.Position);
arrGradStop.push(gradientStop);
});
this.gradient.asc_putGradientStops(arrGradStop);
}
this.gradient.asc_setDegree(rawData.type);
this.fill.asc_setGradientFill(this.gradient);
this.api.asc_setCellFill(this.fill);
}
}
Common.NotificationCenter.trigger('edit:complete', this);
},
onColorsGradientSelect: function(picker, color) {
var me = this,
pickerId = picker.el.id;
if (pickerId === "cell-gradient-color1-menu") {
this.btnGradColor1.setColor(color);
this.GradColors[0].Color = color;
} else if (pickerId === "cell-gradient-color2-menu") {
this.btnGradColor2.setColor(color);
this.GradColors[1].Color = color;
}
if (this.api && !this._noApply) {
if (this.gradient == null) {
this.gradient = new Asc.asc_CGradientFill();
this.gradient.asc_setType(this.GradFillType);
if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) {
this.gradient.asc_setDegree(this.GradLinearDirectionType);
}
}
var arrGradStop = [];
this.GradColors.forEach(function (item) {
var gradientStop = new Asc.asc_CGradientStop();
gradientStop.asc_setColor(Common.Utils.ThemeColor.getRgbColor(item.Color));
gradientStop.asc_setPosition(item.Position);
arrGradStop.push(gradientStop);
});
this.gradient.asc_putGradientStops(arrGradStop);
this.fill.asc_setGradientFill(this.gradient);
this.api.asc_setCellFill(this.fill);
}
Common.NotificationCenter.trigger('edit:complete', this);
},
onPatternSelect: function(combo, record) {
if (this.api && !this._noApply) {
this.PatternFillType = record.get('type');
if (this.pattern == null) {
this.pattern = new Asc.asc_CPatternFill();
this.pattern.asc_setFgColor(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
this.pattern.asc_setBgColor(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
this.pattern.asc_setType(this.PatternFillType);
this.fill.asc_setPatternFill(this.pattern);
this.api.asc_setCellFill(this.fill);
}
Common.NotificationCenter.trigger('edit:complete', this);
},
onColorsFGSelect: function(picker, color) {
this.btnFGColor.setColor(color);
this.FGColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
if (this.pattern == null) {
this.pattern = new Asc.asc_CPatternFill();
this.pattern.asc_setType(this.PatternFillType);
this.pattern.asc_setBgColor(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
}
this.pattern.asc_setFgColor(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
this.fill.asc_setPatternFill(this.pattern);
this.api.asc_setCellFill(this.fill);
}
Common.NotificationCenter.trigger('edit:complete', this);
},
onColorsBGSelect: function(picker, color) {
this.btnBGColor.setColor(color);
this.BGColor = {Value: 1, Color: color};
if (this.api && !this._noApply) {
if (this.pattern == null) {
this.pattern = new Asc.asc_CPatternFill();
this.pattern.asc_setFgColor(Common.Utils.ThemeColor.getRgbColor(this.FGColor.Color));
this.pattern.asc_setType(this.PatternFillType);
}
this.pattern.asc_setBgColor(Common.Utils.ThemeColor.getRgbColor(this.BGColor.Color));
this.fill.asc_setPatternFill(this.pattern);
this.api.asc_setCellFill(this.fill);
}
Common.NotificationCenter.trigger('edit:complete', this);
},
textBorders: 'Border\'s Style',
textBorderColor: 'Color',
textBackColor: 'Background color',
@ -369,7 +1080,21 @@ define([
tipDiagU: 'Set Diagonal Up Border',
tipDiagD: 'Set Diagonal Down Border',
textOrientation: 'Text Orientation',
textAngle: 'Angle'
textAngle: 'Angle',
textFill: 'Fill',
textNoFill: 'No Fill',
textGradientFill: 'Gradient Fill',
textPatternFill: 'Pattern',
textColor: 'Color Fill',
textStyle: 'Style',
textDirection: 'Direction',
textLinear: 'Linear',
textRadial: 'Radial',
textColor1: 'Color 1',
textColor2: 'Color 2',
textPattern: 'Pattern',
textForeground: 'Foreground color',
textBackground: 'Background color'
}, SSE.Views.CellSettings || {}));
});

View file

@ -360,7 +360,8 @@ define([
{ value: 0, displayValue: this.textActualSize },
{ value: 1, displayValue: this.textFitPage },
{ value: 2, displayValue: this.textFitCols },
{ value: 3, displayValue: this.textFitRows }
{ value: 3, displayValue: this.textFitRows },
{ value: 4, displayValue: this.textCustomOptions}
]
});
@ -491,7 +492,8 @@ define([
textActualSize: 'Actual Size',
textFitPage: 'Fit Sheet on One Page',
textFitCols: 'Fit All Columns on One Page',
textFitRows: 'Fit All Rows on One Page'
textFitRows: 'Fit All Rows on One Page',
textCustomOptions: 'Custom Options'
}, SSE.Views.MainSettingsPrint || {}));
SSE.Views.FileMenuPanels.MainSettingsGeneral = Common.UI.BaseView.extend(_.extend({
@ -1108,12 +1110,18 @@ define([
'</table>',
'</div></td>',
'</tr>',
'<tr class="divider"></tr>',
'<tr>',
'<td class="left"></td>',
'<td class="right"><button id="fminfo-btn-apply" class="btn normal dlg-btn primary"><%= scope.okButtonText %></button></td>',
'</tr>',
'</table>'
].join(''));
this.menu = options.menu;
this.coreProps = null;
this.authors = [];
this._locked = false;
},
render: function(node) {
@ -1142,33 +1150,18 @@ define([
style : 'width: 200px;',
placeHolder : this.txtAddText,
validateOnBlur: false
}).on('changed:after', function(input, newValue, oldValue) {
if (newValue !== oldValue && me.coreProps && me.api) {
me.coreProps.asc_putTitle(me.inputTitle.getValue());
me.api.asc_setCoreProps(me.coreProps);
}
}).on('keydown:before', keyDownBefore);
this.inputSubject = new Common.UI.InputField({
el : $markup.findById('#id-info-subject'),
style : 'width: 200px;',
placeHolder : this.txtAddText,
validateOnBlur: false
}).on('changed:after', function(input, newValue, oldValue) {
if (newValue !== oldValue && me.coreProps && me.api) {
me.coreProps.asc_putSubject(me.inputSubject.getValue());
me.api.asc_setCoreProps(me.coreProps);
}
}).on('keydown:before', keyDownBefore);
this.inputComment = new Common.UI.InputField({
el : $markup.findById('#id-info-comment'),
style : 'width: 200px;',
placeHolder : this.txtAddText,
validateOnBlur: false
}).on('changed:after', function(input, newValue, oldValue) {
if (newValue !== oldValue && me.coreProps && me.api) {
me.coreProps.asc_putDescription(me.inputComment.getValue());
me.api.asc_setCoreProps(me.coreProps);
}
}).on('keydown:before', keyDownBefore);
// modify info
@ -1189,10 +1182,6 @@ define([
idx = me.tblAuthor.find('tr').index(el);
el.remove();
me.authors.splice(idx, 1);
if (me.coreProps && me.api) {
me.coreProps.asc_putCreator(me.authors.join(';'));
me.api.asc_setCoreProps(me.coreProps);
}
}
});
@ -1201,27 +1190,31 @@ define([
style : 'width: 200px;',
validateOnBlur: false,
placeHolder: this.txtAddAuthor
}).on('changed:after', function(input, newValue, oldValue) {
}).on('changed:after', function(input, newValue, oldValue, e) {
if (newValue == oldValue) return;
var val = newValue.trim();
if (!!val && val !== oldValue.trim()) {
var isFromApply = e && e.relatedTarget && (e.relatedTarget.id == 'fminfo-btn-apply');
val.split(/\s*[,;]\s*/).forEach(function(item){
var str = item.trim();
if (str) {
var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(str)));
me.trAuthor.before(div);
me.authors.push(item);
if (!isFromApply) {
var div = $(Common.Utils.String.format(me.authorTpl, Common.Utils.String.htmlEncode(str)));
me.trAuthor.before(div);
}
}
});
me.inputAuthor.setValue('');
if (me.coreProps && me.api) {
me.coreProps.asc_putCreator(me.authors.join(';'));
me.api.asc_setCoreProps(me.coreProps);
}
!isFromApply && me.inputAuthor.setValue('');
}
}).on('keydown:before', keyDownBefore);
this.btnApply = new Common.UI.Button({
el: '#fminfo-btn-apply'
});
this.btnApply.on('click', _.bind(this.applySettings, this));
this.rendered = true;
this.updateInfo(this.doc);
@ -1328,6 +1321,7 @@ define([
value = props.asc_getDescription();
this.inputComment.setValue(value || '');
this.inputAuthor.setValue('');
this.tblAuthor.find('tr:not(:last-of-type)').remove();
this.authors = [];
value = props.asc_getCreator();//"123\"\"\"\<\>,456";
@ -1336,7 +1330,9 @@ define([
me.trAuthor.before(div);
me.authors.push(item);
});
this.tblAuthor.find('.close').toggleClass('hidden', !this.mode.isEdit);
}
this.SetDisabled();
},
_ShowHideInfoItem: function(el, visible) {
@ -1351,6 +1347,11 @@ define([
},
setMode: function(mode) {
this.mode = mode;
this.inputAuthor.setVisible(mode.isEdit);
this.btnApply.setVisible(mode.isEdit);
this.tblAuthor.find('.close').toggleClass('hidden', !mode.isEdit);
this.SetDisabled();
return this;
},
@ -1362,12 +1363,30 @@ define([
},
onLockCore: function(lock) {
this.inputTitle.setDisabled(lock);
this.inputSubject.setDisabled(lock);
this.inputComment.setDisabled(lock);
this.inputAuthor.setDisabled(lock);
this.tblAuthor.find('.close').toggleClass('disabled', lock);
!lock && this.updateFileInfo();
this._locked = lock;
this.updateFileInfo();
},
SetDisabled: function() {
var disable = !this.mode.isEdit || this._locked;
this.inputTitle.setDisabled(disable);
this.inputSubject.setDisabled(disable);
this.inputComment.setDisabled(disable);
this.inputAuthor.setDisabled(disable);
this.tblAuthor.find('.close').toggleClass('disabled', this._locked);
this.tblAuthor.toggleClass('disabled', disable);
this.btnApply.setDisabled(this._locked);
},
applySettings: function() {
if (this.coreProps && this.api) {
this.coreProps.asc_putTitle(this.inputTitle.getValue());
this.coreProps.asc_putSubject(this.inputSubject.getValue());
this.coreProps.asc_putDescription(this.inputComment.getValue());
this.coreProps.asc_putCreator(this.authors.join(';'));
this.api.asc_setCoreProps(this.coreProps);
}
this.menu.hide();
},
txtPlacement: 'Location',
@ -1383,7 +1402,8 @@ define([
txtAuthor: 'Author',
txtAddAuthor: 'Add Author',
txtAddText: 'Add Text',
txtMinutes: 'min'
txtMinutes: 'min',
okButtonText: 'Apply'
}, SSE.Views.FileMenuPanels.DocumentInfo || {}));
SSE.Views.FileMenuPanels.DocumentRights = Common.UI.BaseView.extend(_.extend({

View file

@ -57,6 +57,12 @@ define([
me.btnFormula.on('click', function(){
me.fireEvent('function:apply', [{name: 'more', origin: 'more'}]);
});
me.btnCalculate.on('click', function () {
me.fireEvent('function:calculate', [{type: Asc.c_oAscCalculateType.All}]);
});
me.btnCalculate.menu.on('item:click', function (menu, item, e) {
me.fireEvent('function:calculate', [{type: item.value}]);
});
}
return {
options: {},
@ -214,6 +220,18 @@ define([
Common.Utils.injectComponent($host.find('#slot-btn-more'), this.btnMore);
this.lockedControls.push(this.btnMore);
this.btnCalculate = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'btn-calculation',
caption: this.txtCalculation,
split: true,
menu: true,
disabled: true,
lock: [_set.editCell, _set.selRangeEdit, _set.lostConnect, _set.coAuth]
});
Common.Utils.injectComponent($host.find('#slot-btn-calculate'), this.btnCalculate);
this.lockedControls.push(this.btnCalculate);
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},
@ -226,6 +244,17 @@ define([
(new Promise(function (accept, reject) {
accept();
})).then(function(){
me.btnCalculate.updateHint([me.tipCalculateTheEntireWorkbook + Common.Utils.String.platformKey('F9'), me.tipCalculate]);
var _menu = new Common.UI.Menu({
items: [
{caption: me.textCalculateWorkbook, value: Asc.c_oAscCalculateType.All},
{caption: me.textCalculateCurrentSheet, value: Asc.c_oAscCalculateType.ActiveSheet},
//{caption: '--'},
//{caption: me.textAutomatic, value: '', toggleGroup: 'menuCalcMode', checkable: true, checked: true},
//{caption: me.textManual, value: '', toggleGroup: 'menuCalcMode', checkable: true, checked: false}
]
});
me.btnCalculate.setMenu(_menu);
setEvents.call(me);
});
},
@ -480,7 +509,14 @@ define([
txtAdditional: 'Additional',
txtFormula: 'Function',
txtFormulaTip: 'Insert function',
txtMore: 'More functions'
txtMore: 'More functions',
txtCalculation: 'Calculation',
tipCalculate: 'Calculate',
textCalculateWorkbook: 'Calculate workbook',
textCalculateCurrentSheet: 'Calculate current sheet',
textAutomatic: 'Automatic',
textManual: 'Manual',
tipCalculateTheEntireWorkbook: 'Calculate the entire workbook'
}
}()), SSE.Views.FormulaTab || {}));
});

View file

@ -213,7 +213,8 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
{ value: 0, displayValue: this.textActualSize },
{ value: 1, displayValue: this.textFitPage },
{ value: 2, displayValue: this.textFitCols },
{ value: 3, displayValue: this.textFitRows }
{ value: 3, displayValue: this.textFitRows },
{ value: 4, displayValue: this.textCustomOptions}
]
});
@ -322,7 +323,8 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
strShow: 'Show',
btnDownload: 'Save & Download',
textRange: 'Range',
textIgnore: 'Ignore Print Area'
textIgnore: 'Ignore Print Area',
textCustomOptions: 'Custom Options'
}, SSE.Views.PrintSettings || {}));
});

View file

@ -0,0 +1,336 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* ScaleDialog.js
*
* Created by Julia Svinareva on 21/08/19
* Copyright (c) 2019 Ascensio System SIA. All rights reserved.
*
*/
define([
'common/main/lib/component/Window',
'common/main/lib/component/MetricSpinner'
], function () { 'use strict';
SSE.Views.ScaleDialog = Common.UI.Window.extend(_.extend({
options: {
width: 215,
header: true,
style: 'min-width: 215px;',
cls: 'modal-dlg'
},
initialize : function(options) {
_.extend(this.options, {
title: this.textTitle
}, options || {});
this._state = {
width: null,
height: null
};
this.template = [
'<div class="box">',
'<div id="radio-fit-to" style="margin-bottom: 4px;"></div>',
'<div style="padding-left: 22px;">',
'<div>',
'<label style="height: 22px;width: 45px;padding-top: 4px;display: inline-block;margin-bottom: 4px;">' + this.textWidth + '</label>',
'<div id="scale-width" style="display: inline-block;margin-bottom: 4px;"></div>',
'</div>',
'<div>',
'<label style="height: 22px;width: 45px;padding-top: 4px;display: inline-block;margin-bottom: 16px;">' + this.textHeight + '</label>',
'<div id="scale-height" style="display: inline-block;margin-bottom: 16px;"></div>',
'</div>',
'</div>',
'<div id="radio-scale-to" style="margin-bottom: 6px;"></div>',
'<div id="scale" style="padding-left: 22px; margin-bottom: 6px;"></div>',
'</div>',
'<div class="footer center">',
'<button class="btn normal dlg-btn primary" result="ok" style="margin-right: 10px;">' + this.okButtonText + '</button>',
'<button class="btn normal dlg-btn" result="cancel">' + this.cancelButtonText + '</button>',
'</div>'
].join('');
this.options.tpl = _.template(this.template)(this.options);
this.api = this.options.api;
this._originalProps = this.options.props;
this.arrDataScale = [
{displayValue: this.textAuto, value: 0},
{displayValue: '1 ' + this.textOnePage, value: 1},
{displayValue: '2 ' + this.textFewPages, value: 2},
{displayValue: '3 ' + this.textFewPages, value: 3},
{displayValue: '4 ' + this.textFewPages, value: 4},
{displayValue: '5 ' + this.textManyPages, value: 5},
{displayValue: '6 ' + this.textManyPages, value: 6},
{displayValue: '7 ' + this.textManyPages, value: 7},
{displayValue: '8 ' + this.textManyPages, value: 8},
{displayValue: '9 ' + this.textManyPages, value: 9}
];
Common.UI.Window.prototype.initialize.call(this, this.options);
},
render: function() {
Common.UI.Window.prototype.render.call(this);
this.radioFitTo = new Common.UI.RadioBox({
el: $('#radio-fit-to'),
labelText: this.textFitTo,
name: 'asc-radio-scale'
});
this.radioFitTo.on('change', _.bind(this.onRadioScale, this, 'fitto'));
this.radioScaleTo = new Common.UI.RadioBox({
el: $('#radio-scale-to'),
labelText: this.textScaleTo,
name: 'asc-radio-scale'
});
this.radioScaleTo.on('change', _.bind(this.onRadioScale, this, 'scaleto'));
this.cmbScaleWidth = new Common.UI.ComboBox({
el: $('#scale-width'),
cls: 'input-group-nr',
style: 'width: 90px;',
menuStyle : 'min-width: 90px;',
editable: true,
data: this.arrDataScale,
scrollAlwaysVisible: true
}).on('selected', _.bind(this.changeWidthHeight, this, 'width'))
.on('changed:after', _.bind(this.changeWidthHeight, this, 'width'))
.on('changed:before', _.bind(this.onChangeComboScale, this, 'width'));
this.cmbScaleHeight = new Common.UI.ComboBox({
el: $('#scale-height'),
cls: 'input-group-nr',
style: 'width: 90px;',
menuStyle : 'min-width: 90px;',
editable: true,
data: this.arrDataScale,
scrollAlwaysVisible: true
}).on('selected', _.bind(this.changeWidthHeight, this, 'height'))
.on('changed:after', _.bind(this.changeWidthHeight, this, 'height'))
.on('changed:before', _.bind(this.onChangeComboScale, this, 'height'));
this.spnScale = new Common.UI.MetricSpinner({
el : $('#scale'),
step : 1,
width : 75,
defaultUnit : "%",
maxValue : 400,
minValue : 10,
defaultValue: '100 %'
}).on('change', _.bind(function (field) {
this.radioScaleTo.setValue(true, true);
this.cmbScaleHeight.setValue(0,true);
this.cmbScaleWidth.setValue(0,true);
this._state.width = 0;
this._state.height = 0;
}, this));
var $window = this.getChild();
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
this.afterRender();
},
afterRender: function() {
this._setDefaults(this._originalProps);
},
_handleInput: function(state) {
if (this.options.handler) {
this.options.handler.call(this, state, (state == 'ok') ? this.getSettings() : undefined);
}
this.close();
},
onBtnClick: function(event) {
this._handleInput(event.currentTarget.attributes['result'].value);
},
onPrimary: function() {
this._handleInput('ok');
return false;
},
changeWidthHeight: function (type, field) {
var value = field.getValue();
if (typeof(value) === 'string') {
value = parseInt(value);
if (isNaN(value)) {
value = 0;
}
}
if (type === 'width') {
this._state.width = value;
} else {
this._state.height = value;
}
if ((this._state.width === 0 || this._state.width === null) && (this._state.height === 0 || this._state.height === null)) {
this.radioScaleTo.setValue(true, true);
} else {
this.radioFitTo.setValue(true, true);
}
},
onRadioScale: function(type, field, newValue) {
if (type === 'scaleto') {
this.cmbScaleHeight.setValue(0,true);
this._state.height = 0;
this.cmbScaleWidth.setValue(0,true);
this._state.width = 0;
} else {
this.cmbScaleHeight.setValue(0,true);
this._state.height = 0;
this.cmbScaleWidth.setValue(1,true);
this._state.width = 1;
}
},
_setDefaults: function (props) {
if (this.api) {
var pageProps = props ? props : this.api.asc_getPageOptions();
var pageSetup = pageProps.asc_getPageSetup(),
width = pageSetup.asc_getFitToWidth(),
height = pageSetup.asc_getFitToHeight(),
scale = pageSetup.asc_getScale();
this._state.width = (width !== null && width !== 0) ? width : null;
this._state.height = (height !== null && height !== 0) ? height : null;
width = (width !== null) ? width : 0;
height = (height !== null) ? height : 0;
if (width === 0 && height === 0) {
this.radioScaleTo.setValue(true,true);
} else {
this.radioFitTo.setValue(true,true);
}
if (_.findWhere(this.arrDataScale, {value: width})) {
this.cmbScaleWidth.setValue(width);
} else {
this.cmbScaleWidth.setRawValue(width.toString() + ' ' + this.getTextPages(width));
}
if (_.findWhere(this.arrDataScale, {value: height})) {
this.cmbScaleHeight.setValue(height);
} else {
this.cmbScaleHeight.setRawValue(height.toString() + ' ' + this.getTextPages(height));
}
this.spnScale.setValue((scale !== null) ? scale : '', true);
}
},
getSettings: function () {
var props = {};
props.width = (this._state.width === null) ? null : this._state.width;
props.height = (this._state.height === null) ? null : this._state.height;
props.scale = this.spnScale.getNumberValue();
return props;
},
getTextPages: function (val) {
var lastNum = val % 10,
textPage;
if (lastNum > 0 && lastNum < 1.001) {
textPage = this.textOnePage;
} else if (lastNum > 0 && lastNum < 4.001) {
textPage = this.textFewPages;
} else {
textPage = this.textManyPages;
}
return textPage;
},
onChangeComboScale: function(type, combo, record, e) {
var me = this,
textPage,
value = record.value.toLowerCase();
var exprAuto = new RegExp('^\\s*(' + me.textAuto.toLowerCase() + ')\\s*$');
if (exprAuto.exec(value)) {
value = 0;
} else {
value = parseInt(value);
!isNaN(value) && (textPage = me.getTextPages(value));
}
if (isNaN(value) || value < 0 || value > 32767) {
Common.UI.error({
msg: me.textError,
callback: function() {
_.defer(function(btn) {
Common.NotificationCenter.trigger('edit:complete', me);
})
}
});
value = (type === 'width') ? me._state.width : me._state.height;
textPage = me.getTextPages(value);
}
if (value === null) value = 0;
if (type === 'width') {
if (_.findWhere(me.arrDataScale, {value: value})) {
me.cmbScaleWidth.setValue(value);
} else {
me.cmbScaleWidth.setValue('');
me.cmbScaleWidth.setRawValue(value.toString() + ' ' + textPage);
}
me._state.width = value;
} else if (type === 'height') {
if (_.findWhere(me.arrDataScale, {value: value})) {
me.cmbScaleHeight.setValue(value);
} else {
me.cmbScaleHeight.setValue('');
me.cmbScaleHeight.setRawValue(value.toString() + ' ' + textPage);
}
me._state.height = value;
}
},
textTitle: 'Scale Settings',
cancelButtonText: 'Cancel',
okButtonText: 'Ok',
textWidth: 'Width',
textHeight: 'Height',
textAuto: 'Auto',
textOnePage: 'page',
textFewPages: 'pages',
textManyPages: 'pages',
textError: 'The entered value is incorrect.',
textScaleTo: 'Scale To',
textFitTo: 'Fit To'
}, SSE.Views.ScaleDialog || {}))
});

View file

@ -1332,14 +1332,68 @@ define([
})
});
me.btnEditHeader = new Common.UI.Button({
id: 'tlbtn-editheader',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'btn-editheader',
caption: me.capBtnInsHeader,
lock : [_set.editCell, _set.selRangeEdit, _set.headerLock, _set.lostConnect, _set.coAuth]
me.mnuCustomScale = new Common.UI.MenuItem({
template: _.template([
'<div class="checkable custom-scale" style="padding: 5px 20px;font-weight: normal;line-height: 1.42857143;color: #444444;font-size: 11px;height: 32px;"',
'<% if(!_.isUndefined(options.stopPropagation)) { %>',
'data-stopPropagation="true"',
'<% } %>', '>',
'<label class="title" style="padding-top: 3px;">' + me.textScale + '</label>',
'<button id="custom-scale-up" type="button" style="float:right;" class="btn small btn-toolbar"><i class="icon btn-zoomin">&nbsp;</i></button>',
'<label id="value-custom-scale" style="float:right;padding: 3px 3px;min-width: 40px; text-align: center;"></label>',
'<button id="custom-scale-down" type="button" style="float:right;" class="btn small btn-toolbar"><i class="icon btn-zoomout">&nbsp;</i></button>',
'</div>'
].join('')),
stopPropagation: true,
toggleGroup: 'menuScale',
checkable: true,
value: 4
});
me.btnScale = new Common.UI.Button({
id: 'tlbtn-scale',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'btn-scale',
caption: me.capBtnScale,
lock: [_set.docPropsLock, _set.lostConnect, _set.coAuth],
menu: new Common.UI.Menu({
items: [
{
caption: me.textActualSize,
checkable: true,
toggleGroup: 'menuScale',
value: 0
},
{
caption: me.textFitSheetOnOnePage,
checkable: true,
toggleGroup: 'menuScale',
value: 1
},
{
caption: me.textFitAllColumnsOnOnePage,
checkable: true,
toggleGroup: 'menuScale',
value: 2
},
{
caption: me.textFitAllRowsOnOnePage,
checkable: true,
toggleGroup: 'menuScale',
value: 3
},
me.mnuCustomScale,
{caption: '--'},
{ caption: me.textScaleCustom,
checkable: true,
toggleGroup: 'menuScale',
value: 5
}
]})
});
me.mnuScale = me.btnScale.menu;
me.mnuScale.on('show:after', _.bind(me.onAfterShowMenuScale, me));
me.btnImgAlign = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'btn-img-align',
@ -1395,7 +1449,7 @@ define([
me.btnInsertChart, me.btnColorSchemas,
me.btnCopy, me.btnPaste, me.listStyles, me.btnPrint,
/*me.btnSave,*/ me.btnClearStyle, me.btnCopyStyle,
me.btnPageMargins, me.btnPageSize, me.btnPageOrient, me.btnPrintArea, me.btnImgAlign, me.btnImgBackward, me.btnImgForward, me.btnImgGroup, me.btnEditHeader
me.btnPageMargins, me.btnPageSize, me.btnPageOrient, me.btnPrintArea, me.btnImgAlign, me.btnImgBackward, me.btnImgForward, me.btnImgGroup, me.btnScale
];
_.each(me.lockControls.concat([me.btnSave]), function(cmp) {
@ -1409,6 +1463,43 @@ define([
return this;
},
onAfterShowMenuScale: function () {
var me = this;
if (me.api) {
var scale = me.api.asc_getPageOptions().asc_getPageSetup().asc_getScale();
$('#value-custom-scale', me.mnuCustomScale.$el).html(scale + '%');
me.valueCustomScale = scale;
}
if (!me.itemCustomScale) {
me.itemCustomScale = $('.custom-scale', me.mnuCustomScale.$el).on('click', _.bind(function () {
me.fireEvent('click:customscale', [undefined, undefined, undefined, me.valueCustomScale], this);
}, this));
}
if (!me.btnCustomScaleUp) {
me.btnCustomScaleUp = new Common.UI.Button({
el: $('#custom-scale-up', me.mnuCustomScale.$el),
cls: 'btn-toolbar'
}).on('click', _.bind(function () {
me.fireEvent('change:scalespn', ['up', me.valueCustomScale], this);
}, this));
}
if (!me.btnCustomScaleDown) {
me.btnCustomScaleDown = new Common.UI.Button({
el: $('#custom-scale-down', me.mnuCustomScale.$el),
cls: 'btn-toolbar'
}).on('click', _.bind(function () {
me.fireEvent('change:scalespn', ['down', me.valueCustomScale], this);
}, this));
}
},
setValueCustomScale: function(val) {
if (this.api && val !== null && val !== undefined) {
$('#value-custom-scale', this.mnuCustomScale.$el).html(val + '%');
this.valueCustomScale = val;
}
},
render: function (mode) {
var me = this;
@ -1555,7 +1646,10 @@ define([
_injectComponent('#slot-img-group', this.btnImgGroup);
_injectComponent('#slot-img-movefrwd', this.btnImgForward);
_injectComponent('#slot-img-movebkwd', this.btnImgBackward);
_injectComponent('#slot-btn-editheader', this.btnEditHeader);
_injectComponent('#slot-btn-scale', this.btnScale);
this.btnsEditHeader = Common.Utils.injectButtons($host.find('.slot-editheader'), 'tlbtn-editheader-', 'btn-editheader', this.capBtnInsHeader,
[SSE.enumLock.editCell, SSE.enumLock.selRangeEdit, SSE.enumLock.headerLock, SSE.enumLock.lostConnect, SSE.enumLock.coAuth]);
Array.prototype.push.apply(this.lockControls, this.btnsEditHeader);
// replacePlacholder('#id-toolbar-short-placeholder-btn-halign', this.btnHorizontalAlign);
// replacePlacholder('#id-toolbar-short-placeholder-btn-valign', this.btnVerticalAlign);
@ -1628,7 +1722,10 @@ define([
_updateHint(this.btnPageSize, this.tipPageSize);
_updateHint(this.btnPageMargins, this.tipPageMargins);
_updateHint(this.btnPrintArea, this.tipPrintArea);
_updateHint(this.btnEditHeader, this.tipEditHeader);
_updateHint(this.btnScale, this.tipScale);
this.btnsEditHeader.forEach(function (btn) {
_updateHint(btn, me.tipEditHeader);
});
// set menus
if (this.btnBorders && this.btnBorders.rendered) {
@ -2390,6 +2487,14 @@ define([
textTabData: 'Data',
capInsertTable: 'Table',
tipInsertTable: 'Insert table',
textTabFormula: 'Formula'
textTabFormula: 'Formula',
capBtnScale: 'Scale to Fit',
tipScale: 'Scale to Fit',
textActualSize: 'Actual Size',
textFitSheetOnOnePage: 'Fit sheet on One Page',
textFitAllColumnsOnOnePage: 'Fit All Columns on One Page',
textFitAllRowsOnOnePage: 'Fit All Rows on One Page',
textScaleCustom: 'Custom',
textScale: 'Scale'
}, SSE.Views.Toolbar || {}));
});

View file

@ -157,43 +157,43 @@ require([
]
});
Common.Locale.apply();
require([
'spreadsheeteditor/main/app/controller/Viewport',
'spreadsheeteditor/main/app/controller/DocumentHolder',
'spreadsheeteditor/main/app/controller/CellEditor',
'spreadsheeteditor/main/app/controller/Toolbar',
'spreadsheeteditor/main/app/controller/Statusbar',
'spreadsheeteditor/main/app/controller/Spellcheck',
'spreadsheeteditor/main/app/controller/RightMenu',
'spreadsheeteditor/main/app/controller/LeftMenu',
'spreadsheeteditor/main/app/controller/Main',
'spreadsheeteditor/main/app/controller/Print',
'spreadsheeteditor/main/app/controller/PivotTable',
'spreadsheeteditor/main/app/controller/DataTab',
'spreadsheeteditor/main/app/view/FileMenuPanels',
'spreadsheeteditor/main/app/view/ParagraphSettings',
'spreadsheeteditor/main/app/view/ImageSettings',
'spreadsheeteditor/main/app/view/ChartSettings',
'spreadsheeteditor/main/app/view/ShapeSettings',
'spreadsheeteditor/main/app/view/TextArtSettings',
'spreadsheeteditor/main/app/view/PivotSettings',
'spreadsheeteditor/main/app/view/FieldSettingsDialog',
'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog',
'spreadsheeteditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts',
'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat',
'common/main/lib/controller/Plugins'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
window.compareVersions = true;
app.start();
Common.Locale.apply(function(){
require([
'spreadsheeteditor/main/app/controller/Viewport',
'spreadsheeteditor/main/app/controller/DocumentHolder',
'spreadsheeteditor/main/app/controller/CellEditor',
'spreadsheeteditor/main/app/controller/Toolbar',
'spreadsheeteditor/main/app/controller/Statusbar',
'spreadsheeteditor/main/app/controller/Spellcheck',
'spreadsheeteditor/main/app/controller/RightMenu',
'spreadsheeteditor/main/app/controller/LeftMenu',
'spreadsheeteditor/main/app/controller/Main',
'spreadsheeteditor/main/app/controller/Print',
'spreadsheeteditor/main/app/controller/PivotTable',
'spreadsheeteditor/main/app/controller/DataTab',
'spreadsheeteditor/main/app/view/FileMenuPanels',
'spreadsheeteditor/main/app/view/ParagraphSettings',
'spreadsheeteditor/main/app/view/ImageSettings',
'spreadsheeteditor/main/app/view/ChartSettings',
'spreadsheeteditor/main/app/view/ShapeSettings',
'spreadsheeteditor/main/app/view/TextArtSettings',
'spreadsheeteditor/main/app/view/PivotSettings',
'spreadsheeteditor/main/app/view/FieldSettingsDialog',
'spreadsheeteditor/main/app/view/ValueFieldSettingsDialog',
'spreadsheeteditor/main/app/view/SignatureSettings',
'common/main/lib/util/utils',
'common/main/lib/util/LocalStorage',
'common/main/lib/controller/Fonts',
'common/main/lib/controller/Comments',
'common/main/lib/controller/Chat',
'common/main/lib/controller/Plugins'
,'common/main/lib/controller/ReviewChanges'
,'common/main/lib/controller/Protection'
,'common/main/lib/controller/Desktop'
], function() {
window.compareVersions = true;
app.start();
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -751,6 +751,7 @@
"SSE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"SSE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"SSE.Controllers.Main.errorFileSizeExceed": "The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.",
"SSE.Controllers.Print.strAllSheets": "All Sheets",
"SSE.Controllers.Print.textWarning": "Warning",
"SSE.Controllers.Print.txtCustom": "Custom",
@ -1532,6 +1533,7 @@
"SSE.Views.FileMenuPanels.DocumentInfo.txtSubject": "Subject",
"SSE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Title",
"SSE.Views.FileMenuPanels.DocumentInfo.txtUploaded": "Uploaded",
"SSE.Views.FileMenuPanels.DocumentInfo.okButtonText": "Apply",
"SSE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Change access rights",
"SSE.Views.FileMenuPanels.DocumentRights.txtRights": "Persons who have rights",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.okButtonText": "Apply",
@ -1633,6 +1635,13 @@
"SSE.Views.FormulaTab.txtFormulaTip": "Insert function",
"SSE.Views.FormulaTab.txtMore": "More functions",
"SSE.Views.FormulaTab.txtRecent": "Recently used",
"SSE.Views.FormulaTab.txtCalculation": "Calculation",
"SSE.Views.FormulaTab.tipCalculate": "Calculate",
"SSE.Views.FormulaTab.textCalculateWorkbook": "Calculate workbook",
"SSE.Views.FormulaTab.textCalculateCurrentSheet": "Calculate current sheet",
"SSE.Views.FormulaTab.textAutomatic": "Automatic",
"SSE.Views.FormulaTab.textManual": "Manual",
"SSE.Views.FormulaTab.tipCalculateTheEntireWorkbook": "Calculate the entire workbook",
"SSE.Views.GroupDialog.cancelButtonText": "Cancel",
"SSE.Views.GroupDialog.okButtonText": "OK",
"SSE.Views.GroupDialog.textColumns": "Columns",
@ -1750,6 +1759,7 @@
"SSE.Views.MainSettingsPrint.textPrintGrid": "Print Gridlines",
"SSE.Views.MainSettingsPrint.textPrintHeadings": "Print Row and Column Headings",
"SSE.Views.MainSettingsPrint.textSettings": "Settings for",
"SSE.Views.MainSettingsPrint.textCustomOptions": "Custom Options",
"SSE.Views.NamedRangeEditDlg.cancelButtonText": "Cancel",
"SSE.Views.NamedRangeEditDlg.errorCreateDefName": "The existing named ranges cannot be edited and the new ones cannot be created<br>at the moment as some of them are being edited.",
"SSE.Views.NamedRangeEditDlg.namePlaceholder": "Defined name",
@ -1938,6 +1948,7 @@
"SSE.Views.PrintSettings.textShowHeadings": "Show Rows and Columns Headings",
"SSE.Views.PrintSettings.textTitle": "Print Settings",
"SSE.Views.PrintSettings.textTitlePDF": "PDF Settings",
"SSE.Views.PrintSettings.textCustomOptions": "Custom Options",
"SSE.Views.RightMenu.txtCellSettings": "Cell settings",
"SSE.Views.RightMenu.txtChartSettings": "Chart settings",
"SSE.Views.RightMenu.txtImageSettings": "Image settings",
@ -2422,6 +2433,8 @@
"SSE.Views.Toolbar.txtTime": "Time",
"SSE.Views.Toolbar.txtUnmerge": "Unmerge Cells",
"SSE.Views.Toolbar.txtYen": "¥ Yen",
"SSE.Views.Toolbar.capBtnScale": "Scale to Fit",
"SSE.Views.Toolbar.tipScale": "Scale to Fit",
"SSE.Views.Top10FilterDialog.cancelButtonText": "Cancel",
"SSE.Views.Top10FilterDialog.okButtonText": "OK",
"SSE.Views.Top10FilterDialog.textType": "Show",
@ -2429,5 +2442,17 @@
"SSE.Views.Top10FilterDialog.txtItems": "Item",
"SSE.Views.Top10FilterDialog.txtPercent": "Percent",
"SSE.Views.Top10FilterDialog.txtTitle": "Top 10 AutoFilter",
"SSE.Views.Top10FilterDialog.txtTop": "Top"
"SSE.Views.Top10FilterDialog.txtTop": "Top",
"SSE.Views.ScaleDialog.textTitle": "Scale Settings",
"SSE.Views.ScaleDialog.cancelButtonText": "Cancel",
"SSE.Views.ScaleDialog.okButtonText": "Ok",
"SSE.Views.ScaleDialog.textWidth": "Width",
"SSE.Views.ScaleDialog.textHeight": "Height",
"SSE.Views.ScaleDialog.textAuto": "Auto",
"SSE.Views.ScaleDialog.textOnePage": "page",
"SSE.Views.ScaleDialog.textFewPages": "pages",
"SSE.Views.ScaleDialog.textManyPages": "pages",
"SSE.Views.ScaleDialog.textError": "The entered value is incorrect.",
"SSE.Views.ScaleDialog.textScaleTo": "Scale To",
"SSE.Views.ScaleDialog.textFitTo": "Fit To"
}

View file

@ -198,7 +198,7 @@
"Common.Views.SelectFileDlg.textTitle": "Выбрать источник данных",
"Common.Views.SignDialog.cancelButtonText": "Отмена",
"Common.Views.SignDialog.okButtonText": "ОК",
"Common.Views.SignDialog.textBold": "Жирный",
"Common.Views.SignDialog.textBold": "Полужирный",
"Common.Views.SignDialog.textCertificate": "Сертификат",
"Common.Views.SignDialog.textChange": "Изменить",
"Common.Views.SignDialog.textInputName": "Введите имя подписывающего",
@ -272,7 +272,7 @@
"SSE.Controllers.DocumentHolder.txtDeleteBreak": "Удалить принудительный разрыв",
"SSE.Controllers.DocumentHolder.txtDeleteChars": "Удалить вложенные знаки",
"SSE.Controllers.DocumentHolder.txtDeleteCharsAndSeparators": "Удалить вложенные знаки и разделители",
"SSE.Controllers.DocumentHolder.txtDeleteEq": "Удалить формулу",
"SSE.Controllers.DocumentHolder.txtDeleteEq": "Удалить уравнение",
"SSE.Controllers.DocumentHolder.txtDeleteGroupChar": "Удалить символ",
"SSE.Controllers.DocumentHolder.txtDeleteRadical": "Удалить радикал",
"SSE.Controllers.DocumentHolder.txtEnds": "Заканчивается на",
@ -310,8 +310,8 @@
"SSE.Controllers.DocumentHolder.txtInsertArgAfter": "Вставить аргумент после",
"SSE.Controllers.DocumentHolder.txtInsertArgBefore": "Вставить аргумент перед",
"SSE.Controllers.DocumentHolder.txtInsertBreak": "Вставить принудительный разрыв",
"SSE.Controllers.DocumentHolder.txtInsertEqAfter": "Вставить формулу после",
"SSE.Controllers.DocumentHolder.txtInsertEqBefore": "Вставить формулу перед",
"SSE.Controllers.DocumentHolder.txtInsertEqAfter": "Вставить уравнение после",
"SSE.Controllers.DocumentHolder.txtInsertEqBefore": "Вставить уравнение перед",
"SSE.Controllers.DocumentHolder.txtItems": "элементов",
"SSE.Controllers.DocumentHolder.txtKeepTextOnly": "Сохранить только текст",
"SSE.Controllers.DocumentHolder.txtLess": "Меньше",
@ -1641,7 +1641,7 @@
"SSE.Views.HeaderFooterDialog.okButtonText": "OK",
"SSE.Views.HeaderFooterDialog.textAlign": "Выровнять относительно полей страницы",
"SSE.Views.HeaderFooterDialog.textAll": "Все страницы",
"SSE.Views.HeaderFooterDialog.textBold": "Жирный",
"SSE.Views.HeaderFooterDialog.textBold": "Полужирный",
"SSE.Views.HeaderFooterDialog.textCenter": "В центре",
"SSE.Views.HeaderFooterDialog.textColor": "Цвет текста",
"SSE.Views.HeaderFooterDialog.textDate": "Дата",
@ -2225,7 +2225,7 @@
"SSE.Views.Toolbar.textAllBorders": "Все границы",
"SSE.Views.Toolbar.textArea": "С областями",
"SSE.Views.Toolbar.textBar": "Линейчатая",
"SSE.Views.Toolbar.textBold": "Жирный",
"SSE.Views.Toolbar.textBold": "Полужирный",
"SSE.Views.Toolbar.textBordersColor": "Цвет границ",
"SSE.Views.Toolbar.textBordersStyle": "Стиль границ",
"SSE.Views.Toolbar.textBottom": "Нижнее: ",

View file

@ -139,8 +139,6 @@ require([
]
});
Common.Locale.apply();
var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link');
@ -182,36 +180,38 @@ require([
//Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'spreadsheeteditor/mobile/app/controller/Editor',
'spreadsheeteditor/mobile/app/controller/Toolbar',
'spreadsheeteditor/mobile/app/controller/Search',
'spreadsheeteditor/mobile/app/controller/Main',
'spreadsheeteditor/mobile/app/controller/DocumentHolder'
,'spreadsheeteditor/mobile/app/controller/CellEditor'
,'spreadsheeteditor/mobile/app/controller/Statusbar'
,'spreadsheeteditor/mobile/app/controller/Settings'
,'spreadsheeteditor/mobile/app/controller/edit/EditContainer'
,'spreadsheeteditor/mobile/app/controller/edit/EditCell'
,'spreadsheeteditor/mobile/app/controller/edit/EditText'
,'spreadsheeteditor/mobile/app/controller/edit/EditImage'
,'spreadsheeteditor/mobile/app/controller/edit/EditShape'
,'spreadsheeteditor/mobile/app/controller/edit/EditChart'
,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink'
,'spreadsheeteditor/mobile/app/controller/add/AddContainer'
,'spreadsheeteditor/mobile/app/controller/add/AddChart'
,'spreadsheeteditor/mobile/app/controller/add/AddFunction'
,'spreadsheeteditor/mobile/app/controller/add/AddShape'
,'spreadsheeteditor/mobile/app/controller/add/AddOther'
,'spreadsheeteditor/mobile/app/controller/add/AddLink'
,'spreadsheeteditor/mobile/app/controller/FilterOptions'
,'common/mobile/lib/controller/Collaboration'
], function() {
window.compareVersions = true;
app.start();
Common.Locale.apply(function(){
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'spreadsheeteditor/mobile/app/controller/Editor',
'spreadsheeteditor/mobile/app/controller/Toolbar',
'spreadsheeteditor/mobile/app/controller/Search',
'spreadsheeteditor/mobile/app/controller/Main',
'spreadsheeteditor/mobile/app/controller/DocumentHolder'
,'spreadsheeteditor/mobile/app/controller/CellEditor'
,'spreadsheeteditor/mobile/app/controller/Statusbar'
,'spreadsheeteditor/mobile/app/controller/Settings'
,'spreadsheeteditor/mobile/app/controller/edit/EditContainer'
,'spreadsheeteditor/mobile/app/controller/edit/EditCell'
,'spreadsheeteditor/mobile/app/controller/edit/EditText'
,'spreadsheeteditor/mobile/app/controller/edit/EditImage'
,'spreadsheeteditor/mobile/app/controller/edit/EditShape'
,'spreadsheeteditor/mobile/app/controller/edit/EditChart'
,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink'
,'spreadsheeteditor/mobile/app/controller/add/AddContainer'
,'spreadsheeteditor/mobile/app/controller/add/AddChart'
,'spreadsheeteditor/mobile/app/controller/add/AddFunction'
,'spreadsheeteditor/mobile/app/controller/add/AddShape'
,'spreadsheeteditor/mobile/app/controller/add/AddOther'
,'spreadsheeteditor/mobile/app/controller/add/AddLink'
,'spreadsheeteditor/mobile/app/controller/FilterOptions'
,'common/mobile/lib/controller/Collaboration'
], function() {
window.compareVersions = true;
app.start();
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -150,8 +150,6 @@ require([
]
});
Common.Locale.apply();
var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link');
@ -193,35 +191,37 @@ require([
//Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'spreadsheeteditor/mobile/app/controller/Editor',
'spreadsheeteditor/mobile/app/controller/Toolbar',
'spreadsheeteditor/mobile/app/controller/Search',
'spreadsheeteditor/mobile/app/controller/Main',
'spreadsheeteditor/mobile/app/controller/DocumentHolder'
,'spreadsheeteditor/mobile/app/controller/CellEditor'
,'spreadsheeteditor/mobile/app/controller/Statusbar'
,'spreadsheeteditor/mobile/app/controller/Settings'
,'spreadsheeteditor/mobile/app/controller/edit/EditContainer'
,'spreadsheeteditor/mobile/app/controller/edit/EditCell'
,'spreadsheeteditor/mobile/app/controller/edit/EditText'
,'spreadsheeteditor/mobile/app/controller/edit/EditImage'
,'spreadsheeteditor/mobile/app/controller/edit/EditShape'
,'spreadsheeteditor/mobile/app/controller/edit/EditChart'
,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink'
,'spreadsheeteditor/mobile/app/controller/add/AddContainer'
,'spreadsheeteditor/mobile/app/controller/add/AddChart'
,'spreadsheeteditor/mobile/app/controller/add/AddFunction'
,'spreadsheeteditor/mobile/app/controller/add/AddShape'
,'spreadsheeteditor/mobile/app/controller/add/AddOther'
,'spreadsheeteditor/mobile/app/controller/add/AddLink'
,'spreadsheeteditor/mobile/app/controller/FilterOptions'
,'common/mobile/lib/controller/Collaboration'
], function() {
app.start();
Common.Locale.apply(function(){
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'spreadsheeteditor/mobile/app/controller/Editor',
'spreadsheeteditor/mobile/app/controller/Toolbar',
'spreadsheeteditor/mobile/app/controller/Search',
'spreadsheeteditor/mobile/app/controller/Main',
'spreadsheeteditor/mobile/app/controller/DocumentHolder'
,'spreadsheeteditor/mobile/app/controller/CellEditor'
,'spreadsheeteditor/mobile/app/controller/Statusbar'
,'spreadsheeteditor/mobile/app/controller/Settings'
,'spreadsheeteditor/mobile/app/controller/edit/EditContainer'
,'spreadsheeteditor/mobile/app/controller/edit/EditCell'
,'spreadsheeteditor/mobile/app/controller/edit/EditText'
,'spreadsheeteditor/mobile/app/controller/edit/EditImage'
,'spreadsheeteditor/mobile/app/controller/edit/EditShape'
,'spreadsheeteditor/mobile/app/controller/edit/EditChart'
,'spreadsheeteditor/mobile/app/controller/edit/EditHyperlink'
,'spreadsheeteditor/mobile/app/controller/add/AddContainer'
,'spreadsheeteditor/mobile/app/controller/add/AddChart'
,'spreadsheeteditor/mobile/app/controller/add/AddFunction'
,'spreadsheeteditor/mobile/app/controller/add/AddShape'
,'spreadsheeteditor/mobile/app/controller/add/AddOther'
,'spreadsheeteditor/mobile/app/controller/add/AddLink'
,'spreadsheeteditor/mobile/app/controller/FilterOptions'
,'common/mobile/lib/controller/Collaboration'
], function() {
app.start();
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {

View file

@ -1040,6 +1040,10 @@ define([
config.msg = this.errorFrmlMaxTextLength;
break;
case Asc.c_oAscError.ID.ConvertationOpenLimitError:
config.msg = this.errorFileSizeExceed;
break;
default:
config.msg = this.errorDefaultMessage.replace('%1', id);
break;
@ -1621,7 +1625,8 @@ define([
textPaidFeature: 'Paid feature',
textCustomLoader: 'Please note that according to the terms of the license you are not entitled to change the loader.<br>Please contact our Sales Department to get a quote.',
errorFrmlMaxTextLength: 'Text values in formulas are limited to 255 characters.<br>Use the CONCATENATE function or concatenation operator (&)',
waitText: 'Please, wait...'
waitText: 'Please, wait...',
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.'
}
})(), SSE.Controllers.Main || {}))
});

View file

@ -284,6 +284,7 @@
"SSE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"SSE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"SSE.Controllers.Main.errorFileSizeExceed": "The file size exceeds the limitation set for your server.<br>Please contact your Document Server administrator for details.",
"SSE.Controllers.Search.textNoTextFound": "Text not found",
"SSE.Controllers.Search.textReplaceAll": "Replace All",
"SSE.Controllers.Settings.notcriticalErrorTitle": "Warning",

View file

@ -165,6 +165,7 @@ module.exports = function(grunt) {
doRegisterTask('bootstrap');
doRegisterTask('iscroll');
doRegisterTask('fetch');
doRegisterTask('es6-promise');
doRegisterTask('jszip');
doRegisterTask('jsziputils');
doRegisterTask('requirejs', function(defaultConfig, packageFile) {
@ -511,6 +512,7 @@ module.exports = function(grunt) {
grunt.registerTask('deploy-jszip', ['jszip-init', 'clean', 'copy']);
grunt.registerTask('deploy-jsziputils', ['jsziputils-init', 'clean', 'copy']);
grunt.registerTask('deploy-requirejs', ['requirejs-init', 'clean', 'uglify']);
grunt.registerTask('deploy-es6-promise', ['es6-promise-init', 'clean', 'copy']);
grunt.registerTask('deploy-app-main', ['main-app-init', 'clean:prebuild', 'imagemin', 'less', 'requirejs', 'concat',
'copy', 'svgmin', 'inline', 'json-minify',

View file

@ -205,6 +205,17 @@
}
}
},
"es6-promise": {
"clean": [
"../deploy/web-apps/vendor/es6-promise"
],
"copy": {
"script": {
"src": "../vendor/es6-promise/es6-promise.auto.min.js",
"dest": "../deploy/web-apps/vendor/es6-promise/es6-promise.auto.min.js"
}
}
},
"requirejs": {
"clean": [
"../deploy/web-apps/vendor/requirejs"
@ -229,7 +240,8 @@
"deploy-iscroll",
"deploy-fetch",
"deploy-jszip",
"deploy-jsziputils"
"deploy-jsziputils",
"deploy-es6-promise"
]
}
}

1318
vendor/es6-promise/CHANGELOG.md vendored Normal file

File diff suppressed because it is too large Load diff

1383
vendor/es6-promise/LICENSE.htm vendored Normal file

File diff suppressed because it is too large Load diff

1303
vendor/es6-promise/README.md vendored Normal file

File diff suppressed because it is too large Load diff

1176
vendor/es6-promise/es6-promise.auto.js vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

1174
vendor/es6-promise/es6-promise.js vendored Normal file

File diff suppressed because it is too large Load diff

1
vendor/es6-promise/es6-promise.min.js vendored Normal file

File diff suppressed because one or more lines are too long