You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In line with https://github.com/kiwix/kiwix-js/pull/467/files#r247345420, we need to find a way to make Bootstrap alerts remain in the DOM (and hide them when not shown) rather than allowing Bootstrap to remove them from the DOM (which is the native Bootstrap behaviour). This avoids having to re-create the alert in JavaScript each time we wish to display it.
The text was updated successfully, but these errors were encountered:
mossroy
changed the title
Find a way to make the html for Bootstrap alerts persistent
Find a way to make the html for Bootstrap alerts persistent, and avoid putting HTML code in uiUtil.js
Mar 2, 2019
@mossroy, you may have missed it, but in #527 I pointed out that this issue could be closed very easily by adopting one of the commits from that PR, and it may be worth doing it for #525 release. I copy the comment below for convenience:
FYI Commit c463ba4 is a proposed fix for #470, i.e., we no longer have to create the alert boxes' html in code each time we want to display them.
However, as you can see, it doesn't save any code; on the contrary, it adds to the amount of code, because we have to implement an override on Bootstrap's own .alert('close') function. The only advantage of this code is that it maintains the separation between html and code, but at the cost of a little bit more complexity.
This commit (as opposed to the whole PR) could be added to a separate branch and we could have a PR on it as a solution to #470, if you'd prefer to do it that way, @mossroy . Just let me know, and also let me know if you think this way of doing it is better than what it replaces (just focus on commit c463ba4).
In line with https://github.com/kiwix/kiwix-js/pull/467/files#r247345420, we need to find a way to make Bootstrap alerts remain in the DOM (and hide them when not shown) rather than allowing Bootstrap to remove them from the DOM (which is the native Bootstrap behaviour). This avoids having to re-create the alert in JavaScript each time we wish to display it.
The text was updated successfully, but these errors were encountered: