From 5b7cd720fd2df01be03ba4ed4aacba64de57780a Mon Sep 17 00:00:00 2001 From: Jailson Dias Date: Tue, 2 May 2017 23:08:19 -0300 Subject: [PATCH] concertando a paginação de relatorios em pdf_file --- pdf_file/templates/pdf_file/relatorios.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pdf_file/templates/pdf_file/relatorios.html b/pdf_file/templates/pdf_file/relatorios.html index 460e3c8..649ef17 100644 --- a/pdf_file/templates/pdf_file/relatorios.html +++ b/pdf_file/templates/pdf_file/relatorios.html @@ -270,19 +270,19 @@ ] }); $("#title-table").text(search.length + " {% trans 'record(s)' %}"); - function putpagination(data = json_history["data"]){ + function putpagination(data = json_history["data"], load_histoty = true){ var len = Math.ceil(data.length / 20); $(".pagination").empty(); $(".pagination").append('
  • «
  • '); $(".pagination").append('
  • \ - 1\ + 1\
  • '); for (var i = 2; i <= len;i++){ $(".pagination").append('
  • \ - ' + i + '\ + ' + i + '\
  • '); } - if (len > 1) $(".pagination").append('
  • »
  • '); + if (len > 1) $(".pagination").append('
  • »
  • '); else $(".pagination").append('
  • »
  • '); }; putpagination(); @@ -355,7 +355,7 @@ drawTable(column_history,pagination(search,1),true,3); } $("#title-table").text(search.length + " {% trans 'record(s)' %}"); - putpagination(search); + putpagination(search,load_histoty); } function pagination(data,pag){ @@ -376,10 +376,10 @@ } if (pag < Math.ceil(search.length / 20)) - $(".pagination").append('
  • »
  • '); + $(".pagination").append('
  • »
  • '); else $(".pagination").append('
  • »
  • '); if (pag > 1) - $(".pagination").prepend('
  • «
  • '); + $(".pagination").prepend('
  • «
  • '); else $(".pagination").prepend('
  • «
  • '); $(".active").removeClass("active"); $("#" + pag).addClass("active"); -- libgit2 0.21.2