Fixed and improved social networks table.

This commit is contained in:
Christian P. MOMON 2021-01-08 01:16:17 +01:00
parent 25540fa329
commit f5ffce2fbf
2 changed files with 43 additions and 20 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020 Christian Pierre MOMON <christian@momon.org> * Copyright (C) 2020-2021 Christian Pierre MOMON <christian@momon.org>
* *
* This file is part of StatoolInfos, simple service statistics tool. * This file is part of StatoolInfos, simple service statistics tool.
* *
@ -112,6 +112,8 @@ public class SocialNetworksPage
data.setAttribute("organizationListLine", index, "organizationListLineDiasporaImg", "class", ""); data.setAttribute("organizationListLine", index, "organizationListLineDiasporaImg", "class", "");
data.getIdData("organizationListLine", index, "organizationListLineDiasporaImg").getAttribute("class").setMode(DisplayMode.REPLACE); data.getIdData("organizationListLine", index, "organizationListLineDiasporaImg").getAttribute("class").setMode(DisplayMode.REPLACE);
data.setAttribute("organizationListLine", index, "organizationListLineDiasporaLink", "href", organization.getDiasporaWebpage()); data.setAttribute("organizationListLine", index, "organizationListLineDiasporaLink", "href", organization.getDiasporaWebpage());
data.setAttribute("organizationListLine", index, "organizationListLineDiaspora", "data-search", "1");
data.setAttribute("organizationListLine", index, "organizationListLineDiaspora", "data-order", "1");
} }
if (StringUtils.isNotBlank(organization.getFunkwhaleWebpage())) if (StringUtils.isNotBlank(organization.getFunkwhaleWebpage()))
@ -119,6 +121,8 @@ public class SocialNetworksPage
data.setAttribute("organizationListLine", index, "organizationListLineFunkwhaleImg", "class", ""); data.setAttribute("organizationListLine", index, "organizationListLineFunkwhaleImg", "class", "");
data.getIdData("organizationListLine", index, "organizationListLineFunkwhaleImg").getAttribute("class").setMode(DisplayMode.REPLACE); data.getIdData("organizationListLine", index, "organizationListLineFunkwhaleImg").getAttribute("class").setMode(DisplayMode.REPLACE);
data.setAttribute("organizationListLine", index, "organizationListLineFunkwhaleLink", "href", organization.getFunkwhaleWebpage()); data.setAttribute("organizationListLine", index, "organizationListLineFunkwhaleLink", "href", organization.getFunkwhaleWebpage());
data.setAttribute("organizationListLine", index, "organizationListLineFunkwhale", "data-search", "1");
data.setAttribute("organizationListLine", index, "organizationListLineFunkwhale", "data-order", "1");
} }
if (StringUtils.isNotBlank(organization.getMastodonWebpage())) if (StringUtils.isNotBlank(organization.getMastodonWebpage()))
@ -126,6 +130,8 @@ public class SocialNetworksPage
data.setAttribute("organizationListLine", index, "organizationListLineMastodonImg", "class", ""); data.setAttribute("organizationListLine", index, "organizationListLineMastodonImg", "class", "");
data.getIdData("organizationListLine", index, "organizationListLineMastodonImg").getAttribute("class").setMode(DisplayMode.REPLACE); data.getIdData("organizationListLine", index, "organizationListLineMastodonImg").getAttribute("class").setMode(DisplayMode.REPLACE);
data.setAttribute("organizationListLine", index, "organizationListLineMastodonLink", "href", organization.getMastodonWebpage()); data.setAttribute("organizationListLine", index, "organizationListLineMastodonLink", "href", organization.getMastodonWebpage());
data.setAttribute("organizationListLine", index, "organizationListLineMastodon", "data-search", "1");
data.setAttribute("organizationListLine", index, "organizationListLineMastodon", "data-order", "1");
} }
if (StringUtils.isNotBlank(organization.getMobilizonWebpage())) if (StringUtils.isNotBlank(organization.getMobilizonWebpage()))
@ -133,6 +139,8 @@ public class SocialNetworksPage
data.setAttribute("organizationListLine", index, "organizationListLineMobilizonImg", "class", ""); data.setAttribute("organizationListLine", index, "organizationListLineMobilizonImg", "class", "");
data.getIdData("organizationListLine", index, "organizationListLineMobilizonImg").getAttribute("class").setMode(DisplayMode.REPLACE); data.getIdData("organizationListLine", index, "organizationListLineMobilizonImg").getAttribute("class").setMode(DisplayMode.REPLACE);
data.setAttribute("organizationListLine", index, "organizationListLineMobilizonLink", "href", organization.getMobilizonWebpage()); data.setAttribute("organizationListLine", index, "organizationListLineMobilizonLink", "href", organization.getMobilizonWebpage());
data.setAttribute("organizationListLine", index, "organizationListLineMobilizon", "data-search", "1");
data.setAttribute("organizationListLine", index, "organizationListLineMobilizon", "data-order", "1");
} }
if (StringUtils.isNotBlank(organization.getPixelfedWebpage())) if (StringUtils.isNotBlank(organization.getPixelfedWebpage()))
@ -140,6 +148,8 @@ public class SocialNetworksPage
data.setAttribute("organizationListLine", index, "organizationListLinePixelfedImg", "class", ""); data.setAttribute("organizationListLine", index, "organizationListLinePixelfedImg", "class", "");
data.getIdData("organizationListLine", index, "organizationListLinePixelfedImg").getAttribute("class").setMode(DisplayMode.REPLACE); data.getIdData("organizationListLine", index, "organizationListLinePixelfedImg").getAttribute("class").setMode(DisplayMode.REPLACE);
data.setAttribute("organizationListLine", index, "organizationListLinePixelfedLink", "href", organization.getPixelfedWebpage()); data.setAttribute("organizationListLine", index, "organizationListLinePixelfedLink", "href", organization.getPixelfedWebpage());
data.setAttribute("organizationListLine", index, "organizationListLinePixelfed", "data-search", "1");
data.setAttribute("organizationListLine", index, "organizationListLinePixelfed", "data-order", "1");
} }
if (StringUtils.isNotBlank(organization.getPeertubeWebpage())) if (StringUtils.isNotBlank(organization.getPeertubeWebpage()))
@ -147,6 +157,8 @@ public class SocialNetworksPage
data.setAttribute("organizationListLine", index, "organizationListLinePeertubeImg", "class", ""); data.setAttribute("organizationListLine", index, "organizationListLinePeertubeImg", "class", "");
data.getIdData("organizationListLine", index, "organizationListLinePeertubeImg").getAttribute("class").setMode(DisplayMode.REPLACE); data.getIdData("organizationListLine", index, "organizationListLinePeertubeImg").getAttribute("class").setMode(DisplayMode.REPLACE);
data.setAttribute("organizationListLine", index, "organizationListLinePeertubeLink", "href", organization.getPeertubeWebpage()); data.setAttribute("organizationListLine", index, "organizationListLinePeertubeLink", "href", organization.getPeertubeWebpage());
data.setAttribute("organizationListLine", index, "organizationListLinePeertube", "data-search", "1");
data.setAttribute("organizationListLine", index, "organizationListLinePeertube", "data-order", "1");
} }
index += 1; index += 1;

