diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js
index ee433be10..c5aecaf25 100644
--- a/apps/api/documents/api.js
+++ b/apps/api/documents/api.js
@@ -11,10 +11,11 @@
# Full #
config = {
- type: 'desktop or mobile',
+ type: 'desktop or mobile or embedded',
width: '100% by default',
height: '100% by default',
documentType: 'word' | 'cell' | 'slide',// deprecate 'text' | 'spreadsheet' | 'presentation',
+ token: encrypted signature
document: {
title: 'document title',
url: 'document url'
@@ -51,6 +52,12 @@
}
},
editorConfig: {
+ actionLink: { // open file and scroll to data, used with onMakeActionLink or the onRequestSendNotify event
+ action: {
+ type: "bookmark", // or type="comment"
+ data: // or comment id
+ }
+ },
mode: 'view or edit',
lang: ,
location: ,
@@ -141,7 +148,8 @@
mentionShare : true // customize tooltip for mention,
macros: true // can run macros in document
plugins: true // can run plugins in document
- macrosMode: 'warn' // warn about automatic macros, 'enable', 'disable', 'warn'
+ macrosMode: 'warn' // warn about automatic macros, 'enable', 'disable', 'warn',
+ trackChanges: undefined // true/false - open editor with track changes mode on/off
},
plugins: {
autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'],
@@ -155,9 +163,30 @@
},
events: {
'onAppReady': ,
- 'onBack': ,
'onDocumentStateChange':
'onDocumentReady':
+ 'onRequestEditRights': ,
+ 'onRequestHistory': ,// must call refreshHistory method
+ 'onRequestHistoryData': ,// must call setHistoryData method
+ 'onRequestRestore': ,
+ 'onRequestHistoryClose': ,
+ 'onError': ,
+ 'onWarning': ,
+ 'onInfo': ,// send view or edit mode
+ 'onOutdatedVersion': ,// send when previous version is opened
+ 'onDownloadAs': ,// send url of downloaded file as a response for downloadAs method
+ 'onRequestSaveAs': ,
+ 'onCollaborativeChanges': ,// send when other user co-edit document
+ 'onRequestRename': ,
+ 'onMetaChange': // send when meta information changed
+ 'onRequestClose': ,
+ 'onMakeActionLink': ,// must call setActionLink method
+ 'onRequestUsers': ,// must call setUsers method
+ 'onRequestSendNotify': //send when user is mentioned in a comment,
+ 'onRequestInsertImage': ,// must call insertImage method
+ 'onRequestCompareFile': ,// must call setRevisedFile method
+ 'onRequestSharingSettings': ,// must call setSharingSettings method
+ 'onRequestCreateNew': ,
}
}
@@ -361,7 +390,7 @@
if (typeof _config.document.fileType === 'string' && _config.document.fileType != '') {
_config.document.fileType = _config.document.fileType.toLowerCase();
- var type = /^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp)|(doc|docx|doct|odt|gdoc|txt|rtf|pdf|mht|htm|html|epub|djvu|xps|docm|dot|dotm|dotx|fodt|ott))$/
+ var type = /^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp)|(doc|docx|doct|odt|gdoc|txt|rtf|pdf|mht|htm|html|epub|djvu|xps|docm|dot|dotm|dotx|fodt|ott|fb2))$/
.exec(_config.document.fileType);
if (!type) {
window.alert("The \"document.fileType\" parameter for the config object is invalid. Please correct it.");
@@ -850,7 +879,7 @@
iframe.allowFullscreen = true;
iframe.setAttribute("allowfullscreen",""); // for IE11
iframe.setAttribute("onmousewheel",""); // for Safari on Mac
- iframe.setAttribute("allow", "autoplay");
+ iframe.setAttribute("allow", "autoplay; camera; microphone; display-capture");
if (config.type == "mobile")
{
diff --git a/apps/common/main/lib/component/Calendar.js b/apps/common/main/lib/component/Calendar.js
index 2304ab1f5..0ae99149c 100644
--- a/apps/common/main/lib/component/Calendar.js
+++ b/apps/common/main/lib/component/Calendar.js
@@ -237,7 +237,7 @@ define([
me.yearPicker.store.reset(arrYears);
me.enableKeyEvents && _.delay(function() {
- me.monthPicker.cmpEl.find('.dataview').focus();
+ me.monthPicker.focus();
}, 10);
},
@@ -312,7 +312,7 @@ define([
me.monthsPicker.store.reset(arrMonths);
me.enableKeyEvents && _.delay(function() {
- me.monthPicker.cmpEl.find('.dataview').focus();
+ me.monthPicker.focus();
}, 10);
},
@@ -435,7 +435,7 @@ define([
me.monthPicker.store.reset(arrDays);
me.enableKeyEvents && _.delay(function() {
- me.monthPicker.cmpEl.find('.dataview').focus();
+ me.monthPicker.focus();
}, 10);
},
diff --git a/apps/common/main/lib/component/ColorButton.js b/apps/common/main/lib/component/ColorButton.js
index 15b02c0bb..cdbbb0002 100644
--- a/apps/common/main/lib/component/ColorButton.js
+++ b/apps/common/main/lib/component/ColorButton.js
@@ -61,7 +61,7 @@ define([
var me = this;
options.menu = me.getMenu(options);
me.on('render:after', function(btn) {
- me.getPicker(options.color);
+ me.getPicker(options.color, options.colors);
});
}
@@ -88,12 +88,13 @@ define([
span.css({'background-color': (color=='transparent') ? color : ((typeof(color) == 'object') ? '#'+color.color : '#'+color)});
},
- getPicker: function(color) {
+ getPicker: function(color, colors) {
if (!this.colorPicker) {
this.colorPicker = new Common.UI.ThemeColorPalette({
el: this.cmpEl.find('#' + this.menu.id + '-color-menu'),
transparent: this.options.transparent,
- value: color
+ value: color,
+ colors: colors
});
this.colorPicker.on('select', _.bind(this.onColorSelect, this));
this.cmpEl.find('#' + this.menu.id + '-color-new').on('click', _.bind(this.addNewColor, this));
@@ -104,13 +105,14 @@ define([
getMenu: function(options) {
if (typeof this.menu !== 'object') {
options = options || this.options;
+ var height = options.paletteHeight || 216;
var id = Common.UI.getId(),
menu = new Common.UI.Menu({
id: id,
cls: 'shifted-left',
additionalAlign: options.additionalAlign,
items: (options.additionalItems ? options.additionalItems : []).concat([
- { template: _.template('') },
+ { template: _.template('') },
{ template: _.template('' + this.textNewColor + ' ') }
])
});
@@ -122,7 +124,7 @@ define([
setMenu: function (m) {
m = m || this.getMenu();
Common.UI.Button.prototype.setMenu.call(this, m);
- this.getPicker(this.options.color);
+ this.getPicker(this.options.color, this.options.colors);
},
addNewColor: function() {
diff --git a/apps/common/main/lib/component/ComboBox.js b/apps/common/main/lib/component/ComboBox.js
index c50a88aff..14a0a185a 100644
--- a/apps/common/main/lib/component/ComboBox.js
+++ b/apps/common/main/lib/component/ComboBox.js
@@ -86,7 +86,8 @@ define([
displayField: 'displayValue',
valueField : 'value',
search : false,
- scrollAlwaysVisible: false
+ scrollAlwaysVisible: false,
+ takeFocusOnClose: false
},
template: _.template([
@@ -323,6 +324,9 @@ define([
$list.scrollTop(height);
}
setTimeout(function(){$selected.find('a').focus();}, 1);
+ } else {
+ var me = this;
+ setTimeout(function(){me.cmpEl.find('ul li:first a').focus();}, 1);
}
if (this.scroller)
@@ -343,10 +347,19 @@ define([
this.cmpEl.find('.dropdown-toggle').blur();
this.trigger('hide:after', this, e, isFromInputControl);
Common.NotificationCenter.trigger('menu:hide', this, isFromInputControl);
+ if (this.options.takeFocusOnClose) {
+ var me = this;
+ setTimeout(function(){me.focus();}, 1);
+ }
},
onAfterKeydownMenu: function(e) {
- if (e.keyCode == Common.UI.Keys.RETURN) {
+ if (e.keyCode == Common.UI.Keys.DOWN && !this.editable && !this.isMenuOpen()) {
+ this.openMenu();
+ this.onAfterShowMenu();
+ return false;
+ }
+ else if (e.keyCode == Common.UI.Keys.RETURN && (this.editable || this.isMenuOpen())) {
$(e.target).click();
var me = this;
if (this.rendered) {
@@ -666,6 +679,10 @@ define([
wheelSpeed: 10,
alwaysVisibleY: this.scrollAlwaysVisible
}, this.options.scroller));
+ },
+
+ focus: function() {
+ this._input && this._input.focus();
}
}
})());
@@ -687,6 +704,10 @@ define([
Common.UI.ComboBox.prototype.selectRecord.call(this, record);
if (this.options.updateFormControl)
this.options.updateFormControl.call(this, this._selectedItem);
+ },
+
+ focus: function() {
+ this.cmpEl && this.cmpEl.find('.form-control').focus();
}
}, Common.UI.ComboBoxCustom || {}));
});
\ No newline at end of file
diff --git a/apps/common/main/lib/component/ComboBoxFonts.js b/apps/common/main/lib/component/ComboBoxFonts.js
index 8d0092329..7840c57ee 100644
--- a/apps/common/main/lib/component/ComboBoxFonts.js
+++ b/apps/common/main/lib/component/ComboBoxFonts.js
@@ -105,14 +105,17 @@ define([
render : function(parentEl) {
var oldRawValue = null;
+ var oldTabindex = '';
if (!_.isUndefined(this._input)) {
oldRawValue = this._input.val();
+ oldTabindex = this._input.attr('tabindex');
}
Common.UI.ComboBox.prototype.render.call(this, parentEl);
this.setRawValue(oldRawValue);
+ this._input.attr('tabindex', oldTabindex);
this._input.on('keyup', _.bind(this.onInputKeyUp, this));
this._input.on('keydown', _.bind(this.onInputKeyDown, this));
@@ -128,6 +131,8 @@ define([
if ($(e.target).closest('input').length) { // enter in input field
if (this.lastValue !== this._input.val())
this._input.trigger('change');
+ else
+ return true;
} else { // enter in dropdown list
$(e.target).click();
if (this.rendered) {
@@ -136,7 +141,7 @@ define([
else
this._input.blur();
}
- }
+ }
return false;
} else if (e.keyCode == Common.UI.Keys.ESC && this.isMenuOpen()) {
this._input.val(this.lastValue);
@@ -199,7 +204,7 @@ define([
me.closeMenu();
me.onAfterHideMenu(e);
}, 10);
- } else if (e.keyCode != Common.UI.Keys.RETURN && e.keyCode != Common.UI.Keys.CTRL && e.keyCode != Common.UI.Keys.SHIFT && e.keyCode != Common.UI.Keys.ALT){
+ } else if (e.keyCode != Common.UI.Keys.RETURN && e.keyCode != Common.UI.Keys.CTRL && e.keyCode != Common.UI.Keys.SHIFT && e.keyCode != Common.UI.Keys.ALT && e.keyCode != Common.UI.Keys.TAB){
if (!this.isMenuOpen() && !e.ctrlKey)
this.openMenu();
@@ -301,7 +306,7 @@ define([
if (callback) {
this.spriteThumbs = new Image();
this.spriteThumbs.onload = callback;
- this.spriteThumbs.src = (window.devicePixelRatio > 1) ? thumbPath2x : thumbPath;
+ this.spriteThumbs.src = isRetina ? thumbPath2x : thumbPath;
}
},
@@ -338,16 +343,21 @@ define([
onApiChangeFont: function(font) {
var me = this;
- setTimeout(function () {
- me.onApiChangeFontInternal(font);
- }, 100);
+ var name = (_.isFunction(font.get_Name) ? font.get_Name() : font.asc_getFontName());
+ if (this.__name !== name) {
+ if (!this.__nameId) {
+ this.__nameId = setTimeout(function () {
+ me.onApiChangeFontInternal(name);
+ me.__nameId = null;
+ }, 100);
+ }
+ }
},
- onApiChangeFontInternal: function(font) {
+ onApiChangeFontInternal: function(name) {
if (this.inFormControl) return;
- var name = (_.isFunction(font.get_Name) ? font.get_Name() : font.asc_getFontName());
-
+ this.__name = name;
if (this.getRawValue() !== name) {
var record = this.store.findWhere({
name: name
diff --git a/apps/common/main/lib/component/DataView.js b/apps/common/main/lib/component/DataView.js
index 723389239..9a44423f0 100644
--- a/apps/common/main/lib/component/DataView.js
+++ b/apps/common/main/lib/component/DataView.js
@@ -242,6 +242,7 @@ define([
me.listenStoreEvents= (me.options.listenStoreEvents!==undefined) ? me.options.listenStoreEvents : true;
me.allowScrollbar = (me.options.allowScrollbar!==undefined) ? me.options.allowScrollbar : true;
me.scrollAlwaysVisible = me.options.scrollAlwaysVisible || false;
+ me.tabindex = me.options.tabindex || 0;
if (me.parentMenu)
me.parentMenu.options.restoreHeight = (me.options.restoreHeight>0);
me.rendered = false;
@@ -678,7 +679,7 @@ define([
if (this.enableKeyEvents && this.handleSelect) {
var el = $(this.el).find('.inner').addBack().filter('.inner');
el.addClass('canfocused');
- el.attr('tabindex', '0');
+ el.attr('tabindex', this.tabindex.toString());
el.on((this.parentMenu && this.useBSKeydown) ? 'dataview:keydown' : 'keydown', _.bind(this.onKeyDown, this));
}
},
@@ -763,6 +764,10 @@ define([
onResize: function() {
this._layoutParams = undefined;
+ },
+
+ focus: function() {
+ this.cmpEl && this.cmpEl.find('.dataview').focus();
}
});
@@ -798,6 +803,8 @@ define([
me.useBSKeydown = me.options.useBSKeydown; // only with enableKeyEvents && parentMenu
me.style = me.options.style || '';
me.scrollAlwaysVisible = me.options.scrollAlwaysVisible || false;
+ me.tabindex = me.options.tabindex || 0;
+
if (me.parentMenu)
me.parentMenu.options.restoreHeight = (me.options.restoreHeight>0);
me.rendered = false;
@@ -1120,7 +1127,7 @@ define([
if (this.enableKeyEvents && this.handleSelect) {
var el = $(this.el).find('.inner').addBack().filter('.inner');
el.addClass('canfocused');
- el.attr('tabindex', '0');
+ el.attr('tabindex', this.tabindex.toString());
el.on((this.parentMenu && this.useBSKeydown) ? 'dataview:keydown' : 'keydown', _.bind(this.onKeyDown, this));
}
},
@@ -1192,6 +1199,10 @@ define([
onResize: function() {
this._layoutParams = undefined;
+ },
+
+ focus: function() {
+ this.cmpEl && this.cmpEl.find('.dataview').focus();
}
});
diff --git a/apps/common/main/lib/component/FocusManager.js b/apps/common/main/lib/component/FocusManager.js
new file mode 100644
index 000000000..0dfa0baea
--- /dev/null
+++ b/apps/common/main/lib/component/FocusManager.js
@@ -0,0 +1,176 @@
+/*
+ *
+ * (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
+ *
+ */
+/**
+ * FocusManager.js
+ *
+ * Created by Julia Radzhabova on 24.09.2020
+ * Copyright (c) 2020 Ascensio System SIA. All rights reserved.
+ *
+ */
+
+
+if (Common === undefined)
+ var Common = {};
+
+if (Common.UI === undefined) {
+ Common.UI = {};
+}
+
+Common.UI.FocusManager = new(function() {
+ var _tabindex = 1,
+ _windows = [],
+ _count = 0;
+
+ var register = function(fields) {
+ var arr = [];
+ if (!fields.forEach) {
+ fields = [fields];
+ }
+ fields.forEach(function(field) {
+ if (field) {
+ var item = (field.cmp && typeof field.selector == 'string') ? field : {cmp: field, selector: '.form-control'};
+ item.el = (item.cmp.$el || $(item.cmp.el || item.cmp)).find(item.selector).addBack().filter(item.selector);
+ item.el && item.el.attr && item.el.attr('tabindex', _tabindex.toString());
+ arr.push(item);
+ }
+ });
+ return arr;
+ };
+
+ var addTraps = function(current) {
+ if (!current || current.traps || !current.fields || current.fields.length<1) return;
+
+ var trapFirst = $(' ');
+ trapFirst.on('focus', function() {
+ if (current.hidden) return;
+ var fields = current.fields;
+ for (var i=0; i');
+ trapLast.on('focus', function() {
+ if (current.hidden) return;
+ var fields = current.fields;
+ for (var i=fields.length-1; i>=0; i--) {
+ var field = fields[i];
+ if ((field.cmp.isVisible ? field.cmp.isVisible() : field.cmp.is(':visible')) && !(field.cmp.isDisabled && field.cmp.isDisabled())) {
+ var el = (field.selector) ? (field.cmp.$el || $(field.cmp.el || field.cmp)).find(field.selector).addBack().filter(field.selector) : field.el;
+ el && setTimeout(function(){ el.focus(); }, 10);
+ break;
+ }
+ }
+ });
+ current.parent.$window.append(trapLast);
+ current.traps = [trapFirst, trapLast];
+ };
+
+ var updateTabIndexes = function(increment) {
+ var step = increment ? 1 : -1;
+ for (var cid in _windows) {
+ if (_windows.hasOwnProperty(cid)) {
+ var item = _windows[cid];
+ if (item && item.index < _count-1 && item.traps)
+ item.traps[1].attr('tabindex', (parseInt(item.traps[1].attr('tabindex')) + step).toString());
+ }
+ }
+ };
+
+ var _add = function(e, fields) {
+ if (e && e.cid) {
+ if (_windows[e.cid]) {
+ _windows[e.cid].fields = (_windows[e.cid].fields || []).concat(register(fields));
+ } else {
+ _windows[e.cid] = {
+ parent: e,
+ fields: register(fields),
+ hidden: false,
+ index: _count++
+ };
+ }
+ addTraps(_windows[e.cid]);
+ }
+ };
+
+ var _init = function() {
+ Common.NotificationCenter.on({
+ 'modal:show': function(e){
+ if (e && e.cid) {
+ if (_windows[e.cid]) {
+ _windows[e.cid].hidden = false;
+ } else {
+ _windows[e.cid] = {
+ parent: e,
+ hidden: false,
+ index: _count++
+ };
+ updateTabIndexes(true);
+ }
+ }
+ },
+ 'window:show': function(e){
+ if (e && e.cid && _windows[e.cid] && !_windows[e.cid].fields) {
+ _windows[e.cid].fields = register(e.getFocusedComponents());
+ addTraps(_windows[e.cid]);
+ }
+
+ var el = e ? e.getDefaultFocusableComponent() : null;
+ el && setTimeout(function(){ el.focus(); }, 100);
+ },
+ 'modal:close': function(e, last) {
+ if (e && e.cid && _windows[e.cid]) {
+ updateTabIndexes(false);
+ delete _windows[e.cid];
+ _count--;
+ }
+ },
+ 'modal:hide': function(e, last) {
+ if (e && e.cid && _windows[e.cid]) {
+ _windows[e.cid].hidden = true;
+ }
+ }
+ });
+ };
+
+ return {
+ init: _init,
+ add: _add
+ }
+})();
\ No newline at end of file
diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js
index df8164441..75fe653ac 100644
--- a/apps/common/main/lib/component/InputField.js
+++ b/apps/common/main/lib/component/InputField.js
@@ -246,6 +246,10 @@ define([
if (e.keyCode === Common.UI.Keys.RETURN)
this._doChange(e);
+ if (e.keyCode == Common.UI.Keys.ESC)
+ this.setValue(this.value);
+ if (e.keyCode==Common.UI.Keys.RETURN || e.keyCode==Common.UI.Keys.ESC)
+ this.trigger('inputleave', this);
},
onKeyUp: function(e) {
@@ -300,7 +304,7 @@ define([
},
focus: function() {
- this._input.focus();
+ this._input && this._input.focus();
},
checkValidate: function() {
@@ -354,10 +358,10 @@ define([
return true;
},
- showError: function(errors) {
+ showError: function(errors, isWarning) {
var me = this;
if (!_.isEmpty(errors)) {
- me.cmpEl.addClass('error');
+ me.cmpEl.addClass(isWarning ? 'warning' : 'error');
var errorBadge = me.cmpEl.find('.input-error'),
modalParents = errorBadge.closest('.asc-window'),
@@ -376,7 +380,12 @@ define([
}
} else {
me.cmpEl.removeClass('error');
+ me.cmpEl.removeClass('warning');
}
+ },
+
+ showWarning: function(errors) {
+ this.showError(errors, true);
}
}
})());
diff --git a/apps/common/main/lib/component/ListView.js b/apps/common/main/lib/component/ListView.js
index 080d6e15f..0c4016ac1 100644
--- a/apps/common/main/lib/component/ListView.js
+++ b/apps/common/main/lib/component/ListView.js
@@ -115,6 +115,10 @@ define([
if (!this.isSuspendEvents)
this.trigger('item:add', this, view, record);
}
+ },
+
+ focus: function() {
+ this.cmpEl && this.cmpEl.find('.listview').focus();
}
}
})());
diff --git a/apps/common/main/lib/component/LoadMask.js b/apps/common/main/lib/component/LoadMask.js
index b9973a33b..c9634f2aa 100644
--- a/apps/common/main/lib/component/LoadMask.js
+++ b/apps/common/main/lib/component/LoadMask.js
@@ -78,8 +78,8 @@ define([
template: _.template([
'',
- '
',
- '
<%= title %>
',
+ '
',
+ '
<%= title %>
',
'
'
].join('')),
@@ -128,10 +128,6 @@ define([
ownerEl.append(maskeEl);
ownerEl.append(loaderEl);
- loaderEl.css({
- top : Math.round(ownerEl.height() / 2 - (loaderEl.height() + parseInt(loaderEl.css('padding-top')) + parseInt(loaderEl.css('padding-bottom'))) / 2) + 'px',
- left: Math.round(ownerEl.width() / 2 - (loaderEl.width() + parseInt(loaderEl.css('padding-left')) + parseInt(loaderEl.css('padding-right'))) / 2) + 'px'
- });
// if (ownerEl.height()<1 || ownerEl.width()<1)
// loaderEl.css({visibility: 'hidden'});
diff --git a/apps/common/main/lib/component/MetricSpinner.js b/apps/common/main/lib/component/MetricSpinner.js
index b90673569..065ad2352 100644
--- a/apps/common/main/lib/component/MetricSpinner.js
+++ b/apps/common/main/lib/component/MetricSpinner.js
@@ -234,10 +234,7 @@ define([
},
getNumberValue: function(){
- if (this.options.allowAuto && this.value==this.options.autoText)
- return -1;
- else
- return parseFloat(this.value);
+ return this.checkAutoText(this.value) ? -1 : parseFloat(this.value);
},
getUnitValue: function(){
@@ -262,7 +259,7 @@ define([
this.lastValue = this.value;
if ( typeof value === 'undefined' || value === ''){
this.value = '';
- } else if (this.options.allowAuto && (Math.abs(Common.Utils.String.parseFloat(value)+1.)<0.0001 || value==this.options.autoText)) {
+ } else if (this.options.allowAuto && (Math.abs(Common.Utils.String.parseFloat(value)+1.)<0.0001 || this.checkAutoText(value))) {
this.value = this.options.autoText;
} else {
var number = this._add(Common.Utils.String.parseFloat(value), 0, (this.options.allowDecimal) ? 3 : 0);
@@ -450,8 +447,8 @@ define([
val = this.getRawValue();
val = _.isEmpty(val) ? me.oldValue : Common.Utils.String.parseFloat(val);
} else if(me.getValue() !== '') {
- if (me.options.allowAuto && me.getValue()==me.options.autoText) {
- val = me.options.minValue-me.options.step;
+ if (me.checkAutoText(me.getValue())) {
+ val = me.options.defaultValue-me.options.step;
} else
val = Common.Utils.String.parseFloat(me.getValue());
if (isNaN(val))
@@ -471,7 +468,7 @@ define([
val = this.getRawValue();
val = _.isEmpty(val) ? me.oldValue : Common.Utils.String.parseFloat(val);
} else if(me.getValue() !== '') {
- if (me.options.allowAuto && me.getValue()==me.options.autoText) {
+ if (me.checkAutoText(me.getValue())) {
val = me.options.minValue;
} else
val = Common.Utils.String.parseFloat(me.getValue());
@@ -537,6 +534,22 @@ define([
v_out = parseFloat((v_out * 6.0 / 25.4).toFixed(6));
return v_out;
+ },
+
+ focus: function() {
+ if (this.$input) this.$input.focus();
+ },
+
+ setDefaultValue: function(value) {
+ this.options.defaultValue = value;
+ },
+
+ checkAutoText: function(value) {
+ if (this.options.allowAuto && typeof value == 'string') {
+ var val = value.toLowerCase();
+ return (val==this.options.autoText.toLowerCase() || val=='auto');
+ }
+ return false;
}
});
diff --git a/apps/common/main/lib/component/Mixtbar.js b/apps/common/main/lib/component/Mixtbar.js
index 61d99d021..e166d79f1 100644
--- a/apps/common/main/lib/component/Mixtbar.js
+++ b/apps/common/main/lib/component/Mixtbar.js
@@ -267,7 +267,8 @@ define([
me.dblclick_el = tab;
delete me.dblclick_timer;
},500);
- }
+ } else
+ me.dblclick_el = tab;
}
}
},
diff --git a/apps/common/main/lib/component/TextareaField.js b/apps/common/main/lib/component/TextareaField.js
new file mode 100644
index 000000000..4b648d8b4
--- /dev/null
+++ b/apps/common/main/lib/component/TextareaField.js
@@ -0,0 +1,202 @@
+/*
+ *
+ * (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
+ *
+ */
+/**
+ * TextareaField.js
+ *
+ * Created by Julia Radzhabova on 29/09/20
+ * Copyright (c) 2020 Ascensio System SIA. All rights reserved.
+ *
+ */
+
+if (Common === undefined)
+ var Common = {};
+
+define([
+ 'common/main/lib/component/BaseView',
+ 'common/main/lib/component/Tooltip'
+], function () { 'use strict';
+
+ Common.UI.TextareaField = Common.UI.BaseView.extend((function() {
+ return {
+ options : {
+ id : null,
+ cls : '',
+ style : '',
+ value : '',
+ maxlength : undefined,
+ placeHolder : '',
+ spellcheck : false,
+ disabled: false
+ },
+
+ template: _.template([
+ '',
+ '',
+ '
'
+ ].join('')),
+
+ initialize : function(options) {
+ Common.UI.BaseView.prototype.initialize.call(this, options);
+
+ var me = this;
+
+ this.id = me.options.id || Common.UI.getId();
+ this.cls = me.options.cls;
+ this.style = me.options.style;
+ this.value = me.options.value;
+ this.placeHolder = me.options.placeHolder;
+ this.template = me.options.template || me.template;
+ this.disabled = me.options.disabled;
+ this.spellcheck = me.options.spellcheck;
+ this.maxLength = me.options.maxLength;
+
+ me.rendered = me.options.rendered || false;
+
+ if (me.options.el) {
+ me.render();
+ }
+ },
+
+ render : function(parentEl) {
+ var me = this;
+
+ if (!me.rendered) {
+ this.cmpEl = $(this.template({
+ id : this.id,
+ cls : this.cls,
+ style : this.style,
+ placeHolder : this.placeHolder,
+ spellcheck : this.spellcheck,
+ scope : me
+ }));
+
+ if (parentEl) {
+ this.setElement(parentEl, false);
+ parentEl.html(this.cmpEl);
+ } else {
+ this.$el.html(this.cmpEl);
+ }
+ } else {
+ this.cmpEl = this.$el;
+ }
+
+ if (!me.rendered) {
+ var el = this.cmpEl;
+
+ this._input = this.cmpEl.find('textarea').addBack().filter('textarea');
+ this._input.on('blur', _.bind(this.onInputChanged, this));
+ this._input.on('keydown', _.bind(this.onKeyDown, this));
+ if (this.maxLength) this._input.attr('maxlength', this.maxLength);
+
+ if (this.disabled)
+ this.setDisabled(this.disabled);
+ }
+
+ me.rendered = true;
+
+ return this;
+ },
+
+ _doChange: function(e, extra) {
+ // skip processing for internally-generated synthetic event
+ // to avoid double processing
+ if (extra && extra.synthetic)
+ return;
+
+ var newValue = $(e.target).val(),
+ oldValue = this.value;
+
+ this.trigger('changed:before', this, newValue, oldValue, e);
+
+ if (e.isDefaultPrevented())
+ return;
+
+ this.value = newValue;
+
+ // trigger changed event
+ this.trigger('changed:after', this, newValue, oldValue, e);
+ },
+
+ onInputChanged: function(e, extra) {
+ this._doChange(e, extra);
+ },
+
+ onKeyDown: function(e) {
+ this.trigger('keydown:before', this, e);
+
+ if (e.isDefaultPrevented())
+ return;
+
+ if (e.keyCode === Common.UI.Keys.RETURN) {
+ e.stopPropagation();
+ }
+ if (e.keyCode == Common.UI.Keys.ESC)
+ this.setValue(this.value);
+ if (e.keyCode==Common.UI.Keys.ESC)
+ this.trigger('inputleave', this);
+ },
+
+ setDisabled: function(disabled) {
+ this.disabled = disabled;
+ $(this.el).toggleClass('disabled', disabled);
+ disabled
+ ? this._input.attr('disabled', true)
+ : this._input.removeAttr('disabled');
+ },
+
+ isDisabled: function() {
+ return this.disabled;
+ },
+
+ setValue: function(value) {
+ this.value = value;
+
+ if (this.rendered){
+ this._input.val(value);
+ }
+ },
+
+ getValue: function() {
+ return this.value;
+ },
+
+ focus: function() {
+ this._input.focus();
+ }
+ }
+ })());
+});
diff --git a/apps/common/main/lib/component/ThemeColorPalette.js b/apps/common/main/lib/component/ThemeColorPalette.js
index 10549495c..8cbd08a7a 100644
--- a/apps/common/main/lib/component/ThemeColorPalette.js
+++ b/apps/common/main/lib/component/ThemeColorPalette.js
@@ -60,7 +60,7 @@ define([
template :
_.template(
- '' +
+ '
' +
'<% var me = this; %>' +
'<% $(colors).each(function(num, item) { %>' +
'<% if (me.isBlankSeparator(item)) { %>
' +
diff --git a/apps/common/main/lib/component/TreeView.js b/apps/common/main/lib/component/TreeView.js
index 8f32ea245..b8016b431 100644
--- a/apps/common/main/lib/component/TreeView.js
+++ b/apps/common/main/lib/component/TreeView.js
@@ -159,11 +159,12 @@ define([
showLast: true,
allowScrollbar: true,
scrollAlwaysVisible: true,
- emptyItemText: ''
+ emptyItemText: '',
+ keyMoveDirection: 'both'
},
template: _.template([
- '
'
+ '
'
].join('')),
initialize : function(options) {
@@ -280,6 +281,86 @@ define([
this.store.collapseSubItems(record);
this.scroller.update({minScrollbarLength: 40, alwaysVisibleY: this.scrollAlwaysVisible});
}
+ },
+
+ onKeyDown: function (e, data) {
+ if ( this.disabled ) return;
+ if (data===undefined) data = e;
+ if (_.indexOf(this.moveKeys, data.keyCode)>-1 || data.keyCode==Common.UI.Keys.RETURN) {
+ data.preventDefault();
+ data.stopPropagation();
+ var rec = this.getSelectedRec();
+ if (this.lastSelectedRec===null)
+ this.lastSelectedRec = rec;
+ if (data.keyCode==Common.UI.Keys.RETURN) {
+ this.lastSelectedRec = null;
+ if (this.selectedBeforeHideRec) // only for ComboDataView menuPicker
+ rec = this.selectedBeforeHideRec;
+ this.trigger('item:click', this, this, rec, e);
+ this.trigger('item:select', this, this, rec, e);
+ this.trigger('entervalue', this, rec, e);
+ if (this.parentMenu)
+ this.parentMenu.hide();
+ } else {
+ var idx = _.indexOf(this.store.models, rec);
+ if (idx<0) {
+ if (data.keyCode==Common.UI.Keys.LEFT) {
+ var target = $(e.target).closest('.dropdown-submenu.over');
+ if (target.length>0) {
+ target.removeClass('over');
+ target.find('> a').focus();
+ } else
+ idx = 0;
+ } else
+ idx = 0;
+ } else if (this.options.keyMoveDirection == 'both') {
+ var hasSubItems = rec.get('hasSubItems');
+ var hasParent = rec.get('hasParent');
+ var isExpanded = rec.get('isExpanded');
+ if (data.keyCode==Common.UI.Keys.LEFT) {
+ if (hasSubItems && isExpanded)
+ this.collapseRecord(rec);
+ } else if (data.keyCode==Common.UI.Keys.RIGHT) {
+ if (hasSubItems && !isExpanded)
+ this.expandRecord(rec);
+ } else {
+ if (data.keyCode==Common.UI.Keys.DOWN) {
+ for (var i=idx+1; i
=0; i--) {
+ if (this.store.at(i).get('isVisible')) {
+ idx=i;
+ break;
+ }
+ }
+ }
+ }
+ } else {
+ idx = (data.keyCode==Common.UI.Keys.UP || data.keyCode==Common.UI.Keys.LEFT)
+ ? Math.max(0, idx-1)
+ : Math.min(this.store.length - 1, idx + 1) ;
+ }
+
+ if (idx !== undefined && idx>=0) rec = this.store.at(idx);
+ if (rec) {
+ this._fromKeyDown = true;
+ this.selectRecord(rec);
+ this._fromKeyDown = false;
+ this.scrollToRecord(rec);
+ }
+ }
+ } else {
+ this.trigger('item:keydown', this, rec, e);
+ }
+ },
+
+ focus: function() {
+ this.cmpEl && this.cmpEl.find('.treeview').focus();
}
}
})());
diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js
index cc4020a78..d2e132659 100644
--- a/apps/common/main/lib/component/Window.js
+++ b/apps/common/main/lib/component/Window.js
@@ -137,7 +137,8 @@
define([
'common/main/lib/component/BaseView',
- 'common/main/lib/component/CheckBox'
+ 'common/main/lib/component/CheckBox',
+ 'common/main/lib/component/FocusManager'
], function () {
'use strict';
@@ -238,6 +239,14 @@ define([
return {width: width, height: height, top: Common.Utils.InternalSettings.get('window-inactive-area-top')};
}
+ function _autoSize() {
+ if (this.initConfig.height == 'auto') {
+ var height = parseInt(this.$window.find('> .body').css('height'));
+ this.initConfig.header && (height += parseInt(this.$window.find('> .header').css('height')));
+ this.$window.height(height);
+ }
+ }
+
function _centre() {
var main_geometry = _readDocumetGeometry(),
main_width = main_geometry.width,
@@ -597,7 +606,7 @@ define([
if (b.value !== undefined)
newBtns[b.value] = {text: b.caption, cls: 'custom' + ((b.primary || options.primary==b.value) ? ' primary' : '')};
} else {
- newBtns[b] = {text: (b=='custom') ? options.customButtonText : arrBtns[b], cls: (options.primary==b) ? 'primary' : ''};
+ newBtns[b] = {text: (b=='custom') ? options.customButtonText : arrBtns[b], cls: (options.primary==b || _.indexOf(options.primary, b)>-1) ? 'primary' : ''};
if (b=='custom')
newBtns[b].cls += ' custom';
}
@@ -658,11 +667,7 @@ define([
});
}
- if (this.initConfig.height == 'auto') {
- var height = parseInt(this.$window.find('> .body').css('height'));
- this.initConfig.header && (height += parseInt(this.$window.find('> .header').css('height')));
- this.$window.height(height);
- } else {
+ if (this.initConfig.height !== 'auto') {
this.$window.css('height',this.initConfig.height);
}
@@ -719,6 +724,7 @@ define([
if (!this.$window) {
this.render();
+ _autoSize.call(this);
if (_.isNumber(x) && _.isNumber(y)) {
this.$window.css('left',Math.floor(x));
@@ -773,7 +779,7 @@ define([
this.fireEvent('show', this);
}
- Common.NotificationCenter.trigger('window:show');
+ Common.NotificationCenter.trigger('window:show', this);
},
close: function(suppressevent) {
@@ -979,6 +985,13 @@ define([
onPrimary: function() {},
+ getFocusedComponents: function() {
+ return [];
+ },
+
+ getDefaultFocusableComponent: function() {
+ },
+
cancelButtonText: 'Cancel',
okButtonText: 'OK',
yesButtonText: 'Yes',
diff --git a/apps/common/main/lib/controller/Desktop.js b/apps/common/main/lib/controller/Desktop.js
index fa1ca9e4d..8b7e84641 100644
--- a/apps/common/main/lib/controller/Desktop.js
+++ b/apps/common/main/lib/controller/Desktop.js
@@ -111,7 +111,7 @@ define([
} else
if (/button:click/.test(cmd)) {
var obj = JSON.parse(param);
- if ( !!obj.action ) {
+ if ( !!obj.action && !!titlebuttons[obj.action] ) {
titlebuttons[obj.action].btn.click();
}
} else
diff --git a/apps/common/main/lib/controller/History.js b/apps/common/main/lib/controller/History.js
index b261bc3a5..b3714940d 100644
--- a/apps/common/main/lib/controller/History.js
+++ b/apps/common/main/lib/controller/History.js
@@ -139,6 +139,12 @@ define([
Common.Gateway.requestHistoryData(rev); // получаем url-ы для ревизий
}, 10);
} else {
+ var commentsController = this.getApplication().getController('Common.Controllers.Comments');
+ if (commentsController) {
+ commentsController.onApiHideComment();
+ commentsController.clearCollections();
+ }
+
var urlDiff = record.get('urlDiff'),
token = record.get('token'),
hist = new Asc.asc_CVersionHistory();
@@ -152,11 +158,6 @@ define([
hist.asc_setServerVersion(this.currentServerVersion);
this.api.asc_showRevision(hist);
- var commentsController = this.getApplication().getController('Common.Controllers.Comments');
- if (commentsController) {
- commentsController.onApiHideComment();
- commentsController.clearCollections();
- }
var reviewController = this.getApplication().getController('Common.Controllers.ReviewChanges');
if (reviewController)
reviewController.onApiShowChange();
@@ -175,6 +176,12 @@ define([
};
Common.UI.alert(config);
} else {
+ var commentsController = this.getApplication().getController('Common.Controllers.Comments');
+ if (commentsController) {
+ commentsController.onApiHideComment();
+ commentsController.clearCollections();
+ }
+
var data = opts.data;
var historyStore = this.getApplication().getCollection('Common.Collections.HistoryVersions');
if (historyStore && data!==null) {
@@ -210,11 +217,6 @@ define([
hist.asc_setServerVersion(this.currentServerVersion);
this.api.asc_showRevision(hist);
- var commentsController = this.getApplication().getController('Common.Controllers.Comments');
- if (commentsController) {
- commentsController.onApiHideComment();
- commentsController.clearCollections();
- }
var reviewController = this.getApplication().getController('Common.Controllers.ReviewChanges');
if (reviewController)
reviewController.onApiShowChange();
diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js
index b305b8649..68c4f2ccd 100644
--- a/apps/common/main/lib/controller/Plugins.js
+++ b/apps/common/main/lib/controller/Plugins.js
@@ -644,23 +644,23 @@ define([
arr = [],
plugins = this.configPlugins,
warn = false;
- if (plugins.plugins && plugins.plugins.length>0) {
+ if (plugins.plugins && plugins.plugins.length>0)
arr = plugins.plugins;
- var val = plugins.config.autostart || plugins.config.autoStartGuid;
- if (typeof (val) == 'string')
- val = [val];
- warn = !!plugins.config.autoStartGuid;
- autostart = val || [];
- }
+ var val = plugins.config.autostart || plugins.config.autoStartGuid;
+ if (typeof (val) == 'string')
+ val = [val];
+ warn = !!plugins.config.autoStartGuid;
+ autostart = val || [];
+
plugins = this.serverPlugins;
- if (plugins.plugins && plugins.plugins.length>0) {
+ if (plugins.plugins && plugins.plugins.length>0)
arr = arr.concat(plugins.plugins);
- var val = plugins.config.autostart || plugins.config.autoStartGuid;
- if (typeof (val) == 'string')
- val = [val];
- (warn || plugins.config.autoStartGuid) && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration.");
- autostart = autostart.concat(val || []);
- }
+ val = plugins.config.autostart || plugins.config.autoStartGuid;
+ if (typeof (val) == 'string')
+ val = [val];
+ (warn || plugins.config.autoStartGuid) && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration.");
+ autostart = autostart.concat(val || []);
+
this.autostart = autostart;
this.parsePlugins(arr, false);
}
diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js
index 3018058b3..ec828410c 100644
--- a/apps/common/main/lib/controller/ReviewChanges.js
+++ b/apps/common/main/lib/controller/ReviewChanges.js
@@ -48,7 +48,8 @@ define([
'common/main/lib/collection/ReviewChanges',
'common/main/lib/view/ReviewChanges',
'common/main/lib/view/ReviewPopover',
- 'common/main/lib/view/LanguageDialog'
+ 'common/main/lib/view/LanguageDialog',
+ 'common/main/lib/view/OptionsDialog'
], function () {
'use strict';
@@ -571,8 +572,8 @@ define([
if ( this.appConfig.canReview ) {
state = (state == 'on');
- this.api.asc_SetTrackRevisions(state);
Common.localStorage.setItem(this.view.appPrefix + "track-changes-" + (this.appConfig.fileKey || ''), state ? 1 : 0);
+ this.api.asc_SetTrackRevisions(state);
this.view.turnChanges(state);
}
@@ -630,13 +631,19 @@ define([
}).show();
}
} else if (item === 'settings') {
- (new DE.Views.CompareSettingsDialog({
- props: me._state.compareSettings,
- handler: function(result, value) {
- if (result == 'ok') {
- me._state.compareSettings = value;
+ var value = me._state.compareSettings ? me._state.compareSettings.getWords() : true;
+ (new Common.Views.OptionsDialog({
+ title: me.textTitleComparison,
+ items: [
+ {caption: me.textChar, value: false, checked: (value===false)},
+ {caption: me.textWord, value: true, checked: (value!==false)}
+ ],
+ label: me.textShow,
+ handler: function (dlg, result) {
+ if (result=='ok') {
+ me._state.compareSettings = new AscCommonWord.ComparisonOptions();
+ me._state.compareSettings.putWords(dlg.getSettings());
}
-
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
})).show();
@@ -739,7 +746,7 @@ define([
leftMenu.setPreviewMode(disable);
if (this.view) {
- this.view.$el.find('.no-group-mask').css('opacity', 1);
+ this.view.$el.find('.no-group-mask.review').css('opacity', 1);
this.view.btnsDocLang && this.view.btnsDocLang.forEach(function(button) {
if ( button ) {
@@ -772,7 +779,8 @@ define([
me.api.asc_SetTrackRevisions(state);
};
- var state = config.isReviewOnly || Common.localStorage.getBool(me.view.appPrefix + "track-changes-" + (config.fileKey || ''));
+ var trackChanges = typeof (me.appConfig.customization) == 'object' ? me.appConfig.customization.trackChanges : undefined;
+ var state = config.isReviewOnly || trackChanges===true || (trackChanges!==false) && Common.localStorage.getBool(me.view.appPrefix + "track-changes-" + (config.fileKey || ''));
me.api.asc_HaveRevisionsChanges() && me.view.markChanges(true);
_setReviewStatus(state);
@@ -964,6 +972,11 @@ define([
textParaMoveFromUp: 'Moved Up: ',
textParaMoveFromDown: 'Moved Down: ',
textUrl: 'Paste a document URL',
- textAcceptBeforeCompare: 'In order to compare documents all the tracked changes in them will be considered to have been accepted. Do you want to continue?'
+ textAcceptBeforeCompare: 'In order to compare documents all the tracked changes in them will be considered to have been accepted. Do you want to continue?',
+ textTitleComparison: 'Comparison Settings',
+ textShow: 'Show changes at',
+ textChar: 'Character level',
+ textWord: 'Word level'
+
}, Common.Controllers.ReviewChanges || {}));
});
\ No newline at end of file
diff --git a/apps/common/main/lib/template/AutoCorrectDialog.template b/apps/common/main/lib/template/AutoCorrectDialog.template
index 872521c14..6aa2fcc25 100644
--- a/apps/common/main/lib/template/AutoCorrectDialog.template
+++ b/apps/common/main/lib/template/AutoCorrectDialog.template
@@ -25,9 +25,9 @@
- <%= scope.textResetAll %>
- <%= scope.textDelete %>
- <%= scope.textAdd %>
+ <%= scope.textResetAll %>
+ <%= scope.textDelete %>
+ <%= scope.textAdd %>
diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js
index e00a3b8b7..3b8db6cc7 100644
--- a/apps/common/main/lib/util/utils.js
+++ b/apps/common/main/lib/util/utils.js
@@ -106,7 +106,8 @@ Common.Utils = _.extend(new(function() {
Signature : 9,
Pivot : 10,
Cell : 11,
- Slicer : 12
+ Slicer : 12,
+ Form : 13
},
importTextType = {
DRM: 0,
@@ -878,23 +879,24 @@ Common.Utils.warningDocumentIsLocked = function (opts) {
opts.disablefunc(true);
var app = window.DE || window.PE || window.SSE;
- var tip = new Common.UI.SynchronizeTip({
- extCls : 'simple',
- text : Common.Locale.get("warnFileLocked",{name:"Common.Translation", default:'Document is in use by another application. You can continue editing and save it as a copy.'}),
- textLink : Common.Locale.get("txtContinueEditing",{name:app.nameSpace + ".Views.SignatureSettings", default:'Edit anyway'}),
- placement : 'document'
- });
- tip.on({
- 'dontshowclick': function() {
- if ( opts.disablefunc ) opts.disablefunc(false);
- app.getController('Main').api.asc_setIsReadOnly(false);
- this.close();
- },
- 'closeclick': function() {
- this.close();
+
+ Common.UI.warning({
+ msg: Common.Locale.get("warnFileLocked",{name:"Common.Translation", default: "You can't edit this file. Document is in use by another application."}),
+ buttons: [{
+ value: 'view',
+ caption: Common.Locale.get("warnFileLockedBtnView",{name:"Common.Translation", default: "Open for viewing"})
+ }, {
+ value: 'edit',
+ caption: Common.Locale.get("warnFileLockedBtnEdit",{name:"Common.Translation", default: "Create a copy"})
+ }],
+ primary: 'view',
+ callback: function(btn){
+ if (btn == 'edit') {
+ if ( opts.disablefunc ) opts.disablefunc(false);
+ app.getController('Main').api.asc_setIsReadOnly(false);
+ }
}
});
- tip.show();
};
jQuery.fn.extend({
diff --git a/apps/common/main/lib/view/AdvancedSettingsWindow.js b/apps/common/main/lib/view/AdvancedSettingsWindow.js
index cf3e6589c..108adb385 100644
--- a/apps/common/main/lib/view/AdvancedSettingsWindow.js
+++ b/apps/common/main/lib/view/AdvancedSettingsWindow.js
@@ -96,7 +96,7 @@ define([
allowDepress: false,
contentTarget: btnEl.attr('content-target')
});
- btn.on('click', _.bind(me.onCategoryClick, me));
+ btn.on('click', _.bind(me.onCategoryClick, me, btn, index));
me.btnsCategory.push(btn);
});
var cnt_panel = $window.find('.content-panel'),
@@ -125,7 +125,7 @@ define([
this.close();
},
- onCategoryClick: function(btn, event) {
+ onCategoryClick: function(btn, index) {
this.content_panels.filter('.active').removeClass('active');
$("#" + btn.options.contentTarget).addClass("active");
},
@@ -144,19 +144,21 @@ define([
setActiveCategory: function(index) {
if (this.btnsCategory.length<1) return;
-
- var btnActive = this.btnsCategory[(index>=0 && index=0 && index '].join('')),
itemTemplate: _.template([
@@ -138,7 +137,8 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
'
<%= by %>
',
'
'
].join('')),
- scrollAlwaysVisible: true
+ scrollAlwaysVisible: true,
+ tabindex: 1
});
this.mathList.on('item:select', _.bind(this.onSelectMathItem, this));
@@ -177,7 +177,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
me.mathList.scrollToRecord(_selectedItem);
}
_.delay(function(){
- me.mathList.cmpEl.find('.listview').focus();
+ me.mathList.focus();
},10);
}
@@ -214,13 +214,14 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
this.mathRecList = new Common.UI.ListView({
el: $window.find('#auto-correct-recognized-list'),
- store: new Common.UI.DataViewStore(this.functionsStore.slice(0, 9)),
+ store: new Common.UI.DataViewStore(_functionsStore.slice(0, 9)),
simpleAddMode: false,
template: _.template(['
'].join('')),
itemTemplate: _.template([
'<%= value %>
'
].join('')),
- scrollAlwaysVisible: true
+ scrollAlwaysVisible: true,
+ tabindex: 1
});
this.mathRecList.on('item:select', _.bind(this.onSelectRecItem, this));
@@ -259,7 +260,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
me.mathRecList.scrollToRecord(_selectedItem);
}
_.delay(function(){
- me.mathRecList.cmpEl.find('.listview').focus();
+ me.mathRecList.focus();
},10);
}
@@ -280,7 +281,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
});
this.btnDeleteRec.on('click', _.bind(this.onDeleteRec, this, false));
- if (this.appPrefix=='de-') {
+ if (this.appPrefix=='de-' || this.appPrefix=='pe-') {
this.chQuotes = new Common.UI.CheckBox({
el: $('#id-autocorrect-dialog-chk-quotes'),
labelText: this.textQuotes,
@@ -349,6 +350,13 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
}
},
+ getFocusedComponents: function() {
+ return [
+ this.inputReplace, this.inputBy, {cmp: this.mathList, selector: '.listview'}, // 0 tab
+ this.inputRecFind, {cmp: this.mathRecList, selector: '.listview'} // 1 tab
+ ];
+ },
+
getSettings: function() {
return;
},
@@ -401,9 +409,9 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
$('input', me.inputReplace.cmpEl).select().focus();
},delay ? 50 : 0);
- if (me.mathList.store.length < me.mathStore.length) {
+ if (me.mathList.store.length < _mathStore.length) {
_.delay(function(){
- me.mathList.setStore(me.mathStore);
+ me.mathList.setStore(_mathStore);
me.mathList.onResetItems();
},delay ? 100 : 10);
}
@@ -426,7 +434,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
this.btnDelete.setCaption(disabled ? this.textRestore : this.textDelete);
disabled ? this.api.asc_deleteFromAutoCorrectMathSymbols(rec.get('replaced')) : this.api.asc_AddOrEditFromAutoCorrectMathSymbols(rec.get('replaced'), rec.get('defaultValue'));
} else {
- this.mathStore.remove(rec);
+ _mathStore.remove(rec);
this.mathList.scroller && this.mathList.scroller.update({});
this.api.asc_deleteFromAutoCorrectMathSymbols(rec.get('replaced'));
}
@@ -448,7 +456,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
me.mathList.scrollToRecord(record);
};
if (!rec) {
- rec = this.mathStore.findWhere({replaced: this.inputReplace.getValue()})
+ rec = _mathStore.findWhere({replaced: this.inputReplace.getValue()})
}
if (rec) {
var idx = _.findIndex(this.arrAdd, function(item){return (item[0]==rec.get('replaced'));});
@@ -478,7 +486,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
});
} else {
- rec = this.mathStore.add({
+ rec = _mathStore.add({
replaced: this.inputReplace.getValue(),
by: this.inputBy.getValue(),
defaultDisabled: false
@@ -515,8 +523,8 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
this.arrAdd = [];
this.arrRem = [];
- this.mathStore.remove(this.mathStore.where({defaultValue: undefined}));
- this.mathStore.each(function(item, index){
+ _mathStore.remove(_mathStore.where({defaultValue: undefined}));
+ _mathStore.each(function(item, index){
item.set('by', item.get('defaultValueStr'));
item.set('defaultDisabled', false);
});
@@ -529,9 +537,9 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
},
onInitList: function() {
- if (this.mathStore.length>0) return;
+ if (_mathStore.length>0) return;
- this.mathStore.comparator = function(item1, item2) {
+ _mathStore.comparator = function(item1, item2) {
var n1 = item1.get('replaced').toLowerCase(),
n2 = item2.get('replaced').toLowerCase();
if (n1==n2) return 0;
@@ -575,14 +583,14 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
changed.by = item[1];
}
});
- this.mathStore.reset(data.concat(dataAdd));
+ _mathStore.reset(data.concat(dataAdd));
this.updateControls();
},
onInitRecList: function() {
- if (this.functionsStore.length>0) return;
+ if (_functionsStore.length>0) return;
- this.functionsStore.comparator = function(item1, item2) {
+ _functionsStore.comparator = function(item1, item2) {
var n1 = item1.get('value').toLowerCase(),
n2 = item2.get('value').toLowerCase();
if (n1==n2) return 0;
@@ -612,7 +620,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
});
}
});
- this.functionsStore.reset(data.concat(dataAdd));
+ _functionsStore.reset(data.concat(dataAdd));
this.updateRecControls();
},
@@ -642,8 +650,8 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
this.arrAddRec = [];
this.arrRemRec = [];
- this.functionsStore.remove(this.functionsStore.where({defaultValue: false}));
- this.functionsStore.each(function(item, index){
+ _functionsStore.remove(_functionsStore.where({defaultValue: false}));
+ _functionsStore.each(function(item, index){
item.set('defaultDisabled', false);
});
this.mathRecList.deselectAll();
@@ -660,9 +668,9 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
$('input', me.inputRecFind.cmpEl).select().focus();
},delay ? 50 : 0);
- if (me.mathRecList.store.length < me.functionsStore.length) {
+ if (me.mathRecList.store.length < _functionsStore.length) {
_.delay(function(){
- me.mathRecList.setStore(me.functionsStore);
+ me.mathRecList.setStore(_functionsStore);
me.mathRecList.onResetItems();
},delay ? 100 : 10);
}
@@ -685,7 +693,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
this.btnDeleteRec.setCaption(disabled ? this.textRestore : this.textDelete);
disabled ? this.api.asc_deleteFromAutoCorrectMathFunctions(rec.get('value')) : this.api.asc_AddFromAutoCorrectMathFunctions(rec.get('value'));
} else {
- this.functionsStore.remove(rec);
+ _functionsStore.remove(rec);
this.mathRecList.scroller && this.mathRecList.scroller.update({});
this.api.asc_deleteFromAutoCorrectMathFunctions(rec.get('value'));
}
@@ -706,11 +714,11 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
me.mathRecList.scrollToRecord(record);
};
if (!rec) {
- rec = this.functionsStore.findWhere({value: this.inputRecFind.getValue()})
+ rec = _functionsStore.findWhere({value: this.inputRecFind.getValue()})
}
if (!rec) {
if (/^[A-Z]+$/i.test(this.inputRecFind.getValue())) {
- rec = this.functionsStore.add({
+ rec = _functionsStore.add({
value: this.inputRecFind.getValue(),
defaultValue: false,
defaultDisabled: false
diff --git a/apps/common/main/lib/view/ExtendedColorDialog.js b/apps/common/main/lib/view/ExtendedColorDialog.js
index 2790ee764..a5b9d4906 100644
--- a/apps/common/main/lib/view/ExtendedColorDialog.js
+++ b/apps/common/main/lib/view/ExtendedColorDialog.js
@@ -85,7 +85,6 @@ define([
defaultUnit : "",
maxValue: 255,
minValue: 0,
- tabindex: 1,
maskExp: /[0-9]/,
allowDecimal: false
});
@@ -98,7 +97,6 @@ define([
defaultUnit : "",
maxValue: 255,
minValue: 0,
- tabindex: 2,
maskExp: /[0-9]/,
allowDecimal: false
});
@@ -111,7 +109,6 @@ define([
defaultUnit : "",
maxValue: 255,
minValue: 0,
- tabindex: 3,
maskExp: /[0-9]/,
allowDecimal: false
});
@@ -128,7 +125,6 @@ define([
this.spinB.on('change', _.bind(this.showColor, this, null, true)).on('changing', _.bind(this.onChangingRGB, this, 3));
this.textColor.on('change', _.bind(this.onChangeMaskedField, this));
this.textColor.on('changed', _.bind(this.onChangedMaskedField, this));
- this.textColor.$el.attr('tabindex', 4);
this.spinR.$el.find('input').attr('maxlength', 3);
this.spinG.$el.find('input').attr('maxlength', 3);
this.spinB.$el.find('input').attr('maxlength', 3);
@@ -146,9 +142,18 @@ define([
this.rendered = true;
if (this.color!==undefined)
this.setColor(this.color);
+
return this;
},
+ getFocusedComponents: function() {
+ return [this.spinR, this.spinG, this.spinB, {cmp: this.textColor, selector: 'input'}];
+ },
+
+ getDefaultFocusableComponent: function () {
+ return this.getChild('#extended-text-color');
+ },
+
onChangeColor: function(o, color) {
this.colorNew.css({'background-color' : color});
@@ -271,15 +276,6 @@ define([
me.stopevents = false;
},
- show: function() {
- Common.UI.Window.prototype.show.apply(this, arguments);
-
- var me = this;
- _.delay(function(){
- me.getChild('#extended-text-color').focus();
- },50);
- },
-
onPrimary: function() {
this.trigger('onmodalresult', 1);
this.close(true);
diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js
index 013d52043..edc32f215 100644
--- a/apps/common/main/lib/view/Header.js
+++ b/apps/common/main/lib/view/Header.js
@@ -630,6 +630,8 @@ define([
getButton: function(type) {
if (type == 'save')
return this.btnSave;
+ else if (type == 'users')
+ return $panelUsers;
},
lockHeaderBtns: function (alias, lock) {
diff --git a/apps/common/main/lib/view/InsertTableDialog.js b/apps/common/main/lib/view/InsertTableDialog.js
index a9d1e8501..e9890a80f 100644
--- a/apps/common/main/lib/view/InsertTableDialog.js
+++ b/apps/common/main/lib/view/InsertTableDialog.js
@@ -107,6 +107,14 @@ define([
// this.udRows.on('entervalue', _.bind(this.onPrimary, this));
},
+ getFocusedComponents: function() {
+ return [this.udColumns, this.udRows];
+ },
+
+ getDefaultFocusableComponent: function () {
+ return this.udColumns;
+ },
+
onBtnClick: function(event) {
if (this.options.handler) {
this.options.handler.call(this, event.currentTarget.attributes['result'].value, {
diff --git a/apps/common/main/lib/view/LanguageDialog.js b/apps/common/main/lib/view/LanguageDialog.js
index efd4bf487..be8342bc2 100644
--- a/apps/common/main/lib/view/LanguageDialog.js
+++ b/apps/common/main/lib/view/LanguageDialog.js
@@ -101,7 +101,9 @@ define([
''
].join('')),
data: this.options.languages,
- search: true
+ takeFocusOnClose: true,
+ search: true,
+ scrollAlwaysVisible: true
});
if (this.cmbLanguage.scroller) this.cmbLanguage.scroller.update({alwaysVisibleY: true});
@@ -109,6 +111,11 @@ define([
var langname = Common.util.LanguageInfo.getLocalLanguageName(this.options.current);
this.cmbLanguage.setValue(langname[0], langname[1]);
this.onLangSelect(this.cmbLanguage, this.cmbLanguage.getSelectedRecord());
+
+ var me = this;
+ setTimeout(function(){
+ me.cmbLanguage.focus();
+ }, 100);
},
close: function(suppressevent) {
diff --git a/apps/common/main/lib/view/ListSettingsDialog.js b/apps/common/main/lib/view/ListSettingsDialog.js
index 3bee84954..7ba0754a4 100644
--- a/apps/common/main/lib/view/ListSettingsDialog.js
+++ b/apps/common/main/lib/view/ListSettingsDialog.js
@@ -155,6 +155,7 @@ define([
el : $('#id-dlg-list-numbering-format'),
menuStyle : 'min-width: 100%;max-height: 183px;',
editable : false,
+ takeFocusOnClose: true,
cls : 'input-group-nr',
data : [
{ displayValue: this.txtNone, value: -1 },
@@ -196,6 +197,7 @@ define([
menuStyle : 'min-width: 100%;max-height: 183px;',
style : "width: 100px;",
editable : false,
+ takeFocusOnClose: true,
template : _.template(template.join('')),
itemsTemplate: _.template(itemsTemplate.join('')),
data : [
@@ -318,6 +320,10 @@ define([
this.afterRender();
},
+ getFocusedComponents: function() {
+ return [this.cmbNumFormat, this.cmbBulletFormat, this.spnSize, this.spnStart];
+ },
+
afterRender: function() {
this.updateThemeColors();
this._setDefaults(this.props);
@@ -342,6 +348,13 @@ define([
this.numberingControls.toggleClass('hidden', value==0);
this.cmbNumFormat.setVisible(value==1);
this.cmbBulletFormat.setVisible(value==0);
+ var me = this;
+ _.delay(function(){
+ if (value)
+ me.cmbNumFormat.focus();
+ else
+ me.cmbBulletFormat.focus();
+ },50);
},
_handleInput: function(state) {
diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js
index 6123d15f5..8b5dca3b5 100644
--- a/apps/common/main/lib/view/OpenDialog.js
+++ b/apps/common/main/lib/view/OpenDialog.js
@@ -59,7 +59,7 @@ define([
width = 414;
height = 277;
} else {
- width = (options.type !== Common.Utils.importTextType.DRM) ? 340 : (options.warning ? 420 : 262);
+ width = (options.type !== Common.Utils.importTextType.DRM) ? 340 : (options.warning ? 420 : 280);
height = (options.type == Common.Utils.importTextType.CSV || options.type == Common.Utils.importTextType.Paste || options.type == Common.Utils.importTextType.Columns) ? 190 : (options.warning ? 187 : 147);
}
@@ -92,7 +92,7 @@ define([
'',
'<% } else { %>',
'',
- '',
+ '
' + t.txtOpenFile + ' ',
'
',
'
',
'<% } %>',
@@ -507,7 +507,8 @@ define([
txtColon: 'Colon',
txtSemicolon: 'Semicolon',
txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset.',
- txtAdvanced: 'Advanced'
+ txtAdvanced: 'Advanced',
+ txtOpenFile: "Enter a password to open the file"
}, Common.Views.OpenDialog || {}));
});
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/view/CellsAddDialog.js b/apps/common/main/lib/view/OptionsDialog.js
similarity index 70%
rename from apps/spreadsheeteditor/main/app/view/CellsAddDialog.js
rename to apps/common/main/lib/view/OptionsDialog.js
index 68fe56f4d..183745111 100644
--- a/apps/spreadsheeteditor/main/app/view/CellsAddDialog.js
+++ b/apps/common/main/lib/view/OptionsDialog.js
@@ -31,9 +31,9 @@
*
*/
/**
- * CellsAddDialog.js
+ * OptionsDialog.js
*
- * Created by Julia Radzhabova on 08.05.2020
+ * Created by Julia Radzhabova on 15.10.2020
* Copyright (c) 2020 Ascensio System SIA. All rights reserved.
*
*/
@@ -42,13 +42,13 @@ define([
'common/main/lib/component/RadioBox'
], function () { 'use strict';
- SSE.Views.CellsAddDialog = Common.UI.Window.extend(_.extend({
+ Common.Views.OptionsDialog = Common.UI.Window.extend(_.extend({
options: {
width: 214,
- height: 195,
header: true,
style: 'min-width: 214px;',
cls: 'modal-dlg',
+ items: [],
buttons: ['ok', 'cancel']
},
@@ -57,14 +57,18 @@ define([
this.template = [
'',
- '
',
- '
',
- '
',
- '
',
+ '<% if (typeof label !== "undefined" && label !=="") { %>',
+ '
<%= label %> ',
+ '<% } %>',
+ '<% _.each(items, function(item, index) { %>',
+ '<% if (!item.id) item.id = Common.UI.getId(); %>',
+ '
',
+ '<% }) %>',
'
'
].join('');
this.options.tpl = _.template(this.template)(this.options);
+ this.radio = [];
Common.UI.Window.prototype.initialize.call(this, this.options);
},
@@ -73,30 +77,32 @@ define([
Common.UI.Window.prototype.render.call(this);
var me = this,
+ $window = me.getChild(),
items = this.options.items,
- checked = true;
+ checked = true,
+ checkedIndex = -1;
if (items) {
- for (var i=0; i<4; i++) {
- var radio = new Common.UI.RadioBox({
- el: $('#cell-ins-radio-' + (i+1)),
- labelText: items[i].caption,
- name: 'asc-radio-cell-ins',
- value: items[i].value,
- disabled: items[i].disabled,
- checked: checked && !items[i].disabled
+ for (var i=0; i=0) && this.radio[checkedIndex].setValue(true);
}
-
- var $window = this.getChild();
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
},
@@ -121,5 +127,5 @@ define([
return false;
}
- }, SSE.Views.CellsAddDialog || {}))
+ }, Common.Views.OptionsDialog || {}))
});
\ No newline at end of file
diff --git a/apps/common/main/lib/view/PasswordDialog.js b/apps/common/main/lib/view/PasswordDialog.js
index 8ef59c485..c552b5801 100644
--- a/apps/common/main/lib/view/PasswordDialog.js
+++ b/apps/common/main/lib/view/PasswordDialog.js
@@ -54,8 +54,8 @@ define([
_options = {};
_.extend(_options, {
- width : 350,
- height : 238,
+ width : 395,
+ height : 270,
header : true,
cls : 'modal-dlg',
contentTemplate : '',
@@ -77,6 +77,7 @@ define([
'' + t.txtRepeat + ' ',
'',
'
',
+ '' + t.txtWarning + ' ',
''
].join('');
@@ -154,7 +155,8 @@ define([
txtPassword : "Password",
txtDescription : "A Password is required to open this document",
txtRepeat: 'Repeat password',
- txtIncorrectPwd: 'Confirmation password is not identical'
+ txtIncorrectPwd: 'Confirmation password is not identical',
+ txtWarning: 'Warning: If you lose or forget the password, it cannot be recovered. Please keep it in a safe place.'
}, Common.Views.PasswordDialog || {}));
});
\ No newline at end of file
diff --git a/apps/common/main/lib/view/Plugins.js b/apps/common/main/lib/view/Plugins.js
index a1bee256d..cfcc6c050 100644
--- a/apps/common/main/lib/view/Plugins.js
+++ b/apps/common/main/lib/view/Plugins.js
@@ -210,6 +210,7 @@ define([
this.iframePlugin.align = "top";
this.iframePlugin.frameBorder = 0;
this.iframePlugin.scrolling = "no";
+ this.iframePlugin.allow = "camera; microphone; display-capture";
this.iframePlugin.onload = _.bind(this._onLoad,this);
this.currentPluginFrame.append(this.iframePlugin);
@@ -393,6 +394,7 @@ define([
iframe.align = "top";
iframe.frameBorder = 0;
iframe.scrolling = "no";
+ iframe.allow = "camera; microphone; display-capture";
iframe.onload = _.bind(this._onLoad,this);
var me = this;
diff --git a/apps/common/main/lib/view/ReviewChanges.js b/apps/common/main/lib/view/ReviewChanges.js
index 570356601..33cf281dd 100644
--- a/apps/common/main/lib/view/ReviewChanges.js
+++ b/apps/common/main/lib/view/ReviewChanges.js
@@ -57,7 +57,7 @@ define([
Common.Views.ReviewChanges = Common.UI.BaseView.extend(_.extend((function(){
var template =
'' +
- '' +
+ '
' +
' ' +
' ' +
'
' +
@@ -70,7 +70,7 @@ define([
'
' +
' ' +
'
' +
- '
' +
+ '
' +
' ' +
'
' +
'
' +
@@ -84,11 +84,11 @@ define([
' ' +
'
' +
'
' +
- '
' +
+ '
' +
' ' +
'
' +
'
' +
- '
' +
+ '
' +
' ' +
'
' +
'';
@@ -647,7 +647,7 @@ define([
button.setDisabled(state);
}
}, this);
- this.btnChat && this.btnChat.setDisabled(state);
+ // this.btnChat && this.btnChat.setDisabled(state);
this.btnCommentRemove && this.btnCommentRemove.setDisabled(state || !Common.Utils.InternalSettings.get(this.appPrefix + "settings-livecomment"));
},
diff --git a/apps/common/main/lib/view/SignDialog.js b/apps/common/main/lib/view/SignDialog.js
index 44524278a..261496c9c 100644
--- a/apps/common/main/lib/view/SignDialog.js
+++ b/apps/common/main/lib/view/SignDialog.js
@@ -74,6 +74,8 @@ define([
bold: false,
italic: false
};
+ var filter = Common.localStorage.getKeysFilter();
+ this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
this.template = [
'
',
@@ -145,6 +147,7 @@ define([
menuStyle : 'min-width: 234px;max-height: 270px;',
store : new Common.Collections.Fonts(),
recent : 0,
+ takeFocusOnClose: true,
hint : me.tipFontName
}).on('selected', function(combo, record) {
if (me.signObject) {
@@ -160,6 +163,7 @@ define([
menuCls : 'scrollable-menu',
menuStyle: 'min-width: 55px;max-height: 270px;',
hint: this.tipFontSize,
+ takeFocusOnClose: true,
data: [
{ value: 8, displayValue: "8" },
{ value: 9, displayValue: "9" },
@@ -186,11 +190,13 @@ define([
me.font.size = record.value;
});
this.cmbFontSize.setValue(this.font.size);
+ this.cmbFontSize.on('changed:before', _.bind(this.onFontSizeChanged, this, true));
+ this.cmbFontSize.on('changed:after', _.bind(this.onFontSizeChanged, this, false));
me.btnBold = new Common.UI.Button({
parentEl: $('#id-dlg-sign-bold'),
cls: 'btn-toolbar',
- iconCls: 'btn-bold',
+ iconCls: 'toolbar__icon btn-bold',
enableToggle: true,
hint: me.textBold
});
@@ -204,7 +210,7 @@ define([
me.btnItalic = new Common.UI.Button({
parentEl: $('#id-dlg-sign-italic'),
cls: 'btn-toolbar',
- iconCls: 'btn-italic',
+ iconCls: 'toolbar__icon btn-italic',
enableToggle: true,
hint: me.textItalic
});
@@ -241,6 +247,10 @@ define([
me.afterRender();
},
+ getFocusedComponents: function() {
+ return [this.inputPurpose, this.inputName, this.cmbFonts, this.cmbFontSize];
+ },
+
show: function() {
Common.UI.Window.prototype.show.apply(this, arguments);
@@ -301,8 +311,14 @@ define([
_handleInput: function(state) {
if (this.options.handler) {
- if (state == 'ok' && (this.btnOk.isDisabled() || this.signObject && !this.signObject.isValid()))
- return;
+ if (state == 'ok' && (this.btnOk.isDisabled() || this.signObject && !this.signObject.isValid())) {
+ if (!this.btnOk.isDisabled()) {
+ this.inputName.showError([this.textNameError]);
+ this.inputName.focus();
+ }
+ return;
+ }
+
this.options.handler.call(this, this, state);
}
@@ -334,6 +350,39 @@ define([
this.signObject.setText(value, this.font.name, this.font.size, this.font.italic, this.font.bold);
},
+ onFontSizeChanged: function(before, combo, record, e) {
+ var value,
+ me = this;
+
+ if (before) {
+ var item = combo.store.findWhere({
+ displayValue: record.value
+ });
+
+ if (!item) {
+ value = /^\+?(\d*(\.|,)?\d+)$|^\+?(\d+(\.|,)?\d*)$/.exec(record.value);
+
+ if (!value) {
+ value = combo.getValue();
+ combo.setRawValue(value);
+ e.preventDefault();
+ return false;
+ }
+ }
+ } else {
+ var maxvalue = (this.appPrefix=='sse-') ? 409 : 300;
+ value = Common.Utils.String.parseFloat(record.value);
+ value = value > maxvalue ? maxvalue :
+ value < 1 ? 1 : Math.floor((value+0.4)*2)/2;
+
+ combo.setRawValue(value);
+ if (this.signObject) {
+ this.signObject.setText(this.inputName.getValue(), this.font.name, value, this.font.italic, this.font.bold);
+ }
+ this.font.size = value;
+ }
+ },
+
textTitle: 'Sign Document',
textPurpose: 'Purpose for signing this document',
textCertificate: 'Certificate',
@@ -347,7 +396,8 @@ define([
tipFontSize: 'Font Size',
textBold: 'Bold',
textItalic: 'Italic',
- textSelect: 'Select'
+ textSelect: 'Select',
+ textNameError: 'Signer name must not be empty.'
}, Common.Views.SignDialog || {}))
});
\ No newline at end of file
diff --git a/apps/common/main/lib/view/SignSettingsDialog.js b/apps/common/main/lib/view/SignSettingsDialog.js
index d402926ac..74d649b94 100644
--- a/apps/common/main/lib/view/SignSettingsDialog.js
+++ b/apps/common/main/lib/view/SignSettingsDialog.js
@@ -142,13 +142,12 @@ define([
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
},
- show: function() {
- Common.UI.Window.prototype.show.apply(this, arguments);
+ getFocusedComponents: function() {
+ return [this.inputName, this.inputTitle, this.inputEmail, this.textareaInstructions];
+ },
- var me = this;
- _.delay(function(){
- me.inputName.cmpEl.find('input').focus();
- },500);
+ getDefaultFocusableComponent: function () {
+ return this.inputName;
},
setSettings: function (props) {
@@ -164,6 +163,8 @@ define([
value = props.asc_getInstructions();
me.textareaInstructions.val(value ? value : '');
me.chDate.setValue(props.asc_getShowDate());
+
+ me._currentGuid = props.asc_getGuid();
}
},
@@ -176,6 +177,7 @@ define([
props.asc_setEmail(me.inputEmail.getValue());
props.asc_setInstructions(me.textareaInstructions.val());
props.asc_setShowDate(me.chDate.getValue()=='checked');
+ (me._currentGuid!==undefined) && props.asc_setGuid(me._currentGuid);
return props;
},
diff --git a/apps/common/main/lib/view/SymbolTableDialog.js b/apps/common/main/lib/view/SymbolTableDialog.js
index db9a900fc..f95f03d1e 100644
--- a/apps/common/main/lib/view/SymbolTableDialog.js
+++ b/apps/common/main/lib/view/SymbolTableDialog.js
@@ -489,9 +489,18 @@ define([
var init = (aFontSelects.length<1);
init && this.initFonts();
+ //fill recents
+ this.fillRecentSymbols();
+
+ var lastfont;
if (options.font) {
+ lastfont = options.font;
+ } else if (aRecents.length>0) {
+ lastfont = aRecents[0].font;
+ }
+ if (lastfont) {
for(var i = 0; i < aFontSelects.length; ++i){
- if(aFontSelects[i].displayValue === options.font){
+ if(aFontSelects[i].displayValue === lastfont){
nCurrentFont = i;
break;
}
@@ -526,6 +535,8 @@ define([
nCurrentSymbol = options.code;
} else if (options.symbol) {
nCurrentSymbol = this.fixedCharCodeAt(options.symbol, 0);
+ } else if (aRecents.length>0) {
+ nCurrentSymbol = aRecents[0].symbol;
}
if (init && this.options.lang && this.options.lang != 'en') {
@@ -539,6 +550,8 @@ define([
this.on('resizing', _.bind(this.onWindowResizing, this));
this.on('resize', _.bind(this.onWindowResize, this));
+
+ bMainFocus = true;
},
initFonts: function() {
@@ -705,9 +718,6 @@ define([
me.updateInput();
});
- //fill recents
- this.fillRecentSymbols();
-
this.symbolTablePanel = $window.find('#symbol-table-scrollable-div');
this.previewPanel = $window.find('#id-preview-data');
this.previewParent = this.previewPanel.parent();
@@ -790,13 +800,16 @@ define([
},
getPasteSymbol: function(cellId) {
- var bUpdateRecents = cellId[0] === 'c';
+ var bUpdateRecents = false;
var sFont;
- if(bUpdateRecents){
- sFont = aFontSelects[nCurrentFont].displayValue;
- } else {
- var nFontId = parseInt(cellId.split('_')[2]);
- sFont = aFontSelects[nFontId].displayValue;
+ if (cellId && cellId.length>0) {
+ bUpdateRecents = (cellId[0] === 'c');
+ if(bUpdateRecents){
+ sFont = aFontSelects[nCurrentFont].displayValue;
+ } else {
+ var nFontId = parseInt(cellId.split('_')[2]);
+ sFont = aFontSelects[nFontId].displayValue;
+ }
}
return {font: sFont, symbol: this.encodeSurrogateChar(nCurrentSymbol), code: nCurrentSymbol, updateRecents: bUpdateRecents};
},
@@ -821,12 +834,12 @@ define([
}
var special = this.btnSpecial.isActive();
- var settings = special ? this.getSpecialSymbol() : this.getPasteSymbol(this.$window.find('.cell-selected').attr('id'));
+ var settings = (state=='ok') ? (special ? this.getSpecialSymbol() : this.getPasteSymbol(this.$window.find('.cell-selected').attr('id'))) : {};
if (this.options.handler) {
this.options.handler.call(this, this, state, settings);
}
if (state=='ok') {
- !special && settings.updateRecents && this.checkRecent(nCurrentSymbol, settings.font);
+ !special && this.checkRecent(nCurrentSymbol, settings.font);
!special && settings.updateRecents && this.updateRecents();
if (this.type)
return;
@@ -1054,7 +1067,7 @@ define([
this._handleInput('ok');
else {
var settings = this.getPasteSymbol($(e.target).attr('id'));
- settings.updateRecents && this.checkRecent(nCurrentSymbol, settings.font);
+ this.checkRecent(nCurrentSymbol, settings.font);
settings.updateRecents && this.updateView(false, undefined, undefined, true);
this.fireEvent('symbol:dblclick', this, 'ok', settings);
}
@@ -1476,7 +1489,7 @@ define([
this.specialPanel.toggleClass('hidden', !special);
var me = this;
_.delay(function(){
- special ? me.specialList.cmpEl.find('.listview').focus() : me.previewPanel.focus();
+ special ? me.specialList.focus() : me.previewPanel.focus();
},50);
},
diff --git a/apps/common/main/resources/img/controls/common-controls.png b/apps/common/main/resources/img/controls/common-controls.png
index 8694bd120..03fb0999d 100755
Binary files a/apps/common/main/resources/img/controls/common-controls.png and b/apps/common/main/resources/img/controls/common-controls.png differ
diff --git a/apps/common/main/resources/img/controls/common-controls@1.5x.png b/apps/common/main/resources/img/controls/common-controls@1.5x.png
index 1d29d593f..1fd7da019 100644
Binary files a/apps/common/main/resources/img/controls/common-controls@1.5x.png and b/apps/common/main/resources/img/controls/common-controls@1.5x.png differ
diff --git a/apps/common/main/resources/img/controls/common-controls@2x.png b/apps/common/main/resources/img/controls/common-controls@2x.png
index 1c1de5bcb..7d368d53e 100755
Binary files a/apps/common/main/resources/img/controls/common-controls@2x.png and b/apps/common/main/resources/img/controls/common-controls@2x.png differ
diff --git a/apps/common/main/resources/img/load-mask/loading.gif b/apps/common/main/resources/img/load-mask/loading.gif
deleted file mode 100644
index 4d9046503..000000000
Binary files a/apps/common/main/resources/img/load-mask/loading.gif and /dev/null differ
diff --git a/apps/common/main/resources/img/load-mask/loading.svg b/apps/common/main/resources/img/load-mask/loading.svg
new file mode 100644
index 000000000..903decc03
--- /dev/null
+++ b/apps/common/main/resources/img/load-mask/loading.svg
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-sheet-view.png b/apps/common/main/resources/img/toolbar/1.25x/big/btn-sheet-view.png
similarity index 100%
rename from apps/spreadsheeteditor/main/resources/img/toolbar/1.25x/big/btn-sheet-view.png
rename to apps/common/main/resources/img/toolbar/1.25x/big/btn-sheet-view.png
diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-sheet-view.png b/apps/common/main/resources/img/toolbar/1.5x/big/btn-sheet-view.png
similarity index 100%
rename from apps/spreadsheeteditor/main/resources/img/toolbar/1.5x/big/btn-sheet-view.png
rename to apps/common/main/resources/img/toolbar/1.5x/big/btn-sheet-view.png
diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-sheet-view.png b/apps/common/main/resources/img/toolbar/1.75x/big/btn-sheet-view.png
similarity index 100%
rename from apps/spreadsheeteditor/main/resources/img/toolbar/1.75x/big/btn-sheet-view.png
rename to apps/common/main/resources/img/toolbar/1.75x/big/btn-sheet-view.png
diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-sheet-view.png b/apps/common/main/resources/img/toolbar/1x/big/btn-sheet-view.png
similarity index 100%
rename from apps/spreadsheeteditor/main/resources/img/toolbar/1x/big/btn-sheet-view.png
rename to apps/common/main/resources/img/toolbar/1x/big/btn-sheet-view.png
diff --git a/apps/common/main/resources/img/toolbar/1x/btn-arrow-down.png b/apps/common/main/resources/img/toolbar/1x/btn-arrow-down.png
new file mode 100644
index 000000000..77b1c0c64
Binary files /dev/null and b/apps/common/main/resources/img/toolbar/1x/btn-arrow-down.png differ
diff --git a/apps/common/main/resources/img/toolbar/1x/btn-arrow-up.png b/apps/common/main/resources/img/toolbar/1x/btn-arrow-up.png
new file mode 100644
index 000000000..8b08b1fb8
Binary files /dev/null and b/apps/common/main/resources/img/toolbar/1x/btn-arrow-up.png differ
diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-sheet-view.png b/apps/common/main/resources/img/toolbar/2x/big/btn-sheet-view.png
similarity index 100%
rename from apps/spreadsheeteditor/main/resources/img/toolbar/2x/big/btn-sheet-view.png
rename to apps/common/main/resources/img/toolbar/2x/big/btn-sheet-view.png
diff --git a/apps/common/main/resources/img/toolbar/2x/btn-arrow-down.png b/apps/common/main/resources/img/toolbar/2x/btn-arrow-down.png
new file mode 100644
index 000000000..c01427ae7
Binary files /dev/null and b/apps/common/main/resources/img/toolbar/2x/btn-arrow-down.png differ
diff --git a/apps/common/main/resources/img/toolbar/2x/btn-arrow-up.png b/apps/common/main/resources/img/toolbar/2x/btn-arrow-up.png
new file mode 100644
index 000000000..7de6f592e
Binary files /dev/null and b/apps/common/main/resources/img/toolbar/2x/btn-arrow-up.png differ
diff --git a/apps/common/main/resources/less/asc-mixins.less b/apps/common/main/resources/less/asc-mixins.less
index c7e8a6d22..5f3f0311e 100644
--- a/apps/common/main/resources/less/asc-mixins.less
+++ b/apps/common/main/resources/less/asc-mixins.less
@@ -200,7 +200,7 @@
@common-controls-width: 100px;
.img-commonctrl,
- .dropdown-menu li .checked:before, .input-error:before,
+ .dropdown-menu li .checked:before, .input-error:before, .input-warning:before,
.btn-toolbar .icon.img-commonctrl, .list-item div.checked:before
{
background-image: if(@icon-src-base64, data-uri(%("%s",'@{common-image-path}/@{common-controls}')), ~"url(@{common-image-const-path}/@{common-controls})");
diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less
index c937d79d4..bc7a7acdb 100644
--- a/apps/common/main/resources/less/buttons.less
+++ b/apps/common/main/resources/less/buttons.less
@@ -877,11 +877,11 @@ svg.icon {
only screen and (min-resolution: 144dpi),
only screen and (min-resolution: 240dpi) {
.@{class100} {
- display: none;
+ //display: none;
}
.@{class150} {
- display: block;
+ //display: block;
}
}
diff --git a/apps/common/main/resources/less/input.less b/apps/common/main/resources/less/input.less
index ae0c3328a..4fcbd8755 100644
--- a/apps/common/main/resources/less/input.less
+++ b/apps/common/main/resources/less/input.less
@@ -61,6 +61,18 @@
display: block;
}
}
+
+ &.warning {
+ input:not([disabled]) + .input-error {
+ display: block;
+ }
+
+ .input-error {
+ &:before {
+ background-position: @input-warning-offset-x @input-warning-offset-y;
+ }
+ }
+ }
}
input:required:focus:invalid,
diff --git a/apps/common/main/resources/less/listview.less b/apps/common/main/resources/less/listview.less
index 25228220f..03251a941 100644
--- a/apps/common/main/resources/less/listview.less
+++ b/apps/common/main/resources/less/listview.less
@@ -1,5 +1,6 @@
.listview {
border: 1px solid @input-border;
+ .border-radius(@border-radius-small);
line-height: 15px;
&.inner {
@@ -20,6 +21,10 @@
}
}
+ &:not(.no-focus):focus {
+ border-color: @gray-darker;
+ }
+
& > .item {
// display: block;
text-overflow: ellipsis;
diff --git a/apps/common/main/resources/less/loadmask.less b/apps/common/main/resources/less/loadmask.less
index 443bf7283..a17f8d013 100644
--- a/apps/common/main/resources/less/loadmask.less
+++ b/apps/common/main/resources/less/loadmask.less
@@ -1,4 +1,8 @@
@loadmask-zindex: @zindex-modal + 100;
+@loadmask-image-height: 28px;
+@loadmask-image-width: 28px;
+@loadmask-small-image-height: 20px;
+@loadmask-small-image-width: 20px;
.asc-loadmask {
position: absolute;
@@ -14,30 +18,55 @@
.asc-loadmask-body {
position: absolute;
z-index: @loadmask-zindex + 1;
- padding: 20px;
- line-height: 33px;
+ padding: 24px;
+ line-height: @loadmask-image-height;
border: none;
background-image: none;
- background-color: fade(darken(@gray-deep, 15%), 70%);
+ background-color: fade(@gray-deep, 95%);
color: @gray-light;
.border-radius(@border-radius-large);
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%);
+
& > div {
display: inline-block;
vertical-align: middle;
}
.asc-loadmask-image {
- background-image: ~"url(@{common-image-const-path}/load-mask/loading.gif)";
- height: 33px;
- width: 33px;
+ //background-image: ~"url(@{common-image-const-path}/load-mask/loading.svg#middle)";
+ background-image: ~"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgcj0iMTAuMjUiIHN0cm9rZS1kYXNoYXJyYXk9IjE2MCUsIDQwJSIgLz48L3N2Zz4=)";
+ height: @loadmask-image-height;
+ width: @loadmask-image-width;
float: left;
- margin-left: 20px;
+ margin-left: 8px;
}
.asc-loadmask-title {
.fontsize(@font-size-large);
- margin: 0 20px;
+ margin: 0 8px 0 12px;
+ }
+
+ .left-panel & {
+ line-height: @loadmask-small-image-height;
+ background-color: transparent;
+ color: @gray-deep;
+ padding: 8px;
+ top: 78px;
+ transform: translate(-50%, 0);
+
+ .asc-loadmask-image {
+ //background-image: ~"url(@{common-image-const-path}/load-mask/loading.svg#small)";
+ background-image: ~"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PGNpcmNsZSBjeD0iMTAiIGN5PSIxMCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNDQ0IiBzdHJva2Utd2lkdGg9IjEuNSIgcj0iNy4yNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTYwJSwgNDAlIiAvPjwvc3ZnPg==)";
+ height: @loadmask-small-image-height;
+ width: @loadmask-small-image-width;
+ }
+
+ .asc-loadmask-title {
+ margin: 0 8px;
+ }
}
}
@@ -77,3 +106,20 @@
height: 100%;
}
}
+
+@keyframes rotation {
+ from {
+ transform: rotate(0);
+ }
+
+ to {
+ transform: rotate(360deg);
+ }
+}
+
+#loadmask-spinner {
+ animation-duration: .8s;
+ animation-name: rotation;
+ animation-iteration-count: infinite;
+ animation-timing-function: linear;
+}
diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less
index 06917876f..a8f7639d5 100644
--- a/apps/common/main/resources/less/toolbar.less
+++ b/apps/common/main/resources/less/toolbar.less
@@ -425,7 +425,7 @@
}
&.style-skip-docname .toolbar {
- #box-doc-name > input {
+ #box-doc-name > label {
display: none;
}
}
diff --git a/apps/common/main/resources/less/treeview.less b/apps/common/main/resources/less/treeview.less
index c1c185bb9..967ff8cc1 100644
--- a/apps/common/main/resources/less/treeview.less
+++ b/apps/common/main/resources/less/treeview.less
@@ -1,4 +1,7 @@
.treeview {
+ border: 1px solid @input-border;
+ .border-radius(@border-radius-small);
+
&.inner {
width: 100%;
height: 100%;
@@ -16,6 +19,10 @@
}
}
+ &:focus {
+ border-color: @gray-darker;
+ }
+
> .item {
display: block;
width: 100%;
diff --git a/apps/common/main/resources/less/variables.less b/apps/common/main/resources/less/variables.less
index 044f6cbc4..04878d790 100644
--- a/apps/common/main/resources/less/variables.less
+++ b/apps/common/main/resources/less/variables.less
@@ -771,6 +771,10 @@
@input-error-offset-x: -73px;
@input-error-offset-y: -170px;
+// Input warning
+@input-warning-offset-x: -57px;
+@input-warning-offset-y: -170px;
+
// Spinner
@spinner-offset-x: -41px;
@spinner-offset-y: -187px;
diff --git a/apps/common/main/resources/less/window.less b/apps/common/main/resources/less/window.less
index 5a47e07ca..dca6ba2c7 100644
--- a/apps/common/main/resources/less/window.less
+++ b/apps/common/main/resources/less/window.less
@@ -138,34 +138,40 @@
z-index: @zindex-modal - 2;
}
- &.alert {
- min-height: 90px;
- min-width: 230px;
+ .icon {
+ &.warn {
+ width: 35px;
+ height: 32px;
+ background-position: @alerts-offset-x @alerts-offset-y - 105px;
+ }
- .icon {
- float: left;
+ &.error, &.info, &.confirm {
width: 35px;
height: 35px;
- margin: 0 0 0 10px;
-
- &.warn {
- height: 32px;
- background-position: @alerts-offset-x @alerts-offset-y - 105px;
- }
-
- &.error {
- background-position: @alerts-offset-x @alerts-offset-y - 0;
- }
-
- &.info {
- background-position: @alerts-offset-x @alerts-offset-y - 35px;
- }
-
- &.confirm {
- background-position: @alerts-offset-x @alerts-offset-y - 70px;
- }
}
+ &.error {
+ background-position: @alerts-offset-x @alerts-offset-y - 0;
+ }
+
+ &.info {
+ background-position: @alerts-offset-x @alerts-offset-y - 35px;
+ }
+
+ &.confirm {
+ background-position: @alerts-offset-x @alerts-offset-y - 70px;
+ }
+ }
+
+ &.alert {
+ .icon {
+ float: left;
+ margin: 0 0 0 10px;
+ }
+
+ min-height: 90px;
+ min-width: 230px;
+
.body {
.info-box {
padding: 20px 20px 20px 10px;
diff --git a/apps/common/mobile/lib/controller/Collaboration.js b/apps/common/mobile/lib/controller/Collaboration.js
index b928b0619..fb668774f 100644
--- a/apps/common/mobile/lib/controller/Collaboration.js
+++ b/apps/common/mobile/lib/controller/Collaboration.js
@@ -318,7 +318,9 @@ define([
initReviewingSettingsView: function () {
var me = this;
- $('#settings-review input:checkbox').attr('checked', this.appConfig.isReviewOnly || Common.localStorage.getBool("de-mobile-track-changes-" + (_fileKey || '')));
+
+ var trackChanges = typeof (this.appConfig.customization) == 'object' ? this.appConfig.customization.trackChanges : undefined;
+ $('#settings-review input:checkbox').attr('checked', this.appConfig.isReviewOnly || trackChanges===true || (trackChanges!==false) && Common.localStorage.getBool("de-mobile-track-changes-" + (_fileKey || '')));
$('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me));
$('#settings-accept-all').single('click', _.bind(me.onAcceptAllClick, me));
$('#settings-reject-all').single('click', _.bind(me.onRejectAllClick, me));
@@ -409,6 +411,7 @@ define([
}
!suppressEvent && this.initReviewingSettingsView();
DE.getController('Toolbar').setDisplayMode(displayMode);
+ DE.getController('DocumentHolder').setDisplayMode(displayMode);
},
@@ -890,28 +893,31 @@ define([
});
mainView.hideNavbar();
} else {
- me.modalViewComment = uiApp.popover(
- '',
- $$('#toolbar-collaboration')
- );
- this.picker = $$(me.modalViewComment);
- var $overlay = $('.modal-overlay');
-
- $$(this.picker).on('opened', function () {
- $overlay.on('removeClass', function () {
- if (!$overlay.hasClass('modal-overlay-visible')) {
- $overlay.addClass('modal-overlay-visible')
- }
+ if (!me.openModal) {
+ me.modalViewComment = uiApp.popover(
+ '',
+ $$('#toolbar-collaboration')
+ );
+ this.picker = $$(me.modalViewComment);
+ var $overlay = $('.modal-overlay');
+ me.openModal = true;
+ $$(this.picker).on('opened', function () {
+ $overlay.on('removeClass', function () {
+ if (!$overlay.hasClass('modal-overlay-visible')) {
+ $overlay.addClass('modal-overlay-visible')
+ }
+ });
+ }).on('close', function () {
+ $overlay.off('removeClass');
+ $overlay.removeClass('modal-overlay-visible');
+ $('.popover').remove();
+ me.openModal = false;
});
- }).on('close', function () {
- $overlay.off('removeClass');
- $overlay.removeClass('modal-overlay-visible');
- $('.popover').remove();
- });
+ }
}
me.getView('Common.Views.Collaboration').renderViewComments(me.showComments, me.indexCurrentComment);
$('.prev-comment').single('click', _.bind(me.onViewPrevComment, me));
diff --git a/apps/documenteditor/embed/locale/be.json b/apps/documenteditor/embed/locale/be.json
new file mode 100644
index 000000000..41d6ead30
--- /dev/null
+++ b/apps/documenteditor/embed/locale/be.json
@@ -0,0 +1,31 @@
+{
+ "common.view.modals.txtCopy": "Скапіяваць у буфер абмену",
+ "common.view.modals.txtEmbed": "Убудаваць",
+ "common.view.modals.txtHeight": "Вышыня",
+ "common.view.modals.txtShare": "Падзяліцца спасылкай",
+ "common.view.modals.txtWidth": "Шырыня",
+ "DE.ApplicationController.convertationErrorText": "Пераўтварыць не атрымалася.",
+ "DE.ApplicationController.convertationTimeoutText": "Час чакання пераўтварэння сышоў.",
+ "DE.ApplicationController.criticalErrorTitle": "Памылка",
+ "DE.ApplicationController.downloadErrorText": "Не атрымалася спампаваць.",
+ "DE.ApplicationController.downloadTextText": "Спампоўванне дакумента...",
+ "DE.ApplicationController.errorAccessDeny": "Вы спрабуеце выканаць дзеянне, на якое не маеце правоў.
Калі ласка, звярніцеся да адміністратара сервера дакументаў.",
+ "DE.ApplicationController.errorDefaultMessage": "Код памылкі: %1",
+ "DE.ApplicationController.errorFilePassProtect": "Файл абаронены паролем, яго немагчыма адкрыць.",
+ "DE.ApplicationController.errorFileSizeExceed": "Памер файла перавышае ліміт, вызначаны для вашага сервера.
Звярніцеся да адміністратара сервера дакументаў за дадатковымі звесткамі.",
+ "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Злучэнне з інтэрнэтам было адноўлена, і версія файла змянілася.
Перш чым працягнуць працу, неабходна спампаваць файл альбо скапіяваць яго змесціва, каб захаваць даныя, а пасля перазагрузіць старонку.",
+ "DE.ApplicationController.errorUserDrop": "На дадзены момант файл недаступны.",
+ "DE.ApplicationController.notcriticalErrorTitle": "Увага",
+ "DE.ApplicationController.scriptLoadError": "Занадта павольнае злучэнне, не ўсе кампаненты атрымалася загрузіць. Калі ласка, абнавіце старонку.",
+ "DE.ApplicationController.textLoadingDocument": "Загрузка дакумента",
+ "DE.ApplicationController.textOf": "з",
+ "DE.ApplicationController.txtClose": "Закрыць",
+ "DE.ApplicationController.unknownErrorText": "Невядомая памылка.",
+ "DE.ApplicationController.unsupportedBrowserErrorText": "Ваш браўзер не падтрымліваецца.",
+ "DE.ApplicationController.waitText": "Калі ласка, пачакайце...",
+ "DE.ApplicationView.txtDownload": "Спампаваць",
+ "DE.ApplicationView.txtEmbed": "Убудаваць",
+ "DE.ApplicationView.txtFullScreen": "Поўнаэкранны рэжым",
+ "DE.ApplicationView.txtPrint": "Друк",
+ "DE.ApplicationView.txtShare": "Падзяліцца"
+}
\ No newline at end of file
diff --git a/apps/documenteditor/embed/locale/ca.json b/apps/documenteditor/embed/locale/ca.json
new file mode 100644
index 000000000..fc54c1ace
--- /dev/null
+++ b/apps/documenteditor/embed/locale/ca.json
@@ -0,0 +1,31 @@
+{
+ "common.view.modals.txtCopy": "Copiat al porta-retalls",
+ "common.view.modals.txtEmbed": "Incrustar",
+ "common.view.modals.txtHeight": "Alçada",
+ "common.view.modals.txtShare": "Compartir Enllaç",
+ "common.view.modals.txtWidth": "Amplada",
+ "DE.ApplicationController.convertationErrorText": "Conversió Fallida",
+ "DE.ApplicationController.convertationTimeoutText": "Conversió fora de temps",
+ "DE.ApplicationController.criticalErrorTitle": "Error",
+ "DE.ApplicationController.downloadErrorText": "Descàrrega fallida.",
+ "DE.ApplicationController.downloadTextText": "Descarregant document...",
+ "DE.ApplicationController.errorAccessDeny": "Intenteu realitzar una acció per la qual no teniu drets.
Poseu-vos en contacte amb l'administrador del servidor de documents.",
+ "DE.ApplicationController.errorDefaultMessage": "Error codi:%1 ",
+ "DE.ApplicationController.errorFilePassProtect": "El fitxer està protegit amb contrasenya i no es pot obrir.",
+ "DE.ApplicationController.errorFileSizeExceed": "La mida del fitxer excedeix la limitació establerta per al vostre servidor. Podeu contactar amb l'administrador del Document Server per obtenir més detalls.",
+ "DE.ApplicationController.errorUpdateVersionOnDisconnect": "La connexió a Internet s'ha restaurat i la versió del fitxer s'ha canviat.
Abans de continuar treballant, heu de descarregar el fitxer o copiar-ne el contingut per assegurar-vos que no es perdi res i, després, tornar a carregar aquesta pàgina.",
+ "DE.ApplicationController.errorUserDrop": "Ara no es pot accedir al fitxer.",
+ "DE.ApplicationController.notcriticalErrorTitle": "Avis",
+ "DE.ApplicationController.scriptLoadError": "La connexió és massa lenta, alguns dels components no s’han pogut carregar. Torneu a carregar la pàgina.",
+ "DE.ApplicationController.textLoadingDocument": "Carregant document",
+ "DE.ApplicationController.textOf": "de",
+ "DE.ApplicationController.txtClose": "Tancar",
+ "DE.ApplicationController.unknownErrorText": "Error Desconegut.",
+ "DE.ApplicationController.unsupportedBrowserErrorText": "El vostre navegador no és compatible.",
+ "DE.ApplicationController.waitText": "Si us plau, esperi...",
+ "DE.ApplicationView.txtDownload": "Descàrrega",
+ "DE.ApplicationView.txtEmbed": "Incrustar",
+ "DE.ApplicationView.txtFullScreen": "Pantalla Completa",
+ "DE.ApplicationView.txtPrint": "Imprimir",
+ "DE.ApplicationView.txtShare": "Compartir"
+}
\ No newline at end of file
diff --git a/apps/documenteditor/embed/locale/el.json b/apps/documenteditor/embed/locale/el.json
new file mode 100644
index 000000000..e8af25558
--- /dev/null
+++ b/apps/documenteditor/embed/locale/el.json
@@ -0,0 +1,31 @@
+{
+ "common.view.modals.txtCopy": "Αντιγραφή στο πρόχειρο",
+ "common.view.modals.txtEmbed": "Ενσωμάτωση",
+ "common.view.modals.txtHeight": "Ύψος",
+ "common.view.modals.txtShare": "Διαμοιρασμός συνδέσμου",
+ "common.view.modals.txtWidth": "Πλάτος",
+ "DE.ApplicationController.convertationErrorText": "Αποτυχία μετατροπής.",
+ "DE.ApplicationController.convertationTimeoutText": "Υπέρβαση χρονικού ορίου μετατροπής.",
+ "DE.ApplicationController.criticalErrorTitle": "Σφάλμα",
+ "DE.ApplicationController.downloadErrorText": "Αποτυχία λήψης.",
+ "DE.ApplicationController.downloadTextText": "Γίνεται λήψη εγγράφου...",
+ "DE.ApplicationController.errorAccessDeny": "Προσπαθείτε να εκτελέσετε μια ενέργεια για την οποία δεν έχετε δικαιώματα.
Παρακαλούμε να επικοινωνήστε με τον διαχειριστή του διακομιστή εγγράφων.",
+ "DE.ApplicationController.errorDefaultMessage": "Κωδικός σφάλματος: %1",
+ "DE.ApplicationController.errorFilePassProtect": "Το αρχείο προστατεύεται με συνθηματικό και δεν μπορεί να ανοίξει.",
+ "DE.ApplicationController.errorFileSizeExceed": "Το μέγεθος του αρχείου υπερβαίνει το όριο που έχει οριστεί για τον διακομιστή σας.
Παρακαλούμε επικοινωνήστε με τον διαχειριστή του διακομιστή εγγράφων για λεπτομέρειες.",
+ "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Η σύνδεση στο Διαδίκτυο έχει αποκατασταθεί και η έκδοση του αρχείου έχει αλλάξει.
Προτού συνεχίσετε να εργάζεστε, πρέπει να κατεβάσετε το αρχείο ή να αντιγράψετε το περιεχόμενό του για να βεβαιωθείτε ότι δεν έχει χαθεί τίποτα και, στη συνέχεια, φορτώστε ξανά αυτήν τη σελίδα.",
+ "DE.ApplicationController.errorUserDrop": "Δεν είναι δυνατή η πρόσβαση στο αρχείο αυτήν τη στιγμή.",
+ "DE.ApplicationController.notcriticalErrorTitle": "Προειδοποίηση",
+ "DE.ApplicationController.scriptLoadError": "Η σύνδεση είναι πολύ αργή, δεν ήταν δυνατή η φόρτωση ορισμένων στοιχείων. Φορτώστε ξανά τη σελίδα.",
+ "DE.ApplicationController.textLoadingDocument": "Φόρτωση εγγράφου",
+ "DE.ApplicationController.textOf": "του",
+ "DE.ApplicationController.txtClose": "Κλείσιμο",
+ "DE.ApplicationController.unknownErrorText": "Άγνωστο σφάλμα.",
+ "DE.ApplicationController.unsupportedBrowserErrorText": "Ο περιηγητής σας δεν υποστηρίζεται.",
+ "DE.ApplicationController.waitText": "Παρακαλούμε, περιμένετε...",
+ "DE.ApplicationView.txtDownload": "Λήψη",
+ "DE.ApplicationView.txtEmbed": "Ενσωμάτωση",
+ "DE.ApplicationView.txtFullScreen": "Πλήρης οθόνη",
+ "DE.ApplicationView.txtPrint": "Εκτύπωση",
+ "DE.ApplicationView.txtShare": "Διαμοιρασμός"
+}
\ No newline at end of file
diff --git a/apps/documenteditor/embed/locale/hu.json b/apps/documenteditor/embed/locale/hu.json
index ee18969a7..b11971151 100644
--- a/apps/documenteditor/embed/locale/hu.json
+++ b/apps/documenteditor/embed/locale/hu.json
@@ -1,5 +1,5 @@
{
- "common.view.modals.txtCopy": "Másolás a vágólapra",
+ "common.view.modals.txtCopy": "Másolás vágólapra",
"common.view.modals.txtEmbed": "Beágyazás",
"common.view.modals.txtHeight": "Magasság",
"common.view.modals.txtShare": "Hivatkozás megosztása",
@@ -26,5 +26,6 @@
"DE.ApplicationView.txtDownload": "Letöltés",
"DE.ApplicationView.txtEmbed": "Beágyazás",
"DE.ApplicationView.txtFullScreen": "Teljes képernyő",
+ "DE.ApplicationView.txtPrint": "Nyomtatás",
"DE.ApplicationView.txtShare": "Megosztás"
}
\ No newline at end of file
diff --git a/apps/documenteditor/embed/locale/lo.json b/apps/documenteditor/embed/locale/lo.json
new file mode 100644
index 000000000..125d1489c
--- /dev/null
+++ b/apps/documenteditor/embed/locale/lo.json
@@ -0,0 +1,31 @@
+{
+ "common.view.modals.txtCopy": "ເກັບໄວ້ໃນຄຣິບບອດ",
+ "common.view.modals.txtEmbed": "ຝັງໄວ້",
+ "common.view.modals.txtHeight": "ລວງສູງ",
+ "common.view.modals.txtShare": "ແບ່ງປັນລິ້ງ",
+ "common.view.modals.txtWidth": "ລວງກວ້າງ",
+ "DE.ApplicationController.convertationErrorText": " ການປ່ຽນແປງບໍ່ສຳເລັດ.",
+ "DE.ApplicationController.convertationTimeoutText": "ໝົດເວລາການປ່ຽນແປງ.",
+ "DE.ApplicationController.criticalErrorTitle": "ຂໍ້ຜິດພາດ",
+ "DE.ApplicationController.downloadErrorText": "ດາວໂຫຼດບໍ່ສຳເລັດ.",
+ "DE.ApplicationController.downloadTextText": "ກຳລັງດາວໂຫຼດເອກະສານ",
+ "DE.ApplicationController.errorAccessDeny": "ທ່ານບໍ່ມີສິດຈະດຳເນີນການອັນນີ້.
ກະລຸນະຕິດຕໍ່ຜູ້ຄຸ້ມຄອງລົບຂອງທ່ານ",
+ "DE.ApplicationController.errorDefaultMessage": "ລະຫັດຂໍ້ຜິດພາດ: %1",
+ "DE.ApplicationController.errorFilePassProtect": "ມີລະຫັດປົກປ້ອງຟາຍນີ້ຈຶ່ງບໍ່ສາມາດເປີດໄດ້",
+ "DE.ApplicationController.errorFileSizeExceed": "ຂະໜາດຂອງຟາຍໃຫຍ່ກວ່າທີ່ກຳນົດໄວ້ໃນລະບົບ.
ກະລຸນະຕິດຕໍ່ຜູ້ຄຸ້ມຄອງລົບຂອງທ່ານ",
+ "DE.ApplicationController.errorUpdateVersionOnDisconnect": "ການເຊື່ອຕໍ່ອິນເຕີເນັດຫາກໍ່ກັບມາ, ແລະຟາຍເອກະສານໄດ້ມີການປ່ຽນແປງແລ້ວ.
ກ່ອນທີ່ທ່ານຈະດຳເນີການຕໍ່ໄປ, ທ່ານຕ້ອງໄດ້ດາວໂຫຼດຟາຍ ຫຼືສຳເນົາເນື້ອຫາ ເພື່ອປ້ອງການການສູນເສຍ, ແລະກໍ່ທຳການໂຫຼດໜ້າຄືນອີກຄັ້ງ.",
+ "DE.ApplicationController.errorUserDrop": "ບໍ່ສາມາດເຂົ້າເຖິງຟາຍໄດ້",
+ "DE.ApplicationController.notcriticalErrorTitle": "ເຕືອນ",
+ "DE.ApplicationController.scriptLoadError": "ການເຊື່ອມຕໍ່ອິນເຕີເນັດຊ້າເກີນໄປ, ບາງອົງປະກອບບໍ່ສາມາດໂຫຼດໄດ້. ກະລຸນາໂຫຼດໜ້ານີ້ຄືນໃໝ່",
+ "DE.ApplicationController.textLoadingDocument": "ກຳລັງໂຫຼດເອກະສານ",
+ "DE.ApplicationController.textOf": "ຂອງ",
+ "DE.ApplicationController.txtClose": " ປິດ",
+ "DE.ApplicationController.unknownErrorText": "ມີຂໍ້ຜິດພາດທີ່ບໍ່ຮູ້ສາເຫດ",
+ "DE.ApplicationController.unsupportedBrowserErrorText": "ບຣາວເຊີຂອງທ່ານບໍ່ສາມານຳໃຊ້ໄດ້",
+ "DE.ApplicationController.waitText": "ກະລຸນາລໍຖ້າ...",
+ "DE.ApplicationView.txtDownload": "ດາວໂຫຼດ",
+ "DE.ApplicationView.txtEmbed": "ຝັງໄວ້",
+ "DE.ApplicationView.txtFullScreen": "ເຕັມຈໍ",
+ "DE.ApplicationView.txtPrint": "ພິມ",
+ "DE.ApplicationView.txtShare": "ແບ່ງປັນ"
+}
\ No newline at end of file
diff --git a/apps/documenteditor/embed/locale/nb.json b/apps/documenteditor/embed/locale/nb.json
new file mode 100644
index 000000000..cffee6416
--- /dev/null
+++ b/apps/documenteditor/embed/locale/nb.json
@@ -0,0 +1,19 @@
+{
+ "common.view.modals.txtCopy": "Kopier til utklippstavle",
+ "common.view.modals.txtHeight": "Høyde",
+ "common.view.modals.txtShare": "Del link",
+ "common.view.modals.txtWidth": "Bredde",
+ "DE.ApplicationController.criticalErrorTitle": "Feil",
+ "DE.ApplicationController.downloadErrorText": "Nedlasting feilet.",
+ "DE.ApplicationController.errorDefaultMessage": "Feilkode: %1",
+ "DE.ApplicationController.notcriticalErrorTitle": "Advarsel",
+ "DE.ApplicationController.textLoadingDocument": "Laster dokument",
+ "DE.ApplicationController.textOf": "av",
+ "DE.ApplicationController.txtClose": "Lukk",
+ "DE.ApplicationController.unknownErrorText": "Ukjent feil.",
+ "DE.ApplicationController.unsupportedBrowserErrorText": "Nettleseren din er ikke støttet.",
+ "DE.ApplicationController.waitText": "Vennligst vent...",
+ "DE.ApplicationView.txtDownload": "Last ned",
+ "DE.ApplicationView.txtFullScreen": "Fullskjerm",
+ "DE.ApplicationView.txtShare": "Del"
+}
\ No newline at end of file
diff --git a/apps/documenteditor/embed/locale/pl.json b/apps/documenteditor/embed/locale/pl.json
index a347a3f66..b7b983c42 100644
--- a/apps/documenteditor/embed/locale/pl.json
+++ b/apps/documenteditor/embed/locale/pl.json
@@ -1,5 +1,6 @@
{
"common.view.modals.txtCopy": "Skopiuj do schowka",
+ "common.view.modals.txtEmbed": "Osadź",
"common.view.modals.txtHeight": "Wysokość",
"common.view.modals.txtShare": "Udostępnij link",
"common.view.modals.txtWidth": "Szerokość",
@@ -23,6 +24,7 @@
"DE.ApplicationController.unsupportedBrowserErrorText": "Twoja przeglądarka nie jest wspierana.",
"DE.ApplicationController.waitText": "Proszę czekać...",
"DE.ApplicationView.txtDownload": "Pobierz",
+ "DE.ApplicationView.txtEmbed": "Osadź",
"DE.ApplicationView.txtFullScreen": "Pełny ekran",
"DE.ApplicationView.txtPrint": "Drukuj",
"DE.ApplicationView.txtShare": "Udostępnij"
diff --git a/apps/documenteditor/embed/locale/ro.json b/apps/documenteditor/embed/locale/ro.json
new file mode 100644
index 000000000..0a69dd72d
--- /dev/null
+++ b/apps/documenteditor/embed/locale/ro.json
@@ -0,0 +1,31 @@
+{
+ "common.view.modals.txtCopy": "Copiere cu clipbiard",
+ "common.view.modals.txtEmbed": "Încorporare",
+ "common.view.modals.txtHeight": "Înălțime",
+ "common.view.modals.txtShare": "Partajare link",
+ "common.view.modals.txtWidth": "Lățime",
+ "DE.ApplicationController.convertationErrorText": "Conversia nu a reușit.",
+ "DE.ApplicationController.convertationTimeoutText": "Timpul de așteptare pentru conversie a expirat.",
+ "DE.ApplicationController.criticalErrorTitle": "Eroare",
+ "DE.ApplicationController.downloadErrorText": "Descărcare eșuată.",
+ "DE.ApplicationController.downloadTextText": "Descărcarea documentului...",
+ "DE.ApplicationController.errorAccessDeny": "Nu aveți dreptul să efectuați acțiunea pe care doriți. Contactați administratorul dumneavoastră de Server Documente.",
+ "DE.ApplicationController.errorDefaultMessage": "Codul de eroare: %1",
+ "DE.ApplicationController.errorFilePassProtect": "Fișierul este protejat cu parolă și deaceea nu poate fi deschis.",
+ "DE.ApplicationController.errorFileSizeExceed": "Dimensiunea fișierului depășește limita permisă de serverul Dvs. Pentru detalii, contactați administratorul dumneavoastră de Server Documente.",
+ "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Conexiunea la Internet s-a restabilit și versiunea fișierului s-a schimbat. Înainte de a continua, fișierul trebuie descărcat sau conținutul fișierului copiat ca să vă asigurați că nimic nu e pierdut, apoi reîmprospătați această pagină.",
+ "DE.ApplicationController.errorUserDrop": "Fișierul nu poate fi accesat deocamdată.",
+ "DE.ApplicationController.notcriticalErrorTitle": "Avertisment",
+ "DE.ApplicationController.scriptLoadError": "Conexeunea e prea lentă și unele elemente nu se încarcă. Încercați să reîmprospătati pagina.",
+ "DE.ApplicationController.textLoadingDocument": "Încărcare document",
+ "DE.ApplicationController.textOf": "din",
+ "DE.ApplicationController.txtClose": "Închidere",
+ "DE.ApplicationController.unknownErrorText": "Eroare Necunoscut.",
+ "DE.ApplicationController.unsupportedBrowserErrorText": "Browserul nu este compatibil.",
+ "DE.ApplicationController.waitText": "Vă rugăm să așteptați...",
+ "DE.ApplicationView.txtDownload": "Descărcare",
+ "DE.ApplicationView.txtEmbed": "Încorporare",
+ "DE.ApplicationView.txtFullScreen": "Ecran complet",
+ "DE.ApplicationView.txtPrint": "Imprimare",
+ "DE.ApplicationView.txtShare": "Partajează"
+}
\ No newline at end of file
diff --git a/apps/documenteditor/embed/locale/sl.json b/apps/documenteditor/embed/locale/sl.json
index 6564e9534..69203a9ff 100644
--- a/apps/documenteditor/embed/locale/sl.json
+++ b/apps/documenteditor/embed/locale/sl.json
@@ -26,5 +26,6 @@
"DE.ApplicationView.txtDownload": "Prenesi",
"DE.ApplicationView.txtEmbed": "Vdelano",
"DE.ApplicationView.txtFullScreen": "Celozaslonski",
+ "DE.ApplicationView.txtPrint": "Natisni",
"DE.ApplicationView.txtShare": "Deli"
}
\ No newline at end of file
diff --git a/apps/documenteditor/embed/locale/zh.json b/apps/documenteditor/embed/locale/zh.json
index 5ecc104d7..3305185d9 100644
--- a/apps/documenteditor/embed/locale/zh.json
+++ b/apps/documenteditor/embed/locale/zh.json
@@ -13,18 +13,19 @@
"DE.ApplicationController.errorDefaultMessage": "错误代码:%1",
"DE.ApplicationController.errorFilePassProtect": "该文档受密码保护,无法被打开。",
"DE.ApplicationController.errorFileSizeExceed": "文件大小超出了为服务器设置的限制. 有关详细信息,请与文档服务器管理员联系。",
- "DE.ApplicationController.errorUpdateVersionOnDisconnect": "网连接已还原文件版本已更改。. 在继续工作之前,需要下载文件或复制其内容以确保没有丢失任何内容,然后重新加载此页。",
+ "DE.ApplicationController.errorUpdateVersionOnDisconnect": "网络连接已恢复,文件版本已变更。 在继续工作之前,需要下载文件或复制其内容以避免丢失数据,然后刷新此页。",
"DE.ApplicationController.errorUserDrop": "该文件现在无法访问。",
"DE.ApplicationController.notcriticalErrorTitle": "警告",
"DE.ApplicationController.scriptLoadError": "连接速度过慢,部分组件无法被加载。请重新加载页面。",
"DE.ApplicationController.textLoadingDocument": "文件加载中…",
"DE.ApplicationController.textOf": "的",
"DE.ApplicationController.txtClose": "关闭",
- "DE.ApplicationController.unknownErrorText": "示知错误",
- "DE.ApplicationController.unsupportedBrowserErrorText": "你的浏览器不支持",
+ "DE.ApplicationController.unknownErrorText": "未知错误。",
+ "DE.ApplicationController.unsupportedBrowserErrorText": "您的浏览器不受支持",
"DE.ApplicationController.waitText": "请稍候...",
"DE.ApplicationView.txtDownload": "下载",
"DE.ApplicationView.txtEmbed": "嵌入",
"DE.ApplicationView.txtFullScreen": "全屏",
+ "DE.ApplicationView.txtPrint": "打印",
"DE.ApplicationView.txtShare": "共享"
}
\ No newline at end of file
diff --git a/apps/documenteditor/main/app.js b/apps/documenteditor/main/app.js
index bd53d3271..87306dd58 100644
--- a/apps/documenteditor/main/app.js
+++ b/apps/documenteditor/main/app.js
@@ -151,6 +151,7 @@ require([
'Toolbar',
'Statusbar',
'Links',
+ 'FormsTab',
'Navigation',
'RightMenu',
'LeftMenu',
@@ -176,6 +177,7 @@ require([
'documenteditor/main/app/controller/DocumentHolder',
'documenteditor/main/app/controller/Toolbar',
'documenteditor/main/app/controller/Statusbar',
+ 'documenteditor/main/app/controller/FormsTab',
'documenteditor/main/app/controller/Links',
'documenteditor/main/app/controller/Navigation',
'documenteditor/main/app/controller/RightMenu',
diff --git a/apps/documenteditor/main/app/controller/FormsTab.js b/apps/documenteditor/main/app/controller/FormsTab.js
new file mode 100644
index 000000000..8864a7b0a
--- /dev/null
+++ b/apps/documenteditor/main/app/controller/FormsTab.js
@@ -0,0 +1,254 @@
+/*
+ *
+ * (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
+ *
+ */
+
+/**
+ * FormsTab.js
+ *
+ * Created by Julia Radzhabova on 06.10.2020
+ * Copyright (c) 2020 Ascensio System SIA. All rights reserved.
+ *
+ */
+
+define([
+ 'core',
+ 'documenteditor/main/app/view/FormsTab'
+], function () {
+ 'use strict';
+
+ DE.Controllers.FormsTab = Backbone.Controller.extend(_.extend({
+ models : [],
+ collections : [
+ ],
+ views : [
+ 'FormsTab'
+ ],
+ sdkViewName : '#id_main',
+
+ initialize: function () {
+ },
+ onLaunch: function () {
+ this._state = {
+ prcontrolsdisable:undefined
+ };
+ },
+
+ setApi: function (api) {
+ if (api) {
+ this.api = api;
+ this.api.asc_registerCallback('asc_onFocusObject', this.onApiFocusObject.bind(this));
+ this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
+ Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
+ this.api.asc_registerCallback('asc_onChangeSpecialFormsGlobalSettings', _.bind(this.onChangeSpecialFormsGlobalSettings, this));
+ Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
+
+ // this.api.asc_registerCallback('asc_onShowContentControlsActions',_.bind(this.onShowContentControlsActions, this));
+ // this.api.asc_registerCallback('asc_onHideContentControlsActions',_.bind(this.onHideContentControlsActions, this));
+ }
+ return this;
+ },
+
+ setConfig: function(config) {
+ this.toolbar = config.toolbar;
+ this.view = this.createView('FormsTab', {
+ toolbar: this.toolbar.toolbar
+ });
+ this.addListeners({
+ 'FormsTab': {
+ 'forms:insert': this.onControlsSelect,
+ 'forms:new-color': this.onNewControlsColor,
+ 'forms:clear': this.onClearClick,
+ 'forms:no-color': this.onNoControlsColor,
+ 'forms:select-color': this.onSelectControlsColor,
+ 'forms:mode': this.onModeClick
+ }
+ });
+ },
+
+ SetDisabled: function(state) {
+ this.view && this.view.SetDisabled(state);
+ },
+
+ getView: function(name) {
+ return !name && this.view ?
+ this.view : Backbone.Controller.prototype.getView.call(this, name);
+ },
+
+ onCoAuthoringDisconnect: function() {
+ this.SetDisabled(true);
+ },
+
+ onApiFocusObject: function(selectedObjects) {
+ if (!this.toolbar.editMode) return;
+
+ var pr, i = -1, type,
+ paragraph_locked = false,
+ header_locked = false;
+
+ while (++i < selectedObjects.length) {
+ type = selectedObjects[i].get_ObjectType();
+ pr = selectedObjects[i].get_ObjectValue();
+
+ if (type === Asc.c_oAscTypeSelectElement.Paragraph) {
+ paragraph_locked = pr.get_Locked();
+ } else if (type === Asc.c_oAscTypeSelectElement.Header) {
+ header_locked = pr.get_Locked();
+ }
+ }
+ var in_control = this.api.asc_IsContentControl();
+ var control_props = in_control ? this.api.asc_GetContentControlProperties() : null,
+ lock_type = (in_control&&control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked,
+ control_plain = (in_control&&control_props) ? (control_props.get_ContentControlType()==Asc.c_oAscSdtLevelType.Inline) : false;
+ (lock_type===undefined) && (lock_type = Asc.c_oAscSdtLockType.Unlocked);
+ var content_locked = lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked;
+ var need_disable = (paragraph_locked || header_locked || control_plain || content_locked);
+ if (this._state.prcontrolsdisable !== need_disable) {
+ this.view.btnTextField.setDisabled(need_disable);
+ this.view.btnComboBox.setDisabled(need_disable);
+ this.view.btnDropDown.setDisabled(need_disable);
+ this.view.btnCheckBox.setDisabled(need_disable);
+ this.view.btnRadioBox.setDisabled(need_disable);
+ this.view.btnImageField.setDisabled(need_disable);
+ this.view.btnTextField.setDisabled(need_disable);
+ this._state.prcontrolsdisable = need_disable;
+ }
+ },
+
+ onChangeSpecialFormsGlobalSettings: function() {
+ if (this.view && this.view.mnuFormsColorPicker) {
+ var clr = this.api.asc_GetSpecialFormsHighlightColor(),
+ show = !!clr;
+ this.view.mnuNoFormsColor.setChecked(!show, true);
+ this.view.mnuFormsColorPicker.clearSelection();
+ if (clr) {
+ clr = Common.Utils.ThemeColor.getHexColor(clr.get_r(), clr.get_g(), clr.get_b());
+ this.view.mnuFormsColorPicker.selectByRGB(clr, true);
+ }
+ this.view.btnHighlight.currentColor = clr;
+ $('.btn-color-value-line', this.view.btnHighlight.cmpEl).css('background-color', clr ? '#' + clr : 'transparent');
+ }
+ },
+
+ onControlsSelect: function(type) {
+ if (!(this.toolbar.mode && this.toolbar.mode.canFeatureContentControl && this.toolbar.mode.canFeatureForms)) return;
+
+ var oPr,
+ oFormPr = new AscCommon.CSdtFormPr();
+ this.toolbar.toolbar.fireEvent('insertcontrol', this.toolbar.toolbar);
+ if (type == 'picture')
+ this.api.asc_AddContentControlPicture(oFormPr);
+ else if (type == 'checkbox' || type == 'radiobox') {
+ oPr = new AscCommon.CSdtCheckBoxPr();
+ (type == 'radiobox') && oPr.put_GroupKey('Group 1');
+ this.api.asc_AddContentControlCheckBox(oPr, oFormPr);
+ } else if (type == 'combobox' || type == 'dropdown')
+ this.api.asc_AddContentControlList(type == 'combobox', oPr, oFormPr);
+ else if (type == 'text') {
+ oPr = new AscCommon.CSdtTextFormPr();
+ this.api.asc_AddContentControlTextForm(oPr, oFormPr);
+ }
+ Common.NotificationCenter.trigger('edit:complete', this.toolbar);
+ },
+
+ onModeClick: function(state) {
+ if (this.api) {
+ this.disableEditing(state);
+ this.api.asc_setRestriction(state ? Asc.c_oAscRestrictionType.OnlyForms : Asc.c_oAscRestrictionType.None);
+ this.api.asc_SetPerformContentControlActionByClick(state);
+ }
+ Common.NotificationCenter.trigger('edit:complete', this.toolbar);
+ },
+
+ onClearClick: function() {
+ if (this.api) {
+ this.api.asc_ClearAllSpecialForms();
+ }
+ Common.NotificationCenter.trigger('edit:complete', this.toolbar);
+ },
+
+ onNewControlsColor: function() {
+ this.view.mnuFormsColorPicker.addNewColor();
+ },
+
+ onNoControlsColor: function(item) {
+ if (!item.isChecked())
+ this.api.asc_SetSpecialFormsHighlightColor(255, 192, 0);
+ else
+ this.api.asc_SetSpecialFormsHighlightColor();
+ Common.NotificationCenter.trigger('edit:complete', this.toolbar);
+ },
+
+ onSelectControlsColor: function(color) {
+ var clr = Common.Utils.ThemeColor.getRgbColor(color);
+ if (this.api) {
+ this.api.asc_SetSpecialFormsHighlightColor(clr.get_r(), clr.get_g(), clr.get_b());
+ }
+ Common.NotificationCenter.trigger('edit:complete', this.toolbar);
+ },
+
+ disableEditing: function(disable) {
+ if (this._state.DisabledEditing != disable) {
+ this._state.DisabledEditing = disable;
+
+ var app = this.getApplication();
+ var rightMenuController = app.getController('RightMenu');
+ rightMenuController.getView('RightMenu').clearSelection();
+ rightMenuController.SetDisabled(disable);
+ app.getController('Toolbar').DisableToolbar(disable, false, false, true);
+ app.getController('Statusbar').getView('Statusbar').SetDisabled(disable);
+ app.getController('Common.Controllers.ReviewChanges').SetDisabled(disable);
+ app.getController('DocumentHolder').getView().SetDisabled(disable);
+ app.getController('Navigation') && app.getController('Navigation').SetDisabled(disable);
+ app.getController('LeftMenu').setPreviewMode(disable);
+ var comments = app.getController('Common.Controllers.Comments');
+ if (comments)
+ comments.setPreviewMode(disable);
+ if (this.view)
+ this.view.$el.find('.no-group-mask.form-view').css('opacity', 1);
+ }
+ },
+
+ onAppReady: function (config) {
+ var me = this;
+ (new Promise(function (accept, reject) {
+ accept();
+ })).then(function(){
+ if (config.canEditContentControl) {
+ var clr = me.api.asc_GetSpecialFormsHighlightColor();
+ clr && (clr = Common.Utils.ThemeColor.getHexColor(clr.get_r(), clr.get_g(), clr.get_b()));
+ me.view.btnHighlight.currentColor = clr;
+ }
+ });
+ }
+
+ }, DE.Controllers.FormsTab || {}));
+});
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js
index ef762b511..5d3238ab0 100644
--- a/apps/documenteditor/main/app/controller/LeftMenu.js
+++ b/apps/documenteditor/main/app/controller/LeftMenu.js
@@ -206,7 +206,7 @@ define([
this.leftMenu.setOptionsPanel('navigation', this.getApplication().getController('Navigation').getView('Navigation'));
- this.mode.trialMode && this.leftMenu.setDeveloperMode(this.mode.trialMode);
+ (this.mode.trialMode || this.mode.isBeta) && this.leftMenu.setDeveloperMode(this.mode.trialMode, this.mode.isBeta, this.mode.buildVersion);
Common.util.Shortcuts.resumeEvents();
return this;
@@ -218,7 +218,7 @@ define([
this.leftMenu.setOptionsPanel('plugins', this.getApplication().getController('Common.Controllers.Plugins').getView('Common.Views.Plugins'));
} else
this.leftMenu.btnPlugins.hide();
- this.mode.trialMode && this.leftMenu.setDeveloperMode(this.mode.trialMode);
+ (this.mode.trialMode || this.mode.isBeta) && this.leftMenu.setDeveloperMode(this.mode.trialMode, this.mode.isBeta, this.mode.buildVersion);
},
clickMenuFileItem: function(menu, action, isopts) {
diff --git a/apps/documenteditor/main/app/controller/Links.js b/apps/documenteditor/main/app/controller/Links.js
index fc983122c..43cd15155 100644
--- a/apps/documenteditor/main/app/controller/Links.js
+++ b/apps/documenteditor/main/app/controller/Links.js
@@ -48,7 +48,8 @@ define([
'documenteditor/main/app/view/BookmarksDialog',
'documenteditor/main/app/view/CaptionDialog',
'documenteditor/main/app/view/NotesRemoveDialog',
- 'documenteditor/main/app/view/CrossReferenceDialog'
+ 'documenteditor/main/app/view/CrossReferenceDialog',
+ 'common/main/lib/view/OptionsDialog'
], function () {
'use strict';
@@ -71,7 +72,9 @@ define([
'links:hyperlink': this.onHyperlinkClick,
'links:bookmarks': this.onBookmarksClick,
'links:caption': this.onCaptionClick,
- 'links:crossref': this.onCrossRefClick
+ 'links:crossref': this.onCrossRefClick,
+ 'links:tof': this.onTableFigures,
+ 'links:tof-update': this.onTableFiguresUpdate
},
'DocumentHolder': {
'links:contents': this.onTableContents,
@@ -98,6 +101,8 @@ define([
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
this.api.asc_registerCallback('asc_onShowContentControlsActions',_.bind(this.onShowContentControlsActions, this));
this.api.asc_registerCallback('asc_onHideContentControlsActions',_.bind(this.onHideContentControlsActions, this));
+ this.api.asc_registerCallback('asc_onAscReplaceCurrentTOF',_.bind(this.onAscReplaceCurrentTOF, this));
+ this.api.asc_registerCallback('asc_onAscTOFUpdate',_.bind(this.onAscTOFUpdate, this));
}
return this;
},
@@ -173,6 +178,8 @@ define([
need_disable = in_header || rich_edit_lock || plain_edit_lock || rich_del_lock || plain_del_lock;
this.view.btnsContents.setDisabled(need_disable);
+ this.view.btnTableFigures.setDisabled(need_disable);
+ this.view.btnTableFiguresUpdate.setDisabled(need_disable || paragraph_locked || !this.api.asc_CanUpdateTablesOfFigures());
need_disable = in_header;
this.view.btnCaption.setDisabled(need_disable);
@@ -269,6 +276,7 @@ define([
win = new DE.Views.TableOfContentsSettings({
api: this.api,
props: props,
+ type: 0,
handler: function(result, value) {
if (result == 'ok') {
(props) ? me.api.asc_SetTableOfContentsPr(value) : me.api.asc_AddTableOfContents(null, value);
@@ -476,6 +484,61 @@ define([
me.crossRefProps = me.dlgCrossRefDialog.getSettings();
});
me.dlgCrossRefDialog.show();
+ },
+
+ onTableFigures: function(){
+ var props = this.api.asc_GetTableOfFiguresPr();
+ var me = this,
+ win = new DE.Views.TableOfContentsSettings({
+ api: this.api,
+ props: props,
+ type: 1,
+ handler: function(result, value) {
+ if (result == 'ok') {
+ me.api.asc_AddTableOfFigures(value);
+ }
+ Common.NotificationCenter.trigger('edit:complete', me.toolbar);
+ }
+ });
+ win.show();
+ Common.NotificationCenter.trigger('edit:complete', this.toolbar);
+ },
+
+ onTableFiguresUpdate: function(){
+ this.api.asc_UpdateTablesOfFigures();
+ Common.NotificationCenter.trigger('edit:complete', this.toolbar);
+ },
+
+ onAscReplaceCurrentTOF: function(apiCallback) {
+ Common.UI.warning({
+ msg: this.view.confirmReplaceTOF,
+ buttons: ['yes', 'no', 'cancel'],
+ primary: 'yes',
+ callback: _.bind(function(btn) {
+ if (btn=='yes' || btn=='no') {
+ apiCallback && apiCallback(btn === 'yes');
+ }
+ Common.NotificationCenter.trigger('edit:complete', this.toolbar);
+ }, this)
+ });
+ },
+
+ onAscTOFUpdate: function(apiCallback) {
+ var me = this;
+ (new Common.Views.OptionsDialog({
+ width: 300,
+ title: this.view.titleUpdateTOF,
+ items: [
+ {caption: this.view.textUpdatePages, value: true, checked: true},
+ {caption: this.view.textUpdateAll, value: false, checked: false}
+ ],
+ handler: function (dlg, result) {
+ if (result=='ok') {
+ apiCallback && apiCallback(dlg.getSettings());
+ }
+ Common.NotificationCenter.trigger('edit:complete', me.toolbar);
+ }
+ })).show();
}
}, DE.Controllers.Links || {}));
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index 987df7258..92e0f904a 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -170,6 +170,8 @@ define([
window["flat_desine"] = true;
this.api = this.getApplication().getController('Viewport').getApi();
+ Common.UI.FocusManager.init();
+
if (this.api){
this.api.SetDrawingFreeze(true);
@@ -369,6 +371,7 @@ define([
this.appOptions.compatibleFeatures = (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compatibleFeatures;
this.appOptions.canFeatureComparison = !!this.api.asc_isSupportFeature("comparison");
this.appOptions.canFeatureContentControl = !!this.api.asc_isSupportFeature("content-controls");
+ this.appOptions.canFeatureForms = false; // hide in 6.2
this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false));
appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header');
@@ -545,6 +548,7 @@ define([
} else {
this.api.asc_coAuthoringDisconnect();
appHeader.setCanRename(false);
+ appHeader.getButton('users') && appHeader.getButton('users').hide();
this.getApplication().getController('LeftMenu').getView('LeftMenu').showHistory();
this.disableEditing(true);
var versions = opts.data.history,
@@ -1000,6 +1004,7 @@ define([
me.api.SetCollaborativeMarksShowType(Asc.c_oAscCollaborativeMarksShowType.None);
}
Common.Utils.InternalSettings.set("de-settings-coauthmode", me._state.fastCoauth);
+ me.api.asc_SetPerformContentControlActionByClick(me.appOptions.isRestrictedEdit && me.appOptions.canFillForms);
/** coauthoring end **/
@@ -1244,6 +1249,7 @@ define([
this.appOptions.forcesave = this.appOptions.canForcesave;
this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly);
this.appOptions.trialMode = params.asc_getLicenseMode();
+ this.appOptions.isBeta = params.asc_getIsBeta();
this.appOptions.isSignatureSupport= this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport();
this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isProtectionSupport();
this.appOptions.canProtect = (this.appOptions.isSignatureSupport || this.appOptions.isPasswordSupport);
@@ -1368,6 +1374,7 @@ define([
toolbarView.on('insertshape', _.bind(me.onInsertShape, me));
toolbarView.on('inserttextart', _.bind(me.onInsertTextArt, me));
toolbarView.on('insertchart', _.bind(me.onInsertChart, me));
+ toolbarView.on('insertcontrol', _.bind(me.onInsertControl, me));
}
var value = Common.localStorage.getItem('de-settings-unit');
@@ -2044,6 +2051,10 @@ define([
this.getApplication().getController('RightMenu').onInsertTextArt();
},
+ onInsertControl: function() {
+ this.getApplication().getController('RightMenu').onInsertControl();
+ },
+
unitsChanged: function(m) {
var value = Common.localStorage.getItem("de-settings-unit");
value = (value!==null) ? parseInt(value) : Common.Utils.Metric.getDefaultMetric();
@@ -2265,7 +2276,7 @@ define([
var _disable_ui = function (disable) {
me.disableEditing(disable);
var app = me.getApplication();
- app.getController('DocumentHolder').getView().SetDisabled(disable, true);
+ app.getController('DocumentHolder').getView().SetDisabled(disable);
app.getController('Navigation') && app.getController('Navigation').SetDisabled(disable);
var leftMenu = app.getController('LeftMenu');
diff --git a/apps/documenteditor/main/app/controller/RightMenu.js b/apps/documenteditor/main/app/controller/RightMenu.js
index 7c0ae2dc6..baac421e7 100644
--- a/apps/documenteditor/main/app/controller/RightMenu.js
+++ b/apps/documenteditor/main/app/controller/RightMenu.js
@@ -60,6 +60,8 @@ define([
'rightmenuclick': this.onRightMenuClick
}
});
+
+ Common.Utils.InternalSettings.set("de-rightpanel-active-form", 1);
},
onLaunch: function() {
@@ -81,6 +83,7 @@ define([
this._settings[Common.Utils.documentSettingsType.Chart] = {panelId: "id-chart-settings", panel: rightMenu.chartSettings, btn: rightMenu.btnChart, hidden: 1, locked: false};
this._settings[Common.Utils.documentSettingsType.MailMerge] = {panelId: "id-mail-merge-settings", panel: rightMenu.mergeSettings, btn: rightMenu.btnMailMerge, hidden: 1, props: {}, locked: false};
this._settings[Common.Utils.documentSettingsType.Signature] = {panelId: "id-signature-settings", panel: rightMenu.signatureSettings, btn: rightMenu.btnSignature, hidden: 1, props: {}, locked: false};
+ this._settings[Common.Utils.documentSettingsType.Form] = {panelId: "id-form-settings", panel: rightMenu.formSettings, btn: rightMenu.btnForm, hidden: 1, props: {}, locked: false};
},
setApi: function(api) {
@@ -94,8 +97,29 @@ define([
this.editMode = mode.isEdit;
},
- onRightMenuClick: function(menu, type, minimized) {
+ onRightMenuClick: function(menu, type, minimized, event) {
if (!minimized && this.editMode) {
+ if (event) { // user click event
+ if (!this._settings[Common.Utils.documentSettingsType.Form].hidden) {
+ if (type == Common.Utils.documentSettingsType.Form) {
+ if (!this._settings[Common.Utils.documentSettingsType.Paragraph].hidden)
+ Common.Utils.InternalSettings.set("de-rightpanel-active-para", 0);
+ if (!this._settings[Common.Utils.documentSettingsType.Image].hidden)
+ Common.Utils.InternalSettings.set("de-rightpanel-active-image", 0);
+ if (!this._settings[Common.Utils.documentSettingsType.Shape].hidden)
+ Common.Utils.InternalSettings.set("de-rightpanel-active-shape", 0);
+ } else if (type == Common.Utils.documentSettingsType.Paragraph) {
+ Common.Utils.InternalSettings.set("de-rightpanel-active-para", 2);
+ } else if (type == Common.Utils.documentSettingsType.Image) {
+ Common.Utils.InternalSettings.set("de-rightpanel-active-image", 2);
+ Common.Utils.InternalSettings.set("de-rightpanel-active-shape", 0);
+ } else if (type == Common.Utils.documentSettingsType.Shape) {
+ Common.Utils.InternalSettings.set("de-rightpanel-active-shape", 2);
+ Common.Utils.InternalSettings.set("de-rightpanel-active-image", 0);
+ }
+ }
+ }
+
var panel = this._settings[type].panel;
var props = this._settings[type].props;
if (props && panel)
@@ -128,6 +152,8 @@ define([
this._settings[Common.Utils.documentSettingsType.Signature].locked = false;
var isChart = false;
+ var control_props = this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null,
+ control_lock = false;
for (i=0; iparaactive) ? Common.Utils.documentSettingsType.Form : Common.Utils.documentSettingsType.Paragraph;
+ } else if (!this._settings[Common.Utils.documentSettingsType.Paragraph].Image || !this._settings[Common.Utils.documentSettingsType.Shape].hidden) {
+ if (formactive>shapeactive && formactive>imageactive)
+ priorityactive = Common.Utils.documentSettingsType.Form;
+ else if (shapeactive>formactive && shapeactive>imageactive)
+ priorityactive = Common.Utils.documentSettingsType.Shape;
+ else
+ priorityactive = Common.Utils.documentSettingsType.Image;
+ }
+ }
+
if (priorityactive>-1) active = priorityactive;
else if (lastactive>=0 && currentactive<0) active = lastactive;
else if (currentactive>=0) active = currentactive;
@@ -253,6 +311,11 @@ define([
this._settings[Common.Utils.documentSettingsType.TextArt].needShow = true;
},
+ onInsertControl: function() {
+ if (this._settings[Common.Utils.documentSettingsType.Form])
+ this._settings[Common.Utils.documentSettingsType.Form].needShow = true;
+ },
+
UpdateThemeColors: function() {
this.rightmenu.paragraphSettings.UpdateThemeColors();
this.rightmenu.tableSettings.UpdateThemeColors();
@@ -266,6 +329,7 @@ define([
this.rightmenu.chartSettings.updateMetricUnit();
this.rightmenu.imageSettings.updateMetricUnit();
this.rightmenu.tableSettings.updateMetricUnit();
+ this.rightmenu.formSettings && this.rightmenu.formSettings.updateMetricUnit();
},
createDelayedElements: function() {
@@ -351,6 +415,7 @@ define([
this.rightmenu.headerSettings.disableControls(disabled);
this.rightmenu.tableSettings.disableControls(disabled);
this.rightmenu.imageSettings.disableControls(disabled);
+ this.rightmenu.formSettings && this.rightmenu.formSettings.disableControls(disabled);
if (!allowMerge && this.rightmenu.mergeSettings) {
this.rightmenu.mergeSettings.disableControls(disabled);
disabled && this.rightmenu.btnMailMerge.setDisabled(disabled);
@@ -369,6 +434,7 @@ define([
this.rightmenu.btnShape.setDisabled(disabled);
this.rightmenu.btnTextArt.setDisabled(disabled);
this.rightmenu.btnChart.setDisabled(disabled);
+ this.rightmenu.btnForm && this.rightmenu.btnForm.setDisabled(disabled);
} else {
var selectedElements = this.api.getSelectedElements();
if (selectedElements.length > 0)
diff --git a/apps/documenteditor/main/app/controller/Statusbar.js b/apps/documenteditor/main/app/controller/Statusbar.js
index 9c4c0e6c3..1abf49a5d 100644
--- a/apps/documenteditor/main/app/controller/Statusbar.js
+++ b/apps/documenteditor/main/app/controller/Statusbar.js
@@ -143,7 +143,8 @@ define([
}
}
- if ( config.isReviewOnly || Common.localStorage.getBool("de-track-changes-" + (config.fileKey || ''))) {
+ var trackChanges = typeof (config.customization) == 'object' ? config.customization.trackChanges : undefined;
+ if ( config.isReviewOnly || trackChanges===true || (trackChanges!==false) && Common.localStorage.getBool("de-track-changes-" + (config.fileKey || ''))) {
_process_changestip();
} else if ( me.api.asc_IsTrackRevisions() ) {
var showNewChangesTip = !Common.localStorage.getBool("de-new-changes");
diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index 1ea44a6c0..907e78f36 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -58,7 +58,6 @@ define([
'documenteditor/main/app/view/CustomColumnsDialog',
'documenteditor/main/app/view/ControlSettingsDialog',
'documenteditor/main/app/view/WatermarkSettingsDialog',
- 'documenteditor/main/app/view/CompareSettingsDialog',
'documenteditor/main/app/view/ListSettingsDialog',
'documenteditor/main/app/view/DateTimeDialog',
'documenteditor/main/app/view/LineNumbersDialog'
@@ -791,11 +790,12 @@ define([
toolbar.btnContentControls.setDisabled(paragraph_locked || header_locked);
if (!(paragraph_locked || header_locked)) {
- var control_disable = control_plain || content_locked;
+ var control_disable = control_plain || content_locked,
+ if_form = control_props && control_props.get_FormPr();
for (var i=0; i<7; 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[8].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked || if_form);
+ toolbar.btnContentControls.menu.items[10].setDisabled(!in_control || if_form);
}
var need_text_disable = paragraph_locked || header_locked || in_chart || rich_edit_lock || plain_edit_lock;
@@ -1015,13 +1015,13 @@ define([
onChangeSdtGlobalSettings: function() {
var show = this.api.asc_GetGlobalContentControlShowHighlight();
- this.toolbar.mnuNoControlsColor.setChecked(!show, true);
- this.toolbar.mnuControlsColorPicker.clearSelection();
+ this.toolbar.mnuNoControlsColor && this.toolbar.mnuNoControlsColor.setChecked(!show, true);
+ this.toolbar.mnuControlsColorPicker && this.toolbar.mnuControlsColorPicker.clearSelection();
if (show){
var clr = this.api.asc_GetGlobalContentControlHighlightColor();
if (clr) {
clr = Common.Utils.ThemeColor.getHexColor(clr.get_r(), clr.get_g(), clr.get_b());
- this.toolbar.mnuControlsColorPicker.selectByRGB(clr, true);
+ this.toolbar.mnuControlsColorPicker && this.toolbar.mnuControlsColorPicker.selectByRGB(clr, true);
}
}
},
@@ -1321,8 +1321,8 @@ define([
}
} else {
value = Common.Utils.String.parseFloat(record.value);
- value = value > 100
- ? 100
+ value = value > 300
+ ? 300
: value < 1
? 1
: Math.floor((value+0.4)*2)/2;
@@ -1907,6 +1907,7 @@ define([
oPr, oFormPr;
if (isnew) {
oFormPr = new AscCommon.CSdtFormPr();
+ this.toolbar.fireEvent('insertcontrol', this.toolbar);
}
if (item.value == 'plain' || item.value == 'rich')
this.api.asc_AddContentControl((item.value=='plain') ? Asc.c_oAscSdtLevelType.Inline : Asc.c_oAscSdtLevelType.Block);
@@ -2659,7 +2660,8 @@ define([
if (this.dlgSymbolTable && this.dlgSymbolTable.isVisible()) return;
if (this.api) {
- var me = this;
+ var me = this,
+ selected = me.api.asc_GetSelectedText();
me.dlgSymbolTable = new Common.Views.SymbolTableDialog({
api: me.api,
lang: me.mode.lang,
@@ -2667,6 +2669,8 @@ define([
type: 1,
special: true,
showShortcutKey: true,
+ font: selected && selected.length>0 ? this.api.get_TextProps().get_TextPr().get_FontFamily().get_Name() : undefined,
+ symbol: selected && selected.length>0 ? selected.charAt(0) : undefined,
buttons: [{value: 'ok', caption: this.textInsert}, 'close'],
handler: function(dlg, result, settings) {
if (result == 'ok') {
@@ -2857,9 +2861,6 @@ define([
this.onParagraphColor(this._state.clrshd_asccolor);
}
this._state.clrshd_asccolor = undefined;
-
- updateColors(this.toolbar.mnuControlsColorPicker, 1);
- this.onChangeSdtGlobalSettings();
},
_onInitEditorStyles: function(styles) {
@@ -2966,27 +2967,36 @@ define([
this.DisableToolbar(true, true);
},
- DisableToolbar: function(disable, viewMode, reviewmode) {
+ DisableToolbar: function(disable, viewMode, reviewmode, fillformmode) {
if (viewMode!==undefined) this.editMode = !viewMode;
disable = disable || !this.editMode;
var toolbar_mask = $('.toolbar-mask'),
group_mask = $('.toolbar-group-mask'),
- mask = reviewmode ? group_mask : toolbar_mask;
+ mask = (reviewmode || fillformmode) ? group_mask : toolbar_mask;
if (disable && mask.length>0 || !disable && mask.length==0) return;
var toolbar = this.toolbar;
if(disable) {
if (reviewmode) {
- mask = $("
+
+
+
+
+
Abbildungsverzeichnis hinzufügen und formatieren
+
Abbildungsverzeichnis bietet einen Überblick über Gleichungen, Abbildungen und Tabellen, die einem Dokument hinzugefügt wurden. Ähnlich wie bei einem Inhaltsverzeichnis werden in einem Abbildungsverzeichnis Objekte oder Textüberschriften mit einem bestimmten Stil aufgelistet, sortiert und angeordnet. Dies macht es einfach, sie in Ihrem Dokument zu referenzieren und zwischen Abbildungen zu navigieren. Klicken Sie auf den Link im als Links formatierten Abbildungsverzeichnis , und Sie werden direkt zur Abbildung oder Überschrift weitergeleitet. Alle Tabellen, Gleichungen, Diagramme, Zeichnungen, Schaubilder, Fotos oder anderen Arten von Illustration werden als Abbildungen dargestellt.
+
+
Um ein Abbildungsverzeichnis hinzuzufügen, öffnen Sie die Registerkarte Verweise und klicken Sie auf das Symbol Abbildungsverzeichnis , um ein Abbildungsverzeichnis zu erstellen und formatieren. Verwenden Sie die Schaltfläche Aktualisieren , um das Abbildungsverzeichnis jedes Mal zu aktualisieren, wenn Sie Ihrem Dokument eine neue Abbildung hinzufügen.
+
Abbildungsverzeichnis erstellen
+
Hinweis: Sie können ein Abbildungsverzeichnis entweder mit Beschriftungen oder mit Stilen erstellen. Eine Beschriftung soll jeder Gleichung, jedem Abbildungsverzeichnis hinzugefügt werden, oder ein Stil soll auf dem Text angewendet werden, damit der Text korrekt in ein Abbildungsverzeichnis aufgenommen ist.
+
+
+ Wenn Sie Beschriftungen oder Stile hinzugefügt haben, positionieren Sie den Cursor an der Stelle, an der Sie ein Abbildungsverzeichnis einfügen möchten, und wechseln Sie zur Registerkarte Verweise . Klicken Sie auf die Schaltfläche Abbildungsverzeichnis , um das Dialogfeld Abbildungsverzeichnis zu öffnen und eine Liste der Abbildungen zu erstellen.
+
+
+
+ Wählen Sie eine Option zum Erstellen eines Abbildungsverzeichnisses aus Beschriftungen oder Stilen .
+
+
+ Sie können ein Abbildungsverzeichnis basierend auf beschrifteten Objekten erstellen. Aktivieren Sie das Kontrollkästchen Beschriftung und wählen Sie ein beschriftetes Objekt aus der Dropdown-Liste aus:
+
+ Kein
+ Gleichung
+ Abbildung
+
+ Tabelle
+
+
+
+
+ Sie können ein Abbildungsverzeichnis basierend auf den Stilen erstellen, die zur Textformatierung verwendet sind. Aktivieren Sie das Kontrollkästchen Stil und wählen Sie einen Stil aus der Dropdown-Liste aus. Die Liste der Optionen kann je nach angewendetem Stil variieren:
+
+ Überschrift 1
+ Überschrift 2
+ Beschriftung
+ Abbildungsverzeichnis
+
+ Normal
+
+
+
+
+
+
+
+
Abbildungsverzeichnis formatieren
+
Mit den Kontrollkästchenoptionen können Sie ein Abbildungsverzeichnis formatieren. Alle Kontrollkästchen für Formatierung sind standardmäßig aktiviert, da es in den meisten Fällen am vernünftigsten ist. Deaktivieren Sie die Kontrollkästchen, die Sie nicht benötigen.
+
+ Seitenzahlen anzeigen : Um die Seitenzahl anzuzeigen, auf der die Abbildung ist;
+ Seitenzahlen rechtsbündig : Um Seitenzahlen rechts anzuzeigen, wenn Seitenzahlen anzeigen aktiv ist; deaktivieren Sie diese Option, um Seitenzahlen direkt nach dem Titel anzuzeigen;
+ Inhaltsverzeichnis als Links formatieren : Um Hyperlinks dem Abbildungsverzeichnis hinzuzufügen;
+ Bezeichnung und Nummer einschließen : Um dem Abbildungsverzeichnis eine Bezeichnung und eine Nummer hinzuzufügen.
+
+
+ Wählen Sie den Füllzeichen-Stil aus der Dropdown-Liste, um Titel mit Seitenzahlen für eine bessere Visualisierung zu verbinden.
+
+ Passen Sie die Textstile des Abbildungsverzeichnisses an, indem Sie einen der verfügbaren Stile aus der Dropdown-Liste auswählen:
+
+ Aktuell - zeigt den zuvor ausgewählten Stil an.
+ Einfach - hebt Text als fett hervor.
+ Online - hebt Text als Hyperlink hervor und ordnet ihn an.
+ Klassisch - macht alle Buchstaben als Großbuchstaben.
+ Elegant - hebt Text als kursiv hervor.
+ Zentriert - zentriert den Text und zeigt kein Füllzeichen an.
+ Formell - zeigt Text in 11 pt Arial an, um eine formellere Darstellung zu haben.
+
+
+ Das Vorschaufenster zeigt an, wie das Abbildungsverzeichnis im Dokument oder beim Drucken angezeigt wird.
+
+
Abbildungsverzeichnis aktualisieren
+
Aktualisieren Sie ein Abbildungsverzeichnis jedes Mal, wenn Sie Ihrem Dokument eine neue Gleichung, Abbildung oder Tabelle hinzufügen. Die Schaltfläche Aktualisieren wird aktiv, wenn Sie auf das Abbildungsverzeichnis klicken oder es auswählen. Klicken Sie auf der Registerkarte Verweise in der oberen Symbolleiste auf die Schaltfläche Aktualisieren und wählen Sie die gewünschte Option aus dem Menü:
+
+
+ Nur Seitenzahlen aktualisieren - um Seitenzahlen zu aktualisieren, ohne Änderungen an den Überschriften vorzunehmen.
+ Gesamtes Verzeichnis aktualisieren - um alle geänderten Überschriften und Seitenzahlen zu aktualisieren.
+
+
Klicken Sie auf OK
+
oder
+
Klicken Sie mit der rechten Maustaste auf das Abbildungsverzeichnis in Ihrem Dokument, um das Kontextmenü zu öffnen, und wählen Sie die Option Feld aktualisieren , um das Abbildungsverzeichnis zu aktualisieren.
+
+
diff --git a/apps/documenteditor/main/resources/help/de/UsageInstructions/AddTableofFigures.htm b/apps/documenteditor/main/resources/help/de/UsageInstructions/AddTableofFigures.htm
new file mode 100644
index 000000000..4eb2c30c5
--- /dev/null
+++ b/apps/documenteditor/main/resources/help/de/UsageInstructions/AddTableofFigures.htm
@@ -0,0 +1,93 @@
+
+
+