[DE][PE][SSE] Update bootstrap (fixed opening context menu when clicking on items, added 'dropdown-item' class)

This commit is contained in:
JuliaSvinareva 2020-12-09 18:43:36 +03:00
parent fd37831b46
commit b767be56c0
5 changed files with 22 additions and 4 deletions

View file

@ -690,7 +690,7 @@ define([
this.id = this.options.id || Common.UI.getId();
this.itemTemplate = this.options.itemTemplate || _.template([
'<a id="<%= id %>" <% if(typeof style !== "undefined") { %> style="<%= style %>" <% } %>',
'<a id="<%= id %>" class="dropdown-item" <% if(typeof style !== "undefined") { %> style="<%= style %>" <% } %>',
'<% if(typeof canFocused !== "undefined") { %> tabindex="-1" type="menuitem" <% } %>',
'<% if(typeof stopPropagation !== "undefined") { %> data-stopPropagation="true" <% } %>',
'class="<% if (checked) { %> checked <% } %>" >',

View file

@ -96,7 +96,7 @@ define([
if (!menu.rendered) {
// Prepare menu container
if (menuContainer.length < 1) {
menuContainer = $(Common.Utils.String.format('<div id="menu-container-{0}" style="position: absolute; z-index: 10000;"><div class="dropdown-toggle" data-toggle="dropdown"></div></div>', menu.id));
menuContainer = $(Common.Utils.String.format('<div id="menu-container-{0}" class="dropdown" style="position: absolute; z-index: 10000;"><a class="dropdown-toggle d-none" data-toggle="dropdown" href="#" role="button"></a></div>', menu.id));
$(me.el).append(menuContainer);
}
@ -106,6 +106,12 @@ define([
//position without popper
menu.cmpEl.data('display', 'static');
menu.cmpEl.css({'position': 'fixed'});
menu.cmpEl.on('click.bs.dropdown', function (event) {
event.preventDefault();
event.stopImmediatePropagation();
Common.UI.Menu.Manager.hideAll();
});
}
menuContainer.css({
@ -2869,7 +2875,7 @@ define([
});
var langTemplate = _.template([
'<a id="<%= id %>" tabindex="-1" type="menuitem" style="padding-left: 28px !important;" langval="<%= value %>" class="<% if (checked) { %> checked <% } %>">',
'<a id="<%= id %>" class="dropdown-item" tabindex="-1" type="menuitem" style="padding-left: 28px !important;" langval="<%= value %>" class="<% if (checked) { %> checked <% } %>">',
'<i class="icon <% if (spellcheck) { %> toolbar__icon btn-ic-docspell spellcheck-lang <% } %>"></i>',
'<%= caption %>',
'</a>'

View file

@ -98,6 +98,12 @@ define([
//position without popper
menu.cmpEl.data('display', 'static');
menu.cmpEl.css({'position': 'fixed'});
menu.cmpEl.on('click.bs.dropdown', function (event) {
event.preventDefault();
event.stopImmediatePropagation();
Common.UI.Menu.Manager.hideAll();
});
}
menuContainer.css({

View file

@ -2058,6 +2058,12 @@ define([
//position without popper
menu.cmpEl.data('display', 'static');
menu.cmpEl.css({'position': 'fixed'});
menu.cmpEl.on('click.bs.dropdown', function (event) {
event.preventDefault();
event.stopImmediatePropagation();
Common.UI.Menu.Manager.hideAll();
});
}
if (/*!this.mouse.isRightButtonDown &&*/ event.button !== 2) {

View file

@ -435,7 +435,7 @@ define([
})
});
var numFormatTemplate = _.template('<a id="<%= id %>" tabindex="-1" type="menuitem">'+
var numFormatTemplate = _.template('<a class="dropdown-item" id="<%= id %>" tabindex="-1" type="menuitem">'+
'<div style="position: relative;">'+
'<div style="position: absolute; left: 0; width: 100px;"><%= caption %></div>' +
'<label style="width: 100%; max-width: 300px; overflow: hidden; text-overflow: ellipsis; text-align: right; vertical-align: bottom; padding-left: 100px; color: silver;cursor: pointer;"><%= options.exampleval ? options.exampleval : "" %></label>' +