diff --git a/youtube_video/templates/youtube/relatorios.html b/youtube_video/templates/youtube/relatorios.html index d188e79..596a2c1 100644 --- a/youtube_video/templates/youtube/relatorios.html +++ b/youtube_video/templates/youtube/relatorios.html @@ -64,7 +64,7 @@ function selectHandler() { var selectedItem = chart.getSelection()[0]; - console.log(selectedItem.row,selectedItem.column); + var col = data.getColumnLabel(selectedItem.column); if (selectedItem) { if (selectedItem.row == 0 && selectedItem.column == 1){ tabela_atual = true; @@ -144,7 +144,25 @@ drawTable(column_n_did,pagination(search,1),false); alterTitleTable(search.length); putpagination(search,tabela_atual); + } else if (col == "{{n_did_table}}"){ + tabela_atual = false; + search = []; + for (var i in json_n_did["data"]){ + search.push([json_n_did["data"][i][0],json_n_did["data"][i][1], + json_n_did["data"][i][2],json_n_did["data"][i][3]]); + } + searcher(col, tabela_atual,true); + + } else if (col == "{{did_table}}"){ + tabela_atual = true; + search = []; + for (var i in json_history["data"]){ + search.push([json_history["data"][i][0],json_history["data"][i][1], + json_history["data"][i][2],json_history["data"][i][3]]); + } + searcher(col, tabela_atual,true); } + scroll("#title-table"); } chart.setSelection([]) } @@ -214,16 +232,18 @@ {% endblock %} {% block content %} - {% if messages %} - {% for message in messages %} -
- {% endfor %} - {% endif %} +' + data["message"] + '
\ +' + data.responseText + '
\ +