Changeset 3880:e6d1f6d9d7df for admin/js/_post.js
- Timestamp:
- 09/18/18 20:22:10 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/_post.js
r3878 r3880 8 8 } 9 9 10 var commentId = $(line).attr('id').substr(1); 11 var tr = document.getElementById('ce' + commentId); 12 var spam = (e.metaKey || $(line).hasClass('sts-junk')); 10 const commentId = $(line).attr('id').substr(1); 11 const lineId = `ce${commentId}`; 12 let tr = document.getElementById(lineId); 13 14 // If meta key down or it's a spam then display content HTML code 15 const clean = (e.metaKey || $(line).hasClass('sts-junk')); 13 16 14 17 if (!tr) { … … 18 21 // Content found 19 22 tr = document.createElement('tr'); 20 tr.id = 'ce' + commentId;21 vartd = document.createElement('td');23 tr.id = lineId; 24 const td = document.createElement('td'); 22 25 td.colSpan = $(line).children('td').length; 23 26 td.className = 'expand'; … … 32 35 }, { 33 36 ip: false, 34 clean: spam37 clean: clean 35 38 }); 36 39 } else { … … 42 45 $(function() { 43 46 // Post preview 44 var$preview_url = $('#post-preview').attr('href');47 let $preview_url = $('#post-preview').attr('href'); 45 48 if ($preview_url) { 46 49 47 50 // Make $preview_url absolute 48 var$a = document.createElement('a');51 let $a = document.createElement('a'); 49 52 $a.href = $('#post-preview').attr('href'); 50 53 $preview_url = $a.href; … … 78 81 79 82 // Add date picker 80 varpost_dtPick = new datePicker($('#post_dt').get(0));83 const post_dtPick = new datePicker($('#post_dt').get(0)); 81 84 post_dtPick.img_top = '1.5em'; 82 85 post_dtPick.draw(); … … 140 143 $('a.attachment-remove').click(function() { 141 144 this.href = ''; 142 varm_name = $(this).parents('ul').find('li:first>a').attr('title');145 const m_name = $(this).parents('ul').find('li:first>a').attr('title'); 143 146 if (window.confirm(dotclear.msg.confirm_remove_attachment.replace('%s', m_name))) { 144 147 var f = $('#attachment-remove-hide').get(0);
Note: See TracChangeset
for help on using the changeset viewer.