[DE][PE][SSE] Update bootstrap (fixed opening context menu when clicking on items, added 'dropdown-item' class)
This commit is contained in:
parent
fd37831b46
commit
b767be56c0
|
@ -690,7 +690,7 @@ define([
|
||||||
|
|
||||||
this.id = this.options.id || Common.UI.getId();
|
this.id = this.options.id || Common.UI.getId();
|
||||||
this.itemTemplate = this.options.itemTemplate || _.template([
|
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 canFocused !== "undefined") { %> tabindex="-1" type="menuitem" <% } %>',
|
||||||
'<% if(typeof stopPropagation !== "undefined") { %> data-stopPropagation="true" <% } %>',
|
'<% if(typeof stopPropagation !== "undefined") { %> data-stopPropagation="true" <% } %>',
|
||||||
'class="<% if (checked) { %> checked <% } %>" >',
|
'class="<% if (checked) { %> checked <% } %>" >',
|
||||||
|
|
|
@ -96,7 +96,7 @@ define([
|
||||||
if (!menu.rendered) {
|
if (!menu.rendered) {
|
||||||
// Prepare menu container
|
// Prepare menu container
|
||||||
if (menuContainer.length < 1) {
|
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);
|
$(me.el).append(menuContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,6 +106,12 @@ define([
|
||||||
//position without popper
|
//position without popper
|
||||||
menu.cmpEl.data('display', 'static');
|
menu.cmpEl.data('display', 'static');
|
||||||
menu.cmpEl.css({'position': 'fixed'});
|
menu.cmpEl.css({'position': 'fixed'});
|
||||||
|
|
||||||
|
menu.cmpEl.on('click.bs.dropdown', function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopImmediatePropagation();
|
||||||
|
Common.UI.Menu.Manager.hideAll();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
menuContainer.css({
|
menuContainer.css({
|
||||||
|
@ -2869,7 +2875,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var langTemplate = _.template([
|
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>',
|
'<i class="icon <% if (spellcheck) { %> toolbar__icon btn-ic-docspell spellcheck-lang <% } %>"></i>',
|
||||||
'<%= caption %>',
|
'<%= caption %>',
|
||||||
'</a>'
|
'</a>'
|
||||||
|
|
|
@ -98,6 +98,12 @@ define([
|
||||||
//position without popper
|
//position without popper
|
||||||
menu.cmpEl.data('display', 'static');
|
menu.cmpEl.data('display', 'static');
|
||||||
menu.cmpEl.css({'position': 'fixed'});
|
menu.cmpEl.css({'position': 'fixed'});
|
||||||
|
|
||||||
|
menu.cmpEl.on('click.bs.dropdown', function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopImmediatePropagation();
|
||||||
|
Common.UI.Menu.Manager.hideAll();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
menuContainer.css({
|
menuContainer.css({
|
||||||
|
|
|
@ -2058,6 +2058,12 @@ define([
|
||||||
//position without popper
|
//position without popper
|
||||||
menu.cmpEl.data('display', 'static');
|
menu.cmpEl.data('display', 'static');
|
||||||
menu.cmpEl.css({'position': 'fixed'});
|
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) {
|
if (/*!this.mouse.isRightButtonDown &&*/ event.button !== 2) {
|
||||||
|
|
|
@ -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: relative;">'+
|
||||||
'<div style="position: absolute; left: 0; width: 100px;"><%= caption %></div>' +
|
'<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>' +
|
'<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>' +
|
||||||
|
|
Loading…
Reference in a new issue