diff options
author | Rael <rael.gc@gmail.com> | 2015-10-17 15:06:14 -0300 |
---|---|---|
committer | Rael <rael.gc@gmail.com> | 2015-10-17 15:06:14 -0300 |
commit | 43e95b21daf1bbf5f5e4d2bac9edac8de067a5d2 (patch) | |
tree | b57c1c7bcc2dd98761d6f46b9e7d3e2ff8cedd50 | |
parent | 6474225337c9c01b8d98bf9fd6d4e0626773e4f3 (diff) | |
download | scudcloud-43e95b21daf1bbf5f5e4d2bac9edac8de067a5d2.zip scudcloud-43e95b21daf1bbf5f5e4d2bac9edac8de067a5d2.tar.gz scudcloud-43e95b21daf1bbf5f5e4d2bac9edac8de067a5d2.tar.bz2 |
Escape single quote on team icon (#264)
-rw-r--r-- | scudcloud-1.0/leftpane-src.js | 2 | ||||
-rw-r--r-- | scudcloud-1.0/resources/leftpane.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scudcloud-1.0/leftpane-src.js b/scudcloud-1.0/leftpane-src.js index 40856f0..5e735a6 100644 --- a/scudcloud-1.0/leftpane-src.js +++ b/scudcloud-1.0/leftpane-src.js @@ -9,7 +9,7 @@ var LeftPane = { li.setAttribute("title", name); li.innerHTML = name[0]; if( icon ){ - li.style.backgroundImage = "url('"+ icon +"')"; + li.style.backgroundImage = "url('"+ icon.replace(/'/g, '"') +"')"; li.innerHTML = ""; } ul.appendChild(li); diff --git a/scudcloud-1.0/resources/leftpane.js b/scudcloud-1.0/resources/leftpane.js index 1138579..005a43e 100644 --- a/scudcloud-1.0/resources/leftpane.js +++ b/scudcloud-1.0/resources/leftpane.js @@ -1 +1 @@ -var LeftPane={addTeam:function(e,t,n,l,i){var c=document.getElementById(e);if(null===c){var a=document.getElementById("teams");li=document.createElement("li"),li.id=e,li.setAttribute("onclick","LeftPane.switchTo('"+e.replace(/'/g,""")+"','"+n.replace(/'/g,""")+"')"),li.setAttribute("title",t),li.innerHTML=t[0],l&&(li.style.backgroundImage="url('"+l+"')",li.innerHTML=""),a.appendChild(li),i&&LeftPane.setActive(e),LeftPane.switchTo(e,n)}},click:function(e){for(var t=document.getElementsByTagName("li"),n=0;n<t.length;n++)if(e==n){t[n].click();break}},alert:function(e){document.getElementById(e).classList.add("alert")},stopAlert:function(e){document.getElementById(e).classList.remove("alert")},switchTo:function(e,t){leftPane.switchTo(t),LeftPane.setActive(e)},setActive:function(e){for(var t=document.getElementsByTagName("li"),n=0;n<t.length;n++)t[n].className="inactive";document.getElementById(e).className="active"},clickNext:function(e){for(var t=document.getElementsByTagName("li"),n=0;n<t.length&&"active"!=t[n].className;n++);n+=e,n>=t.length?n=0:0>n&&(n=t.length-1),LeftPane.click(n)}}; +var LeftPane={addTeam:function(e,t,n,l,c){var i=document.getElementById(e);if(null===i){var a=document.getElementById("teams");li=document.createElement("li"),li.id=e,li.setAttribute("onclick","LeftPane.switchTo('"+e.replace(/'/g,""")+"','"+n.replace(/'/g,""")+"')"),li.setAttribute("title",t),li.innerHTML=t[0],l&&(li.style.backgroundImage="url('"+l.replace(/'/g,""")+"')",li.innerHTML=""),a.appendChild(li),c&&LeftPane.setActive(e),LeftPane.switchTo(e,n)}},click:function(e){for(var t=document.getElementsByTagName("li"),n=0;n<t.length;n++)if(e==n){t[n].click();break}},alert:function(e){document.getElementById(e).classList.add("alert")},stopAlert:function(e){document.getElementById(e).classList.remove("alert")},switchTo:function(e,t){leftPane.switchTo(t),LeftPane.setActive(e)},setActive:function(e){for(var t=document.getElementsByTagName("li"),n=0;n<t.length;n++)t[n].className="inactive";document.getElementById(e).className="active"},clickNext:function(e){for(var t=document.getElementsByTagName("li"),n=0;n<t.length&&"active"!=t[n].className;n++);n+=e,n>=t.length?n=0:0>n&&(n=t.length-1),LeftPane.click(n)}}; |