diff options
-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)}}; |