Changeset 4396
- Timestamp:
- 07/13/07 22:05:28 (6 years ago)
- Files:
-
- modules/branches/2.3/dashboard/dashboard.css (modified) (1 diff)
- modules/branches/2.3/dashboard/page.index.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.3/dashboard/dashboard.css
r4360 r4396 93 93 padding-left:2px; 94 94 } 95 #syslog ul li .notif y_ignore_btn{95 #syslog ul li .notification_buttons { 96 96 position:absolute; 97 97 right:0; 98 98 top:0; 99 } 100 #syslog ul li .notification_buttons a { 101 cursor:pointer; 99 102 } 100 103 #syslog ul li.notify_critical { modules/branches/2.3/dashboard/page.index.php
r4376 r4396 345 345 346 346 $out .= '<h4 class="syslog_text"><span>'.$item['display_text'].'</span>'; 347 $out .= '<div class="notification_buttons">'; 348 if (isset($item['candelete']) && $item['candelete']) { 349 $out .= '<a class="notify_ignore_btn" title="'._('Delete this').'" '. 350 'onclick="delete_notification(\''.$domid.'\', \''.$item['module'].'\', \''.$item['id'].'\');">'. 351 '<img src="images/cancel.png" width="16" height="16" border="0" alt="'._('Delete this').'" /></a>'; 352 } 347 353 if (!$item['reset']) { 348 354 $out .= '<a class="notify_ignore_btn" title="'._('Ignore this').'" '. … … 350 356 '<img src="'.dirname($_SERVER['PHP_SELF']).'/images/notify_delete.png" width="16" height="16" border="0" alt="'._('Ignore this').'" /></a>'; 351 357 } 358 $out .= '</div>'; 352 359 $out .= '</h4>'; 353 360 … … 387 394 if (isset($_REQUEST['module']) && $_REQUEST['id']) { 388 395 $notify->reset($_REQUEST['module'], $_REQUEST['id']); 396 } 397 } 398 function do_syslog_delete() { 399 global $db; 400 $notify =& notifications::create($db); 401 402 if (isset($_REQUEST['module']) && $_REQUEST['id']) { 403 var_dump($_REQUEST); 404 $notify->safe_delete($_REQUEST['module'], $_REQUEST['id']); 389 405 } 390 406 } … … 489 505 $.post('config.php', {display:'<?php echo $module_page; ?>', quietmode:1, info:'syslog_ack', module:module, id:id}); 490 506 } 507 function delete_notification(domid, module, id) { 508 $('#'+domid).fadeOut('slow'); 509 $.post('config.php', {display:'<?php echo $module_page; ?>', quietmode:1, info:'syslog_delete', module:module, id:id}); 510 } 491 511 </script> 492 512 … … 557 577 do_syslog_ack(); 558 578 break; 559 579 case 'syslog_delete': 580 do_syslog_delete(); 581 break; 560 582 561 583 case 'info':
