Fix attachment options menu

pull/5742/merge
Aleksander Machniak 8 years ago
parent 997c4d3de4
commit 98a0c1a07e

@ -241,7 +241,7 @@
</ul> </ul>
</div> </div>
<div id="attachment-menu" class="popupmenu" data-popup-init="attachmentmenu"> <div id="attachmentmenu" class="popupmenu">
<h3 id="aria-label-attachmentmenu" class="voice"><roundcube:label name="arialabelattachmentmenu" /></h3> <h3 id="aria-label-attachmentmenu" class="voice"><roundcube:label name="arialabelattachmentmenu" /></h3>
<ul class="toolbarmenu listing" role="menu" aria-labelledby="aria-label-attachmentmenu"> <ul class="toolbarmenu listing" role="menu" aria-labelledby="aria-label-attachmentmenu">
<roundcube:button command="open-attachment" id="attachmenuopen" type="link-menuitem" label="open" class="extwin" classAct="extwin active" /> <roundcube:button command="open-attachment" id="attachmenuopen" type="link-menuitem" label="open" class="extwin" classAct="extwin active" />

@ -1,5 +1,5 @@
<roundcube:add_label name="errortitle" /> <roundcube:add_label name="errortitle" />
<roundcube:add_label name="options" />
<roundcube:object name="doctype" value="html5" /> <roundcube:object name="doctype" value="html5" />
<roundcube:if condition="!env:framed || env:extwin" /> <roundcube:if condition="!env:framed || env:extwin" />
<html> <html>

@ -44,9 +44,9 @@
</div> </div>
<!-- popup menus --> <!-- popup menus -->
<div id="attachment-menu" class="popupmenu" data-popup-init="attachmentmenu"> <div id="attachmentmenu" class="popupmenu">
<h3 id="aria-label-attachment-menu" class="voice"><roundcube:label name="arialabelattachmentmenu" /></h3> <h3 id="aria-label-attachmentmenu" class="voice"><roundcube:label name="arialabelattachmentmenu" /></h3>
<ul class="toolbarmenu listing" role="menu" aria-labelledby="aria-label-attachment-menu"> <ul class="toolbarmenu listing" role="menu" aria-labelledby="aria-label-attachmentmenu">
<roundcube:button command="open-attachment" id="attachmenuopen" type="link-menuitem" label="open" class="extwin" classAct="extwin active" /> <roundcube:button command="open-attachment" id="attachmenuopen" type="link-menuitem" label="open" class="extwin" classAct="extwin active" />
<roundcube:button command="download-attachment" id="attachmenudownload" type="link-menuitem" label="download" class="download" classAct="download active" /> <roundcube:button command="download-attachment" id="attachmenudownload" type="link-menuitem" label="download" class="download" classAct="download active" />
<roundcube:container name="attachmentmenu" id="attachmentoptionsmenu" /> <roundcube:container name="attachmentmenu" id="attachmentoptionsmenu" />

@ -1254,17 +1254,21 @@ function rcube_elastic_ui()
item = $(item); item = $(item);
if (!item.children('.drop').length) { if (!item.children('.drop').length) {
var label = rcmail.gettext('options');
var button = $('<a>') var button = $('<a>')
.attr({ .attr({
href: '#', href: '#',
tabindex: 0, tabindex: 0,
'class': 'button icon dropdown skip-content', title: label,
'data-popup': 'attachment-menu', 'class': 'button icon dropdown skip-content'
}) })
.append($('<span class="inner">').text('Show options')) // TODO: Localize "Show options" .on('click keypress', function(e) {
if (e.type != 'keypress' || rcube_event.get_keycode(e) == 13) {
attachmentmenu($('#attachmentmenu'), button, e);
}
})
.append($('<span>').attr('class', 'inner').text(label))
.appendTo(item); .appendTo(item);
popup_init(button);
} }
}; };

Loading…
Cancel
Save