[fix] App background color never change after the 10th app. #35

This commit is contained in:
opi 2014-05-20 13:23:51 +02:00
parent 2622629d0a
commit 180fcdca52
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ document.addEventListener('DOMContentLoaded', function() {
[].forEach.call(liMenu, function(el, i) { [].forEach.call(liMenu, function(el, i) {
// Add color class. // Add color class.
el.classList.add(colors[i]); el.classList.add(colors[i%colors.length]);
// Set first-letter data attribute. // Set first-letter data attribute.
el.querySelector('.first-letter').setAttribute('data-first-letter',el.textContent.substring(0, 2)); el.querySelector('.first-letter').setAttribute('data-first-letter',el.textContent.substring(0, 2));
}); });

View file

@ -181,7 +181,7 @@ domReady(function(){
// Add application links // Add application links
var links = []; var links = [];
Array.prototype.forEach.call(response.app, function(app, n){ 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>'; overlay.innerHTML += '<div id="yuno-apps" class="wrapper apps"><ul class="ul-reset listing-apps col colNomarge sourceProBold">'+ links.join('') +'</ul></div>';