Fix attachment options menu

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

@ -241,7 +241,7 @@
</ul>
</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>
<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" />

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

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

@ -1254,17 +1254,21 @@ function rcube_elastic_ui()
item = $(item);
if (!item.children('.drop').length) {
var label = rcmail.gettext('options');
var button = $('<a>')
.attr({
href: '#',
tabindex: 0,
'class': 'button icon dropdown skip-content',
'data-popup': 'attachment-menu',
title: label,
'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);
popup_init(button);
}
};

Loading…
Cancel
Save