Commit 422e08ab authored by alexeyomelchenko's avatar alexeyomelchenko Committed by Alexey Omelchenko

Bug 1646229: eliminate MochiKit admin/site

behatnotneeded: same functionality

Change-Id: Ief98a0a2e5dfdac29518cad06348566f8925213b
Signed-off-by: 's avataralexeyomelchenko <alexeyomelchenko@catalyst.net.nz>
parent 08b6177d
......@@ -138,22 +138,23 @@ $pagination = build_pagination(array(
));
$js = <<< EOF
addLoadEvent(function () {
jQuery(function ($) {
p = {$pagination['javascript']}
EOF;
if ($offset > 0) {
$js .= <<< EOF
if ($('fontlist')) {
getFirstElementByTagAndClassName('a', null, 'fontlist').focus();
if ($('#fontlist').length) {
$('#fontlist a:first').focus();
}
EOF;
}
else {
$js .= <<< EOF
if ($('searchresultsheading')) {
addElementClass('searchresultsheading', 'hidefocus');
setNodeAttribute('searchresultsheading', 'tabIndex', 0);
$('searchresultsheading').focus();
if ($('#searchresultsheading').length) {
$('#searchresultsheading')
.addClass('hidefocus')
.prop('tabIndex', 0)
.focus();
}
EOF;
}
......
This diff is collapsed.
......@@ -34,22 +34,23 @@ else {
}
$js = <<< EOF
addLoadEvent(function () {
jQuery(function($) {
p = {$pagination['javascript']}
EOF;
if ($offset > 0) {
$js .= <<< EOF
if ($('myviews')) {
getFirstElementByTagAndClassName('a', null, 'myviews'). focus();
if ($('#myviews')) {
$('#myviews a:first').focus();
}
EOF;
}
else {
$js .= <<< EOF
if ($('searchresultsheading')) {
addElementClass('searchresultsheading', 'hidefocus');
setNodeAttribute('searchresultsheading', 'tabIndex', -1);
$('searchresultsheading').focus();
if ($('#searchresultsheading').length) {
$('#searchresultsheading')
.addClass('hidefocus')
.prop('tabIndex', -1)
.focus();
}
EOF;
}
......
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