Skip to content

Commit

Permalink
Merge pull request #2953 from ONLYOFFICE/fix/bugfix
Browse files Browse the repository at this point in the history
Fix/bugfix
  • Loading branch information
JuliaRadzhabova authored Apr 19, 2024
2 parents 01b9346 + 1fd6eea commit ce56dfd
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
10 changes: 9 additions & 1 deletion apps/common/main/lib/view/ListSettingsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,19 @@ define([
}
});

var config = this.options.colorConfig || {};
this.btnColor = new Common.UI.ColorButton({
parentEl: $window.find('#id-dlg-list-color'),
style: "width:45px;",
additionalAlign: this.menuAddAlign,
color: this.color,
colors: config.colors,
dynamiccolors: config.dynamiccolors,
themecolors: config.themecolors,
effects: config.effects,
columns: config.columns,
paletteCls: config.cls,
paletteWidth: config.paletteWidth,
takeFocusOnClose: true
});
this.btnColor.on('color:select', _.bind(this.onColorsSelect, this));
Expand Down Expand Up @@ -400,7 +408,7 @@ define([
},

afterRender: function() {
this.updateThemeColors();
!this.options.colorConfig && this.updateThemeColors();
this._setDefaults(this.props);

var me = this;
Expand Down
4 changes: 2 additions & 2 deletions apps/pdfeditor/main/app/controller/InsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ define([
}
}
if (props) {
win = new PE.Views.HyperlinkSettingsDialog({
win = new PDFE.Views.HyperlinkSettingsDialog({
api: me.api,
appOptions: me.appOptions,
handler: handlerDlg,
Expand Down Expand Up @@ -563,7 +563,7 @@ define([
} else if (in_text && type=='datetime') {
//insert date time
var me = this;
(new PE.Views.DateTimeDialog({
(new PDFE.Views.DateTimeDialog({
api: this.api,
lang: this._state.lang,
handler: function(result, value) {
Expand Down
18 changes: 11 additions & 7 deletions apps/pdfeditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,8 @@ define([
var me = this;
me.turnOnSelectTool();
me.turnOnShowComments();
me.api.asc_StopInkDrawer();

if (h === 'menu') {
me._state.clrstrike = undefined;
// me.onApiHighlightColor();
Expand All @@ -825,7 +827,6 @@ define([
me.api.SetMarkerFormat(me.toolbar.btnStrikeout.options.type, true, 100, parseInt(r, 16), parseInt(g, 16), parseInt(b, 16));
me.toolbar.mnuStrikeoutTransparent.setChecked(false, true);
}
me.api.asc_StopInkDrawer();
Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnStrikeout);
},

Expand All @@ -850,6 +851,8 @@ define([
var me = this;
me.turnOnSelectTool();
me.turnOnShowComments();
me.api.asc_StopInkDrawer();

if (h === 'menu') {
me._state.clrunderline = undefined;
// me.onApiHighlightColor();
Expand All @@ -872,7 +875,6 @@ define([
me.api.SetMarkerFormat(me.toolbar.btnUnderline.options.type, true, 100, parseInt(r, 16), parseInt(g, 16), parseInt(b, 16));
me.toolbar.mnuUnderlineTransparent.setChecked(false, true);
}
me.api.asc_StopInkDrawer();
Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnUnderline);
},

Expand All @@ -897,6 +899,8 @@ define([
var me = this;
me.turnOnSelectTool();
me.turnOnShowComments();
me.api.asc_StopInkDrawer();

if (h === 'menu') {
me._state.clrhighlight = undefined;
// me.onApiHighlightColor();
Expand All @@ -919,7 +923,6 @@ define([
me.api.SetMarkerFormat(me.toolbar.btnHighlight.options.type, true, 100, parseInt(r, 16), parseInt(g, 16), parseInt(b, 16));
me.toolbar.mnuHighlightTransparent.setChecked(false, true);
}
me.api.asc_StopInkDrawer();
Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnHighlight);
},

Expand Down Expand Up @@ -1750,6 +1753,7 @@ define([
api: me.api,
props: props,
type: type,
colorConfig: Common.define.simpleColorsConfig,
storage: me.mode.canRequestInsertImage || me.mode.fileChoiceUrl && me.mode.fileChoiceUrl.indexOf("{documentType}")>-1,
interfaceLang: me.toolbar.mode.lang,
handler: function(result, value) {
Expand Down Expand Up @@ -1944,10 +1948,10 @@ define([
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (Asc.c_oAscTypeSelectElement.Shape == elType) {
var win = new PE.Views.ShapeSettingsAdvanced(
var win = new PDFE.Views.ShapeSettingsAdvanced(
{
shapeProps: elValue,
slideSize: PE.getController('Toolbar').currentPageSize,
slideSize: {width: me.api.get_PageWidth(), height: me.api.get_PageHeight()},
handler: function(result, value) {
if (result == 'ok') {
if (me.api) {
Expand All @@ -1958,7 +1962,7 @@ define([
}
});
win.show();
win.setActiveCategory(4);
win.setActiveCategory(5);
break;
}
}
Expand Down Expand Up @@ -2174,6 +2178,7 @@ define([

_setMarkerColor: function(strcolor, h) {
var me = this;
me.api.asc_StopInkDrawer();

if (h === 'menu') {
me._state.textclrhighlight = undefined;
Expand All @@ -2194,7 +2199,6 @@ define([
b = strcolor[4] + strcolor[5];
me.api.SetMarkerFormat(undefined, true, true, parseInt(r, 16), parseInt(g, 16), parseInt(b, 16));
}
me.api.asc_StopInkDrawer();
Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnTextHighlightColor);
Common.component.Analytics.trackEvent('ToolBar', 'Highlight Color');
},
Expand Down
2 changes: 1 addition & 1 deletion apps/pdfeditor/main/app/view/ChartSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ define([
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (Asc.c_oAscTypeSelectElement.Chart == elType) {
(new PE.Views.ChartSettingsAdvanced(
(new PDFE.Views.ChartSettingsAdvanced(
{
chartProps: elValue,
slideSize: {width: me.api.get_PageWidth(), height: me.api.get_PageHeight()},
Expand Down
2 changes: 1 addition & 1 deletion apps/presentationeditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,7 @@ define([
}
});
win.show();
win.setActiveCategory(4);
win.setActiveCategory(5);
break;
}
}
Expand Down

0 comments on commit ce56dfd

Please sign in to comment.