/
dialog_box.mc
30 lines (30 loc) · 1.19 KB
/
dialog_box.mc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<div class="dialog-box" id="<% $id %>">
<div class="dragger" onmousedown="beginDrag(event, this.parentNode);">
<button class="dclose" title="<% $lang->maketext('Close this dialog box') . ' ' . $lang->maketext('(Access Key: c)') %>" accesskey="c" onclick="return closeDialog(document.getElementById('<% $id %>'));">×</button>
<% $lang->maketext($title) %>
</div>
<div class="dialogcontent">
<%perl>;
$m->print($m->content, qq{<ul class="buttons">\n});
for my $button (@buttons) {
$m->print(
qq{ <li><button class="button" title="},
$lang->maketext($button->{title}), ' ',
$lang->maketext('(Access Key: [_1])', $button->{accesskey}),
qq{" accesskey="$button->{accesskey}"},
qq{ onclick="$button->{onclick}">},
$lang->maketext($button->{label}),
"</button></li>\n"
);
}
</%perl>
<li><button class="button" title="<% $lang->maketext('Close this dialog box') . ' ' . $lang->maketext('(Access Key: c)') %>" accesskey="c" onclick="return closeDialog('<% $id %>');"><% $lang->maketext($close_label) %></button></li>
</ul>
</div>
</div>
<%args>
$id
$title => 'Bricolage Dialog Box'
$close_label => 'Cancel'
@buttons => ()
</%args>