Skip to content
Snippets Groups Projects
Commit bade1031 authored by Valentin Pocotilenco's avatar Valentin Pocotilenco
Browse files

Move and rename button [Issue #24]

parent 3c1c7928
No related branches found
No related tags found
1 merge request!2Refactor/statistics button placement
...@@ -226,3 +226,8 @@ input[type=checkbox] { ...@@ -226,3 +226,8 @@ input[type=checkbox] {
display: none; display: none;
background-size: 100px 100px; background-size: 100px 100px;
} }
.top .inline {
display: flex;
justify-content: space-between;
}
...@@ -300,7 +300,7 @@ $(document).ready(function() { ...@@ -300,7 +300,7 @@ $(document).ready(function() {
}, },
"lengthMenu": [[10, 30, 50, 100, -1], [10, 30, 50, 100, "All"]], "lengthMenu": [[10, 30, 50, 100, -1], [10, 30, 50, 100, "All"]],
"autoWidth": false, "autoWidth": false,
"dom": '<"top"lip>rt<"bottom"><"clear">', "dom": '<"top"<"inline"l<"statistics">>ip>rt<"bottom"><"clear">',
"columns": [ "columns": [
{ {
"className": 'details-control', "className": 'details-control',
...@@ -350,7 +350,11 @@ $(document).ready(function() { ...@@ -350,7 +350,11 @@ $(document).ready(function() {
} }
}, },
"order": [[1, 'asc']] "order": [[1, 'asc']],
"fnDrawCallback": function() {
let r= $('<input type="button" id="statisticsButton" value="ECCS demand"/>');
$(".top .statistics").empty().append(r)
}
} ); } );
// Add event listener for opening and closing details // Add event listener for opening and closing details
......
...@@ -118,7 +118,7 @@ $data[ 'check_result' ] = htmlspecialchars($_GET[ "check_result" ] ?? null); ...@@ -118,7 +118,7 @@ $data[ 'check_result' ] = htmlspecialchars($_GET[ "check_result" ] ?? null);
var check_result = "<?php echo $data[ 'check_result' ] ?>"; var check_result = "<?php echo $data[ 'check_result' ] ?>";
</script> </script>
<script type="text/javascript" src="eccs.js"></script> <script type="text/javascript" src="eccs.js"></script>
<script type="text/javascript" src="statistics.js" /></script> <script type="text/javascript" src="statistics.js"></script>
</div> <!-- END eccs-central --> </div> <!-- END eccs-central -->
<div id="statisticsModal" class="modal"> <div id="statisticsModal" class="modal">
<div class="modal-content"> <div class="modal-content">
......
...@@ -6,7 +6,7 @@ $(document).ready(function() { ...@@ -6,7 +6,7 @@ $(document).ready(function() {
$("#statisticsModal").hide() $("#statisticsModal").hide()
}); });
$("#statisticsButton").on("click", function() { $(document).on("click", "#statisticsButton", function() {
$("#statisticsModal").show() $("#statisticsModal").show()
getStatistics(); getStatistics();
}) })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment