Changeset 3880:e6d1f6d9d7df for plugins/antispam/js/dashboard.js
- Timestamp:
- 09/18/18 20:22:10 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
-
plugins/antispam/js/dashboard.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/antispam/js/dashboard.js
r3787 r3880 3 3 4 4 dotclear.dbSpamsCount = function() { 5 varparams = {5 const params = { 6 6 f: 'getSpamsCount', 7 7 xd_check: dotclear.nonce, … … 13 13 window.console.log('Dotclear REST server error'); 14 14 } else { 15 varnb = $('rsp>count', data).attr('ret');15 const nb = $('rsp>count', data).attr('ret'); 16 16 if (nb != dotclear.dbSpamsCount_Counter) { 17 17 // First pass or counter changed 18 varicon = $('#dashboard-main #icons p a[href="comments.php?status=-2"]');18 let icon = $('#dashboard-main #icons p a[href="comments.php?status=-2"]'); 19 19 if (icon.length) { 20 20 // Update count if exists 21 varnb_label = icon.children('span.db-icon-title-spam');21 const nb_label = icon.children('span.db-icon-title-spam'); 22 22 if (nb_label.length) { 23 23 nb_label.text(nb); … … 26 26 if (nb != '') { 27 27 // Add full element (link + counter) 28 varicon = $('#dashboard-main #icons p a[href="comments.php"]');28 icon = $('#dashboard-main #icons p a[href="comments.php"]'); 29 29 if (icon.length) { 30 var xml = ' <a href="comments.php?status=-2"><span class="db-icon-title-spam">' + nb + '</span></a>';30 const xml = ` <a href="comments.php?status=-2"><span class="db-icon-title-spam">${nb}</span></a>`; 31 31 icon.after(xml); 32 32 } … … 43 43 // run counters' update on some dashboard icons 44 44 // Spam comments 45 varicon_spam = $('#dashboard-main #icons p a[href="comments.php"]');45 const icon_spam = $('#dashboard-main #icons p a[href="comments.php"]'); 46 46 if (icon_spam.length) { 47 47 // Icon exists on dashboard
Note: See TracChangeset
for help on using the changeset viewer.
