diff options
| author | nch@tinyerp.com <> | 2009-11-02 11:20:06 +0530 |
|---|---|---|
| committer | nch@tinyerp.com <> | 2009-11-02 11:20:06 +0530 |
| commit | 371fe0f68fecab614fb2befe8b525bec8483ce38 (patch) | |
| tree | e8cf90ffdfc80f235e5687b8af6fffda4d088669 /bin/report/render/makohtml2html/makohtml2html.py | |
| parent | 48ff95502dffb6448a9dcffbc6ead3ef77f3e487 (diff) | |
[IMP]:Added next previous counter
bzr revid: nch@tinyerp.com-20091102055006-727h8e26j7a53nlo
Diffstat (limited to 'bin/report/render/makohtml2html/makohtml2html.py')
| -rw-r--r-- | bin/report/render/makohtml2html/makohtml2html.py | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/bin/report/render/makohtml2html/makohtml2html.py b/bin/report/render/makohtml2html/makohtml2html.py index f672674f20e..c6a4ddedbe8 100644 --- a/bin/report/render/makohtml2html/makohtml2html.py +++ b/bin/report/render/makohtml2html/makohtml2html.py @@ -59,16 +59,28 @@ class makohtml2html(object): if(indexer < aryTest.length -1) { indexer += 1; + document.forms[0].prev.disabled = false; document.getElementById("openerp_data").innerHTML=aryTest[indexer]; + document.getElementById("counter").innerHTML= indexer + 1 + ' / ' + aryTest.length; } + else + { + document.forms[0].next.disabled = true; + } } function prevData() { if (indexer > 0) { indexer -= 1; + document.forms[0].next.disabled = false; document.getElementById("openerp_data").innerHTML=aryTest[indexer]; + document.getElementById("counter").innerHTML= indexer + 1 + ' / ' + aryTest.length; } + else + { + document.forms[0].prev.disabled = true; + } } </script> </head> @@ -80,10 +92,22 @@ class makohtml2html(object): %s </div> <br> - <input type="button" value="Previous" onclick="prevData();"> - <input type="button" value="Next" onclick="nextData();"> - - </body></html>'''%(body_list,body_list[0],footer) + <form> + <table> + <tr> + <td td align="left"> + <input name = "prev" type="button" value="Previous" onclick="prevData();"> + </td> + <td> + <div id = "counter">%s / %s</div> + </td> + <td align="right"> + <input name = "next" type="button" value="Next" onclick="nextData();"> + </td> + </tr> + </table> + </form> + </body></html>'''%(body_list,body_list[0],footer,'1',len(body_list)) return html_body def render(self): |
