Key shortcut to media timeline

merge-requests/30/head
Bob Mottram 2021-04-23 13:24:34 +01:00
parent 4b904c8f33
commit 5d4ed5b741
2 changed files with 9 additions and 5 deletions

View File

@ -43,7 +43,8 @@ def headerButtonsTimeline(defaultTimeline: str,
calendarPath: str, calendarPath: str,
calendarImage: str, calendarImage: str,
followApprovals: str, followApprovals: str,
iconsAsButtons: bool) -> str: iconsAsButtons: bool,
accessKeys: {}) -> str:
"""Returns the header at the top of the timeline, containing """Returns the header at the top of the timeline, containing
buttons for inbox, outbox, search, calendar, etc buttons for inbox, outbox, search, calendar, etc
""" """
@ -53,7 +54,9 @@ def headerButtonsTimeline(defaultTimeline: str,
if defaultTimeline == 'tlmedia': if defaultTimeline == 'tlmedia':
tlStr += \ tlStr += \
'<a href="' + usersPath + \ '<a href="' + usersPath + \
'/tlmedia" tabindex="-1"><button class="' + \ '/tlmedia" tabindex="-1" ' + \
'accesskey="' + accessKeys['menuMedia'] + '"' + \
'><button class="' + \
mediaButton + '"><span>' + translate['Media'] + \ mediaButton + '"><span>' + translate['Media'] + \
'</span></button></a>' '</span></button></a>'
elif defaultTimeline == 'tlblogs': elif defaultTimeline == 'tlblogs':

View File

@ -269,7 +269,8 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
# show follow approvals icon # show follow approvals icon
followApprovals = \ followApprovals = \
'<a href="' + usersPath + \ '<a href="' + usersPath + \
'/followers#buttonheader">' + \ '/followers#buttonheader" ' + \
'accesskey="' + accessKeys['followButton'] + '">' + \
'<img loading="lazy" ' + \ '<img loading="lazy" ' + \
'class="timelineicon" alt="' + \ 'class="timelineicon" alt="' + \
translate['Approve follow requests'] + \ translate['Approve follow requests'] + \
@ -515,7 +516,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
domain, timelineStartTime, domain, timelineStartTime,
newCalendarEvent, calendarPath, newCalendarEvent, calendarPath,
calendarImage, followApprovals, calendarImage, followApprovals,
iconsAsButtons) iconsAsButtons, accessKeys)
# start the timeline # start the timeline
tlStr += '<table class="timeline">\n' tlStr += '<table class="timeline">\n'
@ -555,7 +556,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
domain, timelineStartTime, domain, timelineStartTime,
newCalendarEvent, calendarPath, newCalendarEvent, calendarPath,
calendarImage, followApprovals, calendarImage, followApprovals,
iconsAsButtons) iconsAsButtons, accessKeys)
tlStr += ' <div id="timelineposts" class="timeline-posts">\n' tlStr += ' <div id="timelineposts" class="timeline-posts">\n'