Commit b2c3707a authored by Julia Radzhabova's avatar Julia Radzhabova

[DE] [PE] Change tooltip for Insert Chart button in the toolbar when chart is selected.

parent 96dba54f
......@@ -93,7 +93,8 @@ define([
can_copycut: undefined,
pgmargins: undefined,
fontsize: undefined,
in_equation: false
in_equation: false,
in_chart: false
};
this.flg = {};
this.diagramEditor = null;
......@@ -685,6 +686,11 @@ define([
if ((need_disable || in_image) != toolbar.mnuInsertTextArt.isDisabled())
toolbar.mnuInsertTextArt.setDisabled(need_disable || in_image);
if (in_chart !== this._state.in_chart) {
toolbar.btnInsertChart.updateHint(in_chart ? toolbar.tipChangeChart : toolbar.tipInsertChart);
this._state.in_chart = in_chart;
}
need_disable = in_chart && image_locked || !in_chart && need_disable;
if (need_disable != toolbar.btnInsertChart.isDisabled())
toolbar.btnInsertChart.setDisabled(need_disable);
......
......@@ -1958,7 +1958,8 @@ define([
mniInsFootnote: 'Insert Footnote',
mniDelFootnote: 'Delete All Footnotes',
mniNoteSettings: 'Notes Settings',
textGotoFootnote: 'Go to Footnotes'
textGotoFootnote: 'Go to Footnotes',
tipChangeChart: 'Change Chart Type'
}, DE.Views.Toolbar || {}));
});
......@@ -1520,6 +1520,7 @@
"DE.Views.Toolbar.tipAlignLeft": "Align Left",
"DE.Views.Toolbar.tipAlignRight": "Align Right",
"DE.Views.Toolbar.tipBack": "Back",
"DE.Views.Toolbar.tipChangeChart": "Change Chart Type",
"DE.Views.Toolbar.tipClearStyle": "Clear Style",
"DE.Views.Toolbar.tipColorSchemas": "Change Color Scheme",
"DE.Views.Toolbar.tipColumns": "Insert columns",
......
......@@ -95,7 +95,8 @@ define([
zoom_type: undefined,
zoom_percent: undefined,
fontsize: undefined,
in_equation: undefined
in_equation: undefined,
in_chart: false
};
this._isAddingShape = false;
this.slideSizeArr = [
......@@ -570,7 +571,8 @@ define([
no_paragraph = true,
no_text = true,
no_object = true,
in_equation = false;
in_equation = false,
in_chart = false;
while (++i < selectedObjects.length) {
type = selectedObjects[i].get_ObjectType();
......@@ -589,11 +591,17 @@ define([
if (type !== Asc.c_oAscTypeSelectElement.Image) {
no_text = false;
}
in_chart = type == Asc.c_oAscTypeSelectElement.Chart;
} else if (type === Asc.c_oAscTypeSelectElement.Math) {
in_equation = true;
}
}
if (in_chart !== this._state.in_chart) {
this.toolbar.btnInsertChart.updateHint(in_chart ? this.toolbar.tipChangeChart : this.toolbar.tipInsertChart);
this._state.in_chart = in_chart;
}
if (paragraph_locked!==undefined && this._state.prcontrolsdisable !== paragraph_locked) {
if (this._state.activated) this._state.prcontrolsdisable = paragraph_locked;
this.toolbar.lockToolbar(PE.enumLock.paragraphLock, paragraph_locked, {array: me.toolbar.paragraphControls});
......
......@@ -1713,6 +1713,7 @@ define([
textShowCurrent: 'Show from Current slide',
textShowSettings: 'Show Settings',
tipInsertEquation: 'Insert Equation',
textCharts: 'Charts'
textCharts: 'Charts',
tipChangeChart: 'Change Chart Type'
}, PE.Views.Toolbar || {}));
});
\ No newline at end of file
......@@ -1233,6 +1233,7 @@
"PE.Views.Toolbar.tipAddSlide": "Add Slide",
"PE.Views.Toolbar.tipAdvSettings": "Advanced Settings",
"PE.Views.Toolbar.tipBack": "Back",
"PE.Views.Toolbar.tipChangeChart": "Change Chart Type",
"PE.Views.Toolbar.tipChangeSlide": "Change Slide Layout",
"PE.Views.Toolbar.tipClearStyle": "Clear Style",
"PE.Views.Toolbar.tipColorSchemas": "Change Color Scheme",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment