Commit eaca1954 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

context menu visualization fixed - it's slightly different in bootstrap 4

parent 5a19f11e
Pipeline #12734 passed with stage
in 20 minutes and 38 seconds
......@@ -11,6 +11,7 @@ minerva (14.0.0~alpha.1) unstable; urgency=low
* Bug fix: upload of invalid plugin doesn't add it to plugin tab and list of
loaded plugins (#885)
* Bug fix: link to molart was brokwn (#886)
* Bug fix: context menu visualization fixed
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 12 Aug 2019 10:00:00 +0200
......
......@@ -43,7 +43,7 @@ function ContextMenu(params) {
self._documentClickListener = function (e) {
var className = e.target.className;
if (typeof className === 'string' || className instanceof String) {
if (className.indexOf("dropdown-link") === -1) {
if (className.indexOf("dropdown-item") === -1) {
self.hide(new Date().getTime() - self.MIN_SHOW_TIME);
}
} else {
......@@ -83,13 +83,12 @@ ContextMenu.prototype.addOption = function (name, handler, disabled) {
});
var link = Functions.createElement({
type: "a",
className: "dropdown-link",
className: "dropdown-item",
href: "#",
content: name
});
if (!disabled) {
link.href = "#";
} else {
link.className = 'disabled-link';
if (disabled) {
link.className = 'dropdown-item disabled';
}
$(link).data("handler", handler);
option.appendChild(link);
......
......@@ -30,7 +30,7 @@ SubMenu.prototype._createGui = function (params) {
var link = Functions.createElement({
type: "a",
href: "#",
className: "dropdown-link",
className: "dropdown-item",
content: params.name
});
link.tabIndex = -1;
......@@ -55,7 +55,7 @@ SubMenu.prototype.addOption = function (name, handler) {
var link = Functions.createElement({
type: "a",
href: "#",
className: "dropdown-link",
className: "dropdown-item",
content: name
});
$(link).data("handler", handler);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment