Merge pull request #1166 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2021-09-08 20:31:51 +03:00 committed by GitHub
commit 3b45745018
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 86 additions and 30 deletions

View file

@ -91,6 +91,7 @@ define([
this.rendered = false;
this.needFillComboView = false;
this.minWidth = this.options.minWidth;
this.delayRenderTips = this.options.delayRenderTips || false;
this.fieldPicker = new Common.UI.DataView({
cls: 'field-picker',
@ -102,7 +103,8 @@ define([
'<span class="title"><%= title %></span>',
'<% } %>',
'</div>'
].join(''))
].join('')),
delayRenderTips: this.delayRenderTips
});
this.openButton = new Common.UI.Button({
@ -137,7 +139,8 @@ define([
'<span class="title"><%= title %></span>',
'<% } %>',
'</div>'
].join(''))
].join('')),
delayRenderTips: this.delayRenderTips
});
// Handle resize

View file

@ -272,6 +272,7 @@ define([
me.allowScrollbar = (me.options.allowScrollbar!==undefined) ? me.options.allowScrollbar : true;
me.scrollAlwaysVisible = me.options.scrollAlwaysVisible || false;
me.tabindex = me.options.tabindex || 0;
me.delayRenderTips = me.options.delayRenderTips || false;
if (me.parentMenu)
me.parentMenu.options.restoreHeight = (me.options.restoreHeight>0);
me.rendered = false;
@ -454,14 +455,28 @@ define([
var idx = _.indexOf(this.store.models, record);
this.dataViewItems = this.dataViewItems.slice(0, idx).concat(view).concat(this.dataViewItems.slice(idx));
if (record.get('tip')) {
var view_el = $(view.el);
view_el.attr('data-toggle', 'tooltip');
view_el.tooltip({
title : record.get('tip'),
placement : 'cursor',
zIndex : this.tipZIndex
});
var me = this,
view_el = $(view.el),
tip = record.get('tip');
if (tip) {
if (this.delayRenderTips)
view_el.one('mouseenter', function(){ // hide tooltip when mouse is over menu
view_el.attr('data-toggle', 'tooltip');
view_el.tooltip({
title : tip,
placement : 'cursor',
zIndex : me.tipZIndex
});
view_el.mouseenter();
});
else {
view_el.attr('data-toggle', 'tooltip');
view_el.tooltip({
title : tip,
placement : 'cursor',
zIndex : me.tipZIndex
});
}
}
this.listenTo(view, 'change', this.onChangeItem);

View file

@ -101,7 +101,7 @@ define([
this.collection = this.getApplication().getCollection('Common.Collections.ReviewChanges');
this.userCollection = this.getApplication().getCollection('Common.Collections.Users');
this._state = {posx: -1000, posy: -1000, popoverVisible: false, previewMode: false, compareSettings: null /*new AscCommon.CComparisonPr()*/};
this._state = {posx: -1000, posy: -1000, popoverVisible: false, previewMode: false, compareSettings: null, wsLock: false, wsProps: []};
Common.NotificationCenter.on('reviewchanges:turn', this.onTurnPreview.bind(this));
Common.NotificationCenter.on('spelling:turn', this.onTurnSpelling.bind(this));

View file

@ -341,5 +341,5 @@
}
.combo-slicer-style {
.combo-textart(61px, 4px);
.combo-textart(60px, 4px);
}

View file

@ -235,7 +235,8 @@ define([
cls: 'combo-chart-style',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
dataHintOffset: 'big',
delayRenderTips: true
});
this.cmbWrapType.menuPicker.itemTemplate = this.cmbWrapType.fieldPicker.itemTemplate = _.template([
'<div class="item-icon-box" id="<%= id %>">',
@ -274,7 +275,8 @@ define([
restoreHeight: 465,
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()),
store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>'),
delayRenderTips: true
});
});
this.btnChartType.render($('#chart-button-type'));
@ -444,7 +446,8 @@ define([
cls: 'combo-chart-style',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
dataHintOffset: 'big',
delayRenderTips: true
});
this.cmbChartStyle.render($('#chart-combo-style'));
this.cmbChartStyle.openButton.menu.cmpEl.css({

View file

@ -139,7 +139,8 @@ define([
cls: 'combo-chart-style',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: '-10, 0'
dataHintOffset: '-10, 0',
delayRenderTips: true
});
this.cmbWrapType.menuPicker.itemTemplate = this.cmbWrapType.fieldPicker.itemTemplate = _.template([
'<div class="item-icon-box" id="<%= id %>" style="">',

View file

@ -1586,7 +1586,8 @@ define([
cls: 'combo-chart-style',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
dataHintOffset: 'big',
delayRenderTips: true
});
this.cmbWrapType.menuPicker.itemTemplate = this.cmbWrapType.fieldPicker.itemTemplate = _.template([
'<div class="item-icon-box" id="<%= id %>">',

View file

@ -240,6 +240,8 @@ define([
createDelayedControls: function() {
var me = this;
this._tableTemplates && this._onInitTemplates(this._tableTemplates);
this.chHeader = new Common.UI.CheckBox({
el: $('#table-checkbox-header'),
labelText: this.textHeader,
@ -729,6 +731,11 @@ define([
},
_onInitTemplates: function(Templates){
if (this._initSettings) {
this._tableTemplates = Templates;
return;
}
var self = this;
this._isTemplatesChanged = true;
@ -754,7 +761,8 @@ define([
groups: new Common.UI.DataViewGroupStore(),
store: new Common.UI.DataViewStore(),
itemTemplate: _.template('<div id="<%= id %>" class="item"><img src="<%= imageUrl %>" height="52" width="72"></div>'),
style: 'max-height: 350px;'
style: 'max-height: 350px;',
delayRenderTips: true
});
});
this.btnTableTemplate.render($('#table-btn-template'));

View file

@ -226,7 +226,8 @@ define([
restoreHeight: 465,
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()),
store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>'),
delayRenderTips: true
});
});
this.btnChartType.render($('#chart-button-type'));
@ -386,7 +387,8 @@ define([
cls: 'combo-chart-style',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
dataHintOffset: 'big',
delayRenderTips: true
});
this.cmbChartStyle.render($('#chart-combo-style'));
this.cmbChartStyle.openButton.menu.cmpEl.css({

View file

@ -227,6 +227,8 @@ define([
createDelayedControls: function() {
var me = this;
this._tableTemplates && this._onInitTemplates(this._tableTemplates);
this.chHeader = new Common.UI.CheckBox({
el: $('#table-checkbox-header'),
labelText: this.textHeader,
@ -670,6 +672,11 @@ define([
},
_onInitTemplates: function(Templates){
if (this._initSettings) {
this._tableTemplates = Templates;
return;
}
var self = this;
this._isTemplatesChanged = true;
@ -695,7 +702,8 @@ define([
groups: new Common.UI.DataViewGroupStore(),
store: new Common.UI.DataViewStore(),
itemTemplate: _.template('<div id="<%= id %>" class="item"><img src="<%= imageUrl %>" height="52" width="72"></div>'),
style: 'max-height: 350px;'
style: 'max-height: 350px;',
delayRenderTips: true
});
});
this.btnTableTemplate.render($('#table-btn-template'));

View file

@ -2021,7 +2021,8 @@ define([
restoreHeight: 300,
style: 'max-height: 300px;',
store: me.getCollection('TableTemplates'),
itemTemplate: _.template('<div class="item-template"><img src="<%= imageUrl %>" id="<%= id %>" style="width:60px;height:44px;"></div>')
itemTemplate: _.template('<div class="item-template"><img src="<%= imageUrl %>" id="<%= id %>" style="width:60px;height:44px;"></div>'),
delayRenderTips: true
});
picker.on('item:click', function(picker, item, record) {

View file

@ -135,6 +135,11 @@ define([
if (this._initSettings)
this.createDelayedElements();
if (this._isEditType) {
this._props = props;
return;
}
this.ShowHideElem(!!(props && props.asc_getChartProperties && props.asc_getChartProperties()));
this.disableControls(this._locked);
@ -680,7 +685,8 @@ define([
allowScrollbar: false,
groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getSparkGroupData()),
store: new Common.UI.DataViewStore(Common.define.chartData.getSparkData()),
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-chartlist"><svg width="40" height="40" class=\"icon\"><use xlink:href=\"#chart-<%= iconCls %>\"></use></svg></div>'),
delayRenderTips: true
});
});
this.btnSparkType.render($('#spark-button-type'));
@ -950,12 +956,14 @@ define([
if (result == 'ok') {
props.endEdit();
me._isEditType = false;
me._props && me.ChangeSettings(me._props);
}
Common.NotificationCenter.trigger('edit:complete', me);
}
}).on('close', function() {
me._isEditType && props.cancelEdit();
me._isEditType = false;
me._props = null;
});
win.show();
}
@ -994,7 +1002,8 @@ define([
cls: 'combo-chart-style',
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
dataHintOffset: 'big',
delayRenderTips: true
});
this.cmbChartStyle.render($('#chart-combo-style'));
this.cmbChartStyle.openButton.menu.cmpEl.css({
@ -1046,7 +1055,8 @@ define([
itemHeight: 50,
menuMaxHeight: 272,
enableKeyEvents: true,
cls: 'combo-spark-style'
cls: 'combo-spark-style',
delayRenderTips: true
});
this.cmbSparkStyle.render($('#spark-combo-style'));
this.cmbSparkStyle.openButton.menu.cmpEl.css({

View file

@ -178,7 +178,8 @@ define([
'<span class="title"><%= title %></span>',
'<% } %>',
'</div>'
].join(''))
].join('')),
delayRenderTips: true
});
this.stylesList.on('item:select', _.bind(this.onSelectStyles, this));

View file

@ -692,7 +692,7 @@ define([
if (!this.btnSlicerStyle) {
this.btnSlicerStyle = new Common.UI.ComboDataView({
itemWidth: 36,
itemHeight: 49,
itemHeight: 48,
menuMaxHeight: 235,
enableKeyEvents: true,
cls: 'combo-slicer-style',

View file

@ -531,7 +531,8 @@ define([
groups: new Common.UI.DataViewGroupStore(),
store: new Common.UI.DataViewStore(),
itemTemplate: _.template('<div id="<%= id %>" class="item"><img src="<%= imageUrl %>" height="44" width="60"></div>'),
style: 'max-height: 325px;'
style: 'max-height: 325px;',
delayRenderTips: true
});
});
this.btnTableTemplate.render($('#table-btn-template'));

View file

@ -83,7 +83,8 @@
}
.pivot-check-listview {
background-color: #fff;
background-color: @background-normal-ie;
background-color: @background-normal;
width: 100%;
height: 250px;
@ -111,7 +112,8 @@
}
.pivot-listview {
background-color: #fff;
background-color: @background-normal-ie;
background-color: @background-normal;
width: 95px;
height: 130px;