Skip to content

Commit

Permalink
Update Contents: 2024/2/9 12:23
Browse files Browse the repository at this point in the history
  • Loading branch information
Phillweston committed Feb 9, 2024
1 parent 5e53414 commit 78403df
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 28 deletions.
71 changes: 43 additions & 28 deletions dashboard/index-dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,40 @@
<link href="../assets/css/responsive.css" rel="stylesheet" type="text/css" />
<!-- CORE CSS TEMPLATE - END -->

<script>
document.addEventListener('DOMContentLoaded', function() {
var rows = document.querySelectorAll('#tech-companies-1 .data-row');
var riskInfo = document.querySelector('#risk-info .risk-heading');
var riskContent = document.querySelector('#risk-info .risk-content');

rows.forEach(function(row) {
row.addEventListener('click', function() {
// Remove the highlight from all rows
rows.forEach(r => r.classList.remove('highlighted'));

// Add the highlight to the clicked row
this.classList.add('highlighted');

// Toggle the visibility of "RISK: HIGH"
riskInfo.textContent = 'RISK: HIGH';
riskContent.innerHTML = '<i class="fa fa-dot-circle-o active"></i>6 active risks';
});
});

// Add click event listener to the document
document.addEventListener('click', function(event) {
// Check if the clicked element is not a descendant of a 'data-row'
if (!event.target.closest('.data-row')) {
// Remove the highlight from all rows
rows.forEach(r => r.classList.remove('highlighted'));

// Hide "RISK: HIGH"
riskInfo.textContent = 'RISK: UNKNOWN';
riskContent.innerHTML = '<i class="fa fa-dot-circle-o active"></i>Unknown active risks';
}
});
});
</script>
</head>
<!-- END HEAD -->

Expand Down Expand Up @@ -394,6 +428,12 @@
<span class="title">Completed Orders</span>
</a>
</li>
<li class="">
<a href="my-wallet.html">
<i class="img"><img src="../data/icons/wallet-o.png" style="width:16px" alt=""></i>
<span class="title">My Wallet</span>
</a>
</li>
<li class="">
<a href="security.html">
<i class="fa fa-lock"></i>
Expand Down Expand Up @@ -568,9 +608,9 @@ <h2 class="title pull-left">Safe Audits</h2>
</div>
<div class="col-xs-12">
<div class="statistics-wraper">
<div class="statistics-info">
<h3 style="color: red;" class="mb">RISK: HIGH</h3>
<span><i class="fa fa-dot-circle-o active"></i> 6 active risks</span>
<div class="statistics-info" id="risk-info">
<h3 style="color: red;" class="mb risk-heading">RISK: UNKNOWN</h3>
<span class="risk-content"><i class="fa fa-dot-circle-o active"></i>Unknown active risks</span>
</div>
<div class="statistics-info no-pb">
<div style="display: flex; justify-content: center; align-items: center;">
Expand Down Expand Up @@ -715,31 +755,6 @@ <h2 class="title pull-left">Contract Orders</h2>
</tbody>
</table>

<script>
document.addEventListener('DOMContentLoaded', function() {
var rows = document.querySelectorAll('#tech-companies-1 .data-row');

rows.forEach(function(row) {
row.addEventListener('click', function() {
// Remove the highlight from all rows
rows.forEach(r => r.classList.remove('highlighted'));

// Add the highlight to the clicked row
this.classList.add('highlighted');
});
});

// Add click event listener to the document
document.addEventListener('click', function(event) {
// Check if the clicked element is not a descendant of a 'data-row'
if (!event.target.closest('.data-row')) {
// Remove the highlight from all rows
rows.forEach(r => r.classList.remove('highlighted'));
}
});
});
</script>

</div>

</div>
Expand Down
6 changes: 6 additions & 0 deletions dashboard/index-ico-admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,12 @@
<span class="title">Completed Orders</span>
</a>
</li>
<li class="">
<a href="my-wallet.html">
<i class="img"><img src="../data/icons/wallet-o.png" style="width:16px" alt=""></i>
<span class="title">My Wallet</span>
</a>
</li>
<li class="">
<a href="security.html">
<i class="fa fa-lock"></i>
Expand Down
6 changes: 6 additions & 0 deletions dashboard/index-ico-user.html
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,12 @@
<span class="title">Completed Orders</span>
</a>
</li>
<li class="">
<a href="my-wallet.html">
<i class="img"><img src="../data/icons/wallet-o.png" style="width:16px" alt=""></i>
<span class="title">My Wallet</span>
</a>
</li>
<li class="">
<a href="security.html">
<i class="fa fa-lock"></i>
Expand Down

0 comments on commit 78403df

Please sign in to comment.