Changeset - c5bff92d5084
[Not reviewed]
default
0 7 0
Mads Kiilerich - 8 years ago 2017-09-14 02:08:06
mads@kiilerich.com
templates: disable paging and page size controls in DataTables

Since all data is sent to the client side, it can just as well be rendered.
PageDown or scrolling is more convenient for paging than paging buttons, so
short of "infinite scrolling", showing all entries is an acceptable solution
... especially when it very rarely is hundres of entries.

There could perhaps be further changes to how DataTables is shown - this is one
step.
7 files changed with 14 insertions and 14 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/admin/my_account/my_account_repos.html
Show inline comments
 
@@ -16,7 +16,7 @@
 
            {data: "action", title: ${h.jshtml(_('Action'))}, sortable: false, searchable: false}
 
        ],
 
        order: [[2, "asc"]],
 
        dom: '<"dataTables_left"f><"dataTables_right"ilp>t',
 
        pageLength: 100
 
        dom: '<"dataTables_left"f><"dataTables_right"i>t',
 
        paging: false,
 
    });
 
</script>
kallithea/templates/admin/my_account/my_account_watched.html
Show inline comments
 
@@ -15,7 +15,7 @@
 
            {data: "last_changeset", "orderData": 3, title: ${h.jshtml(_('Tip'))}, searchable: false},
 
        ],
 
        order: [[2, "asc"]],
 
        dom: '<"dataTables_left"f><"dataTables_right"ilp>t',
 
        pageLength: 100
 
        dom: '<"dataTables_left"f><"dataTables_right"i>t',
 
        paging: false,
 
    });
 
</script>
kallithea/templates/admin/repo_groups/repo_groups.html
Show inline comments
 
@@ -43,8 +43,8 @@
 
            {data: "action", title: ${h.jshtml(_('Action'))}, sortable: false, searchable: false}
 
        ],
 
        drawCallback: updateRowCountCallback($("#repo_group_count")),
 
        dom: '<"dataTables_left"f><"dataTables_right"ilp>t',
 
        pageLength: 100
 
        dom: '<"dataTables_left"f><"dataTables_right"i>t',
 
        paging: false,
 
    });
 

	
 
</script>
kallithea/templates/admin/repos/repos.html
Show inline comments
 
@@ -44,8 +44,8 @@
 
            {data: "action", title: ${h.jshtml(_('Action'))}, sortable: false, searchable: false}
 
        ],
 
        drawCallback: updateRowCountCallback($("#repo_count")),
 
        dom: '<"dataTables_left"f><"dataTables_right"ilp>t',
 
        pageLength: 100
 
        dom: '<"dataTables_left"f><"dataTables_right"i>t',
 
        paging: false,
 
    });
 
</script>
 

	
kallithea/templates/admin/user_groups/user_groups.html
Show inline comments
 
@@ -43,8 +43,8 @@
 
            {data: "action", title: ${h.jshtml(_('Action'))}, searchable: false, sortable: false}
 
        ],
 
        order: [[1, "asc"]],
 
        dom: '<"dataTables_left"f><"dataTables_right"ilp>t',
 
        pageLength: 100
 
        dom: '<"dataTables_left"f><"dataTables_right"i>t',
 
        paging: false,
 
    });
 
</script>
 
</%def>
kallithea/templates/admin/users/users.html
Show inline comments
 
@@ -46,8 +46,8 @@
 
        ],
 
        order: [[1, "asc"]],
 
        drawCallback: updateRowCountCallback($("#user_count")),
 
        dom: '<"dataTables_left"f><"dataTables_right"ilp>t',
 
        pageLength: 100
 
        dom: '<"dataTables_left"f><"dataTables_right"i>t',
 
        paging: false,
 
    });
 
</script>
 

	
kallithea/templates/index_base.html
Show inline comments
 
@@ -64,7 +64,7 @@
 
                    {data: "atom", defaultContent: '', sortable: false}
 
                ],
 
                order: [[1, "asc"]],
 
                dom: '<"dataTables_left"f><"dataTables_right"ilp>t',
 
                pageLength: 100
 
                dom: '<"dataTables_left"f><"dataTables_right"i>t',
 
                paging: false,
 
            });
 
      </script>
0 comments (0 inline, 0 general)