fix delay in enabling Alert extended functionality
This commit is contained in:
parent
83c02a2773
commit
dc8ba8fe3c
@ -5,6 +5,7 @@ function Alert(parentElement)
|
||||
this.ParentElement = parentElement;
|
||||
this.IconElement = this.ParentElement.children[0];
|
||||
this.IconElement.NativeObject = this;
|
||||
System.ClassList.Remove(this.ParentElement, "uwt-disabled");
|
||||
this.IconElement.addEventListener("click", function()
|
||||
{
|
||||
if (System.ClassList.Contains(this.NativeObject.ParentElement, "uwt-collapsible"))
|
||||
@ -145,13 +146,17 @@ Alert.show = function(content, title, cssClass, timeoutInMilliseconds)
|
||||
|
||||
window.addEventListener("load", function()
|
||||
{
|
||||
var items = document.getElementsByClassName("uwt-alert");
|
||||
for (var i = 0; i < items.length; i++)
|
||||
{
|
||||
items[i].NativeObject = new Alert(items[i]);
|
||||
}
|
||||
|
||||
window.setTimeout(function()
|
||||
{
|
||||
var items = document.getElementsByClassName("uwt-alert");
|
||||
for (var i = 0; i < items.length; i++)
|
||||
{
|
||||
items[i].NativeObject = new Alert(items[i]);
|
||||
if (!System.ClassList.Contains(items[i], "uwt-alert-sticky"))
|
||||
{
|
||||
items[i].style.right = "-2000px";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user