chg: [decaying:simulation] Support of row clicking

pull/5032/head
mokaddem 2019-07-10 16:39:32 +02:00
parent 4e7c628350
commit 5c8e7f7e30
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
3 changed files with 10 additions and 4 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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 {