Skip to content

Commit

Permalink
Merge pull request #2948 from ONLYOFFICE/fix/bugfix
Browse files Browse the repository at this point in the history
Fix/bugfix
  • Loading branch information
JuliaRadzhabova authored Apr 18, 2024
2 parents 76d3899 + b7ca94e commit 03ad9d8
Show file tree
Hide file tree
Showing 12 changed files with 130 additions and 13 deletions.
6 changes: 3 additions & 3 deletions apps/common/main/lib/view/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -771,9 +771,9 @@ define([
$html.find('#slot-btn-share').hide();
}

if (isPDFEditor && config.isEdit && !config.isOffline && config.canSwitchMode) {
if (isPDFEditor && config.isEdit && config.canSwitchMode) {
me.btnPDFMode = new Common.UI.Button({
cls: 'btn-header btn-header-pdf-mode no-caret',
cls: 'btn-header btn-header-pdf-mode',
iconCls: 'toolbar__icon icon--inverse btn-sheet-view',
caption: me.textView,
menu: true,
Expand All @@ -785,7 +785,7 @@ define([
changePDFMode.call(me, config);
} else if (isDocEditor && config.isEdit && config.canSwitchMode) {
me.btnDocMode = new Common.UI.Button({
cls: 'btn-header btn-header-pdf-mode no-caret',
cls: 'btn-header btn-header-pdf-mode ',
iconCls: 'toolbar__icon icon--inverse ' + (config.isReviewOnly ? 'btn-ic-review' : 'btn-edit'),
caption: config.isReviewOnly ? me.textReview : me.textEdit,
menu: true,
Expand Down
15 changes: 14 additions & 1 deletion apps/common/main/resources/less/header.less
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,19 @@
opacity: @header-component-hover-icon-opacity;
}
}

.caret {
border-color: @icon-toolbar-header-ie;
border-color: @icon-toolbar-header;
}

&:active:not(.disabled),
&.active:not(.disabled){
.caret {
border-color: @icon-toolbar-header-ie;
border-color: @icon-toolbar-header;
}
}
}

svg.icon {
Expand Down Expand Up @@ -349,7 +362,7 @@
width: auto;

.caption {
margin: 2px 0 0 2px;
margin: 2px 4px 0 2px;
color: @text-toolbar-header-ie;
color: @text-toolbar-header;
}
Expand Down
10 changes: 10 additions & 0 deletions apps/common/main/resources/less/toolbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,11 @@
color: @text-normal;
}

.caret {
border-color: @icon-normal-ie;
border-color: @icon-normal;
}

.inner-box-icon {
> svg {
fill: @text-normal-ie;
Expand Down Expand Up @@ -649,6 +654,11 @@
color: @highlight-button-pressed-ie;
color: @highlight-button-pressed;
}

.caret {
border-color: @icon-normal-pressed-ie;
border-color: @icon-normal-pressed;
}
}
}
}
Expand Down
11 changes: 10 additions & 1 deletion apps/documenteditor/main/app/view/DateTimeDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,21 @@ define([
this.updateFormats(record.value);
}, this));

var value = Common.Utils.InternalSettings.get("de-date-auto-update");
if (value==null || value==undefined) {
value = Common.localStorage.getBool("de-date-auto-update");
Common.Utils.InternalSettings.set("de-date-auto-update", value);
}

this.chUpdate = new Common.UI.CheckBox({
el: $('#datetime-dlg-update'),
labelText: this.textUpdate
labelText: this.textUpdate,
value: !!value
});
this.chUpdate.on('change', _.bind(function(field, newValue, oldValue, eOpts){
this.onSelectFormat(this.listFormats, null, this.listFormats.getSelectedRec());
Common.localStorage.setBool("de-date-auto-update", newValue==='checked');
Common.Utils.InternalSettings.set("de-date-auto-update", newValue==='checked');
}, this));

this.listFormats = new Common.UI.ListView({
Expand Down
13 changes: 12 additions & 1 deletion apps/documenteditor/main/app/view/ShapeSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,18 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.put_fill(fill);
this.imgprops.put_ShapeProperties(props);
this.api.ImgApply(this.imgprops);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
Expand Down
12 changes: 11 additions & 1 deletion apps/pdfeditor/main/app/view/ShapeSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,17 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.put_fill(fill);
this.api.ShapeApply(props);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
Expand Down
13 changes: 12 additions & 1 deletion apps/pdfeditor/main/app/view/TextArtSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,18 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
this.api.ShapeApply(this.shapeprops);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
Expand Down
12 changes: 11 additions & 1 deletion apps/presentationeditor/main/app/view/ShapeSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,17 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.put_fill(fill);
this.api.ShapeApply(props);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
Expand Down
12 changes: 11 additions & 1 deletion apps/presentationeditor/main/app/view/SlideSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,17 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.CAscSlideProps();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.put_background(fill);
this.api.SetSlideProps(props);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
Expand Down
13 changes: 12 additions & 1 deletion apps/presentationeditor/main/app/view/TextArtSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,18 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
this.api.ShapeApply(this.shapeprops);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
Expand Down
13 changes: 12 additions & 1 deletion apps/spreadsheeteditor/main/app/view/ShapeSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,18 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(Asc.c_oAscFillBlipType.TILE);
fill.asc_getFill().asc_putTextureId(this._texturearray[0].type);
props.asc_putFill(fill);
this.imgprops.asc_putShapeProperties(props);
this.api.asc_setGraphicObjectProps(this.imgprops);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
Expand Down
13 changes: 12 additions & 1 deletion apps/spreadsheeteditor/main/app/view/TextArtSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,18 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(Asc.c_oAscFillBlipType.TILE);
fill.asc_getFill().asc_putTextureId(this._texturearray[0].type);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
this.api.asc_setGraphicObjectProps(this.imgprops);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;
Expand Down

0 comments on commit 03ad9d8

Please sign in to comment.