accessibility improvements and other stuff
This commit is contained in:
parent
0ec7fc4500
commit
ff4c6be547
@ -3,6 +3,7 @@ function AdditionalDetailWidget(parent)
|
||||
this.Parent = parent;
|
||||
this.Show = function ()
|
||||
{
|
||||
this.OnOpening();
|
||||
System.ClassList.Add(this.Parent, "apb-selected");
|
||||
};
|
||||
this.Hide = function ()
|
||||
@ -11,9 +12,18 @@ function AdditionalDetailWidget(parent)
|
||||
};
|
||||
this.Toggle = function ()
|
||||
{
|
||||
if (!System.ClassList.Contains(this.Parent, "apb-selected"))
|
||||
{
|
||||
this.OnOpening();
|
||||
}
|
||||
System.ClassList.Toggle(this.Parent, "apb-selected");
|
||||
};
|
||||
|
||||
this.OnOpening = function()
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
this.TextLink = parent.childNodes[0];
|
||||
this.ButtonLink = parent.childNodes[1];
|
||||
|
||||
|
||||
@ -1,5 +1,17 @@
|
||||
function Alert(parentElement)
|
||||
{
|
||||
this.ParentElement = parentElement;
|
||||
this.IconElement = this.ParentElement.children[0];
|
||||
this.IconElement.NativeObject = this;
|
||||
this.IconElement.addEventListener("click", function()
|
||||
{
|
||||
if (System.ClassList.Contains(this.NativeObject.ParentElement, "uwt-collapsible"))
|
||||
{
|
||||
System.ClassList.Toggle(this.NativeObject.ParentElement, "uwt-collapsed");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.mvarTitle = "";
|
||||
this.setTitle = function(value)
|
||||
{
|
||||
@ -137,6 +149,7 @@ 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]);
|
||||
if (!System.ClassList.Contains(items[i], "uwt-alert-sticky"))
|
||||
{
|
||||
items[i].style.right = "-2000px";
|
||||
|
||||
@ -1,48 +1,39 @@
|
||||
function Disclosure(parentElement)
|
||||
{
|
||||
this.ParentElement = parentElement;
|
||||
|
||||
parentElement.childNodes[0].childNodes[0].addEventListener("click", function(e)
|
||||
this.TitleElement = this.ParentElement.children[0];
|
||||
this.TitleElement.NativeObject = this;
|
||||
this.TitleElement.addEventListener("click", function(e)
|
||||
{
|
||||
parentElement.NativeObject.ToggleExpanded();
|
||||
this.NativeObject.toggleExpanded();
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
|
||||
this.mvarExpanded = (parentElement.attributes["data-expanded"] != null ? parentElement.attributes["data-expanded"].value == "true" : false);
|
||||
this.GetExpanded = function()
|
||||
this.getExpanded = function()
|
||||
{
|
||||
return this.mvarExpanded;
|
||||
return System.ClassList.Contains(this.ParentElement, "uwt-expanded");
|
||||
};
|
||||
this.SetExpanded = function(value)
|
||||
this.setExpanded = function(value)
|
||||
{
|
||||
this.mvarExpanded = value;
|
||||
this.Refresh();
|
||||
};
|
||||
this.ToggleExpanded = function()
|
||||
if (value)
|
||||
{
|
||||
this.SetExpanded(!this.GetExpanded());
|
||||
};
|
||||
|
||||
this.Refresh = function()
|
||||
{
|
||||
var disclosure = this.ParentElement;
|
||||
if (this.GetExpanded())
|
||||
{
|
||||
disclosure.className = "Disclosure Expanded";
|
||||
disclosure.attributes["data-expanded"].value = "true";
|
||||
System.ClassList.Add(this.ParentElement, "uwt-expanded");
|
||||
}
|
||||
else
|
||||
{
|
||||
disclosure.className = "Disclosure";
|
||||
disclosure.attributes["data-expanded"].value = "false";
|
||||
System.ClassList.Remove(this.ParentElement, "uwt-expanded");
|
||||
}
|
||||
};
|
||||
this.toggleExpanded = function()
|
||||
{
|
||||
this.setExpanded(!this.getExpanded());
|
||||
};
|
||||
}
|
||||
window.addEventListener("load", function(e)
|
||||
{
|
||||
var items = document.getElementsByClassName("Disclosure");
|
||||
var items = document.getElementsByClassName("uwt-disclosure");
|
||||
for (var i = 0; i < items.length; i++)
|
||||
{
|
||||
items[i].NativeObject = new Disclosure(items[i]);
|
||||
|
||||
@ -1307,5 +1307,8 @@
|
||||
|
||||
\date_default_timezone_set(System::GetConfigurationValue("System.DefaultTimezone", date_default_timezone_get()));
|
||||
|
||||
session_start();
|
||||
if (!session_start())
|
||||
{
|
||||
echo ("session_start didn't work!");
|
||||
}
|
||||
?>
|
||||
|
||||
@ -372,7 +372,7 @@
|
||||
$guidChars .= "}";
|
||||
return $guidChars;
|
||||
}
|
||||
public function __toStringFormat($includeDashes = false, $prefix = "{", $suffix = "}")
|
||||
public function __toStringFormat($includeDashes = true, $prefix = "{", $suffix = "}")
|
||||
{
|
||||
$guidChars = $prefix;
|
||||
$guidChars .= UUID::HexsToChars($this->_a >> 24, $this->_a >> 16);
|
||||
|
||||
@ -128,7 +128,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ("<a class=\"apb-text apb-empty\" href=\"#\">" . $this->Text . "</span>");
|
||||
echo ("<a class=\"apb-text apb-empty\" href=\"\">" . $this->Text . "</a>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user