mirror of https://github.com/MISP/MISP
fix: [UI] Do not use inline JS
parent
1a39e860d7
commit
e0ad718b4a
|
@ -98,7 +98,7 @@ class AuditLog extends AppModel
|
|||
{
|
||||
if (in_array($auditLog['action'], [self::ACTION_TAG, self::ACTION_TAG_LOCAL, self::ACTION_REMOVE_TAG, self::ACTION_REMOVE_TAG_LOCAL], true)) {
|
||||
$attached = ($auditLog['action'] === self::ACTION_TAG || $auditLog['action'] === self::ACTION_TAG_LOCAL);
|
||||
$local = ($auditLog['action'] === self::ACTION_TAG_LOCAL || $auditLog['action'] === self::ACTION_REMOVE_TAG_LOCAL) ? 'local' : 'global';
|
||||
$local = ($auditLog['action'] === self::ACTION_TAG_LOCAL || $auditLog['action'] === self::ACTION_REMOVE_TAG_LOCAL) ? __('local') : __('global');
|
||||
if ($attached) {
|
||||
return __('Attached %s tag "%s" to %s #%s', $local, $auditLog['model_title'], strtolower($auditLog['model']), $auditLog['model_id']);
|
||||
} else {
|
||||
|
@ -108,7 +108,7 @@ class AuditLog extends AppModel
|
|||
|
||||
if (in_array($auditLog['action'], [self::ACTION_GALAXY, self::ACTION_GALAXY_LOCAL, self::ACTION_REMOVE_GALAXY, self::ACTION_REMOVE_GALAXY_LOCAL], true)) {
|
||||
$attached = ($auditLog['action'] === self::ACTION_GALAXY || $auditLog['action'] === self::ACTION_GALAXY_LOCAL);
|
||||
$local = ($auditLog['action'] === self::ACTION_GALAXY_LOCAL || $auditLog['action'] === self::ACTION_REMOVE_GALAXY_LOCAL) ? 'local' : 'global';
|
||||
$local = ($auditLog['action'] === self::ACTION_GALAXY_LOCAL || $auditLog['action'] === self::ACTION_REMOVE_GALAXY_LOCAL) ? __('local') : __('global');
|
||||
if ($attached) {
|
||||
return __('Attached %s galaxy cluster "%s" to %s #%s', $local, $auditLog['model_title'], strtolower($auditLog['model']), $auditLog['model_id']);
|
||||
} else {
|
||||
|
|
|
@ -282,7 +282,7 @@
|
|||
<?= isset($item['AuditLog']['model_link']) ? '</a>' : '' ?>
|
||||
</td>
|
||||
<td class="limitedWidth"><?= h($item['AuditLog']['title']) ?></td>
|
||||
<td ondblclick="showFullChange(<?= h($item['AuditLog']['id']) ?>)"><?= $this->element('AuditLog/change', ['item' => $item]) ?></td>
|
||||
<td class="fullChange" data-log-id="<?= h($item['AuditLog']['id']) ?>"><?= $this->element('AuditLog/change', ['item' => $item]) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
@ -301,7 +301,8 @@
|
|||
<script type="text/javascript">
|
||||
var passedArgs = <?= $passedArgs ?>;
|
||||
|
||||
function showFullChange(id) {
|
||||
$('.fullChange').dblclick(function () {
|
||||
var id = $(this).data('log-id');
|
||||
$.get(baseurl + "/audit_logs/fullChange/" + id, function(data) {
|
||||
var $popoverFormLarge = $('#popover_form_large');
|
||||
$popoverFormLarge.html(data);
|
||||
|
@ -311,7 +312,7 @@
|
|||
openPopup($popoverFormLarge);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$('td[data-search]').mouseenter(function() {
|
||||
var $td = $(this);
|
||||
|
|
Loading…
Reference in New Issue