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

Feature/flexbox fix #225

Merged
merged 8 commits into from
Jun 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions openfecwebapp/api_caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def load_nested_type(parent_type, c_id, nested_type, *path, **filters):
def load_cmte_financials(committee_id, **filters):
filters.update({
'per_page': MAX_FINANCIALS_COUNT,
'report_type': filters.get('report_type', []) + ['-TER']
})

reports = _call_api('committee', committee_id, 'reports', **filters)
Expand Down
2 changes: 1 addition & 1 deletion static/js/modules/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var defaultOpts = {
};

function onSelectChange($input, updatedText) {
$input.attr('placeholder', updatedText);
$input.attr('placeholder', updatedText).attr('aria-label', updatedText);
};

var Search = function($el, opts) {
Expand Down
8 changes: 1 addition & 7 deletions static/js/modules/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ module.exports = {
window.location = window.location.origin + '/' + datasetName + '/' + datum.id;
});

$('.twitter-typeahead').css({
display: 'flex',
});
$('.twitter-typeahead').addClass('flex-container').css('display','');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI need to a class to take advantage of Bourbon's browser prefixing for the display property. And then the css method is to override the fact that the library sets an inline style of display: inline-block.

},

init: function(){
Expand Down Expand Up @@ -233,9 +231,5 @@ module.exports = {
definition: datum.definition
});
});

$('.twitter-typeahead').css({
display: 'flex',
});
}
};
6 changes: 6 additions & 0 deletions static/styles/_base/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ select {
&:focus {
outline: 3px solid $focus;
}

&::-ms-expand {
display: none;
}
}

select[multiple] {
Expand All @@ -123,6 +127,8 @@ select[multiple] {

.input-button-combo {
@include display(flex);
@include align-items(stretch);
@include flex-direction(row);
@include justify-content(center);
height: 4rem;

Expand Down
4 changes: 4 additions & 0 deletions static/styles/_components/_glossary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
.glossary {
z-index: 999;

.twitter-typeahead {
width: 100%;
}

.tt-dropdown-menu {
width: 100%;
}
Expand Down
2 changes: 1 addition & 1 deletion static/styles/_components/_search-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
// Typeahead
.twitter-typeahead {
@include display(flex);
width: 100%;
width: 50%;
}

.tt-dropdown-menu {
Expand Down
4 changes: 4 additions & 0 deletions static/styles/_layout/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ body {
@include span-columns(6);
}

.flex-container {
@include display(flex);
}

// Chunks
// These are common grouping sizes, described by their desktop size

Expand Down
2 changes: 1 addition & 1 deletion templates/committees-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ <h5>{{ pretty_name }}</h5>

<section class="page-section" id="section-1" role="tabpanel" aria-hidden="false" aria-labelledby="section-1-header">
<div class="container committee-summary">
{% if totals %}
{% if reports and totals %}
<h2 id="section-1-header" tabindex="0">Financial Summary</h2>
<p class="text--lead">Get the full picture of all of the money received and spent by this committee.</p>
<div class="page-subsection page-subsection--noline">
Expand Down
2 changes: 1 addition & 1 deletion templates/committees.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1><img width="32" height="32" class="category-icon" src="/static/img/icon-comm
{% if pagination %}
{% include 'partials/pagination.html' %}
{% endif %}
<button id="filter-toggle" data-slide="left">Filter Results</button>
<button id="filter-toggle" data-slide="left">Show Filters</button>
</div>

<section class="results-content">
Expand Down
4 changes: 2 additions & 2 deletions templates/partials/search-bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
Committees</option>
</select>
<input class="search-bar" type="text" name="search"
aria-label="Search for candidates and committees"
placeholder="Search for candidates by name" autocomplete="off"
aria-label="Enter a candidate name"
placeholder="Enter a candidate name" autocomplete="off"
autocorrect="off" autocapitalize="off" spellcheck="false"
value="{{ query or '' }}">
<button class="search-submit primary"><img width="16" height="16" src="/static/img/icon-search--white.svg" alt="Magnifying glass icon"></button>
Expand Down