Update tag.html
This commit is contained in:
parent
2ee940313f
commit
c786987543
@ -91,7 +91,7 @@ function showList(jsonData,tag){
|
|||||||
showLabels.setAttribute("class","Label");
|
showLabels.setAttribute("class","Label");
|
||||||
showLabels.setAttribute("style","background-color:"+jsonData["postListJson"][i]['labelColor']);
|
showLabels.setAttribute("style","background-color:"+jsonData["postListJson"][i]['labelColor']);
|
||||||
showLabels.innerHTML=jsonData["postListJson"][i]['label'];
|
showLabels.innerHTML=jsonData["postListJson"][i]['label'];
|
||||||
showLabels.setAttribute("onclick",'javascript:updateShowTag('+jsonData["postListJson"][i]['label']+');');
|
showLabels.setAttribute("onclick",'javascript:updateShowTag("'+jsonData["postListJson"][i]['label']+'");');
|
||||||
tagLable.appendChild(showLabels);
|
tagLable.appendChild(showLabels);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,9 +138,12 @@ function showList(jsonData,tag){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateShowTag(label){
|
function updateShowTag(label){
|
||||||
|
if(window.location.hash.slice(1)!=encodeURI(label)){
|
||||||
window.location.hash="#"+(label);
|
window.location.hash="#"+(label);
|
||||||
showList(jsonData,label);
|
showList(jsonData,label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user