Merge branch 'develop' into feature/gradient-fill
|
@ -770,7 +770,9 @@
|
|||
if ( typeof(customization) == 'object' && ( customization.toolbarNoTabs ||
|
||||
(config.editorConfig.targetApp!=='desktop') && (customization.loaderName || customization.loaderLogo))) {
|
||||
index = "/index_loader.html";
|
||||
}
|
||||
} else if (config.editorConfig.mode == 'editdiagram' || config.editorConfig.mode == 'editmerge')
|
||||
index = "/index_internal.html";
|
||||
|
||||
}
|
||||
path += index;
|
||||
return path;
|
||||
|
|
34
apps/common/main/lib/util/fix-ie-compat.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
|
||||
if ( !window.fetch ) {
|
||||
var element = document.createElement('script');
|
||||
element['src'] = '../../../vendor/fetch/fetch.umd.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(element);
|
||||
|
||||
if ( !window.Promise ) {
|
||||
element = document.createElement('script');
|
||||
element['src'] = '../../../vendor/es6-promise/es6-promise.auto.min.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(element);
|
||||
}
|
||||
|
||||
if (typeof Object.assign != 'function') {
|
||||
Object.assign = function(target) {
|
||||
'use strict';
|
||||
if (target == null) {
|
||||
throw new TypeError('Cannot convert undefined or null to object');
|
||||
}
|
||||
|
||||
target = Object(target);
|
||||
for (var index = 1; index < arguments.length; index++) {
|
||||
var source = arguments[index];
|
||||
if (source != null) {
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
}
|
||||
}
|
|
@ -594,6 +594,20 @@ Common.Utils.String = new (function() {
|
|||
parseFloat: function(string) {
|
||||
(typeof string === 'string') && (string = string.replace(',', '.'));
|
||||
return parseFloat(string)
|
||||
},
|
||||
|
||||
encodeSurrogateChar: function(nUnicode) {
|
||||
if (nUnicode < 0x10000)
|
||||
{
|
||||
return String.fromCharCode(nUnicode);
|
||||
}
|
||||
else
|
||||
{
|
||||
nUnicode = nUnicode - 0x10000;
|
||||
var nLeadingChar = 0xD800 | (nUnicode >> 10);
|
||||
var nTrailingChar = 0xDC00 | (nUnicode & 0x3FF);
|
||||
return String.fromCharCode(nLeadingChar) + String.fromCharCode(nTrailingChar);
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
|
199
apps/common/main/lib/view/AutoCorrectDialog.js
Normal file
|
@ -0,0 +1,199 @@
|
|||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2010-2020
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* AutoCorrectDialog.js
|
||||
*
|
||||
* Created by Julia Radzhabova on 03.07.2020
|
||||
* Copyright (c) 2020 Ascensio System SIA. All rights reserved.
|
||||
*
|
||||
*/
|
||||
if (Common === undefined)
|
||||
var Common = {};
|
||||
define([
|
||||
'common/main/lib/component/ListView',
|
||||
'common/main/lib/component/Window'
|
||||
], function () { 'use strict';
|
||||
|
||||
Common.Views.AutoCorrectDialog = Common.UI.Window.extend(_.extend({
|
||||
options: {
|
||||
width: 448,
|
||||
cls: 'modal-dlg',
|
||||
buttons: null
|
||||
},
|
||||
|
||||
initialize : function(options) {
|
||||
_.extend(this.options, {
|
||||
title: this.textTitle
|
||||
}, options || {});
|
||||
|
||||
this.template = [
|
||||
'<div class="box">',
|
||||
'<div id="symbol-table-pnl-special">',
|
||||
'<table cols="1" style="width: 100%;">',
|
||||
'<tr>',
|
||||
'<td style="padding-bottom: 8px;">',
|
||||
'<label style="font-weight: bold;">' + this.textMathCorrect + '</label>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td>',
|
||||
'<label style="width: 117px;">' + this.textReplace + '</label>',
|
||||
'<label>' + this.textBy + '</label>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td>',
|
||||
'<div id="auto-correct-replace" style="height:22px;width: 115px;margin-right: 2px;display: inline-block;"></div>',
|
||||
'<div id="auto-correct-by" style="height:22px;width: 299px;display: inline-block;"></div>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td>',
|
||||
'<div id="auto-correct-math-list" class="" style="width:100%; height: 254px;"></div>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'</table>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
'<div class="footer center">',
|
||||
'<button class="btn normal dlg-btn" result="cancel" style="width: 86px;">' + this.closeButtonText + '</button>',
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
this.options.tpl = _.template(this.template)(this.options);
|
||||
this.props = this.options.props || [];
|
||||
|
||||
Common.UI.Window.prototype.initialize.call(this, this.options);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
Common.UI.Window.prototype.render.call(this);
|
||||
|
||||
var $window = this.getChild();
|
||||
var me = this;
|
||||
|
||||
// special
|
||||
this.mathList = new Common.UI.ListView({
|
||||
el: $window.find('#auto-correct-math-list'),
|
||||
store: new Common.UI.DataViewStore(this.props),
|
||||
simpleAddMode: true,
|
||||
template: _.template(['<div class="listview inner" style=""></div>'].join('')),
|
||||
itemTemplate: _.template([
|
||||
'<div id="<%= id %>" class="list-item" style="pointer-events:none;width: 100%;display:flex;">',
|
||||
'<div style="min-width:110px;padding-right: 5px;"><%= replaced %></div>',
|
||||
'<div style="flex-grow:1;font-family: Cambria Math;font-size:13px;"><%= by %></div>',
|
||||
'</div>'
|
||||
].join('')),
|
||||
scrollAlwaysVisible: true
|
||||
});
|
||||
this.mathList.on('item:select', _.bind(this.onSelectMathItem, this));
|
||||
|
||||
this.inputReplace = new Common.UI.InputField({
|
||||
el : $window.find('#auto-correct-replace'),
|
||||
allowBlank : true,
|
||||
validateOnChange : true,
|
||||
validation : function () { return true; }
|
||||
}).on ('changing', function (input, value) {
|
||||
if (value.length) {
|
||||
var store = me.mathList.store;
|
||||
var _selectedItem = store.find(function(item) {
|
||||
if ( item.get('replaced').indexOf(value) == 0) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (_selectedItem) {
|
||||
me.mathList.selectRecord(_selectedItem, true);
|
||||
me.mathList.scrollToRecord(_selectedItem);
|
||||
} else {
|
||||
me.mathList.deselectAll();
|
||||
}
|
||||
} else {
|
||||
me.mathList.deselectAll();
|
||||
}
|
||||
});
|
||||
|
||||
this.inputReplace.cmpEl.find('input').on('keydown', function(event){
|
||||
if (event.key == 'ArrowDown') {
|
||||
var _selectedItem = me.mathList.getSelectedRec() || me.mathList.store.at(0);
|
||||
if (_selectedItem) {
|
||||
me.mathList.selectRecord(_selectedItem);
|
||||
me.mathList.scrollToRecord(_selectedItem);
|
||||
}
|
||||
_.delay(function(){
|
||||
me.mathList.cmpEl.find('.listview').focus();
|
||||
},10);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
this.inputBy = new Common.UI.InputField({
|
||||
el : $window.find('#auto-correct-by'),
|
||||
allowBlank : true,
|
||||
validateOnChange : true,
|
||||
validation : function () { return true; }
|
||||
});
|
||||
// this.inputBy.cmpEl.find('input').css('font-size', '13px');
|
||||
|
||||
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||
},
|
||||
|
||||
onSelectMathItem: function(lisvView, itemView, record) {
|
||||
this.inputReplace.setValue(record.get('replaced'));
|
||||
this.inputBy.setValue(record.get('by'));
|
||||
},
|
||||
|
||||
show: function() {
|
||||
Common.UI.Window.prototype.show.apply(this, arguments);
|
||||
|
||||
var me = this;
|
||||
_.delay(function(){
|
||||
$('input', me.inputReplace.cmpEl).select().focus();
|
||||
},100);
|
||||
},
|
||||
|
||||
onBtnClick: function(event) {
|
||||
this.close();
|
||||
},
|
||||
|
||||
onPrimary: function(event) {
|
||||
return true;
|
||||
},
|
||||
|
||||
textTitle: 'AutoCorrect',
|
||||
textMathCorrect: 'Math AutoCorrect',
|
||||
textReplace: 'Replace:',
|
||||
textBy: 'By:'
|
||||
|
||||
}, Common.Views.AutoCorrectDialog || {}))
|
||||
});
|
|
@ -53,8 +53,8 @@ define([
|
|||
Common.Views.ListSettingsDialog = Common.UI.Window.extend(_.extend({
|
||||
options: {
|
||||
type: 0, // 0 - markers, 1 - numbers
|
||||
width: 230,
|
||||
height: 200,
|
||||
width: 280,
|
||||
height: 255,
|
||||
style: 'min-width: 240px;',
|
||||
cls: 'modal-dlg',
|
||||
split: false,
|
||||
|
@ -70,28 +70,59 @@ define([
|
|||
|
||||
this.template = [
|
||||
'<div class="box">',
|
||||
'<div class="input-row" style="margin-bottom: 10px;">',
|
||||
'<label class="text" style="width: 70px;">' + this.txtSize + '</label><div id="id-dlg-list-size"></div><label class="text" style="margin-left: 10px;">' + this.txtOfText + '</label>',
|
||||
'<div style="margin-bottom: 16px;">',
|
||||
'<button type="button" class="btn btn-text-default auto" id="id-dlg-list-bullet" style="border-top-right-radius: 0;border-bottom-right-radius: 0;">', this.textBulleted,'</button>',
|
||||
'<button type="button" class="btn btn-text-default auto" id="id-dlg-list-numbering" style="border-top-left-radius: 0;border-bottom-left-radius: 0;border-left-width: 0;margin-left: -1px;">', this.textNumbering,'</button>',
|
||||
'</div>',
|
||||
'<div style="margin-bottom: 10px;">',
|
||||
'<label class="text" style="width: 70px;">' + this.txtColor + '</label><div id="id-dlg-list-color" style="display: inline-block;"></div>',
|
||||
'<div style="height:120px;">',
|
||||
'<table cols="3">',
|
||||
'<tr>',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;min-width: 50px;">',
|
||||
'<label class="text">' + this.txtType + '</label>',
|
||||
'</td>',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;width: 100px;">',
|
||||
'<div id="id-dlg-list-numbering-format" class="input-group-nr" style="width: 100px;"></div>',
|
||||
'<div id="id-dlg-list-bullet-format" class="input-group-nr" style="width: 100px;"></div>',
|
||||
'</td>',
|
||||
'<td style="padding-bottom: 8px;"></td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;min-width: 50px;">',
|
||||
'<label class="text">' + this.txtSize + '</label>',
|
||||
'</td>',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;width: 100px;">',
|
||||
'<div id="id-dlg-list-size"></div>',
|
||||
'</td>',
|
||||
'<td style="padding-bottom: 8px;">',
|
||||
'<label class="text" style="white-space: nowrap;">' + this.txtOfText + '</label>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<tr class="numbering">',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;min-width: 50px;">',
|
||||
'<label class="text" style="white-space: nowrap;">' + this.txtStart + '</label>',
|
||||
'</td>',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;width: 100px;">',
|
||||
'<div id="id-dlg-list-start"></div>',
|
||||
'</td>',
|
||||
'<td style="padding-bottom: 8px;"></td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;min-width: 50px;">',
|
||||
'<label class="text">' + this.txtColor + '</label>',
|
||||
'</td>',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;width: 100px;">',
|
||||
'<div id="id-dlg-list-color"></div>',
|
||||
'</td>',
|
||||
'<td style="padding-bottom: 8px;"></td>',
|
||||
'</tr>',
|
||||
'</table>',
|
||||
'</div>',
|
||||
'<% if (type == 0) { %>',
|
||||
'<div class="input-row" style="margin-bottom: 10px;">',
|
||||
'<label class="text" style="width: 70px;vertical-align: top;">' + this.txtBullet + '</label>',
|
||||
'<button type="button" class="btn btn-text-default" id="id-dlg-list-edit" style="width:53px;display: inline-block;vertical-align: top;"></button>',
|
||||
'</div>',
|
||||
'<% } %>',
|
||||
'<% if (type == 1) { %>',
|
||||
'<div class="input-row" style="margin-bottom: 10px;">',
|
||||
'<label class="text" style="width: 70px;">' + this.txtStart + '</label><div id="id-dlg-list-start"></div>',
|
||||
'</div>',
|
||||
'<% } %>',
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
this.props = options.props;
|
||||
this.options.tpl = _.template(this.template)(this.options);
|
||||
this.color = '000000';
|
||||
|
||||
Common.UI.Window.prototype.initialize.call(this, this.options);
|
||||
},
|
||||
|
@ -103,10 +134,148 @@ define([
|
|||
$window = this.getChild();
|
||||
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||
|
||||
me.btnBullet = new Common.UI.Button({
|
||||
el: $('#id-dlg-list-bullet'),
|
||||
enableToggle: true,
|
||||
toggleGroup: 'list-type',
|
||||
allowDepress: false,
|
||||
pressed: true
|
||||
});
|
||||
me.btnBullet.on('click', _.bind(me.onListTypeClick, me, 0));
|
||||
|
||||
me.btnNumbering = new Common.UI.Button({
|
||||
el: $('#id-dlg-list-numbering'),
|
||||
enableToggle: true,
|
||||
toggleGroup: 'list-type',
|
||||
allowDepress: false
|
||||
});
|
||||
me.btnNumbering.on('click', _.bind(me.onListTypeClick, me, 1));
|
||||
|
||||
this.cmbNumFormat = new Common.UI.ComboBox({
|
||||
el : $('#id-dlg-list-numbering-format'),
|
||||
menuStyle : 'min-width: 100%;max-height: 183px;',
|
||||
editable : false,
|
||||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ displayValue: this.txtNone, value: -1 },
|
||||
{ displayValue: 'A, B, C,...', value: 4 },
|
||||
{ displayValue: 'a), b), c),...', value: 6 },
|
||||
{ displayValue: 'a, b, c,...', value: 6 },
|
||||
{ displayValue: '1, 2, 3,...', value: 1 },
|
||||
{ displayValue: '1), 2), 3),...', value: 2 },
|
||||
{ displayValue: 'I, II, III,...', value: 3 },
|
||||
{ displayValue: 'i, ii, iii,...', value: 7 }
|
||||
]
|
||||
});
|
||||
this.cmbNumFormat.on('selected', _.bind(function (combo, record) {
|
||||
if (this._changedProps) {
|
||||
this._changedProps.asc_putListType(1, record.value);
|
||||
}
|
||||
}, this));
|
||||
this.cmbNumFormat.setValue(1);
|
||||
|
||||
var itemsTemplate =
|
||||
[
|
||||
'<% _.each(items, function(item) { %>',
|
||||
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">',
|
||||
'<%= item.displayValue %><% if (item.value === 0) { %><span style="font-family:<%=item.font%>;"><%=item.symbol%></span><% } %>',
|
||||
'</a></li>',
|
||||
'<% }); %>'
|
||||
];
|
||||
var template = [
|
||||
'<div class="input-group combobox input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">',
|
||||
'<div class="form-control" style="padding-top:3px; line-height: 14px; cursor: pointer; <%= style %>"></div>',
|
||||
'<div style="display: table-cell;"></div>',
|
||||
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret img-commonctrl"></span></button>',
|
||||
'<ul class="dropdown-menu <%= menuCls %>" style="<%= menuStyle %>" role="menu">'].concat(itemsTemplate).concat([
|
||||
'</ul>',
|
||||
'</div>'
|
||||
]);
|
||||
this.cmbBulletFormat = new Common.UI.ComboBoxCustom({
|
||||
el : $('#id-dlg-list-bullet-format'),
|
||||
menuStyle : 'min-width: 100%;max-height: 183px;',
|
||||
style : "width: 100px;",
|
||||
editable : false,
|
||||
template : _.template(template.join('')),
|
||||
itemsTemplate: _.template(itemsTemplate.join('')),
|
||||
data : [
|
||||
{ displayValue: this.txtNone, value: -1 },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "•", font: 'Arial' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "o", font: 'Courier New' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "§", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "v", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "Ø", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "ü", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "w", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "–", font: 'Arial' },
|
||||
{ displayValue: this.txtNewBullet, value: 1 }
|
||||
],
|
||||
updateFormControl: function(record) {
|
||||
var formcontrol = $(this.el).find('.form-control');
|
||||
if (record) {
|
||||
if (record.get('value')==0)
|
||||
formcontrol[0].innerHTML = record.get('displayValue') + '<span style="font-family:' + (record.get('font') || 'Arial') + '">' + record.get('symbol') + '</span>';
|
||||
else
|
||||
formcontrol[0].innerHTML = record.get('displayValue');
|
||||
} else
|
||||
formcontrol[0].innerHTML = '';
|
||||
}
|
||||
});
|
||||
var rec = this.cmbBulletFormat.store.at(1);
|
||||
this.cmbBulletFormat.selectRecord(rec);
|
||||
this.bulletProps = {symbol: rec.get('symbol'), font: rec.get('font')};
|
||||
this.cmbBulletFormat.on('selected', _.bind(function (combo, record) {
|
||||
if (this._changedProps) {
|
||||
if (record.value === 1) {
|
||||
var me = this,
|
||||
props = me.bulletProps,
|
||||
handler = function(dlg, result, settings) {
|
||||
if (result == 'ok') {
|
||||
props.changed = true;
|
||||
props.code = settings.code;
|
||||
props.font = settings.font;
|
||||
props.symbol = settings.symbol;
|
||||
if (me._changedProps) {
|
||||
me._changedProps.asc_putFont(props.font);
|
||||
me._changedProps.asc_putSymbol(props.symbol);
|
||||
}
|
||||
}
|
||||
var store = combo.store;
|
||||
if (!store.findWhere({value: 0, symbol: props.symbol, font: props.font}))
|
||||
store.add({ displayValue: me.txtSymbol + ': ', value: 0, symbol: props.symbol, font: props.font }, {at: store.length-1});
|
||||
combo.setData(store.models);
|
||||
combo.selectRecord(combo.store.findWhere({value: 0, symbol: props.symbol, font: props.font}));
|
||||
},
|
||||
win = new Common.Views.SymbolTableDialog({
|
||||
api: me.options.api,
|
||||
lang: me.options.interfaceLang,
|
||||
modal: true,
|
||||
type: 0,
|
||||
font: props.font,
|
||||
symbol: props.symbol,
|
||||
handler: handler
|
||||
});
|
||||
win.show();
|
||||
win.on('symbol:dblclick', handler);
|
||||
} else if (record.value == -1) {
|
||||
this._changedProps.asc_putListType(0, record.value);
|
||||
} else {
|
||||
this.bulletProps.changed = true;
|
||||
this.bulletProps.code = record.code;
|
||||
this.bulletProps.font = record.font;
|
||||
this.bulletProps.symbol = record.symbol;
|
||||
if (this._changedProps) {
|
||||
this._changedProps.asc_putFont(this.bulletProps.font);
|
||||
this._changedProps.asc_putSymbol(this.bulletProps.symbol);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, this));
|
||||
|
||||
this.spnSize = new Common.UI.MetricSpinner({
|
||||
el : $window.find('#id-dlg-list-size'),
|
||||
step : 1,
|
||||
width : 53,
|
||||
width : 100,
|
||||
value : 100,
|
||||
defaultUnit : '',
|
||||
maxValue : 400,
|
||||
|
@ -114,14 +283,15 @@ define([
|
|||
allowDecimal: false
|
||||
}).on('change', function(field, newValue, oldValue, eOpts){
|
||||
if (me._changedProps) {
|
||||
me._changedProps.asc_putBulletSize(field.getNumberValue());
|
||||
me._changedProps.asc_putSize(field.getNumberValue());
|
||||
}
|
||||
});
|
||||
|
||||
this.btnColor = new Common.UI.ColorButton({
|
||||
parentEl: $window.find('#id-dlg-list-color'),
|
||||
style: "width:53px;",
|
||||
additionalAlign: this.menuAddAlign
|
||||
style: "width:45px;",
|
||||
additionalAlign: this.menuAddAlign,
|
||||
color: this.color
|
||||
});
|
||||
this.btnColor.on('color:select', _.bind(this.onColorsSelect, this));
|
||||
this.colors = this.btnColor.getPicker();
|
||||
|
@ -129,7 +299,7 @@ define([
|
|||
this.spnStart = new Common.UI.MetricSpinner({
|
||||
el : $window.find('#id-dlg-list-start'),
|
||||
step : 1,
|
||||
width : 53,
|
||||
width : 100,
|
||||
value : 1,
|
||||
defaultUnit : '',
|
||||
maxValue : 32767,
|
||||
|
@ -137,16 +307,14 @@ define([
|
|||
allowDecimal: false
|
||||
}).on('change', function(field, newValue, oldValue, eOpts){
|
||||
if (me._changedProps) {
|
||||
me._changedProps.put_NumStartAt(field.getNumberValue());
|
||||
me._changedProps.asc_putNumStartAt(field.getNumberValue());
|
||||
}
|
||||
});
|
||||
|
||||
this.btnEdit = new Common.UI.Button({
|
||||
el: $window.find('#id-dlg-list-edit'),
|
||||
hint: this.tipChange
|
||||
});
|
||||
this.btnEdit.on('click', _.bind(this.onEditBullet, this));
|
||||
this.btnEdit.cmpEl.css({'font-size': '16px', 'line-height': '16px'});
|
||||
me.numberingControls = $window.find('.numbering');
|
||||
|
||||
var el = $window.find('table tr:first() td:first()');
|
||||
el.width(Math.max($window.find('.numbering .text').width(), el.width()));
|
||||
|
||||
this.afterRender();
|
||||
},
|
||||
|
@ -161,43 +329,46 @@ define([
|
|||
},
|
||||
|
||||
onColorsSelect: function(btn, color) {
|
||||
this.color = color;
|
||||
if (this._changedProps) {
|
||||
this._changedProps.asc_putBulletColor(Common.Utils.ThemeColor.getRgbColor(color));
|
||||
this._changedProps.asc_putColor(Common.Utils.ThemeColor.getRgbColor(color));
|
||||
}
|
||||
},
|
||||
|
||||
onEditBullet: function() {
|
||||
var me = this,
|
||||
props = me.bulletProps,
|
||||
handler = function(dlg, result, settings) {
|
||||
if (result == 'ok') {
|
||||
props.changed = true;
|
||||
props.code = settings.code;
|
||||
props.font = settings.font;
|
||||
props.symbol = settings.symbol;
|
||||
props.font && me.btnEdit.cmpEl.css('font-family', props.font);
|
||||
settings.symbol && me.btnEdit.setCaption(settings.symbol);
|
||||
if (me._changedProps) {
|
||||
me._changedProps.asc_putBulletFont(props.font);
|
||||
me._changedProps.asc_putBulletSymbol(props.symbol);
|
||||
}
|
||||
}
|
||||
},
|
||||
win = new Common.Views.SymbolTableDialog({
|
||||
api: me.options.api,
|
||||
lang: me.options.interfaceLang,
|
||||
modal: true,
|
||||
type: 0,
|
||||
font: props.font,
|
||||
symbol: props.symbol,
|
||||
handler: handler
|
||||
});
|
||||
win.show();
|
||||
win.on('symbol:dblclick', handler);
|
||||
onListTypeClick: function(type, btn, event) {
|
||||
this.ShowHideElem(type);
|
||||
},
|
||||
|
||||
ShowHideElem: function(value) {
|
||||
this.numberingControls.toggleClass('hidden', value==0);
|
||||
this.cmbNumFormat.setVisible(value==1);
|
||||
this.cmbBulletFormat.setVisible(value==0);
|
||||
},
|
||||
|
||||
_handleInput: function(state) {
|
||||
if (this.options.handler) {
|
||||
if (this.options.handler)
|
||||
{
|
||||
var type = this.btnBullet.pressed ? 0 : 1;
|
||||
if (this.originalType == AscFormat.BULLET_TYPE_BULLET_NONE) {
|
||||
this._changedProps = new Asc.asc_CBullet();
|
||||
this._changedProps.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.color));
|
||||
this._changedProps.asc_putSize(this.spnSize.getNumberValue());
|
||||
}
|
||||
|
||||
if (this.originalType == AscFormat.BULLET_TYPE_BULLET_NONE ||
|
||||
this.originalType == AscFormat.BULLET_TYPE_BULLET_CHAR && type==1 || this.originalType == AscFormat.BULLET_TYPE_BULLET_AUTONUM && type==0) { // changed list type
|
||||
if (type==0) {//markers
|
||||
if (this.cmbBulletFormat.getValue()==-1) {
|
||||
this._changedProps.asc_putListType(0, -1);
|
||||
} else {
|
||||
this._changedProps.asc_putFont(this.bulletProps.font);
|
||||
this._changedProps.asc_putSymbol(this.bulletProps.symbol);
|
||||
}
|
||||
} else {
|
||||
this._changedProps.asc_putListType(1, this.cmbNumFormat.getValue());
|
||||
this._changedProps.asc_putNumStartAt(this.spnStart.getNumberValue());
|
||||
}
|
||||
}
|
||||
this.options.handler.call(this, state, this._changedProps);
|
||||
}
|
||||
this.close();
|
||||
|
@ -214,40 +385,73 @@ define([
|
|||
|
||||
_setDefaults: function (props) {
|
||||
if (props) {
|
||||
this.spnSize.setValue(props.asc_getBulletSize() || '', true);
|
||||
var value = props.get_NumStartAt();
|
||||
this.spnStart.setValue(value || '', true);
|
||||
this.spnStart.setDisabled(value===null);
|
||||
var color = props.asc_getBulletColor();
|
||||
if (color) {
|
||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
color = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
|
||||
} else {
|
||||
color = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||
}
|
||||
} else
|
||||
color = 'transparent';
|
||||
this.btnColor.setColor(color);
|
||||
if ( typeof(color) == 'object' ) {
|
||||
var isselected = false;
|
||||
for (var i=0; i<10; i++) {
|
||||
if ( Common.Utils.ThemeColor.ThemeValues[i] == color.effectValue ) {
|
||||
this.colors.select(color,true);
|
||||
isselected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isselected) this.colors.clearSelection();
|
||||
} else
|
||||
this.colors.select(color,true);
|
||||
var type = 0;
|
||||
var bullet = props.asc_getBullet();
|
||||
if (bullet) {
|
||||
this.originalType = bullet.asc_getType();
|
||||
|
||||
if (this.type==0) {
|
||||
this.bulletProps = {symbol: props.asc_getBulletSymbol(), font: props.asc_getBulletFont()};
|
||||
this.bulletProps.font && this.btnEdit.cmpEl.css('font-family', this.bulletProps.font);
|
||||
this.bulletProps.symbol && this.btnEdit.setCaption(this.bulletProps.symbol);
|
||||
this.spnSize.setValue(bullet.asc_getSize() || '', true);
|
||||
|
||||
var color = bullet.asc_getColor();
|
||||
if (color) {
|
||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||
color = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
|
||||
} else {
|
||||
color = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
|
||||
}
|
||||
} else
|
||||
color = 'transparent';
|
||||
this.color = Common.Utils.ThemeColor.colorValue2EffectId(color);
|
||||
this.btnColor.setColor(color);
|
||||
if ( typeof(color) == 'object' ) {
|
||||
var isselected = false;
|
||||
for (var i=0; i<10; i++) {
|
||||
if ( Common.Utils.ThemeColor.ThemeValues[i] == color.effectValue ) {
|
||||
this.colors.select(color,true);
|
||||
isselected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isselected) this.colors.clearSelection();
|
||||
} else
|
||||
this.colors.select(color,true);
|
||||
|
||||
if (this.originalType == AscFormat.BULLET_TYPE_BULLET_NONE) {
|
||||
this.cmbNumFormat.setValue(-1);
|
||||
this.cmbBulletFormat.setValue(-1);
|
||||
type = this.type;
|
||||
} else if (this.originalType == AscFormat.BULLET_TYPE_BULLET_CHAR) {
|
||||
var symbol = bullet.asc_getSymbol();
|
||||
if (symbol) {
|
||||
this.bulletProps = {symbol: symbol, font: bullet.asc_getFont()};
|
||||
if (!this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font}))
|
||||
this.cmbBulletFormat.store.add({ displayValue: this.txtSymbol + ': ', value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font }, {at: this.cmbBulletFormat.store.length-1});
|
||||
this.cmbBulletFormat.setData(this.cmbBulletFormat.store.models);
|
||||
this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font}));
|
||||
} else
|
||||
this.cmbBulletFormat.setValue('');
|
||||
this._changedProps = bullet;
|
||||
type = 0;
|
||||
} else if (this.originalType == AscFormat.BULLET_TYPE_BULLET_AUTONUM) {
|
||||
var autonum = bullet.asc_getAutoNumType();
|
||||
this.cmbNumFormat.setValue(autonum, '');
|
||||
|
||||
var value = bullet.asc_getNumStartAt();
|
||||
this.spnStart.setValue(value || '', true);
|
||||
this.spnStart.setDisabled(value===null);
|
||||
this._changedProps = bullet;
|
||||
type = 1;
|
||||
}
|
||||
} else {// different bullet types
|
||||
this.cmbNumFormat.setValue(-1);
|
||||
this.cmbBulletFormat.setValue(-1);
|
||||
this._changedProps = new Asc.asc_CBullet();
|
||||
type = this.type;
|
||||
}
|
||||
}
|
||||
this._changedProps = new Asc.asc_CParagraphProperty();
|
||||
|
||||
(type == 1) ? this.btnNumbering.toggle(true) : this.btnBullet.toggle(true);
|
||||
this.ShowHideElem(type);
|
||||
},
|
||||
|
||||
txtTitle: 'List Settings',
|
||||
|
@ -255,7 +459,11 @@ define([
|
|||
txtColor: 'Color',
|
||||
txtOfText: '% of text',
|
||||
txtStart: 'Start at',
|
||||
txtBullet: 'Bullet',
|
||||
tipChange: 'Change bullet'
|
||||
textBulleted: 'Bulleted',
|
||||
textNumbering: 'Numbered',
|
||||
txtType: 'Type',
|
||||
txtNone: 'None',
|
||||
txtNewBullet: 'New bullet',
|
||||
txtSymbol: 'Symbol'
|
||||
}, Common.Views.ListSettingsDialog || {}))
|
||||
});
|
|
@ -104,7 +104,7 @@ define([
|
|||
'</div>',
|
||||
'</div>',
|
||||
'<% } %>',
|
||||
'<% if (type == Common.Utils.importTextType.CSV || type == Common.Utils.importTextType.Paste || type == Common.Utils.importTextType.Columns) { %>',
|
||||
'<% if (type == Common.Utils.importTextType.CSV) { %>',
|
||||
'<div style="display: inline-block; margin-bottom:15px;">',
|
||||
'<label class="header">' + t.txtDelimiter + '</label>',
|
||||
'<div>',
|
||||
|
@ -113,6 +113,16 @@ define([
|
|||
'</div>',
|
||||
'</div>',
|
||||
'<% } %>',
|
||||
'<% if (type == Common.Utils.importTextType.Paste || type == Common.Utils.importTextType.Columns) { %>',
|
||||
'<div style="display: inline-block; margin-bottom:15px;width: 100%;">',
|
||||
'<label class="header">' + t.txtDelimiter + '</label>',
|
||||
'<div>',
|
||||
'<div id="id-delimiters-combo" class="input-group-nr" style="max-width: 100px;display: inline-block; vertical-align: middle;"></div>',
|
||||
'<div id="id-delimiter-other" class="input-row" style="display: inline-block; vertical-align: middle;margin-left: 10px;"></div>',
|
||||
'<button type="button" class="btn btn-text-default" id="id-delimiters-advanced" style="min-width:100px; display: inline-block;float:right;">' + t.txtAdvanced + '</button>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
'<% } %>',
|
||||
'<% if (!!preview) { %>',
|
||||
'<div style="">',
|
||||
'<label class="header">' + t.txtPreview + '</label>',
|
||||
|
@ -234,7 +244,10 @@ define([
|
|||
if (!this.closable && this.type == Common.Utils.importTextType.TXT) { //save last encoding only for opening txt files
|
||||
Common.localStorage.setItem("de-settings-open-encoding", encoding);
|
||||
}
|
||||
this.handler.call(this, state, encoding, delimiter, delimiterChar);
|
||||
|
||||
var decimal = this.separatorOptions ? this.separatorOptions.decimal : undefined,
|
||||
thousands = this.separatorOptions ? this.separatorOptions.thousands : undefined;
|
||||
this.handler.call(this, state, encoding, delimiter, delimiterChar, decimal, thousands);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -336,6 +349,13 @@ define([
|
|||
this.inputDelimiter.setVisible(false);
|
||||
if (this.preview)
|
||||
this.inputDelimiter.on ('changing', _.bind(this.updatePreview, this));
|
||||
|
||||
if (this.type == Common.Utils.importTextType.Paste || this.type == Common.Utils.importTextType.Columns) {
|
||||
this.btnAdvanced = new Common.UI.Button({
|
||||
el: $('#id-delimiters-advanced')
|
||||
});
|
||||
this.btnAdvanced.on('click', _.bind(this.onAdvancedClick, this));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -355,7 +375,12 @@ define([
|
|||
break;
|
||||
case Common.Utils.importTextType.Paste:
|
||||
case Common.Utils.importTextType.Columns:
|
||||
this.api.asc_TextImport(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar), _.bind(this.previewCallback, this), this.type == Common.Utils.importTextType.Paste);
|
||||
var options = new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar);
|
||||
if (this.separatorOptions) {
|
||||
options.asc_setNumberDecimalSeparator(this.separatorOptions.decimal);
|
||||
options.asc_setNumberGroupSeparator(this.separatorOptions.thousands);
|
||||
}
|
||||
this.api.asc_TextImport(options, _.bind(this.previewCallback, this), this.type == Common.Utils.importTextType.Paste);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
@ -444,6 +469,28 @@ define([
|
|||
this.updatePreview();
|
||||
},
|
||||
|
||||
onAdvancedClick: function() {
|
||||
if (!SSE) return;
|
||||
|
||||
var me = this,
|
||||
decimal = this.api.asc_getDecimalSeparator(),
|
||||
thousands = this.api.asc_getGroupSeparator();
|
||||
(new SSE.Views.AdvancedSeparatorDialog({
|
||||
props: {
|
||||
decimal: decimal,
|
||||
thousands: thousands
|
||||
},
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok') {
|
||||
me.separatorOptions = {
|
||||
decimal: (value.decimal.length > 0) ? value.decimal : decimal,
|
||||
thousands: (value.thousands.length > 0) ? value.thousands : thousands
|
||||
};
|
||||
}
|
||||
}
|
||||
})).show();
|
||||
},
|
||||
|
||||
txtDelimiter : "Delimiter",
|
||||
txtEncoding : "Encoding ",
|
||||
txtSpace : "Space",
|
||||
|
@ -458,7 +505,8 @@ define([
|
|||
txtComma: 'Comma',
|
||||
txtColon: 'Colon',
|
||||
txtSemicolon: 'Semicolon',
|
||||
txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset.'
|
||||
txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset.',
|
||||
txtAdvanced: 'Advanced'
|
||||
|
||||
}, Common.Views.OpenDialog || {}));
|
||||
});
|
|
@ -783,10 +783,10 @@ define([
|
|||
toolbar.btnContentControls.setDisabled(paragraph_locked || header_locked);
|
||||
if (!(paragraph_locked || header_locked)) {
|
||||
var control_disable = control_plain || content_locked;
|
||||
for (var i=0; i<7; i++)
|
||||
for (var i=0; i<14; i++)
|
||||
toolbar.btnContentControls.menu.items[i].setDisabled(control_disable);
|
||||
toolbar.btnContentControls.menu.items[8].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked);
|
||||
toolbar.btnContentControls.menu.items[10].setDisabled(!in_control);
|
||||
toolbar.btnContentControls.menu.items[15].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked);
|
||||
toolbar.btnContentControls.menu.items[17].setDisabled(!in_control);
|
||||
}
|
||||
|
||||
var need_text_disable = paragraph_locked || header_locked || in_chart || rich_edit_lock || plain_edit_lock;
|
||||
|
@ -1826,16 +1826,29 @@ define([
|
|||
}
|
||||
}
|
||||
} else {
|
||||
var isnew = (item.value.indexOf('new-')==0),
|
||||
oPr, oFormPr;
|
||||
if (isnew) {
|
||||
oFormPr = new AscCommon.CSdtFormPr();
|
||||
}
|
||||
if (item.value == 'plain' || item.value == 'rich')
|
||||
this.api.asc_AddContentControl((item.value=='plain') ? Asc.c_oAscSdtLevelType.Inline : Asc.c_oAscSdtLevelType.Block);
|
||||
else if (item.value == 'picture')
|
||||
this.api.asc_AddContentControlPicture();
|
||||
else if (item.value == 'checkbox')
|
||||
this.api.asc_AddContentControlCheckBox();
|
||||
else if (item.value == 'date')
|
||||
else if (item.value.indexOf('picture')>=0)
|
||||
this.api.asc_AddContentControlPicture(oFormPr);
|
||||
else if (item.value.indexOf('checkbox')>=0 || item.value.indexOf('radiobox')>=0) {
|
||||
if (isnew) {
|
||||
oPr = new AscCommon.CSdtCheckBoxPr();
|
||||
(item.value.indexOf('radiobox')>=0) && oPr.put_GroupKey('Group 1');
|
||||
}
|
||||
this.api.asc_AddContentControlCheckBox(oPr, oFormPr);
|
||||
} else if (item.value == 'date')
|
||||
this.api.asc_AddContentControlDatePicker();
|
||||
else if (item.value == 'combobox' || item.value == 'dropdown')
|
||||
this.api.asc_AddContentControlList(item.value == 'combobox');
|
||||
else if (item.value.indexOf('combobox')>=0 || item.value.indexOf('dropdown')>=0)
|
||||
this.api.asc_AddContentControlList(item.value.indexOf('combobox')>=0, oPr, oFormPr);
|
||||
else if (item.value == 'new-field') {
|
||||
oPr = new AscCommon.CSdtTextFormPr();
|
||||
this.api.asc_AddContentControlTextForm(oPr, oFormPr);
|
||||
}
|
||||
|
||||
Common.component.Analytics.trackEvent('ToolBar', 'Add Content Control');
|
||||
}
|
||||
|
|
|
@ -148,4 +148,70 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="id-adv-control-settings-additional" class="settings-panel">
|
||||
<div class="inner-content">
|
||||
<table cols="1" style="width: 100%;">
|
||||
<tr class="group-key">
|
||||
<td class="padding-small">
|
||||
<label class="input-label"><%= scope.textGroupKey %></label>
|
||||
<div id="control-settings-txt-groupkey"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small">
|
||||
<label class="input-label"><%= scope.textKey %></label>
|
||||
<div id="control-settings-txt-key"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small">
|
||||
<label class="input-label"><%= scope.textLabel %></label>
|
||||
<div id="control-settings-txt-label"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-large">
|
||||
<label class="input-label"><%= scope.textHelp %></label>
|
||||
<textarea id="control-settings-txt-help" class="form-control" style="width: 100%; height: 90px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-large">
|
||||
<div id="control-settings-chb-required"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="id-adv-control-settings-field" class="settings-panel">
|
||||
<div class="inner-content">
|
||||
<table cols="2" style="width: auto;">
|
||||
<tr>
|
||||
<td class="padding-small" colspan="2">
|
||||
<div id="control-settings-chb-max-chars" style="display: inline-block;margin-right: 10px;"></div>
|
||||
<div id="control-settings-spin-max-chars" style="display: inline-block;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small" colspan="2">
|
||||
<div id="control-settings-chb-comb"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small">
|
||||
<label class="input-label" style="margin-right: 10px;"><%= scope.textPlaceholderSymbol %></label>
|
||||
</td>
|
||||
<td class="padding-small">
|
||||
<button type="button" class="btn btn-text-default" id="control-settings-btn-placeholder-edit" style="width:53px"></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small" colspan="2">
|
||||
<label class="input-label" style="margin-right: 10px;"><%= scope.textWidth %></label>
|
||||
<div id="control-settings-spin-width" style=""></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -66,7 +66,9 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
{panelId: 'id-adv-control-settings-lock', panelCaption: this.textLock},
|
||||
{panelId: 'id-adv-control-settings-list', panelCaption: this.textCombobox},
|
||||
{panelId: 'id-adv-control-settings-date', panelCaption: this.textDate},
|
||||
{panelId: 'id-adv-control-settings-checkbox',panelCaption: this.textCheckbox}
|
||||
{panelId: 'id-adv-control-settings-checkbox',panelCaption: this.textCheckbox},
|
||||
{panelId: 'id-adv-control-settings-field', panelCaption: this.textField},
|
||||
{panelId: 'id-adv-control-settings-additional',panelCaption: this.textAdditional}
|
||||
],
|
||||
contentTemplate: _.template(contentTemplate)({
|
||||
scope: this
|
||||
|
@ -248,6 +250,99 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
this.btnEditUnchecked.cmpEl.css({'font-size': '16px', 'line-height': '16px'});
|
||||
this.btnEditUnchecked.on('click', _.bind(this.onEditCheckbox, this, false));
|
||||
|
||||
// Additional
|
||||
this.txtGroupKey = new Common.UI.InputField({
|
||||
el : $('#control-settings-txt-groupkey'),
|
||||
allowBlank : true,
|
||||
validateOnChange: false,
|
||||
validateOnBlur: false,
|
||||
style : 'width: 100%;',
|
||||
// maxLength: 64,
|
||||
value : ''
|
||||
});
|
||||
|
||||
this.txtKey = new Common.UI.InputField({
|
||||
el : $('#control-settings-txt-key'),
|
||||
allowBlank : true,
|
||||
validateOnChange: false,
|
||||
validateOnBlur: false,
|
||||
style : 'width: 100%;',
|
||||
// maxLength: 64,
|
||||
value : ''
|
||||
});
|
||||
|
||||
this.txtLabel = new Common.UI.InputField({
|
||||
el : $('#control-settings-txt-label'),
|
||||
allowBlank : true,
|
||||
validateOnChange: false,
|
||||
validateOnBlur: false,
|
||||
style : 'width: 100%;',
|
||||
// maxLength: 64,
|
||||
value : ''
|
||||
});
|
||||
|
||||
this.textareaHelp = this.$window.find('#control-settings-txt-help');
|
||||
this.textareaHelp.keydown(function (event) {
|
||||
if (event.keyCode == Common.UI.Keys.RETURN) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
me.isHelpChanged = true;
|
||||
});
|
||||
|
||||
this.chRequired = new Common.UI.CheckBox({
|
||||
el: $('#control-settings-chb-required'),
|
||||
labelText: this.textRequired
|
||||
});
|
||||
|
||||
// Text field
|
||||
this.btnEditPlaceholder = new Common.UI.Button({
|
||||
el: $('#control-settings-btn-placeholder-edit'),
|
||||
hint: this.tipChange
|
||||
});
|
||||
this.btnEditPlaceholder.cmpEl.css({'font-size': '16px', 'line-height': '16px'});
|
||||
this.btnEditPlaceholder.on('click', _.bind(this.onEditPlaceholder, this));
|
||||
|
||||
this.spnWidth = new Common.UI.MetricSpinner({
|
||||
el: $('#control-settings-spin-width'),
|
||||
step: .1,
|
||||
width: 80,
|
||||
defaultUnit : "cm",
|
||||
value: '3 cm',
|
||||
maxValue: 55.88,
|
||||
minValue: 0.1
|
||||
});
|
||||
|
||||
this.spnMaxChars = new Common.UI.MetricSpinner({
|
||||
el: $('#control-settings-spin-max-chars'),
|
||||
step: 1,
|
||||
width: 53,
|
||||
defaultUnit : "",
|
||||
value: '10',
|
||||
maxValue: 1000000,
|
||||
minValue: 1
|
||||
});
|
||||
|
||||
this.chMaxChars = new Common.UI.CheckBox({
|
||||
el: $('#control-settings-chb-max-chars'),
|
||||
labelText: this.textMaxChars
|
||||
});
|
||||
this.chMaxChars.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
||||
this.spnMaxChars.setDisabled(field.getValue()!='checked');
|
||||
}, this));
|
||||
|
||||
this.chComb = new Common.UI.CheckBox({
|
||||
el: $('#control-settings-chb-comb'),
|
||||
labelText: this.textComb
|
||||
});
|
||||
this.chComb.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
||||
var checked = (field.getValue()=='checked');
|
||||
if (checked) {
|
||||
this.chMaxChars.setValue(true);
|
||||
}
|
||||
this.btnEditPlaceholder.setDisabled(!checked);
|
||||
this.spnWidth.setDisabled(!checked);
|
||||
}, this));
|
||||
|
||||
this.afterRender();
|
||||
},
|
||||
|
||||
|
@ -272,6 +367,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
|
||||
afterRender: function() {
|
||||
this.updateThemeColors();
|
||||
this.updateMetricUnit();
|
||||
this._setDefaults(this.props);
|
||||
if (this.storageName) {
|
||||
var value = Common.localStorage.getItem(this.storageName);
|
||||
|
@ -316,12 +412,13 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
this.chLockEdit.setValue(val==Asc.c_oAscSdtLockType.SdtContentLocked || val==Asc.c_oAscSdtLockType.ContentLocked);
|
||||
|
||||
var type = props.get_SpecificType();
|
||||
var specProps;
|
||||
|
||||
//for list controls
|
||||
this.btnsCategory[2].setVisible(type == Asc.c_oAscContentControlSpecificType.ComboBox || type == Asc.c_oAscContentControlSpecificType.DropDownList);
|
||||
if (type == Asc.c_oAscContentControlSpecificType.ComboBox || type == Asc.c_oAscContentControlSpecificType.DropDownList) {
|
||||
this.btnsCategory[2].setCaption(type == Asc.c_oAscContentControlSpecificType.ComboBox ? this.textCombobox : this.textDropDown);
|
||||
var specProps = (type == Asc.c_oAscContentControlSpecificType.ComboBox) ? props.get_ComboBoxPr() : props.get_DropDownListPr();
|
||||
specProps = (type == Asc.c_oAscContentControlSpecificType.ComboBox) ? props.get_ComboBoxPr() : props.get_DropDownListPr();
|
||||
if (specProps) {
|
||||
var count = specProps.get_ItemsCount();
|
||||
var arr = [];
|
||||
|
@ -339,7 +436,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
//for date picker
|
||||
this.btnsCategory[3].setVisible(type == Asc.c_oAscContentControlSpecificType.DateTime);
|
||||
if (type == Asc.c_oAscContentControlSpecificType.DateTime) {
|
||||
var specProps = props.get_DateTimePr();
|
||||
specProps = props.get_DateTimePr();
|
||||
if (specProps) {
|
||||
this.datetime = specProps;
|
||||
var lang = specProps.get_LangId() || this.options.controlLang;
|
||||
|
@ -360,7 +457,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
// for check box
|
||||
this.btnsCategory[4].setVisible(type == Asc.c_oAscContentControlSpecificType.CheckBox);
|
||||
if (type == Asc.c_oAscContentControlSpecificType.CheckBox) {
|
||||
var specProps = props.get_CheckBoxPr();
|
||||
specProps = props.get_CheckBoxPr();
|
||||
if (specProps) {
|
||||
var code = specProps.get_CheckedSymbol(),
|
||||
font = specProps.get_CheckedFont();
|
||||
|
@ -377,6 +474,56 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
}
|
||||
|
||||
this.type = type;
|
||||
|
||||
// form settings
|
||||
var formPr = props.get_FormPr();
|
||||
this.btnsCategory[6].setVisible(!!formPr);
|
||||
if (formPr) {
|
||||
val = formPr.get_Key();
|
||||
this.txtKey.setValue(val ? val : '');
|
||||
|
||||
val = formPr.get_Label();
|
||||
this.txtLabel.setValue(val ? val : '');
|
||||
|
||||
val = formPr.get_HelpText();
|
||||
this.textareaHelp.val(val ? val : '');
|
||||
|
||||
val = formPr.get_Required();
|
||||
this.chRequired.setValue(!!val);
|
||||
|
||||
var hidden = true;
|
||||
if (type == Asc.c_oAscContentControlSpecificType.CheckBox && specProps) {
|
||||
val = specProps.get_GroupKey();
|
||||
this.txtGroupKey.setValue(val ? val : '');
|
||||
hidden = (typeof val !== 'string');
|
||||
!hidden && this.btnsCategory[4].setCaption(this.textRadiobox);
|
||||
}
|
||||
this.$window.find('.group-key').toggleClass('hidden', hidden);
|
||||
}
|
||||
|
||||
var formTextPr = props.get_TextFormPr();
|
||||
this.btnsCategory[5].setVisible(!!formTextPr);
|
||||
if (formTextPr) {
|
||||
var code = formTextPr.get_PlaceHolderSymbol(),
|
||||
font = formTextPr.get_PlaceHolderFont();
|
||||
font && this.btnEditPlaceholder.cmpEl.css('font-family', font);
|
||||
code && this.btnEditPlaceholder.setCaption(String.fromCharCode(code));
|
||||
this.placeholder = {code: code, font: font};
|
||||
|
||||
val = formTextPr.get_Comb();
|
||||
this.chComb.setValue(!!val, true);
|
||||
|
||||
this.btnEditPlaceholder.setDisabled(!val);
|
||||
this.spnWidth.setDisabled(!val);
|
||||
|
||||
val = formTextPr.get_MaxCharacters();
|
||||
this.chMaxChars.setValue(val && val>=0, true);
|
||||
this.spnMaxChars.setDisabled(!val || val<0);
|
||||
this.spnMaxChars.setValue(val && val>=0 ? val : 10);
|
||||
|
||||
val = formTextPr.get_Width();
|
||||
this.spnWidth.setValue(val ? val : '', true);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -404,9 +551,10 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
lock = Asc.c_oAscSdtLockType.ContentLocked;
|
||||
props.put_Lock(lock);
|
||||
|
||||
var specProps;
|
||||
// for list controls
|
||||
if (this.type == Asc.c_oAscContentControlSpecificType.ComboBox || this.type == Asc.c_oAscContentControlSpecificType.DropDownList) {
|
||||
var specProps = (this.type == Asc.c_oAscContentControlSpecificType.ComboBox) ? this.props.get_ComboBoxPr() : this.props.get_DropDownListPr();
|
||||
specProps = (this.type == Asc.c_oAscContentControlSpecificType.ComboBox) ? this.props.get_ComboBoxPr() : this.props.get_DropDownListPr();
|
||||
specProps.clear();
|
||||
this.list.store.each(function (item, index) {
|
||||
specProps.add_Item(item.get('name'), item.get('value'));
|
||||
|
@ -416,7 +564,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
|
||||
//for date picker
|
||||
if (this.type == Asc.c_oAscContentControlSpecificType.DateTime) {
|
||||
var specProps = this.props.get_DateTimePr();
|
||||
specProps = this.props.get_DateTimePr();
|
||||
specProps.put_DateFormat(this.txtDate.getValue());
|
||||
specProps.put_LangId(this.cmbLang.getValue());
|
||||
props.put_DateTimePr(specProps);
|
||||
|
@ -425,7 +573,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
// for check box
|
||||
if (this.type == Asc.c_oAscContentControlSpecificType.CheckBox) {
|
||||
if (this.checkedBox && this.checkedBox.changed || this.uncheckedBox && this.uncheckedBox.changed) {
|
||||
var specProps = this.props.get_CheckBoxPr();
|
||||
specProps = this.props.get_CheckBoxPr();
|
||||
if (this.checkedBox) {
|
||||
specProps.put_CheckedSymbol(this.checkedBox.code);
|
||||
specProps.put_CheckedFont(this.checkedBox.font);
|
||||
|
@ -438,6 +586,43 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
}
|
||||
}
|
||||
|
||||
if (this.btnsCategory[6].isVisible()) {
|
||||
var formPr = new AscCommon.CSdtFormPr();
|
||||
formPr.put_Key(this.txtKey.getValue());
|
||||
formPr.put_Label(this.txtLabel.getValue());
|
||||
formPr.put_Required(this.chRequired.getValue()=='checked');
|
||||
|
||||
if (this.isHelpChanged)
|
||||
formPr.put_HelpText(this.textareaHelp.val());
|
||||
|
||||
if (this.type == Asc.c_oAscContentControlSpecificType.CheckBox && !this.$window.find('.group-key').hasClass('hidden')) {
|
||||
specProps = this.props.get_CheckBoxPr();
|
||||
if (specProps) {
|
||||
specProps.put_GroupKey(this.txtGroupKey.getValue());
|
||||
props.put_CheckBoxPr(specProps);
|
||||
}
|
||||
}
|
||||
props.put_FormPr(formPr);
|
||||
}
|
||||
|
||||
if (this.btnsCategory[5].isVisible()) {
|
||||
var formTextPr = new AscCommon.CSdtTextFormPr();
|
||||
if (this.spnWidth.getValue())
|
||||
formTextPr.put_Width(this.spnWidth.getNumberValue());
|
||||
if (this.placeholder && this.placeholder.changed) {
|
||||
formTextPr.put_PlaceHolderSymbol(this.placeholder.code);
|
||||
formTextPr.put_PlaceHolderFont(this.placeholder.font);
|
||||
}
|
||||
formTextPr.put_Comb(this.chComb.getValue()=='checked');
|
||||
|
||||
var checked = (this.chMaxChars.getValue()=='checked' || this.chComb.getValue()=='checked');
|
||||
formTextPr.put_MaxCharacters(checked);
|
||||
if (checked)
|
||||
formTextPr.put_MaxCharacters(this.spnMaxChars.getNumberValue() || 12);
|
||||
|
||||
props.put_TextFormPr(formTextPr);
|
||||
}
|
||||
|
||||
return props;
|
||||
},
|
||||
|
||||
|
@ -601,11 +786,44 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
}
|
||||
},
|
||||
|
||||
onEditPlaceholder: function() {
|
||||
if (this.api) {
|
||||
var me = this,
|
||||
props = me.placeholder,
|
||||
cmp = me.btnEditPlaceholder,
|
||||
handler = function(dlg, result, settings) {
|
||||
if (result == 'ok') {
|
||||
props.changed = true;
|
||||
props.code = settings.code;
|
||||
props.font = settings.font;
|
||||
props.font && cmp.cmpEl.css('font-family', props.font);
|
||||
settings.symbol && cmp.setCaption(settings.symbol);
|
||||
}
|
||||
},
|
||||
win = new Common.Views.SymbolTableDialog({
|
||||
api: me.api,
|
||||
lang: me.options.interfaceLang,
|
||||
modal: true,
|
||||
type: 0,
|
||||
font: props.font,
|
||||
code: props.code,
|
||||
handler: handler
|
||||
});
|
||||
win.show();
|
||||
win.on('symbol:dblclick', handler);
|
||||
}
|
||||
},
|
||||
|
||||
onSelectFormat: function(lisvView, itemView, record) {
|
||||
if (!record) return;
|
||||
this.txtDate.setValue(record.get('format'));
|
||||
},
|
||||
|
||||
updateMetricUnit: function() {
|
||||
this.spnWidth.setDefaultUnit(Common.Utils.Metric.getCurrentMetricName());
|
||||
this.spnWidth.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
},
|
||||
|
||||
textTitle: 'Content Control Settings',
|
||||
textName: 'Title',
|
||||
textTag: 'Tag',
|
||||
|
@ -636,7 +854,19 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
textChecked: 'Checked symbol',
|
||||
textUnchecked: 'Unchecked symbol',
|
||||
tipChange: 'Change symbol',
|
||||
textPlaceholder: 'Placeholder'
|
||||
textPlaceholder: 'Placeholder',
|
||||
textAdditional: 'Additional',
|
||||
textField: 'Text field',
|
||||
textKey: 'Key',
|
||||
textLabel: 'Label',
|
||||
textHelp: 'Help text',
|
||||
textRequired: 'Required',
|
||||
textGroupKey: 'Group key',
|
||||
textRadiobox: 'Radio box',
|
||||
textWidth: 'Width',
|
||||
textPlaceholderSymbol: 'Placeholder symbol',
|
||||
textMaxChars: 'Characters limit',
|
||||
textComb: 'Comb of characters'
|
||||
|
||||
}, DE.Views.ControlSettingsDialog || {}))
|
||||
});
|
|
@ -239,6 +239,7 @@ define([
|
|||
|
||||
if ( !!this.api ) {
|
||||
this.panels['info'].setApi(this.api);
|
||||
if (this.panels['opts']) this.panels['opts'].setApi(this.api);
|
||||
if ( this.panels['protect'] )
|
||||
this.panels['protect'].setApi(this.api);
|
||||
}
|
||||
|
@ -373,6 +374,7 @@ define([
|
|||
|
||||
if ( this.rendered ) {
|
||||
this.panels['info'].setApi(api);
|
||||
if (this.panels['opts']) this.panels['opts'].setApi(api);
|
||||
if (this.panels['protect']) this.panels['protect'].setApi(api);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,8 @@
|
|||
*/
|
||||
|
||||
define([
|
||||
'common/main/lib/view/DocumentAccessDialog'
|
||||
'common/main/lib/view/DocumentAccessDialog',
|
||||
'common/main/lib/view/AutoCorrectDialog'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
|
@ -202,6 +203,10 @@ define([
|
|||
'<td class="left"><label><%= scope.txtSpellCheck %></label></td>',
|
||||
'<td class="right"><div id="fms-chb-spell-check"></div></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="edit">',
|
||||
'<td class="left"><label><%= scope.txtProofing %></label></td>',
|
||||
'<td class="right"><button type="button" class="btn btn-text-default" id="fms-btn-auto-correct" style="width:auto; display: inline-block;padding-right: 10px;padding-left: 10px;"><%= scope.txtAutoCorrect %></button></div></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="edit">',
|
||||
'<td class="left"><label><%= scope.txtInput %></label></td>',
|
||||
'<td class="right"><div id="fms-chb-input-mode"></div></td>',
|
||||
|
@ -430,6 +435,11 @@ define([
|
|||
labelText: this.strPasteButton
|
||||
});
|
||||
|
||||
this.btnAutoCorrect = new Common.UI.Button({
|
||||
el: $markup.findById('#fms-btn-auto-correct')
|
||||
});
|
||||
this.btnAutoCorrect.on('click', _.bind(this.autoCorrect, this));
|
||||
|
||||
this.btnApply = new Common.UI.Button({
|
||||
el: $markup.findById('#fms-btn-apply')
|
||||
});
|
||||
|
@ -473,6 +483,11 @@ define([
|
|||
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
|
||||
},
|
||||
|
||||
setApi: function(o) {
|
||||
this.api = o;
|
||||
return this;
|
||||
},
|
||||
|
||||
updateSettings: function() {
|
||||
this.chInputMode.setValue(Common.Utils.InternalSettings.get("de-settings-inputmode"));
|
||||
|
||||
|
@ -593,6 +608,29 @@ define([
|
|||
this._fontRender = combo.getValue();
|
||||
},
|
||||
|
||||
autoCorrect: function() {
|
||||
if (!this._mathCorrect) {
|
||||
var arr = (this.api) ? this.api.asc_getAutoCorrectMathSymbols() : [],
|
||||
data = [];
|
||||
_.each(arr, function(item, index){
|
||||
var itm = {replaced: item[0]};
|
||||
if (typeof item[1]=='object') {
|
||||
itm.by = '';
|
||||
_.each(item[1], function(ch){
|
||||
itm.by += Common.Utils.String.encodeSurrogateChar(ch);
|
||||
});
|
||||
} else {
|
||||
itm.by = Common.Utils.String.encodeSurrogateChar(item[1]);
|
||||
}
|
||||
data.push(itm);
|
||||
});
|
||||
this._mathCorrect = data;
|
||||
}
|
||||
(new Common.Views.AutoCorrectDialog({
|
||||
props: this._mathCorrect
|
||||
})).show();
|
||||
},
|
||||
|
||||
strLiveComment: 'Turn on option',
|
||||
strInputMode: 'Turn on hieroglyphs',
|
||||
strZoom: 'Default Zoom Value',
|
||||
|
@ -642,7 +680,9 @@ define([
|
|||
txtRunMacrosDesc: 'Enable all macros without notification',
|
||||
txtStopMacrosDesc: 'Disable all macros without notification',
|
||||
strPaste: 'Cut, copy and paste',
|
||||
strPasteButton: 'Show Paste Options button when content is pasted'
|
||||
strPasteButton: 'Show Paste Options button when content is pasted',
|
||||
txtProofing: 'Proofing',
|
||||
txtAutoCorrect: 'AutoCorrect options...'
|
||||
}, DE.Views.FileMenuPanels.Settings || {}));
|
||||
|
||||
DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -643,6 +643,31 @@ define([
|
|||
value: 'checkbox'
|
||||
},
|
||||
{caption: '--'},
|
||||
{
|
||||
caption: this.textNewFieldControl,
|
||||
value: 'new-field'
|
||||
},
|
||||
{
|
||||
caption: this.textNewPictureControl,
|
||||
value: 'new-picture'
|
||||
},
|
||||
{
|
||||
caption: this.textNewComboboxControl,
|
||||
value: 'new-combobox'
|
||||
},
|
||||
{
|
||||
caption: this.textNewDropdownControl,
|
||||
value: 'new-dropdown'
|
||||
},
|
||||
{
|
||||
caption: this.textNewCheckboxControl,
|
||||
value: 'new-checkbox'
|
||||
},
|
||||
{
|
||||
caption: this.textNewRadioboxControl,
|
||||
value: 'new-radiobox'
|
||||
},
|
||||
{caption: '--'},
|
||||
{
|
||||
caption: this.textRemoveControl,
|
||||
// iconCls: 'menu__icon cc-remove',
|
||||
|
@ -1957,7 +1982,7 @@ define([
|
|||
|
||||
this.btnMailRecepients.setVisible(mode.canCoAuthoring == true && mode.canUseMailMerge);
|
||||
this.listStylesAdditionalMenuItem.setVisible(mode.canEditStyles);
|
||||
this.btnContentControls.menu.items[10].setVisible(mode.canEditContentControl);
|
||||
this.btnContentControls.menu.items[17].setVisible(mode.canEditContentControl);
|
||||
this.mnuInsertImage.items[2].setVisible(this.mode.canRequestInsertImage || this.mode.fileChoiceUrl && this.mode.fileChoiceUrl.indexOf("{documentType}")>-1);
|
||||
},
|
||||
|
||||
|
@ -2321,7 +2346,13 @@ define([
|
|||
mniEraseTable: 'Erase Table',
|
||||
textListSettings: 'List Settings',
|
||||
capBtnDateTime: 'Date & Time',
|
||||
tipDateTime: 'Insert current date and time'
|
||||
tipDateTime: 'Insert current date and time',
|
||||
textNewFieldControl: 'New text field',
|
||||
textNewPictureControl: 'New picture',
|
||||
textNewComboboxControl: 'New combo box',
|
||||
textNewCheckboxControl: 'New check box',
|
||||
textNewRadioboxControl: 'New radio box',
|
||||
textNewDropdownControl: 'New drop-down list'
|
||||
}
|
||||
})(), DE.Views.Toolbar || {}));
|
||||
});
|
||||
|
|
|
@ -201,6 +201,9 @@
|
|||
|
||||
window.frameEditorId = params["frameEditorId"];
|
||||
window.parentOrigin = params["parentOrigin"];
|
||||
|
||||
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent))
|
||||
document.write('<script src="../../common/main/lib/util/fix-ie-compat.js"><\/script>');
|
||||
</script>
|
||||
|
||||
<!-- debug begin -->
|
||||
|
|
|
@ -157,6 +157,10 @@
|
|||
"Common.Views.About.txtPoweredBy": "Powered by",
|
||||
"Common.Views.About.txtTel": "tel.: ",
|
||||
"Common.Views.About.txtVersion": "Version ",
|
||||
"Common.Views.AutoCorrectDialog.textTitle": "AutoCorrect",
|
||||
"Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect",
|
||||
"Common.Views.AutoCorrectDialog.textReplace": "Replace:",
|
||||
"Common.Views.AutoCorrectDialog.textBy": "By:",
|
||||
"Common.Views.Chat.textSend": "Send",
|
||||
"Common.Views.Comments.textAdd": "Add",
|
||||
"Common.Views.Comments.textAddComment": "Add Comment",
|
||||
|
@ -1581,6 +1585,8 @@
|
|||
"DE.Views.FileMenuPanels.Settings.txtStopMacrosDesc": "Disable all macros without notification",
|
||||
"DE.Views.FileMenuPanels.Settings.strPaste": "Cut, copy and paste",
|
||||
"DE.Views.FileMenuPanels.Settings.strPasteButton": "Show Paste Options button when content is pasted",
|
||||
"DE.Views.FileMenuPanels.Settings.txtProofing": "Proofing",
|
||||
"DE.Views.FileMenuPanels.Settings.txtAutoCorrect": "AutoCorrect options...",
|
||||
"DE.Views.HeaderFooterSettings.textBottomCenter": "Bottom center",
|
||||
"DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom left",
|
||||
"DE.Views.HeaderFooterSettings.textBottomPage": "Bottom of Page",
|
||||
|
|
|
@ -486,7 +486,6 @@ define([
|
|||
this.toolbar.mnuMarkersPicker.selectByIndex(this._state.bullets.subtype, true);
|
||||
else
|
||||
this.toolbar.mnuMarkersPicker.deselectAll(true);
|
||||
this.toolbar.mnuMarkerSettings && this.toolbar.mnuMarkerSettings.setDisabled(this._state.bullets.subtype<0);
|
||||
break;
|
||||
case 1:
|
||||
var idx = 0;
|
||||
|
@ -515,7 +514,6 @@ define([
|
|||
}
|
||||
this.toolbar.btnNumbers.toggle(true, true);
|
||||
this.toolbar.mnuNumbersPicker.selectByIndex(idx, true);
|
||||
this.toolbar.mnuNumberSettings && this.toolbar.mnuNumberSettings.setDisabled(idx==0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1140,7 +1138,8 @@ define([
|
|||
handler: function(result, value) {
|
||||
if (result == 'ok') {
|
||||
if (me.api) {
|
||||
me.api.paraApply(value);
|
||||
props.asc_putBullet(value);
|
||||
me.api.paraApply(props);
|
||||
}
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||
|
@ -1709,8 +1708,6 @@ define([
|
|||
|
||||
this.toolbar.mnuMarkersPicker.selectByIndex(0, true);
|
||||
this.toolbar.mnuNumbersPicker.selectByIndex(0, true);
|
||||
this.toolbar.mnuMarkerSettings && this.toolbar.mnuMarkerSettings.setDisabled(true);
|
||||
this.toolbar.mnuNumberSettings && this.toolbar.mnuNumberSettings.setDisabled(true);
|
||||
},
|
||||
|
||||
_getApiTextSize: function () {
|
||||
|
|
|
@ -223,6 +223,7 @@ define([
|
|||
|
||||
if ( !!this.api ) {
|
||||
this.panels['info'].setApi(this.api);
|
||||
if (this.panels['opts']) this.panels['opts'].setApi(this.api);
|
||||
if ( this.panels['protect'] )
|
||||
this.panels['protect'].setApi(this.api);
|
||||
}
|
||||
|
@ -352,6 +353,7 @@ define([
|
|||
|
||||
if ( this.rendered ) {
|
||||
this.panels['info'].setApi(api);
|
||||
if (this.panels['opts']) this.panels['opts'].setApi(api);
|
||||
if (this.panels['protect']) this.panels['protect'].setApi(api);
|
||||
}
|
||||
this.api.asc_registerCallback('asc_onDocumentName', _.bind(this.onDocumentName, this));
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
define([
|
||||
'common/main/lib/view/DocumentAccessDialog',
|
||||
'common/main/lib/view/AutoCorrectDialog',
|
||||
'common/main/lib/component/CheckBox'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
@ -184,6 +185,10 @@ define([
|
|||
'<td class="left"><label><%= scope.txtSpellCheck %></label></td>',
|
||||
'<td class="right"><div id="fms-chb-spell-check"></div></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="edit">',
|
||||
'<td class="left"><label><%= scope.txtProofing %></label></td>',
|
||||
'<td class="right"><button type="button" class="btn btn-text-default" id="fms-btn-auto-correct" style="width:auto; display: inline-block;padding-right: 10px;padding-left: 10px;"><%= scope.txtAutoCorrect %></button></div></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="edit">',
|
||||
'<td class="left"><label><%= scope.txtInput %></label></td>',
|
||||
'<td class="right"><div id="fms-chb-input-mode"></div></td>',
|
||||
|
@ -373,6 +378,11 @@ define([
|
|||
labelText: this.strPasteButton
|
||||
});
|
||||
|
||||
this.btnAutoCorrect = new Common.UI.Button({
|
||||
el: $markup.findById('#fms-btn-auto-correct')
|
||||
});
|
||||
this.btnAutoCorrect.on('click', _.bind(this.autoCorrect, this));
|
||||
|
||||
this.btnApply = new Common.UI.Button({
|
||||
el: $markup.findById('#fms-btn-apply')
|
||||
});
|
||||
|
@ -414,6 +424,11 @@ define([
|
|||
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
|
||||
},
|
||||
|
||||
setApi: function(o) {
|
||||
this.api = o;
|
||||
return this;
|
||||
},
|
||||
|
||||
updateSettings: function() {
|
||||
this.chSpell.setValue(Common.Utils.InternalSettings.get("pe-settings-spellcheck"));
|
||||
|
||||
|
@ -506,6 +521,29 @@ define([
|
|||
this._fontRender = combo.getValue();
|
||||
},
|
||||
|
||||
autoCorrect: function() {
|
||||
if (!this._mathCorrect) {
|
||||
var arr = (this.api) ? this.api.asc_getAutoCorrectMathSymbols() : [],
|
||||
data = [];
|
||||
_.each(arr, function(item, index){
|
||||
var itm = {replaced: item[0]};
|
||||
if (typeof item[1]=='object') {
|
||||
itm.by = '';
|
||||
_.each(item[1], function(ch){
|
||||
itm.by += Common.Utils.String.encodeSurrogateChar(ch);
|
||||
});
|
||||
} else {
|
||||
itm.by = Common.Utils.String.encodeSurrogateChar(item[1]);
|
||||
}
|
||||
data.push(itm);
|
||||
});
|
||||
this._mathCorrect = data;
|
||||
}
|
||||
(new Common.Views.AutoCorrectDialog({
|
||||
props: this._mathCorrect
|
||||
})).show();
|
||||
},
|
||||
|
||||
strInputMode: 'Turn on hieroglyphs',
|
||||
strZoom: 'Default Zoom Value',
|
||||
okButtonText: 'Apply',
|
||||
|
@ -549,7 +587,9 @@ define([
|
|||
txtRunMacrosDesc: 'Enable all macros without notification',
|
||||
txtStopMacrosDesc: 'Disable all macros without notification',
|
||||
strPaste: 'Cut, copy and paste',
|
||||
strPasteButton: 'Show Paste Options button when content is pasted'
|
||||
strPasteButton: 'Show Paste Options button when content is pasted',
|
||||
txtProofing: 'Proofing',
|
||||
txtAutoCorrect: 'AutoCorrect options...'
|
||||
}, PE.Views.FileMenuPanels.Settings || {}));
|
||||
|
||||
PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -1111,7 +1111,6 @@ define([
|
|||
{template: _.template('<div id="id-toolbar-menu-markers" class="menu-markers" style="width: 139px; margin: 0 16px;"></div>')},
|
||||
this.mnuMarkerSettings = new Common.UI.MenuItem({
|
||||
caption: this.textListSettings,
|
||||
disabled: (this.mnuMarkersPicker.conf.index || 0)==0,
|
||||
value: 'settings'
|
||||
})
|
||||
]
|
||||
|
@ -1124,7 +1123,6 @@ define([
|
|||
{template: _.template('<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 185px; margin: 0 16px;"></div>')},
|
||||
this.mnuNumberSettings = new Common.UI.MenuItem({
|
||||
caption: this.textListSettings,
|
||||
disabled: (this.mnuNumbersPicker.conf.index || 0)==0,
|
||||
value: 'settings'
|
||||
})
|
||||
]
|
||||
|
|
|
@ -229,6 +229,9 @@
|
|||
|
||||
window.frameEditorId = params["frameEditorId"];
|
||||
window.parentOrigin = params["parentOrigin"];
|
||||
|
||||
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent))
|
||||
document.write('<script src="../../common/main/lib/util/fix-ie-compat.js"><\/script>');
|
||||
</script>
|
||||
|
||||
<!-- debug begin -->
|
||||
|
|
|
@ -58,6 +58,10 @@
|
|||
"Common.Views.About.txtPoweredBy": "Powered by",
|
||||
"Common.Views.About.txtTel": "tel.: ",
|
||||
"Common.Views.About.txtVersion": "Version ",
|
||||
"Common.Views.AutoCorrectDialog.textTitle": "AutoCorrect",
|
||||
"Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect",
|
||||
"Common.Views.AutoCorrectDialog.textReplace": "Replace:",
|
||||
"Common.Views.AutoCorrectDialog.textBy": "By:",
|
||||
"Common.Views.Chat.textSend": "Send",
|
||||
"Common.Views.Comments.textAdd": "Add",
|
||||
"Common.Views.Comments.textAddComment": "Add Comment",
|
||||
|
@ -119,13 +123,17 @@
|
|||
"Common.Views.InsertTableDialog.txtTitle": "Table Size",
|
||||
"Common.Views.InsertTableDialog.txtTitleSplit": "Split Cell",
|
||||
"Common.Views.LanguageDialog.labelSelect": "Select document language",
|
||||
"Common.Views.ListSettingsDialog.tipChange": "Change bullet",
|
||||
"Common.Views.ListSettingsDialog.txtBullet": "Bullet",
|
||||
"Common.Views.ListSettingsDialog.txtColor": "Color",
|
||||
"Common.Views.ListSettingsDialog.txtOfText": "% of text",
|
||||
"Common.Views.ListSettingsDialog.txtSize": "Size",
|
||||
"Common.Views.ListSettingsDialog.txtStart": "Start at",
|
||||
"Common.Views.ListSettingsDialog.txtTitle": "List Settings",
|
||||
"Common.Views.ListSettingsDialog.textBulleted": "Bulleted",
|
||||
"Common.Views.ListSettingsDialog.textNumbering": "Numbered",
|
||||
"Common.Views.ListSettingsDialog.txtType": "Type",
|
||||
"Common.Views.ListSettingsDialog.txtNone": "None",
|
||||
"Common.Views.ListSettingsDialog.txtNewBullet": "New bullet",
|
||||
"Common.Views.ListSettingsDialog.txtSymbol": "Symbol",
|
||||
"Common.Views.OpenDialog.closeButtonText": "Close File",
|
||||
"Common.Views.OpenDialog.txtEncoding": "Encoding ",
|
||||
"Common.Views.OpenDialog.txtIncorrectPwd": "Password is incorrect.",
|
||||
|
@ -1270,6 +1278,8 @@
|
|||
"PE.Views.FileMenuPanels.Settings.txtStopMacrosDesc": "Disable all macros without notification",
|
||||
"PE.Views.FileMenuPanels.Settings.strPaste": "Cut, copy and paste",
|
||||
"PE.Views.FileMenuPanels.Settings.strPasteButton": "Show Paste Options button when content is pasted",
|
||||
"PE.Views.FileMenuPanels.Settings.txtProofing": "Proofing",
|
||||
"PE.Views.FileMenuPanels.Settings.txtAutoCorrect": "AutoCorrect options...",
|
||||
"PE.Views.HeaderFooterDialog.applyAllText": "Apply to all",
|
||||
"PE.Views.HeaderFooterDialog.applyText": "Apply",
|
||||
"PE.Views.HeaderFooterDialog.diffLanguage": "You can’t use a date format in a different language than the slide master.<br>To change the master, click 'Apply to all' instead of 'Apply'",
|
||||
|
|
|
@ -199,10 +199,13 @@ define([
|
|||
previewData: data,
|
||||
settings: me._state.CSVOptions,
|
||||
api: me.api,
|
||||
handler: function (result, encoding, delimiter, delimiterChar) {
|
||||
handler: function (result, encoding, delimiter, delimiterChar, decimal, thousands) {
|
||||
if (result == 'ok') {
|
||||
if (me && me.api) {
|
||||
me.api.asc_TextToColumns(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar));
|
||||
var options = new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar);
|
||||
decimal && options.asc_setNumberDecimalSeparator(decimal);
|
||||
thousands && options.asc_setNumberGroupSeparator(thousands);
|
||||
me.api.asc_TextToColumns(options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,6 +237,7 @@ define([
|
|||
view.pmiNumFormat.menu.on('item:click', _.bind(me.onNumberFormatSelect, me));
|
||||
view.pmiNumFormat.menu.on('show:after', _.bind(me.onNumberFormatOpenAfter, me));
|
||||
view.pmiAdvancedNumFormat.on('click', _.bind(me.onCustomNumberFormat, me));
|
||||
view.tableTotalMenu.on('item:click', _.bind(me.onTotalMenuClick, me));
|
||||
|
||||
} else {
|
||||
view.menuViewCopy.on('click', _.bind(me.onCopyPaste, me));
|
||||
|
@ -321,6 +322,7 @@ define([
|
|||
this.api.asc_registerCallback('asc_onFormulaInfo', _.bind(this.onFormulaInfo, this));
|
||||
this.api.asc_registerCallback('asc_ChangeCropState', _.bind(this.onChangeCropState, this));
|
||||
this.api.asc_registerCallback('asc_onInputMessage', _.bind(this.onInputMessage, this));
|
||||
this.api.asc_registerCallback('asc_onTableTotalMenu', _.bind(this.onTableTotalMenu, this));
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
@ -507,7 +509,7 @@ define([
|
|||
onInsFunction: function(item) {
|
||||
var controller = this.getApplication().getController('FormulaDialog');
|
||||
if (controller && this.api) {
|
||||
controller.showDialog();
|
||||
controller.showDialog(undefined, item.value==Asc.ETotalsRowFunction.totalrowfunctionCustom);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -759,7 +761,7 @@ define([
|
|||
onSelectBulletMenu: function(menu, item) {
|
||||
if (this.api) {
|
||||
if (item.options.value == -1) {
|
||||
this.api.asc_setListType(item.options.value);
|
||||
this.api.asc_setListType(0, item.options.value);
|
||||
Common.NotificationCenter.trigger('edit:complete', this.documentHolder);
|
||||
Common.component.Analytics.trackEvent('DocumentHolder', 'List Type');
|
||||
} else if (item.options.value == 'settings') {
|
||||
|
@ -773,15 +775,17 @@ define([
|
|||
}
|
||||
}
|
||||
if (props) {
|
||||
var listtype = me.api.asc_getCurrentListType();
|
||||
(new Common.Views.ListSettingsDialog({
|
||||
api: me.api,
|
||||
props: props,
|
||||
type: me.api.asc_getCurrentListType().get_ListType(),
|
||||
type: 0,
|
||||
interfaceLang: me.permissions.lang,
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok') {
|
||||
if (me.api) {
|
||||
me.api.asc_setGraphicObjectProps(value);
|
||||
props.asc_putBullet(value);
|
||||
me.api.asc_setGraphicObjectProps(props);
|
||||
}
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete', me.documentHolder);
|
||||
|
@ -1783,7 +1787,7 @@ define([
|
|||
documentHolder.menuParagraphDirect270.setChecked(direct == Asc.c_oAscVertDrawingText.vert270);
|
||||
|
||||
documentHolder.menuParagraphBulletNone.setChecked(listtype.get_ListType() == -1);
|
||||
documentHolder.mnuListSettings.setDisabled(listtype.get_ListType() == -1);
|
||||
// documentHolder.mnuListSettings.setDisabled(listtype.get_ListType() == -1);
|
||||
var rec = documentHolder.paraBulletsPicker.store.findWhere({ type: listtype.get_ListType(), subtype: listtype.get_ListSubType() });
|
||||
documentHolder.paraBulletsPicker.selectRecord(rec, true);
|
||||
} else if (elType == Asc.c_oAscTypeSelectElement.Paragraph) {
|
||||
|
@ -2118,6 +2122,63 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onTableTotalMenu: function(current) {
|
||||
if (current !== undefined) {
|
||||
var me = this,
|
||||
documentHolderView = me.documentHolder,
|
||||
menu = documentHolderView.tableTotalMenu,
|
||||
menuContainer = documentHolderView.cmpEl.find(Common.Utils.String.format('#menu-container-{0}', menu.id));
|
||||
|
||||
if (menu.isVisible()) {
|
||||
menu.hide();
|
||||
return;
|
||||
}
|
||||
|
||||
Common.UI.Menu.Manager.hideAll();
|
||||
|
||||
if (!menu.rendered) {
|
||||
// Prepare menu container
|
||||
if (menuContainer.length < 1) {
|
||||
menuContainer = $(Common.Utils.String.format('<div id="menu-container-{0}" style="position: absolute; z-index: 10000;"><div class="dropdown-toggle" data-toggle="dropdown"></div></div>', menu.id));
|
||||
documentHolderView.cmpEl.append(menuContainer);
|
||||
}
|
||||
|
||||
menu.render(menuContainer);
|
||||
menu.cmpEl.attr({tabindex: "-1"});
|
||||
}
|
||||
|
||||
menu.clearAll();
|
||||
var func = _.find(menu.items, function(item) { return item.value == current; });
|
||||
if (func)
|
||||
func.setChecked(true, true);
|
||||
|
||||
var coord = me.api.asc_getActiveCellCoord(),
|
||||
offset = {left:0,top:0},
|
||||
showPoint = [coord.asc_getX() + offset.left, (coord.asc_getY() < 0 ? 0 : coord.asc_getY()) + coord.asc_getHeight() + offset.top];
|
||||
menuContainer.css({left: showPoint[0], top : showPoint[1]});
|
||||
|
||||
me._preventClick = true;
|
||||
menuContainer.attr('data-value', 'prevent-canvas-click');
|
||||
menu.show();
|
||||
|
||||
menu.alignPosition();
|
||||
_.delay(function() {
|
||||
menu.cmpEl.focus();
|
||||
}, 10);
|
||||
} else {
|
||||
this.documentHolder.tableTotalMenu.hide();
|
||||
}
|
||||
},
|
||||
|
||||
onTotalMenuClick: function(menu, item) {
|
||||
if (item.value==Asc.ETotalsRowFunction.totalrowfunctionCustom) {
|
||||
this.onInsFunction(item);
|
||||
} else {
|
||||
this.api.asc_insertInCell(item.value, Asc.c_oAscPopUpSelectorType.TotalRowFunc);
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete', this.documentHolder);
|
||||
},
|
||||
|
||||
onFormulaCompleteMenu: function(funcarr) {
|
||||
if (!this.documentHolder.funcMenu || Common.Utils.ModalWindow.isVisible() || this.rangeSelectionMode) return;
|
||||
|
||||
|
@ -2442,12 +2503,16 @@ define([
|
|||
type: Common.Utils.importTextType.Paste,
|
||||
preview: true,
|
||||
api: me.api,
|
||||
handler: function (result, encoding, delimiter, delimiterChar) {
|
||||
handler: function (result, encoding, delimiter, delimiterChar, decimal, thousands) {
|
||||
if (result == 'ok') {
|
||||
if (me && me.api) {
|
||||
var props = new Asc.SpecialPasteProps();
|
||||
props.asc_setProps(Asc.c_oSpecialPasteProps.useTextImport);
|
||||
props.asc_setAdvancedOptions(new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar));
|
||||
|
||||
var options = new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar);
|
||||
decimal && options.asc_setNumberDecimalSeparator(decimal);
|
||||
thousands && options.asc_setNumberGroupSeparator(thousands);
|
||||
props.asc_setAdvancedOptions(options);
|
||||
me.api.asc_SpecialPaste(props);
|
||||
}
|
||||
me._state.lastSpecPasteChecked = item;
|
||||
|
|
|
@ -99,7 +99,7 @@ define([
|
|||
if (autocomplete)
|
||||
this.api.asc_insertInCell(func.name, Asc.c_oAscPopUpSelectorType.Func, !!autocomplete);
|
||||
else
|
||||
this.api.asc_startWizard(func.name);
|
||||
this.api.asc_startWizard(func.name, this._cleanCell);
|
||||
!autocomplete && this.updateLast10Formulas(func.origin);
|
||||
}
|
||||
}
|
||||
|
@ -133,6 +133,7 @@ define([
|
|||
});
|
||||
this.formulas.on({
|
||||
'hide': function () {
|
||||
me._cleanCell = undefined; // _cleanCell - clean cell when change formula in formatted table total row
|
||||
me.api.asc_enableKeyEvents(true);
|
||||
}
|
||||
});
|
||||
|
@ -212,7 +213,7 @@ define([
|
|||
return null;
|
||||
},
|
||||
|
||||
showDialog: function (group) {
|
||||
showDialog: function (group, clean) {
|
||||
if (this.formulas) {
|
||||
if ( this.needUpdateFormula ) {
|
||||
this.needUpdateFormula = false;
|
||||
|
@ -222,6 +223,7 @@ define([
|
|||
}
|
||||
}
|
||||
this._formulagroup = group;
|
||||
this._cleanCell = clean;
|
||||
this.api.asc_startWizard();
|
||||
}
|
||||
},
|
||||
|
@ -249,6 +251,7 @@ define([
|
|||
}
|
||||
}
|
||||
})).show();
|
||||
this._cleanCell = undefined;
|
||||
} else
|
||||
this.formulas.show(this._formulagroup);
|
||||
this._formulagroup = undefined;
|
||||
|
|
|
@ -66,6 +66,9 @@ define([
|
|||
'pivottable:blankrows': _.bind(this.onPivotBlankRows, this),
|
||||
'pivottable:subtotals': _.bind(this.onPivotSubtotals, this),
|
||||
'pivottable:grandtotals': _.bind(this.onPivotGrandTotals, this)
|
||||
},
|
||||
'TableSettings': {
|
||||
'pivottable:create': _.bind(this.onCreateClick, this)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -109,6 +109,8 @@ define([
|
|||
},
|
||||
|
||||
zoomDocument: function(d,e) {
|
||||
if (!this.api) return;
|
||||
|
||||
switch (d) {
|
||||
case 'up':
|
||||
var f = Math.floor(this.api.asc_getZoom() * 10)/10;
|
||||
|
@ -125,7 +127,7 @@ define([
|
|||
},
|
||||
|
||||
menuZoomClick: function(menu, item) {
|
||||
this.api.asc_setZoom(item.value/100);
|
||||
this.api && this.api.asc_setZoom(item.value/100);
|
||||
Common.NotificationCenter.trigger('edit:complete', this.statusbar);
|
||||
},
|
||||
|
||||
|
@ -230,6 +232,8 @@ define([
|
|||
},
|
||||
|
||||
onWindowResize: function(area) {
|
||||
this.statusbar.updateVisibleItemsBoxMath();
|
||||
this.statusbar.updateTabbarBorders();
|
||||
this.statusbar.onTabInvisible(undefined, this.statusbar.tabbar.checkInvisible(true));
|
||||
},
|
||||
|
||||
|
|
|
@ -60,7 +60,8 @@ define([
|
|||
'spreadsheeteditor/main/app/view/PrintTitlesDialog',
|
||||
'spreadsheeteditor/main/app/view/ScaleDialog',
|
||||
'spreadsheeteditor/main/app/view/SlicerAddDialog',
|
||||
'spreadsheeteditor/main/app/view/CellsAddDialog'
|
||||
'spreadsheeteditor/main/app/view/CellsAddDialog',
|
||||
'spreadsheeteditor/main/app/view/AdvancedSeparatorDialog'
|
||||
], function () { 'use strict';
|
||||
|
||||
SSE.Controllers.Toolbar = Backbone.Controller.extend(_.extend({
|
||||
|
|
|
@ -88,6 +88,11 @@
|
|||
<button type="button" class="btn btn-text-default" id="table-btn-slicer" style="width:100%;"><%= scope.textSlicer %></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pivot-only">
|
||||
<td class="padding-small" colspan=2>
|
||||
<button type="button" class="btn btn-text-default" id="table-btn-pivot" style="width:100%;"><%= scope.textPivot %></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small" colspan=2>
|
||||
<div class="separator horizontal"></div>
|
||||
|
|
144
apps/spreadsheeteditor/main/app/view/AdvancedSeparatorDialog.js
Normal file
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2010-2020
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* AdvancedSeparatorDialog.js
|
||||
*
|
||||
* Created by Julia Radzhabova on 26/06/20
|
||||
* Copyright (c) 2020 Ascensio System SIA. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
define([
|
||||
'common/main/lib/component/Window',
|
||||
'common/main/lib/component/InputField'
|
||||
], function () { 'use strict';
|
||||
|
||||
SSE.Views.AdvancedSeparatorDialog = Common.UI.Window.extend(_.extend({
|
||||
options: {
|
||||
width: 330,
|
||||
cls: 'modal-dlg',
|
||||
buttons: ['ok', 'cancel']
|
||||
},
|
||||
|
||||
initialize : function(options) {
|
||||
_.extend(this.options, {
|
||||
title: this.textTitle
|
||||
}, options || {});
|
||||
|
||||
this.template = [
|
||||
'<div class="box">',
|
||||
'<div class="input-row" style="margin-bottom: 8px;">',
|
||||
'<label>' + this.textLabel + '</label>',
|
||||
'</div>',
|
||||
'<div style="margin-bottom: 12px;">',
|
||||
'<div id="id-adv-separator-decimal" class=""></div><label class="input-row" style="margin-left: 10px; padding-top: 4px;">' + this.strDecimalSeparator + '</label>',
|
||||
'</div>',
|
||||
'<div style="margin-bottom: 10px;">',
|
||||
'<div id="id-adv-separator-thousands" class=""></div><label class="input-row" style="margin-left: 10px; padding-top: 4px;">' + this.strThousandsSeparator + '</label>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
this.options.tpl = _.template(this.template)(this.options);
|
||||
this.props = options.props;
|
||||
|
||||
Common.UI.Window.prototype.initialize.call(this, this.options);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
Common.UI.Window.prototype.render.call(this);
|
||||
|
||||
this.inputDecimalSeparator = new Common.UI.InputField({
|
||||
el: $('#id-adv-separator-decimal'),
|
||||
style: 'width: 35px;',
|
||||
maxLength: 1,
|
||||
validateOnBlur: false
|
||||
});
|
||||
|
||||
this.inputThousandsSeparator = new Common.UI.InputField({
|
||||
el: $('#id-adv-separator-thousands'),
|
||||
style: 'width: 35px;',
|
||||
maxLength: 1,
|
||||
validateOnBlur: false
|
||||
});
|
||||
|
||||
var $window = this.getChild();
|
||||
$window.find('.btn').on('click', _.bind(this.onBtnClick, this));
|
||||
|
||||
this.afterRender();
|
||||
},
|
||||
|
||||
afterRender: function() {
|
||||
this._setDefaults(this.props);
|
||||
},
|
||||
|
||||
_setDefaults: function (props) {
|
||||
if (props) {
|
||||
this.inputDecimalSeparator.setValue(props.decimal || '');
|
||||
this.inputThousandsSeparator.setValue(props.thousands || '');
|
||||
}
|
||||
},
|
||||
|
||||
show: function() {
|
||||
Common.UI.Window.prototype.show.apply(this, arguments);
|
||||
|
||||
var me = this;
|
||||
_.delay(function(){
|
||||
me.inputDecimalSeparator.cmpEl.find('input').focus();
|
||||
},50);
|
||||
},
|
||||
|
||||
onPrimary: function(event) {
|
||||
this._handleInput('ok');
|
||||
return false;
|
||||
},
|
||||
|
||||
onBtnClick: function(event) {
|
||||
this._handleInput(event.currentTarget.attributes['result'].value);
|
||||
},
|
||||
|
||||
_handleInput: function(state) {
|
||||
if (this.options.handler) {
|
||||
this.options.handler.call(this, state, {decimal: this.inputDecimalSeparator.getValue(), thousands: this.inputThousandsSeparator.getValue()});
|
||||
}
|
||||
|
||||
this.close();
|
||||
},
|
||||
|
||||
textTitle: 'Advanced Settings',
|
||||
textLabel: 'Settings used to recognize numeric data',
|
||||
strDecimalSeparator: 'Decimal separator',
|
||||
strThousandsSeparator: 'Thousands separator'
|
||||
|
||||
}, SSE.Views.AdvancedSeparatorDialog || {}));
|
||||
});
|
|
@ -979,6 +979,23 @@ define([
|
|||
mnu.cmpEl.removeAttr('oo_editor_input').attr('oo_editor_keyboard', true);
|
||||
});
|
||||
|
||||
this.tableTotalMenu = new Common.UI.Menu({
|
||||
maxHeight: 160,
|
||||
cyclic: false,
|
||||
cls: 'lang-menu',
|
||||
items: [
|
||||
{caption: this.textNone, value: Asc.ETotalsRowFunction.totalrowfunctionNone, checkable: true},
|
||||
{caption: this.textAverage, value: Asc.ETotalsRowFunction.totalrowfunctionAverage, checkable: true },
|
||||
{caption: this.textCount, value: Asc.ETotalsRowFunction.totalrowfunctionCount, checkable: true },
|
||||
{caption: this.textMax, value: Asc.ETotalsRowFunction.totalrowfunctionMax, checkable: true },
|
||||
{caption: this.textMin, value: Asc.ETotalsRowFunction.totalrowfunctionMin, checkable: true },
|
||||
{caption: this.textSum, value: Asc.ETotalsRowFunction.totalrowfunctionSum, checkable: true },
|
||||
{caption: this.textStdDev, value: Asc.ETotalsRowFunction.totalrowfunctionStdDev, checkable: true },
|
||||
{caption: this.textVar, value: Asc.ETotalsRowFunction.totalrowfunctionVar, checkable: true },
|
||||
{caption: this.textMore, value: Asc.ETotalsRowFunction.totalrowfunctionCustom, checkable: true }
|
||||
]
|
||||
});
|
||||
|
||||
me.fireEvent('createdelayedelements', [me]);
|
||||
},
|
||||
|
||||
|
@ -1111,7 +1128,15 @@ define([
|
|||
textCropFit: 'Fit',
|
||||
textListSettings: 'List Settings',
|
||||
textFromStorage: 'From Storage',
|
||||
advancedSlicerText: 'Slicer Advanced Settings'
|
||||
advancedSlicerText: 'Slicer Advanced Settings',
|
||||
textAverage: 'Average',
|
||||
textMax: 'Max',
|
||||
textMin: 'Min',
|
||||
textCount: 'Count',
|
||||
textSum: 'Sum',
|
||||
textStdDev: 'StdDev',
|
||||
textVar: 'Var',
|
||||
textMore: 'More functions'
|
||||
|
||||
}, SSE.Views.DocumentHolder || {}));
|
||||
});
|
|
@ -31,7 +31,8 @@
|
|||
*
|
||||
*/
|
||||
define([
|
||||
'common/main/lib/view/DocumentAccessDialog'
|
||||
'common/main/lib/view/DocumentAccessDialog',
|
||||
'common/main/lib/view/AutoCorrectDialog'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
|
@ -257,6 +258,7 @@ define([
|
|||
|
||||
setApi: function(api) {
|
||||
this.generalSettings && this.generalSettings.setApi(api);
|
||||
this.spellcheckSettings && this.spellcheckSettings.setApi(api);
|
||||
},
|
||||
|
||||
txtGeneral: 'General',
|
||||
|
@ -1237,6 +1239,10 @@ define([
|
|||
'<td class="left"></td>',
|
||||
'<td class="right"><span id="fms-chb-ignore-numbers-words"></span></td>',
|
||||
'</tr>','<tr class="divider"></tr>',
|
||||
'<tr>',
|
||||
'<td class="left"><label><%= scope.txtProofing %></label></td>',
|
||||
'<td class="right"><button type="button" class="btn btn-text-default" id="fms-btn-auto-correct" style="width:auto; display: inline-block;padding-right: 10px;padding-left: 10px;"><%= scope.txtAutoCorrect %></button></div></td>',
|
||||
'</tr>','<tr class="divider"></tr>',
|
||||
'<tr>',
|
||||
'<td class="left"></td>',
|
||||
'<td class="right"><button id="fms-spellcheck-btn-apply" class="btn normal dlg-btn primary"><%= scope.okButtonText %></button></td>',
|
||||
|
@ -1272,6 +1278,11 @@ define([
|
|||
menuStyle: 'min-width: 267px; max-height: 209px;'
|
||||
});
|
||||
|
||||
this.btnAutoCorrect = new Common.UI.Button({
|
||||
el: $markup.findById('#fms-btn-auto-correct')
|
||||
});
|
||||
this.btnAutoCorrect.on('click', _.bind(this.autoCorrect, this));
|
||||
|
||||
this.btnApply = new Common.UI.Button({
|
||||
el: $markup.findById('#fms-spellcheck-btn-apply')
|
||||
});
|
||||
|
@ -1362,11 +1373,35 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
autoCorrect: function() {
|
||||
if (!this._mathCorrect) {
|
||||
var arr = (this.api) ? this.api.asc_getAutoCorrectMathSymbols() : [],
|
||||
data = [];
|
||||
_.each(arr, function(item, index){
|
||||
var itm = {replaced: item[0]};
|
||||
if (typeof item[1]=='object') {
|
||||
itm.by = '';
|
||||
_.each(item[1], function(ch){
|
||||
itm.by += Common.Utils.String.encodeSurrogateChar(ch);
|
||||
});
|
||||
} else {
|
||||
itm.by = Common.Utils.String.encodeSurrogateChar(item[1]);
|
||||
}
|
||||
data.push(itm);
|
||||
});
|
||||
this._mathCorrect = data;
|
||||
}
|
||||
(new Common.Views.AutoCorrectDialog({
|
||||
props: this._mathCorrect
|
||||
})).show();
|
||||
},
|
||||
|
||||
strIgnoreWordsInUPPERCASE: 'Ignore words in UPPERCASE',
|
||||
strIgnoreWordsWithNumbers: 'Ignore words with numbers',
|
||||
strDictionaryLanguage: 'Dictionary language',
|
||||
okButtonText: 'Apply'
|
||||
|
||||
okButtonText: 'Apply',
|
||||
txtProofing: 'Proofing',
|
||||
txtAutoCorrect: 'AutoCorrect options...'
|
||||
}, SSE.Views.FileMenuPanels.MainSpellCheckSettings || {}));
|
||||
|
||||
SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -266,6 +266,7 @@ define([
|
|||
this.mode = mode;
|
||||
this.imageSettings && this.imageSettings.setMode(mode);
|
||||
this.shapeSettings && this.shapeSettings.setMode(mode);
|
||||
this.tableSettings && this.tableSettings.setMode(mode);
|
||||
return this;
|
||||
},
|
||||
|
||||
|
|
|
@ -53,9 +53,6 @@ define([
|
|||
},
|
||||
|
||||
initialize : function (options) {
|
||||
var t = this,
|
||||
_options = {};
|
||||
|
||||
_.extend(this.options, {
|
||||
title: this.txtTitle
|
||||
}, options || {});
|
||||
|
|
|
@ -353,19 +353,64 @@ define([
|
|||
});
|
||||
});
|
||||
|
||||
var customizeStatusBarMenuTemplate = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem">'+
|
||||
'<div style="position: relative;">'+
|
||||
'<div style="position: absolute; left: 0; width: 100px;"><%= caption %></div>' +
|
||||
'<label style="width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: right; vertical-align: bottom; padding-left: 100px; color: silver;cursor: pointer;"><%= options.exampleval ? options.exampleval : "" %></label>' +
|
||||
'</div></a>');
|
||||
|
||||
this.customizeStatusBarMenu = new Common.UI.Menu({
|
||||
style: 'margin-top: -14px; margin-left: -7px;',
|
||||
menuAlign: 'bl-tl',
|
||||
items: [
|
||||
//{template: _.template('<div style="padding-left: 6px; padding-top: 2px;">' + this.textCustomizeStatusBar + '</div>')},
|
||||
//{caption: '--'},
|
||||
{caption: this.itemAverage, value: 'average', checkable: true, checked: true, leaveopen: true},
|
||||
{caption: this.itemCount, value: 'count', checkable: true, checked: true, leaveopen: true},
|
||||
{caption: this.itemMinimum, value: 'min', checkable: true, checked: true, leaveopen: true},
|
||||
{caption: this.itemMaximum, value: 'max', checkable: true, checked: true, leaveopen: true},
|
||||
{caption: this.itemSum, value: 'sum', checkable: true, checked: true, leaveopen: true}
|
||||
],
|
||||
leaveopen: true
|
||||
{
|
||||
id: 'math-item-average',
|
||||
caption: this.itemAverage,
|
||||
value: 'average',
|
||||
checkable: true,
|
||||
checked: true,
|
||||
template: customizeStatusBarMenuTemplate,
|
||||
exampleval: ''
|
||||
},
|
||||
{
|
||||
id: 'math-item-count',
|
||||
caption: this.itemCount,
|
||||
value: 'count',
|
||||
checkable: true,
|
||||
checked: true,
|
||||
template: customizeStatusBarMenuTemplate,
|
||||
exampleval: ''
|
||||
},
|
||||
{
|
||||
id: 'math-item-min',
|
||||
caption: this.itemMinimum,
|
||||
value: 'min',
|
||||
checkable: true,
|
||||
checked: true,
|
||||
template: customizeStatusBarMenuTemplate,
|
||||
exampleval: ''
|
||||
},
|
||||
{
|
||||
id: 'math-item-max',
|
||||
caption: this.itemMaximum,
|
||||
value: 'max',
|
||||
checkable: true,
|
||||
checked: true,
|
||||
template: customizeStatusBarMenuTemplate,
|
||||
exampleval: ''
|
||||
},
|
||||
{
|
||||
id: 'math-item-sum',
|
||||
caption: this.itemSum,
|
||||
value: 'sum',
|
||||
checkable: true,
|
||||
checked: true,
|
||||
template: customizeStatusBarMenuTemplate,
|
||||
exampleval: ''
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
this.tabbar.$el.append('<div class="dropdown-toggle" data-toggle="dropdown" style="width:0; height:0;"></div>');
|
||||
|
@ -498,12 +543,35 @@ define([
|
|||
this.labelMax.text((info.max && info.max.length) ? (this.textMax + ': ' + info.max) : '');
|
||||
this.labelSum.text((info.sum && info.sum.length) ? (this.textSum + ': ' + info.sum) : '');
|
||||
this.labelAverage.text((info.average && info.average.length) ? (this.textAverage + ': ' + info.average) : '');
|
||||
|
||||
this.customizeStatusBarMenu.items.forEach(function (item) {
|
||||
if (item.options.id === 'math-item-average') {
|
||||
item.options.exampleval = (info.average && info.average.length) ? info.average : '';
|
||||
} else if (item.options.id === 'math-item-min') {
|
||||
item.options.exampleval = (info.min && info.min.length) ? info.min : '';
|
||||
} else if (item.options.id === 'math-item-max') {
|
||||
item.options.exampleval = (info.max && info.max.length) ? info.max : '';
|
||||
} else if (item.options.id === 'math-item-count') {
|
||||
item.options.exampleval = (info.count) ? String(info.count) : '';
|
||||
} else if (item.options.id === 'math-item-sum') {
|
||||
item.options.exampleval = (info.sum && info.sum.length) ? info.sum : '';
|
||||
} else {
|
||||
item.options.exampleval = '';
|
||||
}
|
||||
$(item.el).find('label').text(item.options.exampleval);
|
||||
});
|
||||
} else {
|
||||
this.customizeStatusBarMenu.items.forEach(function (item) {
|
||||
item.options.exampleval = '';
|
||||
$(item.el).find('label').text('');
|
||||
});
|
||||
if (this.boxMath.is(':visible')) this.boxMath.hide();
|
||||
}
|
||||
|
||||
var me = this;
|
||||
_.delay(function(){
|
||||
me.updateVisibleItemsBoxMath();
|
||||
me.updateTabbarBorders();
|
||||
me.onTabInvisible(undefined, me.tabbar.checkInvisible(true));
|
||||
},30);
|
||||
},
|
||||
|
@ -667,6 +735,19 @@ define([
|
|||
this.tabBarBox.css('right', right + 'px');
|
||||
},
|
||||
|
||||
updateVisibleItemsBoxMath: function () {
|
||||
var widthStatusbar = parseInt(this.$el.css('width'));
|
||||
var width = parseInt(this.boxZoom.css('width')) + parseInt($('#status-tabs-scroll').css('width')) + parseInt($('#status-addtabs-box').css('width'));
|
||||
if (this.boxFiltered.is(':visible')) {
|
||||
width += parseInt(this.boxFiltered.css('width'));
|
||||
}
|
||||
this.$el.find('.over-box').removeClass('over-box');
|
||||
while (width + parseInt(this.boxMath.css('width')) + 100 > widthStatusbar) {
|
||||
var items = this.boxMath.find('label:not(.hide, .over-box)');
|
||||
$(items[items.length - 1]).addClass('over-box');
|
||||
}
|
||||
},
|
||||
|
||||
changeViewMode: function (edit) {
|
||||
if (edit) {
|
||||
this.tabBarBox.css('left', '152px');
|
||||
|
@ -720,6 +801,9 @@ define([
|
|||
this.boxMath.find('.separator').show();
|
||||
}
|
||||
}
|
||||
this.updateVisibleItemsBoxMath();
|
||||
this.updateTabbarBorders();
|
||||
this.onTabInvisible(undefined, this.tabbar.checkInvisible(true));
|
||||
event.stopPropagation();
|
||||
item.$el.find('a').blur();
|
||||
},
|
||||
|
|
|
@ -51,7 +51,7 @@ define([
|
|||
|
||||
SSE.Views.TableOptionsDialog = Common.UI.Window.extend(_.extend({
|
||||
options: {
|
||||
width : 350,
|
||||
width : 355,
|
||||
cls : 'modal-dlg',
|
||||
modal : false,
|
||||
buttons: ['ok', 'cancel']
|
||||
|
@ -65,7 +65,8 @@ define([
|
|||
this.template = [
|
||||
'<div class="box">',
|
||||
'<div id="id-dlg-tableoptions-range" class="input-row" style="margin-bottom: 5px;"></div>',
|
||||
'<div class="input-row" id="id-dlg-tableoptions-title" style="margin-top: 5px;"></div>',
|
||||
'<div class="input-row hidden" id="id-dlg-tableoptions-title" style="margin-top: 5px;"></div>',
|
||||
'<label class="" id="id-dlg-tableoptions-lbl" style="margin-top: 5px;">' + this.txtNote + '</label>',
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
|
@ -96,6 +97,8 @@ define([
|
|||
labelText : this.txtTitle
|
||||
});
|
||||
|
||||
me.lblNote =$window.find('#id-dlg-tableoptions-lbl');
|
||||
|
||||
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||
|
||||
this.on('close', _.bind(this.onClose, this));
|
||||
|
@ -113,12 +116,13 @@ define([
|
|||
me.api = settings.api;
|
||||
|
||||
if (settings.range) {
|
||||
me.cbTitle.setVisible(false);
|
||||
me.setHeight(130);
|
||||
me.checkRangeType = Asc.c_oAscSelectionDialogType.FormatTableChangeRange;
|
||||
me.inputRange.setValue(settings.range);
|
||||
me.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.FormatTable, settings.range);
|
||||
} else {
|
||||
me.cbTitle.$el && me.cbTitle.$el.removeClass('hidden');
|
||||
me.lblNote.addClass('hidden');
|
||||
me.setHeight(152);
|
||||
var options = me.api.asc_getAddFormatTableOptions();
|
||||
me.inputRange.setValue(options.asc_getRange());
|
||||
me.cbTitle.setValue(options.asc_getIsTitle());
|
||||
|
@ -218,6 +222,7 @@ define([
|
|||
errorAutoFilterDataRange: 'The operation could not be done for the selected range of cells.<br>Select a uniform data range inside or outside the table and try again.',
|
||||
errorFTChangeTableRangeError: 'Operation could not be completed for the selected cell range.<br>Select a range so that the first table row was on the same row<br>and the resulting table overlapped the current one.',
|
||||
errorFTRangeIncludedOtherTables: 'Operation could not be completed for the selected cell range.<br>Select a range which does not include other tables.',
|
||||
errorMultiCellFormula: 'Multi-cell array formulas are not allowed in tables.'
|
||||
errorMultiCellFormula: 'Multi-cell array formulas are not allowed in tables.',
|
||||
txtNote: 'The headers must remain in the same row, and the resulting table range must overlap the original table range.'
|
||||
}, SSE.Views.TableOptionsDialog || {}))
|
||||
});
|
|
@ -184,6 +184,10 @@ define([
|
|||
return this;
|
||||
},
|
||||
|
||||
setMode: function(mode) {
|
||||
this.mode = mode;
|
||||
},
|
||||
|
||||
createDelayedControls: function() {
|
||||
var me = this;
|
||||
this.chHeader = new Common.UI.CheckBox({
|
||||
|
@ -312,6 +316,14 @@ define([
|
|||
this.btnSlicer.on('click', _.bind(this.onInsertSlicerClick, this));
|
||||
this.lockedControls.push(this.btnSlicer);
|
||||
|
||||
this.btnPivot = new Common.UI.Button({
|
||||
el: $('#table-btn-pivot')
|
||||
});
|
||||
this.btnPivot.on('click', _.bind(this.onInsertPivotClick, this));
|
||||
this.lockedControls.push(this.btnPivot);
|
||||
|
||||
this.$el.find('.pivot-only').toggleClass('hidden', !this.mode.canFeaturePivot);
|
||||
|
||||
$(this.el).on('click', '#table-advanced-link', _.bind(this.openAdvancedSettings, this));
|
||||
|
||||
this._initSettings = false;
|
||||
|
@ -551,6 +563,10 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onInsertPivotClick: function() {
|
||||
this.fireEvent('pivottable:create');
|
||||
},
|
||||
|
||||
onApiEditCell: function(state) {
|
||||
this.isEditCell = (state != Asc.c_oAscCellEditorState.editEnd);
|
||||
if ( state == Asc.c_oAscCellEditorState.editStart || state == Asc.c_oAscCellEditorState.editEnd)
|
||||
|
@ -609,7 +625,8 @@ define([
|
|||
textLongOperation: 'Long operation',
|
||||
warnLongOperation: 'The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?',
|
||||
textRemDuplicates: 'Remove duplicates',
|
||||
textSlicer: 'Insert slicer'
|
||||
|
||||
textSlicer: 'Insert slicer',
|
||||
textPivot: 'Insert pivot table'
|
||||
|
||||
}, SSE.Views.TableSettings || {}));
|
||||
});
|
|
@ -229,6 +229,9 @@
|
|||
|
||||
window.frameEditorId = params["frameEditorId"];
|
||||
window.parentOrigin = params["parentOrigin"];
|
||||
|
||||
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent))
|
||||
document.write('<script src="../../common/main/lib/util/fix-ie-compat.js"><\/script>');
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/>
|
||||
|
|
235
apps/spreadsheeteditor/main/index_internal.html
Normal file
|
@ -0,0 +1,235 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>ONLYOFFICE Document Editor</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=IE8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
||||
|
||||
<!-- splash -->
|
||||
<style type="text/css">
|
||||
.loadmask {
|
||||
left: 0;
|
||||
top: 0;
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
background-color: #f4f4f4;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.loadmask ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.loadmask > .skformula {
|
||||
height: 24px;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
.loadmask > .skformula ul {
|
||||
list-style-type: none;
|
||||
font-size: 0;
|
||||
box-sizing: border-box;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #e1e1e1 transparent;
|
||||
}
|
||||
|
||||
.loadmask > .skformula li {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
height: 19px;
|
||||
width: 100%;
|
||||
margin-left: 20px;
|
||||
background: #f7f7f7;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: transparent #e1e1e1;
|
||||
}
|
||||
|
||||
.loadmask > .skformula li:first-child {
|
||||
width: 100px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.loadmask > .placeholder {
|
||||
background: #fbfbfb;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 0;
|
||||
border: 1px solid #dfdfdf;
|
||||
white-space: nowrap;
|
||||
|
||||
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
|
||||
-moz-animation: flickerAnimation 2s infinite ease-in-out;
|
||||
-o-animation: flickerAnimation 2s infinite ease-in-out;
|
||||
animation: flickerAnimation 2s infinite ease-in-out;
|
||||
}
|
||||
|
||||
.loadmask > .placeholder > .columns {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
background: linear-gradient(90deg, #d5d5d5 0px, rgba(223,223,223,0) 1px) 0 0,
|
||||
linear-gradient(rgba(223,223,223,0) 19px, #d5d5d5 20px) 0 0,
|
||||
linear-gradient( #f1f1f1 0px, #f1f1f1 20px) 0 0 repeat-x;
|
||||
background-size: 80px 20px;
|
||||
}
|
||||
|
||||
.loadmask > .placeholder > .columns:first-child {
|
||||
background: linear-gradient(#f1f1f1 19px, #d5d5d5 20px) 0 0;
|
||||
background-size: 20px 20px;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
@keyframes flickerAnimation {
|
||||
0% { opacity:1; }
|
||||
50% { opacity:0.5; }
|
||||
100% { opacity:1; }
|
||||
}
|
||||
@-o-keyframes flickerAnimation{
|
||||
0% { opacity:1; }
|
||||
50% { opacity:0.5; }
|
||||
100% { opacity:1; }
|
||||
}
|
||||
@-moz-keyframes flickerAnimation{
|
||||
0% { opacity:1; }
|
||||
50% { opacity:0.5; }
|
||||
100% { opacity:1; }
|
||||
}
|
||||
@-webkit-keyframes flickerAnimation{
|
||||
0% { opacity:1; }
|
||||
50% { opacity:0.5; }
|
||||
100% { opacity:1; }
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
document.getElementsByTagName('html')[0].setAttribute('style', 'zoom: ' + 1 / (window.devicePixelRatio < 2 ? window.devicePixelRatio : window.devicePixelRatio / 2) + ';');
|
||||
|
||||
var userAgent = navigator.userAgent.toLowerCase(),
|
||||
check = function(regex){ return regex.test(userAgent); },
|
||||
stopLoading = false;
|
||||
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
||||
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
||||
if (m && parseFloat(m[1]) < 10.0) {
|
||||
document.write(
|
||||
'<div class="app-error-panel">' +
|
||||
'<div class="message-block">' +
|
||||
'<div class="message-inner">' +
|
||||
'<div class="title">Your browser is not supported.</div>' +
|
||||
'<div class="text">Sorry, Spreadsheet Editor is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>');
|
||||
stopLoading = true;
|
||||
}
|
||||
}
|
||||
|
||||
function getUrlParams() {
|
||||
var e,
|
||||
a = /\+/g, // Regex for replacing addition symbol with a space
|
||||
r = /([^&=]+)=?([^&]*)/g,
|
||||
d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
|
||||
q = window.location.search.substring(1),
|
||||
urlParams = {};
|
||||
|
||||
while (e = r.exec(q))
|
||||
urlParams[d(e[1])] = d(e[2]);
|
||||
|
||||
return urlParams;
|
||||
}
|
||||
|
||||
function encodeUrlParam(str) {
|
||||
return str.replace(/&/g, '&')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
|
||||
var params = getUrlParams(),
|
||||
lang = (params["lang"] || 'en').split(/[\-\_]/)[0];
|
||||
|
||||
window.frameEditorId = params["frameEditorId"];
|
||||
window.parentOrigin = params["parentOrigin"];
|
||||
|
||||
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent))
|
||||
document.write('<script src="../../common/main/lib/util/fix-ie-compat.js"><\/script>');
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/>
|
||||
|
||||
<!-- debug begin -->
|
||||
<link rel="stylesheet/less" type="text/css" href="resources/less/app.less" />
|
||||
<!-- debug end -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="loading-mask" class="loadmask">
|
||||
<div class="skformula">
|
||||
<ul><li/><li/></ul>
|
||||
</div>
|
||||
<div class="placeholder">
|
||||
<div class="columns"></div><div class="columns"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="viewport"></div>
|
||||
|
||||
<script>
|
||||
if (stopLoading) {
|
||||
document.body.removeChild(document.getElementById('loading-mask'));
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="../../../vendor/svg-injector/svg-injector.min.js"></script>
|
||||
<!--<img class="inline-svg" src="../../common/main/resources/img/header/buttons.svg">-->
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
|
||||
<script>
|
||||
var svgpoints = document.querySelectorAll('img.inline-svg');
|
||||
SVGInjector(svgpoints);
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.g_debug_mode = true;
|
||||
</script>
|
||||
|
||||
<!-- debug begin -->
|
||||
<script type="text/javascript">var less=less||{};less.env='development';less.async=true;</script>
|
||||
<script src="../../../vendor/less/dist/less.js" type="text/javascript"></script>
|
||||
<!-- debug end -->
|
||||
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../../../../sdkjs/develop/sdkjs/cell/scripts.js"></script>
|
||||
<script>
|
||||
window.sdk_scripts.forEach(function(item){
|
||||
document.write('<script type="text/javascript" src="' + item + '"><\/script>');
|
||||
});
|
||||
|
||||
window.requireTimeourError = function(){
|
||||
var reqerr;
|
||||
|
||||
if ( lang == 'de') reqerr = 'Die Verbindung ist zu langsam, einige Komponenten konnten nicht geladen werden. Aktualisieren Sie bitte die Seite.';
|
||||
else if ( lang == 'es') reqerr = 'La conexión es muy lenta, algunos de los componentes no han podido cargar. Por favor recargue la página.';
|
||||
else if ( lang == 'fr') reqerr = 'La connexion est trop lente, certains des composants n\'ons pas pu être chargé. Veuillez recharger la page.';
|
||||
else if ( lang == 'ru') reqerr = 'Слишком медленное соединение, не удается загрузить некоторые компоненты. Пожалуйста, обновите страницу.';
|
||||
else reqerr = 'The connection is too slow, some of the components could not be loaded. Please reload the page.';
|
||||
|
||||
return reqerr;
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- application -->
|
||||
<script data-main="app_dev" src="../../../vendor/requirejs/require.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
232
apps/spreadsheeteditor/main/index_internal.html.deploy
Normal file
|
@ -0,0 +1,232 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>ONLYOFFICE Document Editor</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=IE8"/>
|
||||
<meta name="description" content="" />
|
||||
<meta name="keywords" content="" />
|
||||
<link rel="icon" href="resources/img/favicon.ico" type="image/x-icon" />
|
||||
|
||||
<!-- splash -->
|
||||
<style type="text/css">
|
||||
.loadmask {
|
||||
left: 0;
|
||||
top: 0;
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
background-color: #f4f4f4;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.loadmask ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.loadmask>.skformula {
|
||||
height: 24px;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
.loadmask>.skformula ul {
|
||||
list-style-type: none;
|
||||
font-size: 0;
|
||||
box-sizing: border-box;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #e1e1e1 transparent;
|
||||
}
|
||||
|
||||
.loadmask>.skformula li {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
height: 19px;
|
||||
width: 100%;
|
||||
margin-left: 20px;
|
||||
background: #f7f7f7;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: transparent #e1e1e1;
|
||||
}
|
||||
|
||||
.loadmask>.skformula li:first-child {
|
||||
width: 100px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.loadmask > .placeholder {
|
||||
background: #fbfbfb;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 0;
|
||||
border: 1px solid #dfdfdf;
|
||||
white-space: nowrap;
|
||||
|
||||
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
|
||||
-moz-animation: flickerAnimation 2s infinite ease-in-out;
|
||||
-o-animation: flickerAnimation 2s infinite ease-in-out;
|
||||
animation: flickerAnimation 2s infinite ease-in-out;
|
||||
}
|
||||
|
||||
.loadmask > .placeholder > .columns {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
background: linear-gradient(90deg, #d5d5d5 0px, rgba(223,223,223,0) 1px) 0 0,
|
||||
linear-gradient(rgba(223,223,223,0) 19px, #d5d5d5 20px) 0 0,
|
||||
linear-gradient( #f1f1f1 0px, #f1f1f1 20px) 0 0 repeat-x;
|
||||
background-size: 80px 20px;
|
||||
}
|
||||
|
||||
.loadmask > .placeholder > .columns:first-child {
|
||||
background: linear-gradient(#f1f1f1 19px, #d5d5d5 20px) 0 0;
|
||||
background-size: 20px 20px;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
@keyframes flickerAnimation {
|
||||
0% { opacity:1; }
|
||||
50% { opacity:0.5; }
|
||||
100% { opacity:1; }
|
||||
}
|
||||
@-o-keyframes flickerAnimation{
|
||||
0% { opacity:1; }
|
||||
50% { opacity:0.5; }
|
||||
100% { opacity:1; }
|
||||
}
|
||||
@-moz-keyframes flickerAnimation{
|
||||
0% { opacity:1; }
|
||||
50% { opacity:0.5; }
|
||||
100% { opacity:1; }
|
||||
}
|
||||
@-webkit-keyframes flickerAnimation{
|
||||
0% { opacity:1; }
|
||||
50% { opacity:0.5; }
|
||||
100% { opacity:1; }
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
document.getElementsByTagName('html')[0].setAttribute('style', 'zoom: ' + 1 / (window.devicePixelRatio < 2 ? window.devicePixelRatio : window.devicePixelRatio / 2) + ';');
|
||||
|
||||
var userAgent = navigator.userAgent.toLowerCase(),
|
||||
check = function(regex){ return regex.test(userAgent); },
|
||||
stopLoading = false;
|
||||
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
||||
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
||||
if (m && parseFloat(m[1]) < 10.0) {
|
||||
document.write('<div class="app-error-panel">' +
|
||||
'<div class="message-block">' +
|
||||
'<div class="message-inner">' +
|
||||
'<div class="title">Your browser is not supported.</div>' +
|
||||
'<div class="text">Sorry, Spreadsheet Editor is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>' +
|
||||
'</div>' +
|
||||
'</div></div>');
|
||||
stopLoading = true;
|
||||
}
|
||||
} else
|
||||
if (check(/windows\snt/i)) {
|
||||
var re = /chrome\/(\d+)/i.exec(userAgent);
|
||||
if (!!re && !!re[1] && !(re[1] > 49)) {
|
||||
setTimeout(function () {
|
||||
document.getElementsByTagName('body')[0].className += "winxp";
|
||||
},0);
|
||||
}
|
||||
}
|
||||
|
||||
function getUrlParams() {
|
||||
var e,
|
||||
a = /\+/g, // Regex for replacing addition symbol with a space
|
||||
r = /([^&=]+)=?([^&]*)/g,
|
||||
d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
|
||||
q = window.location.search.substring(1),
|
||||
urlParams = {};
|
||||
|
||||
while (e = r.exec(q))
|
||||
urlParams[d(e[1])] = d(e[2]);
|
||||
|
||||
return urlParams;
|
||||
}
|
||||
|
||||
function encodeUrlParam(str) {
|
||||
return str.replace(/&/g, '&')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
|
||||
var params = getUrlParams(),
|
||||
lang = (params["lang"] || 'en').split(/[\-\_]/)[0];
|
||||
|
||||
window.frameEditorId = params["frameEditorId"];
|
||||
window.parentOrigin = params["parentOrigin"];
|
||||
|
||||
if ( window.AscDesktopEditor ) {
|
||||
window.desktop = window.AscDesktopEditor;
|
||||
window.on_native_message = function (cmd, param) {
|
||||
!window.native_message_cmd && (window.native_message_cmd = []);
|
||||
window.native_message_cmd[cmd] = param;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../../../apps/spreadsheeteditor/main/resources/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="loading-mask" class="loadmask">
|
||||
<div class="skformula">
|
||||
<ul><li/><li/></ul>
|
||||
</div>
|
||||
<div class="placeholder">
|
||||
<div class="columns"></div><div class="columns"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="viewport"></div>
|
||||
|
||||
<script>
|
||||
if (stopLoading) {
|
||||
document.body.removeChild(document.getElementById('loading-mask'));
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
window.requireTimeourError = function(){
|
||||
var reqerr;
|
||||
|
||||
if ( lang == 'de') reqerr = 'Die Verbindung ist zu langsam, einige Komponenten konnten nicht geladen werden. Aktualisieren Sie bitte die Seite.';
|
||||
else if ( lang == 'es') reqerr = 'La conexión es muy lenta, algunos de los componentes no han podido cargar. Por favor recargue la página.';
|
||||
else if ( lang == 'fr') reqerr = 'La connexion est trop lente, certains des composants n\'ons pas pu être chargé. Veuillez recharger la page.';
|
||||
else if ( lang == 'ru') reqerr = 'Слишком медленное соединение, не удается загрузить некоторые компоненты. Пожалуйста, обновите страницу.';
|
||||
else reqerr = 'The connection is too slow, some of the components could not be loaded. Please reload the page.';
|
||||
|
||||
return reqerr;
|
||||
};
|
||||
|
||||
var requireTimeoutID = setTimeout(function(){
|
||||
window.alert(window.requireTimeourError());
|
||||
window.location.reload();
|
||||
}, 30000);
|
||||
|
||||
var require = {
|
||||
waitSeconds: 30,
|
||||
callback: function(){
|
||||
clearTimeout(requireTimeoutID);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<!--<inline src="resources/img/header/buttons.svg" />-->
|
||||
<inline src="resources/img/toolbar/charttypes.svg" />
|
||||
|
||||
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -59,6 +59,10 @@
|
|||
"Common.Views.About.txtPoweredBy": "Powered by",
|
||||
"Common.Views.About.txtTel": "tel.: ",
|
||||
"Common.Views.About.txtVersion": "Version ",
|
||||
"Common.Views.AutoCorrectDialog.textTitle": "AutoCorrect",
|
||||
"Common.Views.AutoCorrectDialog.textMathCorrect": "Math AutoCorrect",
|
||||
"Common.Views.AutoCorrectDialog.textReplace": "Replace:",
|
||||
"Common.Views.AutoCorrectDialog.textBy": "By:",
|
||||
"Common.Views.Chat.textSend": "Send",
|
||||
"Common.Views.Comments.textAdd": "Add",
|
||||
"Common.Views.Comments.textAddComment": "Add Comment",
|
||||
|
@ -109,13 +113,17 @@
|
|||
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
|
||||
"Common.Views.ImageFromUrlDialog.txtEmpty": "This field is required",
|
||||
"Common.Views.ImageFromUrlDialog.txtNotUrl": "This field should be a URL in the \"http://www.example.com\" format",
|
||||
"Common.Views.ListSettingsDialog.tipChange": "Change bullet",
|
||||
"Common.Views.ListSettingsDialog.txtBullet": "Bullet",
|
||||
"Common.Views.ListSettingsDialog.txtColor": "Color",
|
||||
"Common.Views.ListSettingsDialog.txtOfText": "% of text",
|
||||
"Common.Views.ListSettingsDialog.txtSize": "Size",
|
||||
"Common.Views.ListSettingsDialog.txtStart": "Start at",
|
||||
"Common.Views.ListSettingsDialog.txtTitle": "List Settings",
|
||||
"Common.Views.ListSettingsDialog.textBulleted": "Bulleted",
|
||||
"Common.Views.ListSettingsDialog.textNumbering": "Numbered",
|
||||
"Common.Views.ListSettingsDialog.txtType": "Type",
|
||||
"Common.Views.ListSettingsDialog.txtNone": "None",
|
||||
"Common.Views.ListSettingsDialog.txtNewBullet": "New bullet",
|
||||
"Common.Views.ListSettingsDialog.txtSymbol": "Symbol",
|
||||
"Common.Views.OpenDialog.closeButtonText": "Close File",
|
||||
"Common.Views.OpenDialog.txtColon": "Colon",
|
||||
"Common.Views.OpenDialog.txtComma": "Comma",
|
||||
|
@ -131,6 +139,7 @@
|
|||
"Common.Views.OpenDialog.txtTab": "Tab",
|
||||
"Common.Views.OpenDialog.txtTitle": "Choose %1 options",
|
||||
"Common.Views.OpenDialog.txtTitleProtected": "Protected File",
|
||||
"Common.Views.OpenDialog.txtAdvanced": "Advanced",
|
||||
"Common.Views.PasswordDialog.txtDescription": "Set a password to protect this document",
|
||||
"Common.Views.PasswordDialog.txtIncorrectPwd": "Confirmation password is not identical",
|
||||
"Common.Views.PasswordDialog.txtPassword": "Password",
|
||||
|
@ -1188,6 +1197,10 @@
|
|||
"SSE.Controllers.Viewport.textHideFBar": "Hide Formula Bar",
|
||||
"SSE.Controllers.Viewport.textHideGridlines": "Hide Gridlines",
|
||||
"SSE.Controllers.Viewport.textHideHeadings": "Hide Headings",
|
||||
"SSE.Views.AdvancedSeparatorDialog.textTitle": "Advanced Settings",
|
||||
"SSE.Views.AdvancedSeparatorDialog.textLabel": "Settings used to recognize numeric data",
|
||||
"SSE.Views.AdvancedSeparatorDialog.strDecimalSeparator": "Decimal separator",
|
||||
"SSE.Views.AdvancedSeparatorDialog.strThousandsSeparator": "Thousands separator",
|
||||
"SSE.Views.AutoFilterDialog.btnCustomFilter": "Custom Filter",
|
||||
"SSE.Views.AutoFilterDialog.textAddSelection": "Add current selection to filter",
|
||||
"SSE.Views.AutoFilterDialog.textEmptyItem": "{Blanks}",
|
||||
|
@ -1586,6 +1599,14 @@
|
|||
"SSE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
||||
"SSE.Views.DocumentHolder.textFromStorage": "From Storage",
|
||||
"SSE.Views.DocumentHolder.advancedSlicerText": "Slicer Advanced Settings",
|
||||
"SSE.Views.DocumentHolder.textAverage": "Average",
|
||||
"SSE.Views.DocumentHolder.textMax": "Max",
|
||||
"SSE.Views.DocumentHolder.textMin": "Min",
|
||||
"SSE.Views.DocumentHolder.textCount": "Count",
|
||||
"SSE.Views.DocumentHolder.textSum": "Sum",
|
||||
"SSE.Views.DocumentHolder.textStdDev": "StdDev",
|
||||
"SSE.Views.DocumentHolder.textVar": "Var",
|
||||
"SSE.Views.DocumentHolder.textMore": "More functions",
|
||||
"SSE.Views.FieldSettingsDialog.strLayout": "Layout",
|
||||
"SSE.Views.FieldSettingsDialog.strSubtotals": "Subtotals",
|
||||
"SSE.Views.FieldSettingsDialog.textReport": "Report Form",
|
||||
|
@ -1713,6 +1734,8 @@
|
|||
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.strDictionaryLanguage": "Dictionary language",
|
||||
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.strIgnoreWordsInUPPERCASE": "Ignore words in UPPERCASE",
|
||||
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.strIgnoreWordsWithNumbers": "Ignore words with numbers",
|
||||
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.txtProofing": "Proofing",
|
||||
"SSE.Views.FileMenuPanels.MainSpellCheckSettings.txtAutoCorrect": "AutoCorrect options...",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Warning",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.strEncrypt": "With password",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.strProtect": "Protect Spreadsheet",
|
||||
|
@ -2449,6 +2472,7 @@
|
|||
"SSE.Views.TableOptionsDialog.txtFormat": "Create table",
|
||||
"SSE.Views.TableOptionsDialog.txtInvalidRange": "ERROR! Invalid cells range",
|
||||
"SSE.Views.TableOptionsDialog.txtTitle": "Title",
|
||||
"SSE.Views.TableOptionsDialog.txtNote": "The headers must remain in the same row, and the resulting table range must overlap the original table range.",
|
||||
"SSE.Views.TableSettings.deleteColumnText": "Delete Column",
|
||||
"SSE.Views.TableSettings.deleteRowText": "Delete Row",
|
||||
"SSE.Views.TableSettings.deleteTableText": "Delete Table",
|
||||
|
@ -2485,6 +2509,7 @@
|
|||
"SSE.Views.TableSettings.textTotal": "Total",
|
||||
"SSE.Views.TableSettings.warnLongOperation": "The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?",
|
||||
"SSE.Views.TableSettings.textSlicer": "Insert slicer",
|
||||
"SSE.Views.TableSettings.textPivot": "Insert pivot table",
|
||||
"SSE.Views.TableSettingsAdvanced.textAlt": "Alternative Text",
|
||||
"SSE.Views.TableSettingsAdvanced.textAltDescription": "Description",
|
||||
"SSE.Views.TableSettingsAdvanced.textAltTip": "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table.",
|
||||
|
|
|
@ -2342,6 +2342,7 @@
|
|||
"SSE.Views.TableOptionsDialog.txtFormat": "Создать таблицу",
|
||||
"SSE.Views.TableOptionsDialog.txtInvalidRange": "ОШИБКА! Недопустимый диапазон ячеек",
|
||||
"SSE.Views.TableOptionsDialog.txtTitle": "Заголовок",
|
||||
"SSE.Views.TableOptionsDialog.txtNote": "Заголовки должны оставаться в той же строке, а результирующий диапазон таблицы - частично перекрываться с исходным диапазоном.",
|
||||
"SSE.Views.TableSettings.deleteColumnText": "Удалить столбец",
|
||||
"SSE.Views.TableSettings.deleteRowText": "Удалить строку",
|
||||
"SSE.Views.TableSettings.deleteTableText": "Удалить таблицу",
|
||||
|
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 393 B After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 376 B |
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 353 B |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 454 B |
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 437 B |
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 419 B After Width: | Height: | Size: 438 B |
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 415 B |
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 533 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 610 B After Width: | Height: | Size: 510 B |
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 454 B |
Before Width: | Height: | Size: 527 B After Width: | Height: | Size: 502 B |
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 463 B |
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 140 B After Width: | Height: | Size: 253 B |
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 306 B |
Before Width: | Height: | Size: 276 B After Width: | Height: | Size: 298 B |
Before Width: | Height: | Size: 285 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 647 B |
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 528 B |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 539 B |
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 520 B |
|
@ -122,16 +122,17 @@
|
|||
#status-math-box,
|
||||
#status-filtered-box {
|
||||
float: right;
|
||||
padding-top: 6px;
|
||||
padding-right: 14px;
|
||||
|
||||
label {
|
||||
padding-top: 6px;
|
||||
height: 25px;
|
||||
&:not(:last-child) {
|
||||
padding-right: 10px;
|
||||
}
|
||||
&:last-child {
|
||||
padding-right: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.separator {
|
||||
margin-top: -6px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -350,4 +351,8 @@
|
|||
opacity: 0;
|
||||
background-color: @gray-light;
|
||||
z-index: @zindex-modal - 1;
|
||||
}
|
||||
|
||||
.over-box {
|
||||
display: none;
|
||||
}
|
|
@ -102,7 +102,7 @@ define([
|
|||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiDisconnect, this));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiDisconnect, this));
|
||||
// this.api.asc_registerCallback('asc_onUpdateTabColor', _.bind(this.onApiUpdateTabColor, this));
|
||||
this.api.asc_registerCallback('asc_onUpdateTabColor', _.bind(this.onApiUpdateTabColor, this));
|
||||
// this.api.asc_registerCallback('asc_onEditCell', _.bind(this.onApiEditCell, this));
|
||||
this.api.asc_registerCallback('asc_onWorkbookLocked', _.bind(this.onWorkbookLocked, this));
|
||||
this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onWorksheetLocked, this));
|
||||
|
@ -144,6 +144,8 @@ define([
|
|||
this.sheets.reset(items);
|
||||
this.hiddensheets.reset(hiddentems);
|
||||
|
||||
this.updateTabsColors();
|
||||
|
||||
return;
|
||||
|
||||
if (this.api) {
|
||||
|
@ -271,7 +273,7 @@ define([
|
|||
this.api['asc_hideWorksheet']([index]);
|
||||
} else {
|
||||
this.api['asc_showWorksheet'](index);
|
||||
// this.loadTabColor(index);
|
||||
this.loadTabColor(index);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -436,11 +438,9 @@ define([
|
|||
|
||||
loadTabColor: function (sheetindex) {
|
||||
if (this.api) {
|
||||
if (!this.api.asc_isWorksheetHidden(sheetindex)) {
|
||||
var tab = _.findWhere(this.statusbar.tabbar.tabs, {sheetindex: sheetindex});
|
||||
if (tab) {
|
||||
this.setTabLineColor(tab, this.api.asc_getWorksheetTabColor(sheetindex));
|
||||
}
|
||||
var tab = this.sheets.findWhere({index: sheetindex});
|
||||
if (tab) {
|
||||
this.setTabLineColor(tab, this.api.asc_getWorksheetTabColor(sheetindex));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -454,19 +454,26 @@ define([
|
|||
}
|
||||
|
||||
if (color.length) {
|
||||
if (!tab.isActive()) {
|
||||
color = '0px 3px 0 ' + Common.Utils.RGBColor(color).toRGBA(0.7) + ' inset';
|
||||
if (!tab.get('active')) {
|
||||
color = '0px 4px 0 ' + Common.Utils.RGBColor(color).toRGBA(0.7) + ' inset';
|
||||
} else {
|
||||
color = '0px 3px 0 ' + color + ' inset';
|
||||
color = '0px 4px 0 ' + color + ' inset';
|
||||
}
|
||||
|
||||
tab.$el.find('a').css('box-shadow', color);
|
||||
tab.get('el').find('a').css('box-shadow', color);
|
||||
} else {
|
||||
tab.$el.find('a').css('box-shadow', '');
|
||||
tab.get('el').find('a').css('box-shadow', '');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
updateTabsColors: function () {
|
||||
var me = this;
|
||||
_.each(this.sheets.models, function (item) {
|
||||
me.setTabLineColor(item, me.api.asc_getWorksheetTabColor(item.get('index')));
|
||||
});
|
||||
},
|
||||
|
||||
onError: function(id, level, errData) {
|
||||
// if (id == Asc.c_oAscError.ID.LockedWorksheetRename)
|
||||
// this.statusbar.update();
|
||||
|
|
|
@ -188,6 +188,10 @@
|
|||
{
|
||||
"src": "../apps/spreadsheeteditor/main/index_loader.html.deploy",
|
||||
"dest": "../deploy/web-apps/apps/spreadsheeteditor/main/index_loader.html"
|
||||
},
|
||||
{
|
||||
"src": "../apps/spreadsheeteditor/main/index_internal.html.deploy",
|
||||
"dest": "../deploy/web-apps/apps/spreadsheeteditor/main/index_internal.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|