View file

@ -14,9 +14,9 @@
<div class="center_table" style="width: 1100px;"> <div class="center_table" style="width: 1100px;">
<div style="margin: 5px;"> <div style="margin: 5px;">
<a id="" href="socialNetworks.xhtml" class="button">Tous</a> <a id="allFilterButton" href="socialNetworks.xhtml" class="button">Tous</a>
<a id="" href="socialNetworks-diaspora.xhtml" class="button">Diaspora*</a> <a id="diasporaFilterButton" href="socialNetworks-diaspora.xhtml" class="button">Diaspora*</a>
<a id="" href="socialNetworks-mastodon.xhtml" class="button">Mastodon</a> <a id="mastodonFilterButton" href="socialNetworks-mastodon.xhtml" class="button">Mastodon</a>
</div> </div>
<div class="center"> <div class="center">
@ -42,10 +42,18 @@
<table id="organizations" class="table_classic left"> <table id="organizations" class="table_classic left">
<thead> <thead>
<tr> <tr>
<th style="width: 200px;">Nom du membre</th> <th style="width: 200px;" rowspan="2">Membre</th>
<th style="">URL</th> <th style="" rowspan="2">URL</th>
<th style="width: 10px;" colspan="6">Réseaux sociaux</th> <th style="width: 10px;" colspan="6">Réseaux sociaux</th>
</tr> </tr>
<tr>
<th><img id="organizationListLineDiasporaImg" src="diaspora-logo.png" title="Diaspora*" alt="Diaspora" style="width: 25px;"/></th>
<th><img id="organizationListLineFunkwhaleImg" src="funkwhale-logo.png" title="Funkwhale" alt="Funkwhale" style="width: 25px;"/></th>
<th><img id="organizationListLineMastodonImg" src="mastodon-logo.png" title="Mastodon" alt="Mastodon" style="width: 25px;"/></th>
<th><img id="organizationListLineMobilizonImg" src="mobilizon-logo.png" title="Mobilizon" alt="Mobilizon" style="width: 25px;"/></th>
<th><img id="organizationListLinePeertubeImg" src="peertube-logo.png" title="Peertube" alt="Peertube" style="width: 25px;"/></th>
<th><img id="organizationListLinePixelfedImg" src="pixelfed-logo.png" title="Pixelfed" alt="Pixelfed" style="width: 25px;"/></th>
</tr>
</thead> </thead>
<tbody> <tbody>
<tr id="organizationListLine"> <tr id="organizationListLine">
@ -56,27 +64,30 @@
</a> </a>
</td> </td>
<td id="organizationListLineUrl"><a href="#" id="organizationListLineUrlLink">n/a</a></td> <td id="organizationListLineUrl"><a href="#" id="organizationListLineUrlLink">n/a</a></td>
<td id="" class="td_center center"><a id="organizationListLineDiasporaLink" href="#"><img id="organizationListLineDiasporaImg" src="diaspora-logo.png" class="disabled" title="Diaspora*" style="width: 25px;"/></a></td> <td id="organizationListLineDiaspora" class="td_center center" data-order="0" data-search="0"><a id="organizationListLineDiasporaLink" href="#"><img id="organizationListLineDiasporaImg" src="diaspora-logo.png" class="disabled" title="Diaspora*" alt="Diaspora" style="width: 25px;"/></a></td>
<td id="" class="td_center center"><a id="organizationListLineFunkwhaleLink" href="#"><img id="organizationListLineFunkwhaleImg" src="funkwhale-logo.png" class="disabled" title="Funkwhale" style="width: 25px;"/></a></td> <td id="organizationListLineFunkwhale" class="td_center center" data-order="0" data-search="0"><a id="organizationListLineFunkwhaleLink" href="#"><img id="organizationListLineFunkwhaleImg" src="funkwhale-logo.png" class="disabled" title="Funkwhale" alt="Funkwhale" style="width: 25px;"/></a></td>
<td id="" class="td_center center"><a id="organizationListLineMastodonLink" href="#"><img id="organizationListLineMastodonImg" src="mastodon-logo.png" class="disabled" title="Mastodon" style="width: 25px;"/></a></td> <td id="organizationListLineMastodon" class="td_center center" data-order="0" data-search="0"><a id="organizationListLineMastodonLink" href="#"><img id="organizationListLineMastodonImg" src="mastodon-logo.png" class="disabled" title="Mastodon" alt="Mastodon" style="width: 25px;"/></a></td>
<td id="" class="td_center center"><a id="organizationListLineMobilizonLink" href="#"><img id="organizationListLineMobilizonImg" src="mobilizon-logo.png" class="disabled" title="Mobilizon" style="width: 25px;"/></a></td> <td id="organizationListLineMobilizon" class="td_center center" data-order="0" data-search="0"><a id="organizationListLineMobilizonLink" href="#"><img id="organizationListLineMobilizonImg" src="mobilizon-logo.png" class="disabled" title="Mobilizon" alt="Mobilizon" style="width: 25px;"/></a></td>
<td id="" class="td_center center"><a id="organizationListLinePeertubeLink" href="#"><img id="organizationListLinePeertubeImg" src="peertube-logo.png" class="disabled" title="Peertube" style="width: 25px;"/></a></td> <td id="organizationListLinePeertube" class="td_center center" data-order="0" data-search="0"><a id="organizationListLinePeertubeLink" href="#"><img id="organizationListLinePeertubeImg" src="peertube-logo.png" class="disabled" title="Peertube" alt="Peertube" style="width: 25px;"/></a></td>
<td id="" class="td_center center"><a id="organizationListLinePixelfedLink" href="#"><img id="organizationListLinePixelfedImg" src="pixelfed-logo.png" class="disabled" title="Pixelfed" style="width: 25px;"/></a></td> <td id="organizationListLinePixelfed" class="td_center center" data-order="0" data-search="0"><a id="organizationListLinePixelfedLink" href="#"><img id="organizationListLinePixelfedImg" src="pixelfed-logo.png" class="disabled" title="Pixelfed" alt="Pixelfed" style="width: 25px;"/></a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready( function () $('#organizations').DataTable(
{ {
$('#organizations').DataTable( paging: false,
{ ordering: true,
paging: false, "order": [[ 0, "asc" ]],
ordering: true, language: dataTableFrench,
"order": [[ 0, "asc" ]], column:
language: dataTableFrench [ {},{},
}); {
"bSortable": false
},
]
}); });
</script> </script>
</body> </body>