[SSE] Update bootstrap (fix tab menu, fix disable buttons)

This commit is contained in:
JuliaSvinareva 2020-10-29 20:49:05 +03:00
parent c511a8e6cf
commit 992929c99a
4 changed files with 17 additions and 6 deletions

View file

@ -290,11 +290,13 @@ define([
hide: function() { hide: function() {
if (this.rendered && this.parentEl) { if (this.rendered && this.parentEl) {
if ( this.parentEl.hasClass('show') ) if ( this.parentEl.hasClass('show') ){
this.cmpEl.dropdown('toggle'); this.parentEl.removeClass('show');
else if (this.parentEl.hasClass('over')) this.parentEl.find('.dropdown-menu').removeClass('show');
} else if (this.parentEl.hasClass('over')) {
this.parentEl.removeClass('over'); this.parentEl.removeClass('over');
} }
}
}, },
insertItem: function(index, item) { insertItem: function(index, item) {

View file

@ -649,7 +649,7 @@ define([
//left = tab.position().left; //left = tab.position().left;
//right = left + tab.width(); //right = left + tab.width();
return !(left < leftbound) && !(right - rightbound > 0.5); return !(leftbound - left > 0.5) && !(right - rightbound > 0.5);
} }
return false; return false;

View file

@ -624,7 +624,7 @@ define([
!this.mode.isDisconnected ) { !this.mode.isDisconnected ) {
if (tab && tab.sheetindex >= 0) { if (tab && tab.sheetindex >= 0) {
var rect = tab.$el.get(0).getBoundingClientRect(), var rect = tab.$el.get(0).getBoundingClientRect(),
childPos = tab.$el.offset(), tabPos = tab.$el.position(),
parentPos = tab.$el.parent().offset(); parentPos = tab.$el.parent().offset();
if (!tab.isActive()) this.tabbar.setActive(tab); if (!tab.isActive()) this.tabbar.setActive(tab);
@ -671,6 +671,11 @@ define([
})(); })();
this.tabMenu.hide(); this.tabMenu.hide();
this.tabMenu.cmpEl.dropdown('dispose').dropdown({
boundary: $('#viewport')[0],
reference: this.tabMenu.$el,
offset: tabPos.left + ',-5'
});
this.tabMenu.show(); this.tabMenu.show();
var menu = this.tabMenu; var menu = this.tabMenu;
_.defer(function(){ _.defer(function(){

View file

@ -138,7 +138,7 @@
#status-sheets-bar-box { #status-sheets-bar-box {
position: absolute; position: absolute;
overflow: hidden; //overflow: hidden;
height: 32px; height: 32px;
left: 112px; left: 112px;
right: 160px; right: 160px;
@ -157,6 +157,10 @@
height: 100%; height: 100%;
display: flex; display: flex;
&.nav {
flex-wrap: nowrap;
}
> li { > li {
background-color: @gray-light; background-color: @gray-light;