File tree 2 files changed +5
-8
lines changed
web_src/js/features/admin
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 62
62
63
63
<div class="ui modal admin" id="detail-modal">
64
64
<div class="header">{{ctx.Locale.Tr "admin.notices.view_detail_header"}}</div>
65
- <div class="content">
66
- <div class="sub header"></div>
67
- <pre></pre>
68
- </div>
65
+ <div class="content"><pre></pre></div>
69
66
</div>
70
67
71
68
{{template "admin/layout_footer" .}}
Original file line number Diff line number Diff line change @@ -207,13 +207,13 @@ export function initAdminCommon() {
207
207
208
208
// Notice
209
209
if ( document . querySelector ( '.admin.notice' ) ) {
210
- const $ detailModal = document . getElementById ( 'detail-modal' ) ;
210
+ const detailModal = document . getElementById ( 'detail-modal' ) ;
211
211
212
212
// Attach view detail modals
213
213
$ ( '.view-detail' ) . on ( 'click' , function ( ) {
214
- $detailModal . find ( '.content pre' ) . text ( $ ( this ) . parents ( 'tr' ) . find ( '.notice-description' ) . text ( ) ) ;
215
- $ detailModal. find ( '.sub.header' ) . text ( this . closest ( 'tr' ) ?. querySelector ( 'relative-time' ) ?. getAttribute ( 'title' ) ) ;
216
- $detailModal . modal ( 'show' ) ;
214
+ const description = this . closest ( 'tr' ) . querySelector ( '.notice-description' ) . textContent ;
215
+ detailModal . querySelector ( '.content pre' ) . textContent = description ;
216
+ $ ( detailModal ) . modal ( 'show' ) ;
217
217
return false ;
218
218
} ) ;
219
219
You can’t perform that action at this time.
0 commit comments