From 180fcdca520d94b21348ecbc01226ed5d1737c77 Mon Sep 17 00:00:00 2001 From: opi Date: Tue, 20 May 2014 13:23:51 +0200 Subject: [PATCH] [fix] App background color never change after the 10th app. #35 --- portal/assets/js/global.js | 2 +- portal/assets/js/ynhpanel.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/portal/assets/js/global.js b/portal/assets/js/global.js index 820c610..e493637 100644 --- a/portal/assets/js/global.js +++ b/portal/assets/js/global.js @@ -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)); }); diff --git a/portal/assets/js/ynhpanel.js b/portal/assets/js/ynhpanel.js index 2dfcd51..6aefce7 100644 --- a/portal/assets/js/ynhpanel.js +++ b/portal/assets/js/ynhpanel.js @@ -181,7 +181,7 @@ domReady(function(){ // Add application links var links = []; Array.prototype.forEach.call(response.app, function(app, n){ - links.push('
  • '+app.name+'
  • '); + links.push('
  • '+app.name+'
  • '); }); overlay.innerHTML += '
    ';