Merge pull request #1870 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2022-07-25 23:44:07 +03:00 committed by GitHub
commit c7722c4009
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 95 additions and 126 deletions

View file

@ -52,4 +52,29 @@
padding-right: 30px;
}
}
}
}
.combo-arrow-style {
.form-control {
cursor: pointer;
.image {
width: 100%;
height: 100%;
display: inline-block;
background-color: transparent;
margin: 0 0 0 -3px;
}
}
}
.img-arrows {
.background-ximage-v2('right-panels/Begin-EndStyle.png', 480px);
-webkit-filter: @img-border-type-filter;
filter: @img-border-type-filter;
}
.item-arrow {
width:44px;
height:20px;
}

View file

@ -208,14 +208,16 @@ define([
var me = this;
var str = this.api.asc_GetErrorForReplaceString(textReplace);
if (str) {
Common.UI.warning({
title: this.notcriticalErrorTitle,
msg: Common.Utils.String.format(this.warnReplaceString, str),
buttons: ['ok'],
callback: function(){
me.view.focus('replace');
}
});
setTimeout(function() {
Common.UI.warning({
title: me.notcriticalErrorTitle,
msg: Common.Utils.String.format(me.warnReplaceString, str),
buttons: ['ok'],
callback: function(){
me.view.focus('replace');
}
});
}, 1);
return;
}
@ -234,14 +236,16 @@ define([
var me = this;
var str = this.api.asc_GetErrorForReplaceString(textReplace);
if (str) {
Common.UI.warning({
title: this.notcriticalErrorTitle,
msg: Common.Utils.String.format(this.warnReplaceString, str),
buttons: ['ok'],
callback: function(){
me.view.focus('replace');
}
});
setTimeout(function() {
Common.UI.warning({
title: me.notcriticalErrorTitle,
msg: Common.Utils.String.format(me.warnReplaceString, str),
buttons: ['ok'],
callback: function(){
me.view.focus('replace');
}
});
}, 1);
return;
}

View file

@ -1015,7 +1015,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
el: $('#shape-advanced-begin-style'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="img-arrows form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default">',
'<span class="caret"></span>',
@ -1044,7 +1046,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
el: $('#shape-advanced-begin-size'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="img-arrows form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default">',
'<span class="caret"></span>',
@ -1079,7 +1083,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
el: $('#shape-advanced-end-style'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="img-arrows form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default">',
'<span class="caret"></span>',
@ -1108,7 +1114,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
el: $('#shape-advanced-end-size'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="img-arrows form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default">',
'<span class="caret"></span>',
@ -2083,7 +2091,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
},
_selectStyleItem: function(combo, record) {
var formcontrol = $(combo.el).find('.form-control');
var formcontrol = $(combo.el).find('.form-control > .image');
formcontrol.css('background-position', ((record) ? (-record.get('offsetx')+20) + 'px' : '0') + ' ' + ((record) ? '-' + record.get('offsety') + 'px' : '-30px'));
},

View file

@ -4,28 +4,6 @@
.icon-advanced-wrap {
}
.combo-arrow-style {
.form-control {
cursor: pointer;
background-color: white;
&.image {
background-position: 10px 0;
background-attachment: scroll;
background-color: @background-normal;
}
}
}
.img-arrows {
.background-ximage-v2('right-panels/Begin-EndStyle.png', 480px, @commonimage: true);
}
.item-arrow {
width:44px;
height:20px;
}
.header-styles-tableview {
.list-item > div{
&:nth-child(1) {

View file

@ -1374,7 +1374,7 @@ define([
'<table>',
'<% _.each(users, function(item) { %>',
'<tr>',
'<td><span class="userLink <% if (item.isLink) { %>sharedLink<% } %>"></span><span><%= Common.Utils.String.htmlEncode(item.user) %></span></td>',
'<td><span class="userLink img-commonctrl <% if (item.isLink) { %>sharedLink<% } %>"></span><span><%= Common.Utils.String.htmlEncode(item.user) %></span></td>',
'<td><%= Common.Utils.String.htmlEncode(item.permissions) %></td>',
'</tr>',
'<% }); %>',

View file

@ -406,7 +406,9 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
el: $('#shape-advanced-begin-style'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default"><span class="caret"></span></button>',
'</div>'
@ -424,7 +426,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
el: $('#shape-advanced-menu-begin-style'),
parentMenu: this.btnBeginStyleMenu,
store: new Common.UI.DataViewStore(_arrStyles),
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow img-arrows" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
this.mnuBeginStylePicker.on('item:click', _.bind(this.onSelectBeginStyle, this));
this._selectStyleItem(this.btnBeginStyle, null);
@ -433,7 +435,9 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
el: $('#shape-advanced-begin-size'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default"><span class="caret"></span></button>',
'</div>'
@ -451,7 +455,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
el: $('#shape-advanced-menu-begin-size'),
parentMenu: this.btnBeginSizeMenu,
store: new Common.UI.DataViewStore(_arrSize),
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow img-arrows" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
this.mnuBeginSizePicker.on('item:click', _.bind(this.onSelectBeginSize, this));
this._selectStyleItem(this.btnBeginSize, null);
@ -466,7 +470,9 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
el: $('#shape-advanced-end-style'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default"><span class="caret"></span></button>',
'</div>'
@ -484,7 +490,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
el: $('#shape-advanced-menu-end-style'),
parentMenu: this.btnEndStyleMenu,
store: new Common.UI.DataViewStore(_arrStyles),
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow img-arrows" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
this.mnuEndStylePicker.on('item:click', _.bind(this.onSelectEndStyle, this));
this._selectStyleItem(this.btnEndStyle, null);
@ -493,7 +499,9 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
el: $('#shape-advanced-end-size'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default"><span class="caret"></span></button>',
'</div>'
@ -511,7 +519,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
el: $('#shape-advanced-menu-end-size'),
parentMenu: this.btnEndSizeMenu,
store: new Common.UI.DataViewStore(_arrSize),
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow img-arrows" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
this.mnuEndSizePicker.on('item:click', _.bind(this.onSelectEndSize, this));
this._selectStyleItem(this.btnEndSize, null);
@ -853,7 +861,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
},
_selectStyleItem: function(combo, record) {
var formcontrol = $(combo.el).find('.form-control');
var formcontrol = $(combo.el).find('.form-control > .image');
formcontrol.css('background-position', ((record) ? (-record.get('offsetx')+20) + 'px' : '0') + ' ' + ((record) ? '-' + record.get('offsety') + 'px' : '-30px'));
},

View file

@ -1,33 +1,3 @@
.combo-arrow-style {
.form-control {
cursor: pointer;
background-color: white;
&.image {
.background-ximage('@{common-image-path}/right-panels/Begin-EndStyle.png', '@{common-image-path}/right-panels/Begin-EndStyle@2x.png', 480px);
background-repeat: no-repeat;
background-position: 10px 0;
background-attachment: scroll;
background-color: white;
}
}
.btn {
&:active:not(.disabled),
&.active:not(.disabled){
.caret {
background-position: @arrow-small-offset-x @arrow-small-offset-y;
}
}
}
}
.item-arrow {
.background-ximage('@{common-image-path}/right-panels/Begin-EndStyle.png', '@{common-image-path}/right-panels/Begin-EndStyle@2x.png', 480px);
width:44px;
height:20px;
}
.advanced-settings-dlg {
.div-category {
padding: 0 15px;

View file

@ -469,7 +469,6 @@
}
.userLink {
.background-ximage('@{common-image-path}/@{common-controls}', '@{common-image-path}/@{common-controls2x}', 100px);
background-position: -81px -234px;
background-repeat: no-repeat;
padding: 0 0 0 17px;

View file

@ -1748,7 +1748,7 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
'<table>',
'<% _.each(users, function(item) { %>',
'<tr>',
'<td><span class="userLink <% if (item.isLink) { %>sharedLink<% } %>"></span><span><%= Common.Utils.String.htmlEncode(item.user) %></span></td>',
'<td><span class="userLink img-commonctrl <% if (item.isLink) { %>sharedLink<% } %>"></span><span><%= Common.Utils.String.htmlEncode(item.user) %></span></td>',
'<td><%= Common.Utils.String.htmlEncode(item.permissions) %></td>',
'</tr>',
'<% }); %>',

View file

@ -376,7 +376,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
el: $('#shape-advanced-begin-style'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default"><span class="caret"></span></button>',
'</div>'
@ -394,7 +396,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
el: $('#shape-advanced-menu-begin-style'),
parentMenu: this.btnBeginStyleMenu,
store: new Common.UI.DataViewStore(_arrStyles),
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow img-arrows" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
this.mnuBeginStylePicker.on('item:click', _.bind(this.onSelectBeginStyle, this));
this._selectStyleItem(this.btnBeginStyle, null);
@ -403,7 +405,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
el: $('#shape-advanced-begin-size'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default"><span class="caret"></span></button>',
'</div>'
@ -421,7 +425,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
el: $('#shape-advanced-menu-begin-size'),
parentMenu: this.btnBeginSizeMenu,
store: new Common.UI.DataViewStore(_arrSize),
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow img-arrows" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
this.mnuBeginSizePicker.on('item:click', _.bind(this.onSelectBeginSize, this));
this._selectStyleItem(this.btnBeginSize, null);
@ -436,7 +440,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
el: $('#shape-advanced-end-style'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default"><span class="caret"></span></button>',
'</div>'
@ -454,7 +460,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
el: $('#shape-advanced-menu-end-style'),
parentMenu: this.btnEndStyleMenu,
store: new Common.UI.DataViewStore(_arrStyles),
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow img-arrows" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
this.mnuEndStylePicker.on('item:click', _.bind(this.onSelectEndStyle, this));
this._selectStyleItem(this.btnEndStyle, null);
@ -463,7 +469,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
el: $('#shape-advanced-end-size'),
template: _.template([
'<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">',
'<div class="form-control image" style="width: 100px;"></div>',
'<div class="form-control" style="width: 100px;">',
'<i class="image img-arrows"></i>',
'</div>',
'<div style="display: table-cell;"></div>',
'<button type="button" class="btn btn-default"><span class="caret"></span></button>',
'</div>'
@ -481,7 +489,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
el: $('#shape-advanced-menu-end-size'),
parentMenu: this.btnEndSizeMenu,
store: new Common.UI.DataViewStore(_arrSize),
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-arrow img-arrows" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>')
});
this.mnuEndSizePicker.on('item:click', _.bind(this.onSelectEndSize, this));
this._selectStyleItem(this.btnEndSize, null);
@ -835,7 +843,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
},
_selectStyleItem: function(combo, record) {
var formcontrol = $(combo.el).find('.form-control');
var formcontrol = $(combo.el).find('.form-control > .image');
formcontrol.css('background-position', ((record) ? (-record.get('offsetx')+20) + 'px' : '0') + ' ' + ((record) ? '-' + record.get('offsety') + 'px' : '-30px'));
},

View file

@ -1,33 +1,3 @@
.combo-arrow-style {
.form-control {
cursor: pointer;
background-color: white;
&.image {
.background-ximage('@{common-image-path}/right-panels/Begin-EndStyle.png', '@{common-image-path}/right-panels/Begin-EndStyle@2x.png', 480px);
background-repeat: no-repeat;
background-position: 10px 0;
background-attachment: scroll;
background-color: white;
}
}
.btn {
&:active:not(.disabled),
&.active:not(.disabled){
.caret {
background-position: @arrow-small-offset-x @arrow-small-offset-y;
}
}
}
}
.item-arrow {
.background-ximage('@{common-image-path}/right-panels/Begin-EndStyle.png', '@{common-image-path}/right-panels/Begin-EndStyle@2x.png', 480px);
width:44px;
height:20px;
}
.advanced-settings-dlg {
.div-category {
padding: 0 0 0 10px;

View file

@ -524,7 +524,6 @@
}
.userLink {
.background-ximage('@{common-image-path}/@{common-controls}', '@{common-image-path}/@{common-controls2x}', 100px);
background-position: -81px -234px;
background-repeat: no-repeat;
padding: 0 0 0 17px;