File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
web_src/js/features/admin Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 6262
6363<div class="ui modal admin" id="detail-modal">
6464 <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>
6966</div>
7067
7168{{template "admin/layout_footer" .}}
Original file line number Diff line number Diff line change @@ -207,13 +207,13 @@ export function initAdminCommon() {
207207
208208 // Notice
209209 if ( document . querySelector ( '.admin.notice' ) ) {
210- const $ detailModal = document . getElementById ( 'detail-modal' ) ;
210+ const detailModal = document . getElementById ( 'detail-modal' ) ;
211211
212212 // Attach view detail modals
213213 $ ( '.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' ) ;
217217 return false ;
218218 } ) ;
219219
You can’t perform that action at this time.
0 commit comments