mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
[fix] App background color never change after the 10th app. #35
This commit is contained in:
parent
2622629d0a
commit
180fcdca52
2 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
|
||||
[].forEach.call(liMenu, function(el, i) {
|
||||
// Add color class.
|
||||
el.classList.add(colors[i]);
|
||||
el.classList.add(colors[i%colors.length]);
|
||||
// Set first-letter data attribute.
|
||||
el.querySelector('.first-letter').setAttribute('data-first-letter',el.textContent.substring(0, 2));
|
||||
});
|
||||
|
|
|
@ -181,7 +181,7 @@ domReady(function(){
|
|||
// Add application links
|
||||
var links = [];
|
||||
Array.prototype.forEach.call(response.app, function(app, n){
|
||||
links.push('<li><a class="'+colors[n]+' disableAjax" href="//'+app.url+'"><span class="first-letter" data-first-letter="'+ app.name.substr(0,2) +'"></span><span class="sourcePro">'+app.name+'</span></a></li>');
|
||||
links.push('<li><a class="'+colors[n%colors.length]+' disableAjax" href="//'+app.url+'"><span class="first-letter" data-first-letter="'+ app.name.substr(0,2) +'"></span><span class="sourcePro">'+app.name+'</span></a></li>');
|
||||
});
|
||||
overlay.innerHTML += '<div id="yuno-apps" class="wrapper apps"><ul class="ul-reset listing-apps col colNomarge sourceProBold">'+ links.join('') +'</ul></div>';
|
||||
|
||||
|
|
Loading…
Reference in a new issue