mirror of https://github.com/MISP/MISP
chg: [decaying:simulation] Support of row clicking
parent
4e7c628350
commit
5c8e7f7e30
|
@ -46,7 +46,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div style="width: 70%; display: flex;">
|
||||
<div class="panel-container" style="flex-grow: 1;"></div>
|
||||
<div class="panel-container" style="flex-grow: 1;">
|
||||
<div id="chart-decay-simulation" style="width: 100%; height: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 60%; overflow-y: auto; background-color: #ffffff;" class="panel-container">
|
||||
|
@ -96,4 +98,8 @@ function handle_input_key(e) {
|
|||
}
|
||||
}
|
||||
|
||||
function doSimulation(clicked, attribute_id) {
|
||||
$('#attribute_div tr').removeClass('success');
|
||||
$(clicked).addClass('success');
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
}
|
||||
$tr_class = implode(' ', $tr_class);
|
||||
?>
|
||||
<tr id = "Attribute_<?php echo h($object['id']); ?>_tr" class="<?php echo $tr_class; ?>" tabindex="0">
|
||||
<tr id = "Attribute_<?php echo h($object['id']); ?>_tr" class="<?php echo $tr_class; ?>" tabindex="0" onclick="doSimulation(this, <?php echo h($object['id']); ?>)">
|
||||
<td class="short">
|
||||
<?php echo h($object['id']); ?>
|
||||
</td>
|
||||
|
|
|
@ -670,8 +670,8 @@
|
|||
|
||||
return this.each(function() {
|
||||
var $this = $(this),
|
||||
inst = $this.data('decayingTool'),
|
||||
options = ((typeof options === 'object') ? options : {});
|
||||
inst = $this.data('decayingTool');
|
||||
options = ((typeof options === 'object') ? options : {});
|
||||
if ((!inst) && (typeof options !== 'string')) {
|
||||
$this.data('decayingTool', new DecayingTool(this, options));
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue