From d305503bd6670676a092e58694fb7e71c7a7538f Mon Sep 17 00:00:00 2001 From: Rael Gugelmin Cunha Date: Tue, 2 Feb 2016 16:27:38 -0200 Subject: [PATCH] Fixing keyboard team switching (#374) --- scudcloud/resources/leftpane.js | 2 +- sources/leftpane-src.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scudcloud/resources/leftpane.js b/scudcloud/resources/leftpane.js index bc9839e..4c14984 100644 --- a/scudcloud/resources/leftpane.js +++ b/scudcloud/resources/leftpane.js @@ -1 +1 @@ -var LeftPane={addTeam:function(e,t,n,i,c){var l=document.getElementById(e);if(null===l){var a=document.getElementById("teams"),d=document.createElement("li");d.id=e,d.setAttribute("onclick","LeftPane.switchTo('"+e.replace(/'/g,""")+"','"+n.replace(/'/g,""")+"')"),d.setAttribute("title",t),d.innerHTML=t[0],i&&(d.style.backgroundImage="url('"+i.replace(/'/g,""")+"')",d.innerHTML="");var s=document.createElement("div");s.id=e+"_highlight",s.setAttribute("class","highlight hidden"),s.innerHTML="1",a.appendChild(d),d.appendChild(s),c&&LeftPane.setActive(e),LeftPane.switchTo(e,n)}},click:function(e){var t=document.getElementsByTagName("li");e=t.length?n=0:0>n&&(n=t.length-1),LeftPane.click(n)}}; +var LeftPane={addTeam:function(e,t,n,i,c){var l=document.getElementById(e);if(null===l){var a=document.getElementById("teams"),d=document.createElement("li");d.id=e,d.setAttribute("onclick","LeftPane.switchTo('"+e.replace(/'/g,""")+"','"+n.replace(/'/g,""")+"')"),d.setAttribute("title",t),d.innerHTML=t[0],i&&(d.style.backgroundImage="url('"+i.replace(/'/g,""")+"')",d.innerHTML="");var s=document.createElement("div");s.id=e+"_highlight",s.setAttribute("class","highlight hidden"),s.innerHTML="1",a.appendChild(d),d.appendChild(s),c&&LeftPane.setActive(e),LeftPane.switchTo(e,n)}},click:function(e){var t=document.getElementsByTagName("li");e=t.length?n=0:0>n&&(n=t.length-1),LeftPane.click(n)}}; diff --git a/sources/leftpane-src.js b/sources/leftpane-src.js index 8e0bc1d..47e92c0 100644 --- a/sources/leftpane-src.js +++ b/sources/leftpane-src.js @@ -56,7 +56,7 @@ var LeftPane = { var list = document.getElementsByTagName("li"); var index = 0; for(; index < list.length; index++){ - if (list[index].className == "active") { + if (list[index].classList.contains("active")) { break; } }