mirror of https://github.com/MISP/MISP
fix: Fixed annoying download list only having one side clickable
- it was annoying to brigadier general @adulaupull/2962/head
parent
7554af8edb
commit
ee6f5f46e2
|
@ -46,7 +46,7 @@ class AppController extends Controller {
|
|||
|
||||
public $helpers = array('Utility', 'OrgImg');
|
||||
|
||||
private $__queryVersion = '30';
|
||||
private $__queryVersion = '31';
|
||||
public $pyMispVersion = '2.4.87';
|
||||
public $phpmin = '5.6.5';
|
||||
public $phprec = '7.0.16';
|
||||
|
|
|
@ -3,13 +3,42 @@
|
|||
<div class="popover_choice_main" id ="popover_choice_main">
|
||||
<table style="width:100%;">
|
||||
<?php foreach ($exports as $k => $export): ?>
|
||||
<tr style="border-bottom:1px solid black;" class="templateChoiceButton">
|
||||
<td role="button" tabindex="0" aria-label="<?php echo __('Export as %s', h($export['text']));?>" title="<?php echo __('Export as %s', h($export['text']));?>" style="padding-left:10px; text-align:left;width:50%;" onClick="exportChoiceSelect('<?php echo h($export['url']); ?>', '<?php echo h($k); ?>', '<?php echo h($export['checkbox']); ?>')"><?php echo h($export['text']); ?></td>
|
||||
<td style="padding-right:10px; width:50%;text-align:right;">
|
||||
<tr
|
||||
style="border-bottom:1px solid black;"
|
||||
class="templateChoiceButton"
|
||||
data-export-url="<?php echo h($export['url']); ?>"
|
||||
data-export-key="<?php echo h($k); ?>"
|
||||
data-export-checkbox="<?php echo h($export['checkbox']); ?>"
|
||||
>
|
||||
<td
|
||||
class="export_choice_button"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-label= "<?php echo __('Export as %s', h($export['text']));?>"
|
||||
title="<?php echo __('Export as %s', h($export['text']));?>"
|
||||
style="padding-left:10px; text-align:left;width:50%;"
|
||||
>
|
||||
<?php echo h($export['text']); ?>
|
||||
</td>
|
||||
<td
|
||||
class="export_choice_button"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-label= "<?php echo __('Export as %s', h($export['text']));?>"
|
||||
title="<?php echo __('Export as %s', h($export['text']));?>"
|
||||
class="export_choice_button"
|
||||
style="padding-right:10px; width:50%;text-align:right;"
|
||||
>
|
||||
<?php if ($export['checkbox']):
|
||||
echo h($export['checkbox_text']);
|
||||
?>
|
||||
<input title="<?php h($export['checkbox_text']); ?>" id = "<?php echo h($k) . '_toggle';?>" type="checkbox" style="align;vertical-align:top;margin-top:8px;" <?php if (isset($export['checkbox_default'])) echo 'checked';?>>
|
||||
<input
|
||||
title="<?php h($export['checkbox_text']); ?>"
|
||||
id="<?php echo h($k) . '_toggle';?>"
|
||||
type="checkbox"
|
||||
style="align;vertical-align:top;margin-top:8px;"
|
||||
<?php if (isset($export['checkbox_default'])) echo 'checked';?>
|
||||
>
|
||||
<span id ="<?php echo h($k);?>_set" style="display:none;"><?php if (isset($export['checkbox_set'])) echo h($export['checkbox_set']); ?></span>
|
||||
<?php else: ?>
|
||||
|
||||
|
@ -25,6 +54,9 @@
|
|||
$(document).ready(function() {
|
||||
resizePopoverBody();
|
||||
});
|
||||
$('.export_choice_button').click(function (e) {
|
||||
exportChoiceSelect(e);
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
resizePopoverBody();
|
||||
|
|
|
@ -1896,7 +1896,13 @@ function selectContainsOption(selectid, value) {
|
|||
return exists;
|
||||
}
|
||||
|
||||
function exportChoiceSelect(url, elementId, checkbox) {
|
||||
function exportChoiceSelect(e) {
|
||||
if ($(e.target).is("input")) {
|
||||
return false;
|
||||
}
|
||||
var url = $(e.target).parent().data("export-url");
|
||||
var elementId = $(e.target).parent().data("export-key");
|
||||
var checkbox = $(e.target).parent().data("export-checkbox");
|
||||
if (checkbox == 1) {
|
||||
if ($('#' + elementId + '_toggle').prop('checked')) {
|
||||
url = $('#' + elementId + '_set').html();
|
||||
|
|
Loading…
Reference in New Issue