{% extends "app/website/templates/html/page.html" %} {% block content -%}
{%- endblock %} {% block javascript -%} $(document).ready(function() { window.start = 0; window.$list = $(".transaction-list"); window.$show_more = $(".btn-show-more").on("click", function() { get_transactions(this); }) get_transactions(); }); var get_transactions = function(btn) { wn.call({ method: "{{ method }}", args: { start: start }, btn: btn, callback: function(r) { $list.find(".progress").remove(); $show_more.toggleClass("hide", !(r.message && r.message.length===20)); if(!(r.message && r.message.length)) { console.log("empty"); if(!$list.html().trim()) { $list.html("
\ {{ empty_list_message }}
"); } return; } start += r.message.length; $.each(r.message, function(i, doc) { render(doc); }); } }) }; // var render = function(doc) { }; {% endblock %}