mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
Fixed popovers in Bootstrap v4
This commit is contained in:
parent
d166dda229
commit
5a7bb092c7
5 changed files with 12 additions and 245 deletions
|
@ -73,7 +73,7 @@ OperationsWaiter.prototype.searchOperations = function(e) {
|
|||
|
||||
while (searchResultsEl.firstChild) {
|
||||
try {
|
||||
$(searchResultsEl.firstChild).popover("destroy");
|
||||
$(searchResultsEl.firstChild).popover("dispose");
|
||||
} catch (err) {}
|
||||
searchResultsEl.removeChild(searchResultsEl.firstChild);
|
||||
}
|
||||
|
@ -231,13 +231,13 @@ OperationsWaiter.prototype.editFavouritesClick = function(e) {
|
|||
onFilter: function (evt) {
|
||||
const el = editableList.closest(evt.item);
|
||||
if (el && el.parentNode) {
|
||||
$(el).popover("destroy");
|
||||
$(el).popover("dispose");
|
||||
el.parentNode.removeChild(el);
|
||||
}
|
||||
},
|
||||
onEnd: function(evt) {
|
||||
if (this.removeIntent) {
|
||||
$(evt.item).popover("destroy");
|
||||
$(evt.item).popover("dispose");
|
||||
evt.item.remove();
|
||||
}
|
||||
}.bind(this),
|
||||
|
|
|
@ -94,9 +94,15 @@ RecipeWaiter.prototype.createSortableSeedList = function(listEl) {
|
|||
// Removes popover element and event bindings from the dragged operation but not the
|
||||
// event bindings from the one left in the operations list. Without manually removing
|
||||
// these bindings, we cannot re-initialise the popover on the stub operation.
|
||||
$(evt.item).popover("destroy").removeData("bs.popover").off("mouseenter").off("mouseleave");
|
||||
$(evt.clone).off(".popover").removeData("bs.popover");
|
||||
evt.item.setAttribute("data-toggle", "popover-disabled");
|
||||
$(evt.item)
|
||||
.popover("dispose")
|
||||
.removeData("bs.popover")
|
||||
.off("mouseenter")
|
||||
.off("mouseleave")
|
||||
.attr("data-toggle", "popover-disabled");
|
||||
$(evt.clone)
|
||||
.off(".popover")
|
||||
.removeData("bs.popover");
|
||||
},
|
||||
onEnd: this.opSortEnd.bind(this)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue