templates: use better variables names in loading ajax data

This commit is contained in:
RhodeCode Admin 2023-07-17 15:02:27 +02:00
parent 20da66f03a
commit dc2b299dcc
8 changed files with 16 additions and 8 deletions

View file

@ -92,8 +92,9 @@ $(document).ready(function() {
);
// gists list
var gist_data = ${c.data|n};
$('#gist_list_table').DataTable({
data: ${c.data|n},
data: gist_data,
dom: 'rtp',
pageLength: ${c.visual.dashboard_items},
order: [[ 4, "desc" ]],

View file

@ -17,9 +17,10 @@ $(document).ready(function() {
// repo list
$repoListTable = $('#repo_list_table');
var repos_data = ${c.data|n};
$repoListTable.DataTable({
data: ${c.data|n},
data: repos_data,
dom: 'rtp',
pageLength: ${c.visual.admin_grid_items},
order: [[ 0, "asc" ]],

View file

@ -28,8 +28,9 @@ $(document).ready(function() {
row.remove().draw();
} );
var user_groups_data = ${c.user_groups|n};
$('#user_group_list_table').DataTable({
data: ${c.user_groups|n},
data: user_groups_data,
dom: 'rtp',
pageLength: ${c.visual.admin_grid_items},
order: [[ 0, "asc" ]],

View file

@ -18,8 +18,9 @@ $(document).ready(function() {
// repo list
$repoListTable = $('#repo_list_table');
var watched_repos_data = ${c.data|n};
$repoListTable.DataTable({
data: ${c.data|n},
data: watched_repos_data,
dom: 'rtp',
pageLength: ${c.visual.admin_grid_items},
order: [[ 0, "asc" ]],

View file

@ -46,8 +46,9 @@ $(document).ready(function() {
row.remove().draw();
} );
var groups_data = ${c.groups|n};
$('#user_group_list_table').DataTable({
data: ${c.groups|n},
data: groups_data,
dom: 'rtp',
pageLength: ${c.visual.admin_grid_items},
order: [[ 0, "asc" ]],

View file

@ -62,9 +62,10 @@ $(document).ready(function() {
$('#obj_count').text(_text);
};
var bookmarks_data = ${c.data|n};
// object list
$('#obj_list_table').DataTable({
data: ${c.data | n},
data: bookmarks_data,
dom: 'rtp',
pageLength: ${c.visual.dashboard_items},
order: [[ 0, "asc" ]],

View file

@ -61,9 +61,10 @@ $(document).ready(function() {
$('#obj_count').text(_text);
};
var branches_data = ${c.data|n};
// object list
$('#obj_list_table').DataTable({
data: ${c.data|n},
data: branches_data,
dom: 'rtp',
pageLength: ${c.visual.dashboard_items},
order: [[ 0, "asc" ]],

View file

@ -62,9 +62,10 @@ $(document).ready(function() {
$('#obj_count').text(_text);
};
var tags_data = ${c.data|n};
// object list
$('#obj_list_table').DataTable({
data: ${c.data|n},
data: tags_data,
dom: 'rtp',
pageLength: ${c.visual.dashboard_items},
order: [[ 0, "asc" ]],