| Server IP : 123.56.80.60 / Your IP : 216.73.216.148 Web Server : Apache/2.4.54 (Win32) OpenSSL/1.1.1s PHP/7.4.33 mod_fcgid/2.3.10-dev System : Windows NT iZhx3sob14hnz7Z 10.0 build 14393 (Windows Server 2016) i586 User : SYSTEM ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /site/20241224/spunner/wp-content/plugins/wp-statistics/assets/dev/javascript/meta-box/ |
Upload File : |
wps_js.pages_meta_box = {
view: function (args = []) {
let t = '';
if (args.pages && args.pages.length > 0) {
t += `<div class="o-table-wrapper"><table width="100%" class="o-table wps-new-table">
<thead>
<tr>
<th class="wps-pd-l">${wps_js._('title')}</th>
<th class="wps-pd-l"><span class="wps-order">${wps_js._('views')}</span></th>
<th></th>
</tr>
</thead>
<tbody> `;
const siteUrl = wps_js.global.admin_url.replace('/wp-admin/', '');
let i = 1;
args.pages.forEach(function (value) {
const statisticsPagesWidget =document.getElementById('wp-statistics-pages-widget');
let viewContentLabel =wps_js._('view');
if(statisticsPagesWidget) {
const isInsideDashboardWidgets = statisticsPagesWidget.closest('#dashboard-widgets') !== null;
viewContentLabel = isInsideDashboardWidgets ? wps_js._('view') : window.innerWidth <= 500 ? wps_js._('view') : wps_js._('view_content');
}
t += `<tr>
<td class="wps-pd-l"><div class="wps-ellipsis-parent" title="${value['title']}"><span class="wps-ellipsis-text">${value['title']}</span></div></td>
<td class="wps-pd-l"><a href="${value['hits_page']}">${value['number']}</a></td>
<td class="wps-pd-l"><a target="_blank" class="wps-view-content" href="${value['link']}">${viewContentLabel}</a></td>
</tr>`;
i++;
});
t += `</tbody></table></div>`;
return t;
} else {
return wps_js.no_meta_box_data()
}
}
};
window.addEventListener('resize', function () {
window.addEventListener('resize', function () {
const statisticsPagesWidget= document.getElementById('wp-statistics-pages-widget');
let isInsideDashboardWidgets = null ;
if(statisticsPagesWidget) {
isInsideDashboardWidgets = statisticsPagesWidget.closest('#dashboard-widgets') !== null;
}
const metaBoxes = document.querySelectorAll('.wps-view-content');
if(metaBoxes.length > 0){
metaBoxes.forEach(function (metaBox) {
metaBox.textContent =isInsideDashboardWidgets ? wps_js._('view') : window.innerWidth <= 500 ? wps_js._('view') : wps_js._('view_content'); ;
});
}
});
});