Merge branch 'release/v7.0.0' into develop

This commit is contained in:
Julia Radzhabova 2021-12-10 19:01:46 +03:00
commit 3f2597d5cd
18 changed files with 170 additions and 126 deletions

View file

@ -808,14 +808,14 @@ define([
}; };
var el = $(this.dataViewItems[0].el), var el = $(this.dataViewItems[0].el),
itemW = el.outerWidth() + parseInt(el.css('margin-left')) + parseInt(el.css('margin-right')), itemW = el.outerWidth() + parseFloat(el.css('margin-left')) + parseFloat(el.css('margin-right')),
offsetLeft = this.$el.offset().left, offsetLeft = this.$el.offset().left,
offsetTop = el.offset().top, offsetTop = el.offset().top,
prevtop = -1, topIdx = 0, leftIdx = 0; prevtop = -1, topIdx = 0, leftIdx = 0;
for (var i=0; i<this.dataViewItems.length; i++) { for (var i=0; i<this.dataViewItems.length; i++) {
var top = $(this.dataViewItems[i].el).offset().top - offsetTop; var top = $(this.dataViewItems[i].el).offset().top - offsetTop;
leftIdx = Math.floor(($(this.dataViewItems[i].el).offset().left - offsetLeft)/itemW); leftIdx = Math.floor(($(this.dataViewItems[i].el).offset().left - offsetLeft)/itemW + 0.01);
if (top>prevtop) { if (top>prevtop) {
prevtop = top; prevtop = top;
this._layoutParams.itemsIndexes.push([]); this._layoutParams.itemsIndexes.push([]);
@ -1278,7 +1278,7 @@ define([
}; };
var el = this.dataViewItems[0].el, var el = this.dataViewItems[0].el,
itemW = el.outerWidth() + parseInt(el.css('margin-left')) + parseInt(el.css('margin-right')), itemW = el.outerWidth() + parseFloat(el.css('margin-left')) + parseFloat(el.css('margin-right')),
offsetLeft = this.$el.offset().left, offsetLeft = this.$el.offset().left,
offsetTop = el.offset().top, offsetTop = el.offset().top,
prevtop = -1, topIdx = 0, leftIdx = 0; prevtop = -1, topIdx = 0, leftIdx = 0;

View file

@ -292,6 +292,9 @@ Common.UI.HintManager = new(function() {
section = _isEditDiagram ? _currentSection[0] : _currentSection, section = _isEditDiagram ? _currentSection[0] : _currentSection,
topSection = _currentLevel !== 0 && $(section).length > 0 && !_isEditDiagram ? $(section).offset().top : 0, topSection = _currentLevel !== 0 && $(section).length > 0 && !_isEditDiagram ? $(section).offset().top : 0,
bottomSection = _currentLevel !== 0 && $(section).length > 0 && !_isEditDiagram ? topSection + $(section).height() : docH; bottomSection = _currentLevel !== 0 && $(section).length > 0 && !_isEditDiagram ? topSection + $(section).height() : docH;
if ($(section).prop('id') === 'toolbar' && $(section).outerHeight() < $(section).find('.box-controls').outerHeight()) {
bottomSection += $(section).find('.box-controls').outerHeight();
}
if (_currentControls.length === 0) if (_currentControls.length === 0)
_getControls(); _getControls();
@ -512,7 +515,8 @@ Common.UI.HintManager = new(function() {
return; return;
} }
var needOpenPanel = (curr.attr('content-target') && !$('#' + curr.attr('content-target')).is(':visible') || var needOpenPanel = (curr.attr('content-target') && !$('#' + curr.attr('content-target')).is(':visible') ||
(curr.parent().prop('id') === 'slot-btn-chat' && !$('#left-panel-chat').is(':visible'))); (curr.parent().prop('id') === 'slot-btn-chat' && !$('#left-panel-chat').is(':visible')) ||
(curr.parent().hasClass('ribtab') && !$('#toolbar').children('.toolbar').hasClass('expanded')));
if ((!curr.attr('content-target') && curr.parent().prop('id') !== 'slot-btn-chat') || needOpenPanel) { // need to open panel if ((!curr.attr('content-target') && curr.parent().prop('id') !== 'slot-btn-chat') || needOpenPanel) { // need to open panel
if (!($('#file-menu-panel').is(':visible') && (curr.parent().prop('id') === 'fm-btn-info' && $('#panel-info').is(':visible') || if (!($('#file-menu-panel').is(':visible') && (curr.parent().prop('id') === 'fm-btn-info' && $('#panel-info').is(':visible') ||
curr.parent().prop('id') === 'fm-btn-settings' && $('#panel-settings').is(':visible')))) { curr.parent().prop('id') === 'fm-btn-settings' && $('#panel-settings').is(':visible')))) {

View file

@ -262,7 +262,7 @@ class SearchView extends Component {
<div className="searchbar-inner__center"> <div className="searchbar-inner__center">
<div className="searchbar-input-wrap"> <div className="searchbar-input-wrap">
<input className="searchbar-input" value={searchQuery} placeholder={_t.textSearch} type="search" maxLength="255" <input className="searchbar-input" value={searchQuery} placeholder={_t.textSearch} type="search" maxLength="255"
onChange={e => {this.changeSearchQuery(e.target.value)}} /> onChange={e => {this.changeSearchQuery(e.target.value)}} autoFocus/>
{isIos ? <i className="searchbar-icon" /> : null} {isIos ? <i className="searchbar-icon" /> : null}
<span className="input-clear-button" onClick={() => this.changeSearchQuery('')} /> <span className="input-clear-button" onClick={() => this.changeSearchQuery('')} />
</div> </div>

View file

@ -60,7 +60,7 @@ const AddCommentPopup = inject("storeComments")(observer(props => {
<div className='name'>{userInfo.name}</div> <div className='name'>{userInfo.name}</div>
</div> </div>
<div className='wrap-textarea'> <div className='wrap-textarea'>
<Input className="input-comment" type='textarea' placeholder={_t.textAddComment} value={stateText} onChange={(event) => {setText(event.target.value);}}></Input> <Input className="input-comment" autofocus type='textarea' placeholder={_t.textAddComment} value={stateText} onChange={(event) => {setText(event.target.value);}}></Input>
</div> </div>
</div> </div>
</Popup> </Popup>

View file

@ -966,6 +966,16 @@ input[type="number"]::-webkit-inner-spin-button {
height: 100%; height: 100%;
} }
.dropdown-list {
&__placeholder {
opacity: 0.6;
.item-inner {
border-bottom: 1px solid var(--f7-list-item-border-color);
}
}
}

View file

@ -1835,6 +1835,7 @@ define([
var features = { var features = {
version: '{{PRODUCT_VERSION}}', version: '{{PRODUCT_VERSION}}',
// eventloading: true, // eventloading: true,
uitype: 'fillform',
uithemes: true uithemes: true
}; };
var api; var api;

View file

@ -402,7 +402,7 @@ define([
this.appOptions.canRequestMailMergeRecipients = this.editorConfig.canRequestMailMergeRecipients; this.appOptions.canRequestMailMergeRecipients = this.editorConfig.canRequestMailMergeRecipients;
this.appOptions.canRequestSharingSettings = this.editorConfig.canRequestSharingSettings; this.appOptions.canRequestSharingSettings = this.editorConfig.canRequestSharingSettings;
this.appOptions.compatibleFeatures = (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compatibleFeatures; this.appOptions.compatibleFeatures = (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compatibleFeatures;
this.appOptions.canFeatureComparison = !!this.api.asc_isSupportFeature("comparison"); this.appOptions.canFeatureComparison = true;
this.appOptions.canFeatureContentControl = true; this.appOptions.canFeatureContentControl = true;
this.appOptions.canFeatureForms = !!this.api.asc_isSupportFeature("forms"); this.appOptions.canFeatureForms = !!this.api.asc_isSupportFeature("forms");

View file

@ -370,16 +370,13 @@ define([
}, },
onThemeChanged: function (id) { onThemeChanged: function (id) {
var document = DE.getController('Main').document; if ( this.header.menuItemsDarkMode ) {
if ( !/^pdf|djvu|xps|oxps$/.test(document.fileType) ) { var current_dark = Common.UI.Themes.isDarkTheme();
if ( this.header.menuItemsDarkMode ) { var menuItem = this.header.menuItemsDarkMode;
var current_dark = Common.UI.Themes.isDarkTheme(); menuItem.setVisible(current_dark);
var menuItem = this.header.menuItemsDarkMode; menuItem.$el.prev('.divider')[current_dark ? 'show' : 'hide']();
menuItem.setVisible(current_dark);
menuItem.$el.prev('.divider')[current_dark ? 'show' : 'hide']();
menuItem.setChecked(Common.UI.Themes.isContentThemeDark()); menuItem.setChecked(Common.UI.Themes.isContentThemeDark());
}
} }
}, },

View file

@ -278,7 +278,9 @@ define([
/** coauthoring end **/ /** coauthoring end **/
'<tr class="themes">', '<tr class="themes">',
'<td class="left"><label><%= scope.strTheme %></label></td>', '<td class="left"><label><%= scope.strTheme %></label></td>',
'<td class="right"><span id="fms-cmb-theme"></span></td>', '<td class="right">',
'<div><div id="fms-cmb-theme" style="display: inline-block; margin-right: 15px;vertical-align: middle;"></div>',
'<div id="fms-chb-dark-mode" style="display: inline-block; vertical-align: middle;margin-top: 2px;"></div></div></td>',
'</tr>','<tr class="divider"></tr>', '</tr>','<tr class="divider"></tr>',
'<tr>', '<tr>',
'<td class="left"><label><%= scope.strZoom %></label></td>', '<td class="left"><label><%= scope.strZoom %></label></td>',
@ -547,6 +549,16 @@ define([
dataHint: '2', dataHint: '2',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'big' dataHintOffset: 'big'
}).on('selected', function(combo, record) {
me.chDarkMode.setDisabled(record.themeType!=='dark');
});
this.chDarkMode = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-dark-mode'),
labelText: this.txtDarkMode,
dataHint: '2',
dataHintDirection: 'left',
dataHintOffset: 'small'
}); });
this.cmbReviewHover = new Common.UI.ComboBox({ this.cmbReviewHover = new Common.UI.ComboBox({
@ -702,7 +714,7 @@ define([
var data = []; var data = [];
for (var t in Common.UI.Themes.map()) { for (var t in Common.UI.Themes.map()) {
data.push({value: t, displayValue: Common.UI.Themes.get(t).text}); data.push({value: t, displayValue: Common.UI.Themes.get(t).text, themeType: Common.UI.Themes.get(t).type});
} }
if ( data.length ) { if ( data.length ) {
@ -710,6 +722,8 @@ define([
item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.currentThemeId()}); item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.currentThemeId()});
this.cmbTheme.setValue(item ? item.get('value') : Common.UI.Themes.defaultThemeId()); this.cmbTheme.setValue(item ? item.get('value') : Common.UI.Themes.defaultThemeId());
} }
this.chDarkMode.setValue(Common.UI.Themes.isContentThemeDark());
this.chDarkMode.setDisabled(!Common.UI.Themes.isDarkTheme());
if (this.mode.canViewReview) { if (this.mode.canViewReview) {
value = Common.Utils.InternalSettings.get("de-settings-review-hover-mode"); value = Common.Utils.InternalSettings.get("de-settings-review-hover-mode");
@ -720,6 +734,8 @@ define([
applySettings: function() { applySettings: function() {
Common.UI.Themes.setTheme(this.cmbTheme.getValue()); Common.UI.Themes.setTheme(this.cmbTheme.getValue());
if (!this.chDarkMode.isDisabled() && (this.chDarkMode.isChecked() !== Common.UI.Themes.isContentThemeDark()))
Common.UI.Themes.toggleContentTheme();
Common.localStorage.setItem("de-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0); Common.localStorage.setItem("de-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0);
Common.localStorage.setItem("de-settings-zoom", this.cmbZoom.getValue()); Common.localStorage.setItem("de-settings-zoom", this.cmbZoom.getValue());
Common.Utils.InternalSettings.set("de-settings-zoom", Common.localStorage.getItem("de-settings-zoom")); Common.Utils.InternalSettings.set("de-settings-zoom", Common.localStorage.getItem("de-settings-zoom"));
@ -855,7 +871,8 @@ define([
txtAutoCorrect: 'AutoCorrect options...', txtAutoCorrect: 'AutoCorrect options...',
strReviewHover: 'Track Changes Display', strReviewHover: 'Track Changes Display',
txtChangesTip: 'Show by hover in tooltips', txtChangesTip: 'Show by hover in tooltips',
txtChangesBalloons: 'Show by click in balloons' txtChangesBalloons: 'Show by click in balloons',
txtDarkMode: 'Turn on document dark mode'
}, DE.Views.FileMenuPanels.Settings || {})); }, DE.Views.FileMenuPanels.Settings || {}));
DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({

View file

@ -1771,6 +1771,7 @@
"DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Show by click in balloons", "DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Show by click in balloons",
"DE.Views.FileMenuPanels.Settings.txtChangesTip": "Show by hover in tooltips", "DE.Views.FileMenuPanels.Settings.txtChangesTip": "Show by hover in tooltips",
"DE.Views.FileMenuPanels.Settings.txtCm": "Centimeter", "DE.Views.FileMenuPanels.Settings.txtCm": "Centimeter",
"DE.Views.FileMenuPanels.Settings.txtDarkMode": "Turn on document dark mode",
"DE.Views.FileMenuPanels.Settings.txtFitPage": "Fit to Page", "DE.Views.FileMenuPanels.Settings.txtFitPage": "Fit to Page",
"DE.Views.FileMenuPanels.Settings.txtFitWidth": "Fit to Width", "DE.Views.FileMenuPanels.Settings.txtFitWidth": "Fit to Width",
"DE.Views.FileMenuPanels.Settings.txtInch": "Inch", "DE.Views.FileMenuPanels.Settings.txtInch": "Inch",

View file

@ -1743,6 +1743,7 @@
"DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Mostrar con un clic en los globos", "DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Mostrar con un clic en los globos",
"DE.Views.FileMenuPanels.Settings.txtChangesTip": "Mostrar al mantener el puntero en la información sobre herramientas", "DE.Views.FileMenuPanels.Settings.txtChangesTip": "Mostrar al mantener el puntero en la información sobre herramientas",
"DE.Views.FileMenuPanels.Settings.txtCm": "Centímetro", "DE.Views.FileMenuPanels.Settings.txtCm": "Centímetro",
"DE.Views.FileMenuPanels.Settings.txtDarkMode": "Activar el modo oscuro para documentos",
"DE.Views.FileMenuPanels.Settings.txtFitPage": "Ajustar a la página", "DE.Views.FileMenuPanels.Settings.txtFitPage": "Ajustar a la página",
"DE.Views.FileMenuPanels.Settings.txtFitWidth": "Ajustar al ancho", "DE.Views.FileMenuPanels.Settings.txtFitWidth": "Ajustar al ancho",
"DE.Views.FileMenuPanels.Settings.txtInch": "Pulgada", "DE.Views.FileMenuPanels.Settings.txtInch": "Pulgada",

View file

@ -1743,6 +1743,7 @@
"DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Afficher par clic dans les ballons", "DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Afficher par clic dans les ballons",
"DE.Views.FileMenuPanels.Settings.txtChangesTip": "Afficher lorsque le pointeur est maintenu sur l'infobulle", "DE.Views.FileMenuPanels.Settings.txtChangesTip": "Afficher lorsque le pointeur est maintenu sur l'infobulle",
"DE.Views.FileMenuPanels.Settings.txtCm": "Centimètre", "DE.Views.FileMenuPanels.Settings.txtCm": "Centimètre",
"DE.Views.FileMenuPanels.Settings.txtDarkMode": "Activer le mode sombre pour les documents",
"DE.Views.FileMenuPanels.Settings.txtFitPage": "Ajuster à la page", "DE.Views.FileMenuPanels.Settings.txtFitPage": "Ajuster à la page",
"DE.Views.FileMenuPanels.Settings.txtFitWidth": "Ajuster à la largeur", "DE.Views.FileMenuPanels.Settings.txtFitWidth": "Ajuster à la largeur",
"DE.Views.FileMenuPanels.Settings.txtInch": "Pouce", "DE.Views.FileMenuPanels.Settings.txtInch": "Pouce",

View file

@ -1743,6 +1743,7 @@
"DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Afișare în baloane cu un clic", "DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Afișare în baloane cu un clic",
"DE.Views.FileMenuPanels.Settings.txtChangesTip": "Afișarea sfaturilor ecran la trecere", "DE.Views.FileMenuPanels.Settings.txtChangesTip": "Afișarea sfaturilor ecran la trecere",
"DE.Views.FileMenuPanels.Settings.txtCm": "Centimetru", "DE.Views.FileMenuPanels.Settings.txtCm": "Centimetru",
"DE.Views.FileMenuPanels.Settings.txtDarkMode": "Activează modul întunecat la nivel de document",
"DE.Views.FileMenuPanels.Settings.txtFitPage": "Portivire la pagina", "DE.Views.FileMenuPanels.Settings.txtFitPage": "Portivire la pagina",
"DE.Views.FileMenuPanels.Settings.txtFitWidth": "Potrivire lățime", "DE.Views.FileMenuPanels.Settings.txtFitWidth": "Potrivire lățime",
"DE.Views.FileMenuPanels.Settings.txtInch": "Inch", "DE.Views.FileMenuPanels.Settings.txtInch": "Inch",

View file

@ -1743,6 +1743,7 @@
"DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Показывать при клике в выносках", "DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Показывать при клике в выносках",
"DE.Views.FileMenuPanels.Settings.txtChangesTip": "Показывать при наведении в подсказках", "DE.Views.FileMenuPanels.Settings.txtChangesTip": "Показывать при наведении в подсказках",
"DE.Views.FileMenuPanels.Settings.txtCm": "Сантиметр", "DE.Views.FileMenuPanels.Settings.txtCm": "Сантиметр",
"DE.Views.FileMenuPanels.Settings.txtDarkMode": "Включить темный режим",
"DE.Views.FileMenuPanels.Settings.txtFitPage": "По размеру страницы", "DE.Views.FileMenuPanels.Settings.txtFitPage": "По размеру страницы",
"DE.Views.FileMenuPanels.Settings.txtFitWidth": "По ширине", "DE.Views.FileMenuPanels.Settings.txtFitWidth": "По ширине",
"DE.Views.FileMenuPanels.Settings.txtInch": "Дюйм", "DE.Views.FileMenuPanels.Settings.txtInch": "Дюйм",

View file

@ -1,71 +1,71 @@
import React, {Component, useEffect, useState} from 'react'; import React, {Component, useEffect, useState} from 'react';
import { f7, Page, Navbar, List, ListItem, BlockTitle, ListButton, Popover, Popup, View, Link, Sheet } from "framework7-react"; import { f7, Page, Navbar, List, ListItem, BlockTitle, ListButton, Popover, Popup, View, Link, Sheet } from "framework7-react";
import { Device } from '../../../../common/mobile/utils/device'; import { Device } from '../../../../common/mobile/utils/device';
const PageDropdownList = props => { const PageDropdownList = props => {
const listItems = props.listItems; const listItems = props.listItems;
return ( return (
<View style={props.style}> <View style={props.style}>
<Page> <Page>
<List> <List className="dropdown-list">
{listItems.length && listItems.map((elem, index) => ( {listItems.length && listItems.map((elem, index) => (
<ListItem key={index} className='no-indicator' title={elem.caption} onClick={() => props.onChangeItemList(elem.value)}></ListItem> <ListItem key={index} className={'no-indicator ' + (index === 0 ? 'dropdown-list__placeholder' : '')} title={elem.caption} onClick={() => props.onChangeItemList(elem.value)}></ListItem>
))} ))}
</List> </List>
</Page> </Page>
</View> </View>
); );
}; };
class DropdownListView extends Component { class DropdownListView extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
} }
render() { render() {
return ( return (
Device.isPhone ? Device.isPhone ?
<Sheet id="dropdown-list-sheet" closeByOutsideClick={true} backdrop={false} closeByBackdropClick={false} swipeToStep={true} swipeToClose={true}> <Sheet id="dropdown-list-sheet" closeByOutsideClick={true} backdrop={false} closeByBackdropClick={false} swipeToClose={true}>
<PageDropdownList <PageDropdownList
listItems={this.props.listItems} listItems={this.props.listItems}
onChangeItemList={this.props.onChangeItemList} onChangeItemList={this.props.onChangeItemList}
closeModal={this.props.closeModal} closeModal={this.props.closeModal}
/> />
</Sheet> </Sheet>
: :
<Popover id="dropdown-list-popover" className="popover__titled" closeByOutsideClick={false}> <Popover id="dropdown-list-popover" className="popover__titled" closeByOutsideClick={false}>
<PageDropdownList <PageDropdownList
listItems={this.props.listItems} listItems={this.props.listItems}
onChangeItemList={this.props.onChangeItemList} onChangeItemList={this.props.onChangeItemList}
closeModal={this.props.closeModal} closeModal={this.props.closeModal}
style={{height: '410px'}} style={{height: '410px'}}
/> />
</Popover> </Popover>
); );
} }
} }
const DropdownList = props => { const DropdownList = props => {
useEffect(() => { useEffect(() => {
if(Device.isPhone) { if(Device.isPhone) {
f7.sheet.open('#dropdown-list-sheet', true); f7.sheet.open('#dropdown-list-sheet', true);
} else { } else {
f7.popover.open('#dropdown-list-popover', '#dropdown-list-target'); f7.popover.open('#dropdown-list-popover', '#dropdown-list-target');
} }
return () => {} return () => {}
}); });
return ( return (
<DropdownListView <DropdownListView
listItems={props.listItems} listItems={props.listItems}
onChangeItemList={props.onChangeItemList} onChangeItemList={props.onChangeItemList}
closeModal={props.closeModal} closeModal={props.closeModal}
/> />
); );
}; };
export default DropdownList; export default DropdownList;

View file

@ -505,6 +505,7 @@ const PageReorder = props => {
const EditShape = props => { const EditShape = props => {
const { t } = useTranslation(); const { t } = useTranslation();
const _t = t('Edit', {returnObjects: true}); const _t = t('Edit', {returnObjects: true});
const api = Common.EditorApi.get();
const canFill = props.storeFocusObjects.shapeObject.get_ShapeProperties().get_CanFill(); const canFill = props.storeFocusObjects.shapeObject.get_ShapeProperties().get_CanFill();
const shapeObject = props.storeFocusObjects.shapeObject; const shapeObject = props.storeFocusObjects.shapeObject;
const wrapType = props.storeShapeSettings.getWrapType(shapeObject); const wrapType = props.storeShapeSettings.getWrapType(shapeObject);
@ -515,23 +516,32 @@ const EditShape = props => {
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5' || shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|| shapeType=='straightConnector1'; || shapeType=='straightConnector1';
let controlProps = api && api.asc_IsContentControl() ? api.asc_GetContentControlProperties() : null,
fixedSize = false;
if (controlProps) {
let spectype = controlProps.get_SpecificType();
fixedSize = (spectype == Asc.c_oAscContentControlSpecificType.CheckBox || spectype == Asc. c_oAscContentControlSpecificType.ComboBox || spectype == Asc.c_oAscContentControlSpecificType.DropDownList || spectype == Asc.c_oAscContentControlSpecificType.None || spectype == Asc.c_oAscContentControlSpecificType.Picture) && controlProps.get_FormPr() && controlProps.get_FormPr().get_Fixed();
}
let disableRemove = !!props.storeFocusObjects.paragraphObject; let disableRemove = !!props.storeFocusObjects.paragraphObject;
return ( return (
<Fragment> <Fragment>
<List> <List>
{canFill ? {!fixedSize ?
<ListItem title={_t.textStyle} link='/edit-shape-style/' routeProps={{ canFill ?
onFillColor: props.onFillColor, <ListItem title={_t.textStyle} link='/edit-shape-style/' routeProps={{
onBorderSize: props.onBorderSize, onFillColor: props.onFillColor,
onBorderColor: props.onBorderColor, onBorderSize: props.onBorderSize,
onOpacity: props.onOpacity onBorderColor: props.onBorderColor,
}}></ListItem> : onOpacity: props.onOpacity
<ListItem title={_t.textStyle} link='/edit-shape-style-no-fill/' routeProps={{ }}></ListItem> :
onBorderSize: props.onBorderSize, <ListItem title={_t.textStyle} link='/edit-shape-style-no-fill/' routeProps={{
onBorderColor: props.onBorderColor onBorderSize: props.onBorderSize,
}}></ListItem> onBorderColor: props.onBorderColor
} }}></ListItem>
: null}
<ListItem title={_t.textWrap} link='/edit-shape-wrap/' routeProps={{ <ListItem title={_t.textWrap} link='/edit-shape-wrap/' routeProps={{
onWrapType: props.onWrapType, onWrapType: props.onWrapType,
onShapeAlign: props.onShapeAlign, onShapeAlign: props.onShapeAlign,
@ -539,12 +549,12 @@ const EditShape = props => {
onOverlap: props.onOverlap, onOverlap: props.onOverlap,
onWrapDistance: props.onWrapDistance onWrapDistance: props.onWrapDistance
}}></ListItem> }}></ListItem>
{ !hideChangeType && {(!hideChangeType && !fixedSize) &&
<ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{ <ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{
onReplace: props.onReplace onReplace: props.onReplace
}}></ListItem> }}></ListItem>
} }
{ wrapType !== 'inline' && <ListItem title={_t.textReorder} link='/edit-shape-reorder/' routeProps={{ {wrapType !== 'inline' && <ListItem title={_t.textReorder} link='/edit-shape-reorder/' routeProps={{
onReorder: props.onReorder onReorder: props.onReorder
}}></ListItem> } }}></ListItem> }
</List> </List>

View file

@ -404,7 +404,7 @@ define([
this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false)); this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false));
this.appOptions.canMakeActionLink = this.editorConfig.canMakeActionLink; this.appOptions.canMakeActionLink = this.editorConfig.canMakeActionLink;
this.appOptions.canFeaturePivot = true; this.appOptions.canFeaturePivot = true;
this.appOptions.canFeatureViews = !!this.api.asc_isSupportFeature("sheet-views"); this.appOptions.canFeatureViews = true;
if (this.appOptions.user.guest && this.appOptions.canRenameAnonymous && !this.appOptions.isEditDiagram && !this.appOptions.isEditMailMerge) if (this.appOptions.user.guest && this.appOptions.canRenameAnonymous && !this.appOptions.isEditDiagram && !this.appOptions.isEditMailMerge)
Common.NotificationCenter.on('user:rename', _.bind(this.showRenameUserDialog, this)); Common.NotificationCenter.on('user:rename', _.bind(this.showRenameUserDialog, this));

View file

@ -366,35 +366,35 @@ const EditTabs = props => {
component: <EditCellController /> component: <EditCellController />
}) })
} }
if (!store.isLockedShape && settings.indexOf('shape') > -1) { if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('shape') > -1) {
editors.push({ editors.push({
caption: _t.textShape, caption: _t.textShape,
id: 'edit-shape', id: 'edit-shape',
component: <EditShapeController /> component: <EditShapeController />
}) })
} }
if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) {
editors.push({
caption: _t.textText,
id: 'edit-text',
component: <EditTextController />
})
}
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('chart') > -1) {
editors.push({
caption: _t.textChart,
id: 'edit-chart',
component: <EditChartController />
})
}
if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('image') > -1) {
editors.push({
caption: _t.textImage,
id: 'edit-image',
component: <EditImageController />
})
}
if(!wsProps.Objects) { if(!wsProps.Objects) {
if (settings.indexOf('image') > -1) {
editors.push({
caption: _t.textImage,
id: 'edit-image',
component: <EditImageController />
})
}
if (settings.indexOf('text') > -1) {
editors.push({
caption: _t.textText,
id: 'edit-text',
component: <EditTextController />
})
}
if (settings.indexOf('chart') > -1) {
editors.push({
caption: _t.textChart,
id: 'edit-chart',
component: <EditChartController />
})
}
if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) { if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) {
editors.push({ editors.push({
caption: _t.textHyperlink, caption: _t.textHyperlink,