MDL-59388 calendar: Add data-time to calendar navigation links
This commit is contained in:
committed by
Simey Lameze
parent
def443a086
commit
b16dca435a
+10
-2
@@ -2173,7 +2173,11 @@ function calendar_get_link_previous($text, $linkbase, $d, $m, $y, $accesshide =
|
||||
return $text;
|
||||
}
|
||||
|
||||
return link_arrow_left($text, (string)$href, $accesshide, 'previous');
|
||||
$attrs = [
|
||||
'data-time' => calendar_get_timestamp($d, $m, $y, $time),
|
||||
];
|
||||
|
||||
return link_arrow_left($text, $href->out(false), $accesshide, 'previous', $attrs);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2196,7 +2200,11 @@ function calendar_get_link_next($text, $linkbase, $d, $m, $y, $accesshide = fals
|
||||
return $text;
|
||||
}
|
||||
|
||||
return link_arrow_right($text, (string)$href, $accesshide, 'next');
|
||||
$attrs = [
|
||||
'data-time' => calendar_get_timestamp($d, $m, $y, $time),
|
||||
];
|
||||
|
||||
return link_arrow_right($text, $href->out(false), $accesshide, 'next', $attrs);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user