[DE] Fix Bug 32975.
This commit is contained in:
parent
f1d781df3a
commit
9f3c4cc909
|
@ -461,6 +461,8 @@ define([
|
||||||
updateHint: function(hint) {
|
updateHint: function(hint) {
|
||||||
this.options.hint = hint;
|
this.options.hint = hint;
|
||||||
|
|
||||||
|
if (!this.rendered) return;
|
||||||
|
|
||||||
var cmpEl = this.cmpEl,
|
var cmpEl = this.cmpEl,
|
||||||
modalParents = cmpEl.closest('.asc-window');
|
modalParents = cmpEl.closest('.asc-window');
|
||||||
|
|
||||||
|
|
|
@ -395,6 +395,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
createDelayedElements: function() {
|
createDelayedElements: function() {
|
||||||
|
this.UpdateThemeColors();
|
||||||
this.updateMetricUnit();
|
this.updateMetricUnit();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -694,7 +694,37 @@ define([
|
||||||
id : 'id-toolbar-btn-colorschemas',
|
id : 'id-toolbar-btn-colorschemas',
|
||||||
cls : 'btn-toolbar',
|
cls : 'btn-toolbar',
|
||||||
iconCls : 'btn-colorschemas',
|
iconCls : 'btn-colorschemas',
|
||||||
menu : true
|
menu : new Common.UI.Menu({
|
||||||
|
items: [],
|
||||||
|
maxHeight : 600,
|
||||||
|
restoreHeight: 600
|
||||||
|
}).on('show:before', function(mnu) {
|
||||||
|
if ( !this.scroller ) {
|
||||||
|
this.scroller = new Common.UI.Scroller({
|
||||||
|
el: $(this.el).find('.dropdown-menu '),
|
||||||
|
useKeyboard: this.enableKeyEvents && !this.handleSelect,
|
||||||
|
minScrollbarLength: 40,
|
||||||
|
alwaysVisibleY: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).on('show:after', function(btn, e) {
|
||||||
|
var mnu = $(this.el).find('.dropdown-menu '),
|
||||||
|
docH = $(document).height(),
|
||||||
|
menuH = mnu.outerHeight(),
|
||||||
|
top = parseInt(mnu.css('top'));
|
||||||
|
|
||||||
|
if (menuH > docH) {
|
||||||
|
mnu.css('max-height', (docH - parseInt(mnu.css('padding-top')) - parseInt(mnu.css('padding-bottom'))-5) + 'px');
|
||||||
|
this.scroller.update({minScrollbarLength : 40});
|
||||||
|
} else if ( mnu.height() < this.options.restoreHeight ) {
|
||||||
|
mnu.css('max-height', (Math.min(docH - parseInt(mnu.css('padding-top')) - parseInt(mnu.css('padding-bottom'))-5, this.options.restoreHeight)) + 'px');
|
||||||
|
menuH = mnu.outerHeight();
|
||||||
|
if (top+menuH > docH) {
|
||||||
|
mnu.css('top', 0);
|
||||||
|
}
|
||||||
|
this.scroller.update({minScrollbarLength : 40});
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
this.toolbarControls.push(this.btnColorSchemas);
|
this.toolbarControls.push(this.btnColorSchemas);
|
||||||
|
|
||||||
|
@ -735,6 +765,7 @@ define([
|
||||||
this.mnuInsertTable = this.btnInsertTable.menu;
|
this.mnuInsertTable = this.btnInsertTable.menu;
|
||||||
this.mnuInsertImage = this.btnInsertImage.menu;
|
this.mnuInsertImage = this.btnInsertImage.menu;
|
||||||
this.mnuPageSize = this.btnPageSize.menu;
|
this.mnuPageSize = this.btnPageSize.menu;
|
||||||
|
this.mnuColorSchema = this.btnColorSchemas.menu;
|
||||||
|
|
||||||
//
|
//
|
||||||
// DataView and pickers
|
// DataView and pickers
|
||||||
|
@ -1095,6 +1126,7 @@ define([
|
||||||
this.btnColumns.updateHint(this.tipColumns);
|
this.btnColumns.updateHint(this.tipColumns);
|
||||||
this.btnPageOrient.updateHint(this.tipPageOrient);
|
this.btnPageOrient.updateHint(this.tipPageOrient);
|
||||||
this.btnPageSize.updateHint(this.tipPageSize);
|
this.btnPageSize.updateHint(this.tipPageSize);
|
||||||
|
this.btnPageMargins.updateHint(this.tipPageMargins);
|
||||||
this.btnClearStyle.updateHint(this.tipClearStyle);
|
this.btnClearStyle.updateHint(this.tipClearStyle);
|
||||||
this.btnCopyStyle.updateHint(this.tipCopyStyle + Common.Utils.String.platformKey('Ctrl+Shift+C'));
|
this.btnCopyStyle.updateHint(this.tipCopyStyle + Common.Utils.String.platformKey('Ctrl+Shift+C'));
|
||||||
this.btnColorSchemas.updateHint(this.tipColorSchemas);
|
this.btnColorSchemas.updateHint(this.tipColorSchemas);
|
||||||
|
@ -1541,40 +1573,17 @@ define([
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.mnuColorSchema) {
|
if (this.mnuColorSchema == null) {
|
||||||
this.btnColorSchemas.setMenu(new Common.UI.Menu({
|
this.mnuColorSchema = new Common.UI.Menu({
|
||||||
items: [],
|
|
||||||
maxHeight : 600,
|
maxHeight : 600,
|
||||||
restoreHeight: 600
|
restoreHeight: 600
|
||||||
}));
|
}).on('show:before', function(mnu) {
|
||||||
this.mnuColorSchema = this.btnColorSchemas.menu;
|
|
||||||
this.mnuColorSchema.on('show:before', function(mnu) {
|
|
||||||
if ( !this.scroller ) {
|
|
||||||
this.scroller = new Common.UI.Scroller({
|
this.scroller = new Common.UI.Scroller({
|
||||||
el: $(this.el).find('.dropdown-menu '),
|
el: $(this.el).find('.dropdown-menu '),
|
||||||
useKeyboard: this.enableKeyEvents && !this.handleSelect,
|
useKeyboard: this.enableKeyEvents && !this.handleSelect,
|
||||||
minScrollbarLength: 40,
|
minScrollbarLength : 40
|
||||||
alwaysVisibleY: true
|
});
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}).on('show:after', function(btn, e) {
|
|
||||||
var mnu = $(this.el).find('.dropdown-menu '),
|
|
||||||
docH = Common.Utils.innerHeight(),
|
|
||||||
menuH = mnu.outerHeight(),
|
|
||||||
top = parseInt(mnu.css('top'));
|
|
||||||
|
|
||||||
if (menuH > docH) {
|
|
||||||
mnu.css('max-height', (docH - parseInt(mnu.css('padding-top')) - parseInt(mnu.css('padding-bottom'))-5) + 'px');
|
|
||||||
this.scroller.update({minScrollbarLength : 40});
|
|
||||||
} else if ( mnu.height() < this.options.restoreHeight ) {
|
|
||||||
mnu.css('max-height', (Math.min(docH - parseInt(mnu.css('padding-top')) - parseInt(mnu.css('padding-bottom'))-5, this.options.restoreHeight)) + 'px');
|
|
||||||
menuH = mnu.outerHeight();
|
|
||||||
if (top+menuH > docH) {
|
|
||||||
mnu.css('top', 0);
|
|
||||||
}
|
|
||||||
this.scroller.update({minScrollbarLength : 40});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
this.mnuColorSchema.items = [];
|
this.mnuColorSchema.items = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue