Skip to content

Commit

Permalink
Merge branch 'main' into refactor-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
GiteaBot authored Apr 13, 2024
2 parents 7bad671 + 8fd8978 commit f2c54d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions templates/admin/notice.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@

<div class="ui modal admin" id="detail-modal">
<div class="header">{{ctx.Locale.Tr "admin.notices.view_detail_header"}}</div>
<div class="content">
<div class="sub header"></div>
<pre></pre>
</div>
<div class="content"><pre></pre></div>
</div>

{{template "admin/layout_footer" .}}
8 changes: 4 additions & 4 deletions web_src/js/features/admin/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ export function initAdminCommon() {

// Notice
if (document.querySelector('.admin.notice')) {
const $detailModal = document.getElementById('detail-modal');
const detailModal = document.getElementById('detail-modal');

// Attach view detail modals
$('.view-detail').on('click', function () {
$detailModal.find('.content pre').text($(this).parents('tr').find('.notice-description').text());
$detailModal.find('.sub.header').text(this.closest('tr')?.querySelector('relative-time')?.getAttribute('title'));
$detailModal.modal('show');
const description = this.closest('tr').querySelector('.notice-description').textContent;
detailModal.querySelector('.content pre').textContent = description;
$(detailModal).modal('show');
return false;
});

Expand Down

0 comments on commit f2c54d7

Please sign in to comment.