Skip to content
Snippets Groups Projects
Commit 5d36cac8 authored by Chris Lawton's avatar Chris Lawton
Browse files

rename all submission table

parent d916c25b
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ from .widgets import Select2MultiCheckboxesWidget ...@@ -19,7 +19,7 @@ from .widgets import Select2MultiCheckboxesWidget
def make_row_class(record): def make_row_class(record):
css_class = 'submission-meta__row' if record.next else 'all-submissions__parent' css_class = 'submission-meta__row' if record.next else 'all-submissions-table__parent'
css_class += '' if record.active else ' is-inactive' css_class += '' if record.active else ' is-inactive'
return css_class return css_class
...@@ -48,7 +48,7 @@ class SubmissionsTable(tables.Table): ...@@ -48,7 +48,7 @@ class SubmissionsTable(tables.Table):
'class': make_row_class, 'class': make_row_class,
'data-record-id': lambda record: record.id, 'data-record-id': lambda record: record.id,
} }
attrs = {'class': 'all-submissions'} attrs = {'class': 'all-submissions-table'}
def render_user(self, value): def render_user(self, value):
return value.get_full_name() return value.get_full_name()
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</tr> </tr>
{% with submission=row.record %} {% with submission=row.record %}
<tr class="all-submissions__child" data-parent-id="{{ submission.id }}"> <tr class="all-submissions-table__child" data-parent-id="{{ submission.id }}">
<td colspan="{{ table.columns|length }}"> <td colspan="{{ table.columns|length }}">
<table class="submission-meta"> <table class="submission-meta">
<tr class="submission-meta__row"> <tr class="submission-meta__row">
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
{% if row.record.previous %} {% if row.record.previous %}
{# we have a linked application, re-render the header row #} {# we have a linked application, re-render the header row #}
<tr class="all-submissions__child" data-parent-id="{{ row.record.id }}"> <tr class="all-submissions-table__child" data-parent-id="{{ row.record.id }}">
<td colspan="{{ table.columns|length }}"> <td colspan="{{ table.columns|length }}">
<table class="submission-meta"> <table class="submission-meta">
<tr class="submission-meta__row"> <tr class="submission-meta__row">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
'use strict'; 'use strict';
// add the toggle arrow before the submission titles // add the toggle arrow before the submission titles
$('.all-submissions__parent td.title').prepend('<span class="all-submissions__toggle js-toggle-submission"><span class="arrow"></span></span>'); $('.all-submissions-table__parent td.title').prepend('<span class="all-submissions-table__toggle js-toggle-submission"><span class="arrow"></span></span>');
// grab all the toggles // grab all the toggles
const children = Array.prototype.slice.call( const children = Array.prototype.slice.call(
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// show/hide the submission child rows // show/hide the submission child rows
children.forEach(function (child) { children.forEach(function (child) {
child.addEventListener('click', (e) => { child.addEventListener('click', (e) => {
$(e.target).closest('.all-submissions__parent').toggleClass('is-expanded'); $(e.target).closest('.all-submissions-table__parent').toggleClass('is-expanded');
}); });
}); });
......
...@@ -117,3 +117,6 @@ $filter-dropdown: '.select2 .select2-selection.select2-selection--single'; ...@@ -117,3 +117,6 @@ $filter-dropdown: '.select2 .select2-selection.select2-selection--single';
// listing header/spacer height // listing header/spacer height
$listing-header-height: 75px; $listing-header-height: 75px;
// Table breakpoint
$table-breakpoint: 'tablet-landscape';
// also in _table.scss .all-submissions-table {
$table-breakpoint: 'tablet-landscape';
.all-submissions {
$root: &; $root: &;
font-size: 14px; font-size: 14px;
......
// also in _all-submissions.scss // base table styles - specific ones in their own scss partial
$table-breakpoint: 'tablet-landscape';
table { table {
width: 100%; width: 100%;
background-color: $color--white; background-color: $color--white;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
@import 'base/typography'; @import 'base/typography';
// Components // Components
@import 'components/all-submissions'; @import 'components/all-submissions-table';
@import 'components/admin-bar'; @import 'components/admin-bar';
@import 'components/activity-feed'; @import 'components/activity-feed';
@import 'components/comment'; @import 'components/comment';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment