blob: a6663a3dc5a322fbbb05ccab7506a1fa57901fe5 (
plain)
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
31
32
33
34
35
|
<?php
// can't use the ipsum because it includes html when wrapping views.
$message = elgg_view('output/url', array(
'text' => 'Show system message (system_message())',
'is_trusted' => true,
'href' => '#',
'id' => 'developers-system-message',
// 'onclick' => "elgg.system_message('Elgg System Message');"
));
$error = elgg_view('output/url', array(
'text' => 'Show error message (register_error())',
'is_trusted' => true,
'href' => '#',
'id' => 'developers-error-message',
));
?>
<script type="text/javascript">
$(function() {
$('#developers-system-message').click(function() {
elgg.system_message('Elgg System Message');
})
$('#developers-error-message').click(function() {
elgg.register_error('Elgg Error Message');
})
});
</script>
<ul>
<li><?php echo $message; ?></li>
<li><?php echo $error; ?></li>
</ul>
|