Merge branch 'feature/develop-fixes' into develop
This commit is contained in:
commit
5c51353d23
|
@ -485,6 +485,9 @@
|
|||
&, li {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
li, div {
|
||||
box-shadow: 0 0 0 1px @gray;
|
||||
}
|
||||
}
|
||||
|
||||
li,
|
||||
|
|
|
@ -104,12 +104,19 @@ export class storeChartSettings {
|
|||
{ type: Asc.c_oAscChartTypeSettings.barNormal, thumb: 'chart-03.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStacked, thumb: 'chart-02.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStackedPer, thumb: 'chart-01.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3d, thumb: 'chart-17.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStacked3d, thumb: 'chart-18.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStackedPer3d, thumb: 'chart-19.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, thumb: 'chart-20.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.lineNormal, thumb: 'chart-06.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.lineStacked, thumb: 'chart-05.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.lineStackedPer, thumb: 'chart-04.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarNormal, thumb: 'chart-09.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStacked, thumb: 'chart-08.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer, thumb: 'chart-07.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarNormal3d, thumb: 'chart-25.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStacked3d, thumb: 'chart-24.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, thumb: 'chart-23.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.areaNormal, thumb: 'chart-12.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.areaStacked, thumb: 'chart-11.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.areaStackedPer, thumb: 'chart-10.png'},
|
||||
|
@ -119,13 +126,6 @@ export class storeChartSettings {
|
|||
{ type: Asc.c_oAscChartTypeSettings.scatter, thumb: 'chart-15.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.stock, thumb: 'chart-16.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.line3d, thumb: 'chart-21.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3d, thumb: 'chart-17.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStacked3d, thumb: 'chart-18.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStackedPer3d, thumb: 'chart-19.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarNormal3d, thumb: 'chart-25.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStacked3d, thumb: 'chart-24.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, thumb: 'chart-23.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, thumb: 'chart-20.png'}
|
||||
];
|
||||
const columns = 3;
|
||||
const arr = [];
|
||||
|
|
|
@ -52,12 +52,19 @@ export class storeChartSettings {
|
|||
{ type: Asc.c_oAscChartTypeSettings.barNormal, thumb: 'chart-03.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStacked, thumb: 'chart-02.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStackedPer, thumb: 'chart-01.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3d, thumb: 'chart-17.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStacked3d, thumb: 'chart-18.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStackedPer3d, thumb: 'chart-19.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, thumb: 'chart-20.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.lineNormal, thumb: 'chart-06.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.lineStacked, thumb: 'chart-05.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.lineStackedPer, thumb: 'chart-04.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarNormal, thumb: 'chart-09.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStacked, thumb: 'chart-08.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer, thumb: 'chart-07.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarNormal3d, thumb: 'chart-25.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStacked3d, thumb: 'chart-24.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, thumb: 'chart-23.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.areaNormal, thumb: 'chart-12.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.areaStacked, thumb: 'chart-11.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.areaStackedPer, thumb: 'chart-10.png'},
|
||||
|
@ -67,13 +74,6 @@ export class storeChartSettings {
|
|||
{ type: Asc.c_oAscChartTypeSettings.scatter, thumb: 'chart-15.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.stock, thumb: 'chart-16.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.line3d, thumb: 'chart-21.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3d, thumb: 'chart-17.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStacked3d, thumb: 'chart-18.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStackedPer3d, thumb: 'chart-19.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarNormal3d, thumb: 'chart-25.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStacked3d, thumb: 'chart-24.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, thumb: 'chart-23.png'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, thumb: 'chart-20.png'}
|
||||
];
|
||||
const columns = 3;
|
||||
const arr = [];
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
"loadingDocumentTitleText": "Loading document",
|
||||
"loadingDocumentTextText": "Loading document...",
|
||||
"textLoadingDocument": "Loading document",
|
||||
|
||||
"textYes": "Yes",
|
||||
"notcriticalErrorTitle": "Warning",
|
||||
"textOk": "Ok",
|
||||
"textNo": "No",
|
||||
|
|
|
@ -22,6 +22,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(props => {
|
|||
api.asc_registerCallback('asc_onWorksheetLocked', onWorksheetLocked);
|
||||
api.asc_registerCallback('asc_onSheetsChanged', onApiSheetsChanged);
|
||||
api.asc_registerCallback('asc_onHidePopMenu', onApiHideTabContextMenu);
|
||||
api.asc_registerCallback('asc_onActiveSheetChanged', onApiActiveSheetChanged);
|
||||
};
|
||||
if ( !Common.EditorApi ) {
|
||||
Common.Notifications.on('document:ready', onDocumentReady);
|
||||
|
@ -48,11 +49,18 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(props => {
|
|||
api.asc_unregisterCallback('asc_onWorksheetLocked', onWorksheetLocked);
|
||||
api.asc_unregisterCallback('asc_onSheetsChanged', onApiSheetsChanged);
|
||||
api.asc_unregisterCallback('asc_onHidePopMenu', onApiHideTabContextMenu);
|
||||
api.asc_unregisterCallback('asc_onActiveSheetChanged', onApiActiveSheetChanged);
|
||||
|
||||
$$('.view-main').off('click', on_main_view_click);
|
||||
};
|
||||
}, []);
|
||||
|
||||
const onApiActiveSheetChanged = (index) => {
|
||||
// console.log(index);
|
||||
sheets.setActiveWorksheet(index);
|
||||
Common.Notifications.trigger('sheet:active', index);
|
||||
}
|
||||
|
||||
const onApiHideTabContextMenu = () => {
|
||||
f7.popover.close('.document-menu.modal-in', false);
|
||||
}
|
||||
|
|
|
@ -23,22 +23,15 @@ class EditLinkController extends Component {
|
|||
|
||||
let items = [];
|
||||
let wsc = api.asc_getWorksheetsCount();
|
||||
const aws = api.asc_getActiveWorksheetIndex();
|
||||
|
||||
if (wsc > 0) {
|
||||
items = [];
|
||||
while ( !(--wsc < 0) ) {
|
||||
if ( !api.asc_isWorksheetHidden(wsc) ) {
|
||||
while (!(--wsc < 0)) {
|
||||
if (!api.asc_isWorksheetHidden(wsc)) {
|
||||
items.unshift({
|
||||
value: wsc,
|
||||
caption: api.asc_getWorksheetName(wsc)
|
||||
});
|
||||
if (wsc === aws) {
|
||||
this.activeSheet = {
|
||||
value: wsc,
|
||||
caption: api.asc_getWorksheetName(wsc)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.sheets = items;
|
||||
|
@ -131,7 +124,6 @@ class EditLinkController extends Component {
|
|||
linkInfo={this.linkInfo}
|
||||
isLock={this.isLock}
|
||||
sheets={this.sheets}
|
||||
activeSheet={this.activeSheet}
|
||||
currentSheet={this.currentSheet}
|
||||
onEditLink={this.onEditLink}
|
||||
onRemoveLink={this.onRemoveLink}
|
||||
|
|
|
@ -10,21 +10,11 @@ class DownloadController extends Component {
|
|||
this.onSaveFormat = this.onSaveFormat.bind(this);
|
||||
}
|
||||
|
||||
closeModal() {
|
||||
if (Device.phone) {
|
||||
f7.sheet.close('.settings-popup', true);
|
||||
} else {
|
||||
f7.popover.close('#settings-popover');
|
||||
}
|
||||
}
|
||||
|
||||
onSaveFormat(format) {
|
||||
const api = Common.EditorApi.get();
|
||||
const { t } = this.props;
|
||||
const _t = t("View.Settings", {returnObjects: true});
|
||||
|
||||
this.closeModal();
|
||||
|
||||
if (format) {
|
||||
if (format == Asc.c_oAscFileType.CSV) {
|
||||
f7.dialog.confirm(
|
||||
|
|
|
@ -78,12 +78,19 @@ export class storeChartSettings {
|
|||
{ type: Asc.c_oAscChartTypeSettings.barNormal, thumb: 'bar-normal'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStacked, thumb: 'bar-stacked'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStackedPer, thumb: 'bar-pstacked'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3d, thumb: 'bar3dnormal'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStacked3d, thumb: 'bar3dstack'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStackedPer3d, thumb: 'bar3dpstack'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, thumb: 'bar3dpsnormal'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.lineNormal, thumb: 'line-normal'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.lineStacked, thumb: 'line-stacked'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.lineStackedPer, thumb: 'line-pstacked'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarNormal, thumb: 'hbar-normal'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStacked, thumb: 'hbar-stacked'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer, thumb: 'hbar-pstacked'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarNormal3d, thumb: 'hbar3dnormal'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStacked3d, thumb: 'hbar3dstack'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, thumb: 'hbar3dpstack'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.areaNormal, thumb: 'area-normal'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.areaStacked, thumb: 'area-stacked'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.areaStackedPer, thumb: 'area-pstacked'},
|
||||
|
@ -93,13 +100,6 @@ export class storeChartSettings {
|
|||
{ type: Asc.c_oAscChartTypeSettings.scatter, thumb: 'scatter'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.stock, thumb: 'stock'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.line3d, thumb: 'line3d'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3d, thumb: 'bar3dnormal'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStacked3d, thumb: 'bar3dstack'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barStackedPer3d, thumb: 'bar3dpstack'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarNormal3d, thumb: 'hbar3dnormal'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStacked3d, thumb: 'hbar3dstack'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, thumb: 'hbar3dpstack'},
|
||||
{ type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, thumb: 'bar3dpsnormal'}
|
||||
];
|
||||
const columns = 3;
|
||||
let row = -1;
|
||||
|
|
|
@ -360,7 +360,9 @@ const PageLayout = props => {
|
|||
chartType == Asc.c_oAscChartTypeSettings.lineStacked ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.lineStackedPer ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.stock ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.scatter) {
|
||||
chartType == Asc.c_oAscChartTypeSettings.scatter ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.scatterSmoothMarker || chartType == Asc.c_oAscChartTypeSettings.scatterSmooth ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.scatterLineMarker || chartType == Asc.c_oAscChartTypeSettings.scatterLine) {
|
||||
dataLabelPos.push(
|
||||
{ value: Asc.c_oAscChartDataLabelsPos.l, displayValue: _t.textLeft },
|
||||
{ value: Asc.c_oAscChartDataLabelsPos.r, displayValue: _t.textRight },
|
||||
|
@ -375,7 +377,7 @@ const PageLayout = props => {
|
|||
);
|
||||
}
|
||||
|
||||
const disableSetting = props.disableSetting;
|
||||
const disableEditAxis = props.disableEditAxis;
|
||||
|
||||
const chartLayoutTitles = {
|
||||
0: `${_t.textNone}`,
|
||||
|
@ -461,7 +463,7 @@ const PageLayout = props => {
|
|||
<BlockTitle>{_t.textAxisTitle}</BlockTitle>
|
||||
<List>
|
||||
<ListItem title={_t.textHorizontal} link="/edit-horizontal-axis-title/"
|
||||
after={chartLayoutAxisTitleHorizontal[chartAxisHorTitle]} disabled={disableSetting} routeProps={{
|
||||
after={chartLayoutAxisTitleHorizontal[chartAxisHorTitle]} disabled={disableEditAxis} routeProps={{
|
||||
chartLayoutAxisTitleHorizontal,
|
||||
setLayoutProperty: props.setLayoutProperty,
|
||||
chartAxisHorTitle,
|
||||
|
@ -469,7 +471,7 @@ const PageLayout = props => {
|
|||
}}>
|
||||
</ListItem>
|
||||
<ListItem title={_t.textVertical} link="/edit-vertical-axis-title/"
|
||||
after={chartLayoutAxisTitleVertical[chartAxisVertTitle]} disabled={disableSetting} routeProps={{
|
||||
after={chartLayoutAxisTitleVertical[chartAxisVertTitle]} disabled={disableEditAxis} routeProps={{
|
||||
chartLayoutAxisTitleVertical,
|
||||
setLayoutProperty: props.setLayoutProperty,
|
||||
chartAxisVertTitle,
|
||||
|
@ -480,7 +482,7 @@ const PageLayout = props => {
|
|||
<BlockTitle>{_t.textGridlines}</BlockTitle>
|
||||
<List>
|
||||
<ListItem title={_t.textHorizontal} link="/edit-horizontal-gridlines/"
|
||||
after={chartLayoutGridlinesHorizontal[chartHorGridlines]} disabled={disableSetting} routeProps={{
|
||||
after={chartLayoutGridlinesHorizontal[chartHorGridlines]} disabled={disableEditAxis} routeProps={{
|
||||
chartLayoutGridlinesHorizontal,
|
||||
setLayoutProperty: props.setLayoutProperty,
|
||||
chartHorGridlines,
|
||||
|
@ -488,7 +490,7 @@ const PageLayout = props => {
|
|||
}}>
|
||||
</ListItem>
|
||||
<ListItem title={_t.textVertical} link="/edit-vertical-gridlines/"
|
||||
after={chartLayoutGridlinesVertical[chartVertGridlines]} disabled={disableSetting} routeProps={{
|
||||
after={chartLayoutGridlinesVertical[chartVertGridlines]} disabled={disableEditAxis} routeProps={{
|
||||
chartLayoutGridlinesVertical,
|
||||
setLayoutProperty: props.setLayoutProperty,
|
||||
chartVertGridlines,
|
||||
|
@ -1155,12 +1157,14 @@ const PageHorizontalAxis = props => {
|
|||
) : null}
|
||||
</List>
|
||||
<List>
|
||||
<ListItem title={_t.textAxisPosition} link="/edit-hor-axis-position/" after={axisPosition.display} routeProps={{
|
||||
horAxisPosition,
|
||||
onHorAxisPos: props.onHorAxisPos,
|
||||
axisPosition,
|
||||
setAxisPosition
|
||||
}}></ListItem>
|
||||
{!props.disableAxisPos ?
|
||||
<ListItem title={_t.textAxisPosition} link="/edit-hor-axis-position/" after={axisPosition.display} routeProps={{
|
||||
horAxisPosition,
|
||||
onHorAxisPos: props.onHorAxisPos,
|
||||
axisPosition,
|
||||
setAxisPosition
|
||||
}}></ListItem>
|
||||
: null}
|
||||
<ListItem title={_t.textValuesInReverseOrder}>
|
||||
<div slot="after">
|
||||
<Toggle checked={valuesReverseOrder}
|
||||
|
@ -1376,12 +1380,31 @@ const EditChart = props => {
|
|||
const chartProperties = storeFocusObjects.chartObject && storeFocusObjects.chartObject.get_ChartProperties();
|
||||
const chartType = chartProperties && chartProperties.getType();
|
||||
|
||||
const disableSetting = (
|
||||
const disableEditAxis = (
|
||||
chartType == Asc.c_oAscChartTypeSettings.pie ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.doughnut ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.pie3d
|
||||
);
|
||||
|
||||
const disableAxisPos = (
|
||||
chartType == Asc.c_oAscChartTypeSettings.barNormal3d ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.barStacked3d ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.barStackedPer3d ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.hBarNormal3d ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.hBarStacked3d ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.hBarStackedPer3d ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.barNormal3dPerspective
|
||||
);
|
||||
|
||||
const needReverse = (
|
||||
chartType == Asc.c_oAscChartTypeSettings.hBarNormal ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.hBarStacked ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.hBarStackedPer ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.hBarNormal3d ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.hBarStacked3d ||
|
||||
chartType == Asc.c_oAscChartTypeSettings.hBarStackedPer3d
|
||||
);
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<List>
|
||||
|
@ -1393,11 +1416,21 @@ const EditChart = props => {
|
|||
onBorderSize: props.onBorderSize
|
||||
}}></ListItem>
|
||||
<ListItem title={_t.textLayout} link='/edit-chart-layout/' routeProps={{
|
||||
disableSetting,
|
||||
disableEditAxis,
|
||||
setLayoutProperty: props.setLayoutProperty,
|
||||
initChartLayout: props.initChartLayout
|
||||
}}></ListItem>
|
||||
<ListItem title={_t.textVerticalAxis} link='/edit-chart-vertical-axis/' disabled={disableSetting} routeProps={{
|
||||
<ListItem title={_t.textVerticalAxis} link={needReverse ? '/edit-chart-horizontal-axis/' : '/edit-chart-vertical-axis/'} disabled={disableEditAxis} routeProps={needReverse ? {
|
||||
onHorAxisCrossType: props.onHorAxisCrossType,
|
||||
onHorAxisCrossValue: props.onHorAxisCrossValue,
|
||||
onHorAxisPos: props.onHorAxisPos,
|
||||
onHorAxisReverse: props.onHorAxisReverse,
|
||||
onHorAxisTickMajor: props.onHorAxisTickMajor,
|
||||
onHorAxisTickMinor: props.onHorAxisTickMinor,
|
||||
onHorAxisLabelPos: props.onHorAxisLabelPos,
|
||||
disableAxisPos,
|
||||
needReverse
|
||||
} : {
|
||||
onVerAxisMinValue: props.onVerAxisMinValue,
|
||||
onVerAxisMaxValue: props.onVerAxisMaxValue,
|
||||
onVerAxisCrossType: props.onVerAxisCrossType,
|
||||
|
@ -1408,14 +1441,26 @@ const EditChart = props => {
|
|||
onVerAxisTickMinor: props.onVerAxisTickMinor,
|
||||
onVerAxisLabelPos: props.onVerAxisLabelPos
|
||||
}}></ListItem>
|
||||
<ListItem title={_t.textHorizontalAxis} link='/edit-chart-horizontal-axis/' disabled={disableSetting} routeProps={{
|
||||
<ListItem title={_t.textHorizontalAxis} link={needReverse || chartType == Asc.c_oAscChartTypeSettings.scatter ? '/edit-chart-vertical-axis/' : '/edit-chart-horizontal-axis/'} disabled={disableEditAxis} routeProps={needReverse || chartType == Asc.c_oAscChartTypeSettings.scatter ? {
|
||||
onVerAxisMinValue: props.onVerAxisMinValue,
|
||||
onVerAxisMaxValue: props.onVerAxisMaxValue,
|
||||
onVerAxisCrossType: props.onVerAxisCrossType,
|
||||
onVerAxisCrossValue: props.onVerAxisCrossValue,
|
||||
onVerAxisDisplayUnits: props.onVerAxisDisplayUnits,
|
||||
onVerAxisReverse: props.onVerAxisReverse,
|
||||
onVerAxisTickMajor: props.onVerAxisTickMajor,
|
||||
onVerAxisTickMinor: props.onVerAxisTickMinor,
|
||||
onVerAxisLabelPos: props.onVerAxisLabelPos
|
||||
} : {
|
||||
onHorAxisCrossType: props.onHorAxisCrossType,
|
||||
onHorAxisCrossValue: props.onHorAxisCrossValue,
|
||||
onHorAxisPos: props.onHorAxisPos,
|
||||
onHorAxisReverse: props.onHorAxisReverse,
|
||||
onHorAxisTickMajor: props.onHorAxisTickMajor,
|
||||
onHorAxisTickMinor: props.onHorAxisTickMinor,
|
||||
onHorAxisLabelPos: props.onHorAxisLabelPos
|
||||
onHorAxisLabelPos: props.onHorAxisLabelPos,
|
||||
disableAxisPos,
|
||||
needReverse
|
||||
}}></ListItem>
|
||||
<ListItem title={_t.textReorder} link='/edit-chart-reorder/' routeProps={{
|
||||
onReorder: props.onReorder
|
||||
|
|
|
@ -35,7 +35,7 @@ const PageTypeLink = ({curType, changeType, storeFocusObjects}) => {
|
|||
const PageSheet = ({curSheet, sheets, changeSheet, storeFocusObjects}) => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t('View.Edit', {returnObjects: true});
|
||||
const [stateSheet, setSheet] = useState(curSheet.value);
|
||||
const [stateSheet, setSheet] = useState(curSheet);
|
||||
|
||||
const settings = !storeFocusObjects.focusOn ? [] : (storeFocusObjects.focusOn === 'obj' ? storeFocusObjects.objects : storeFocusObjects.selections);
|
||||
if (storeFocusObjects.focusOn === 'obj' || settings.indexOf('hyperlink') === -1) {
|
||||
|
@ -59,10 +59,10 @@ const PageSheet = ({curSheet, sheets, changeSheet, storeFocusObjects}) => {
|
|||
key={`sheet-${sheet.value}`}
|
||||
title={sheet.caption}
|
||||
radio
|
||||
checked={stateSheet === sheet.value}
|
||||
onClick={() => {
|
||||
setSheet(sheet.value);
|
||||
changeSheet(sheet);
|
||||
checked={stateSheet === sheet.caption}
|
||||
onChange={() => {
|
||||
setSheet(sheet.caption);
|
||||
changeSheet(sheet.caption);
|
||||
}}
|
||||
/>
|
||||
)
|
||||
|
@ -80,13 +80,15 @@ const EditLink = props => {
|
|||
const linkInfo = props.linkInfo;
|
||||
const isLock = props.isLock;
|
||||
const sheets = props.sheets;
|
||||
const activeSheet = props.activeSheet;
|
||||
const currentSheet = props.currentSheet;
|
||||
const valueLinkInfo = linkInfo.asc_getType();
|
||||
const linkSheet = (valueLinkInfo == Asc.c_oAscHyperlinkType.RangeLink) ? linkInfo.asc_getSheet() : currentSheet;
|
||||
const valueTypeLink = linkInfo.asc_getType();
|
||||
const valueLinkSheet = linkInfo.asc_getSheet();
|
||||
const getLinkSheet = () => sheets.find(sheet => sheet.caption === valueLinkSheet);
|
||||
const linkSheet = (valueTypeLink == Asc.c_oAscHyperlinkType.RangeLink) ? getLinkSheet() ? getLinkSheet().caption : '' : currentSheet;
|
||||
|
||||
const [typeLink, setTypeLink] = useState(valueLinkInfo);
|
||||
const [typeLink, setTypeLink] = useState(valueTypeLink);
|
||||
const textType = typeLink != Asc.c_oAscHyperlinkType.RangeLink ? _t.textExternalLink : _t.textInternalDataRange;
|
||||
|
||||
const changeType = (newType) => {
|
||||
setTypeLink(newType);
|
||||
};
|
||||
|
@ -98,7 +100,8 @@ const EditLink = props => {
|
|||
|
||||
const [screenTip, setScreenTip] = useState(linkInfo.asc_getTooltip());
|
||||
|
||||
const [curSheet, setSheet] = useState(activeSheet);
|
||||
const [curSheet, setSheet] = useState(linkSheet);
|
||||
|
||||
const changeSheet = (sheet) => {
|
||||
setSheet(sheet);
|
||||
};
|
||||
|
@ -123,8 +126,8 @@ const EditLink = props => {
|
|||
/>
|
||||
}
|
||||
{typeLink == Asc.c_oAscHyperlinkType.RangeLink &&
|
||||
<ListItem link={'/edit-link-sheet/'} title={_t.textSheet} after={linkSheet} routeProps={{
|
||||
changeSheet: changeSheet,
|
||||
<ListItem link={'/edit-link-sheet/'} title={_t.textSheet} after={curSheet} routeProps={{
|
||||
changeSheet,
|
||||
sheets,
|
||||
curSheet
|
||||
}}/>
|
||||
|
@ -156,10 +159,10 @@ const EditLink = props => {
|
|||
</List>
|
||||
<List>
|
||||
<ListButton title={_t.textEditLink}
|
||||
className={`button-fill button-raised${(typeLink === 'ext' && link.length < 1 || typeLink === 'int' && range.length < 1) && ' disabled'}`}
|
||||
className={`button-fill button-raised${(typeLink === 'ext' && link.length < 1 || typeLink === 'int' || range.length < 1 || !curSheet.length) && ' disabled'}`}
|
||||
onClick={() => {props.onEditLink(typeLink === 1 ?
|
||||
{type: 1, url: link, text: stateDisplayText, tooltip: screenTip} :
|
||||
{type: 2, url: range, sheet: curSheet.caption, text: stateDisplayText, tooltip: screenTip})}}
|
||||
{type: 2, url: range, sheet: curSheet, text: stateDisplayText, tooltip: screenTip})}}
|
||||
/>
|
||||
<ListButton title={_t.textRemoveLink}
|
||||
className={`button-fill button-red`}
|
||||
|
|
Loading…
Reference in a new issue