Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Replace empty tables with placeholder text. #753

Merged
merged 4 commits into from
Sep 25, 2015

Conversation

jmcarp
Copy link
Contributor

@jmcarp jmcarp commented Sep 24, 2015

On fetching results from tables without filters, destroy the DataTable
instance and add placeholder text if no results found. Note: this patch
uses a placeholder placeholder, which would probably benefit from style
and content review by @noahmanger and @emileighoutlaw.

[Resolves #512]

On fetching results from tables without filters, destroy the `DataTable`
instance and add placeholder text if no results found. Note: this patch
uses a placeholder placeholder, which would probably benefit from style
and content review by @noahmanger and @emileighoutlaw.

[Resolves fecgov#512]
if (!response.pagination.count) {
api.destroy();
var $table = $(api.table().node());
$table.before('No data found.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put this in a <div class="message message--alert">?

@noahmanger
Copy link
Contributor

Not all of the tables on the single committee page use the default tableOpts so they don't have the correct setting.

@jmcarp
Copy link
Contributor Author

jmcarp commented Sep 25, 2015

Updated!

noahmanger pushed a commit that referenced this pull request Sep 25, 2015
Replace empty tables with placeholder text.
@noahmanger noahmanger merged commit b4d404e into fecgov:develop Sep 25, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants