Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0e3eeac

Browse files
updating search box styling
1 parent 87eec1f commit 0e3eeac

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

‎mpeds_coder.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -824,12 +824,15 @@ def add_canonical_link():
824824

825825
## check if this link exists already
826826
res = db_session.query(CodeEventCreator, CanonicalEventLink)\
827+
.join(CanonicalEventLink, CodeEventCreator.id == CanonicalEventLink.cec_id)\
827828
.filter(
828829
CodeEventCreator.variable == 'link',
829-
CodeEventCreator.article_id == article_id
830+
CodeEventCreator.article_id == article_id,
831+
CanonicalEventLink.canonical_id == canonical_event_id
830832
).first()
831833

832-
## if the CEC and CEL are not null, this exists already
834+
## if the CEC and CEL are not null,
835+
## and CEL matches canonical event, then link this.
833836
if res and res[0] and res[1]:
834837
return make_response("Link already exists.", 400)
835838

@@ -949,7 +952,8 @@ def del_canonical_link():
949952
for cec in cecs:
950953
## get the CELs for this CEC
951954
cel = db_session.query(CanonicalEventLink).filter(CanonicalEventLink.cec_id == cec.id).first()
952-
db_session.delete(cel)
955+
if cel:
956+
db_session.delete(cel)
953957

954958
## commit these deletes first to avoid foreign key error
955959
db_session.commit()

‎static/adj.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,10 @@ $(function () {
732732
});
733733

734734
// Listener for search button.
735-
$('#adj_search_button').click(loadSearch);
735+
$('#adj_search_button').click(function(e) {
736+
e.preventDefault();
737+
loadSearch();
738+
});
736739

737740
// Listener for clear button.
738741
$('.clear-values').each(function() {

‎static/style.css‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,12 @@ footer {
377377
Adjudication variables
378378
*/
379379
.adj-variable-group, .event-group {
380-
padding: 6px 0;
380+
padding: 2px 0;
381+
}
382+
383+
.adj-variable-group select,
384+
.adj-variable-group input {
385+
font-size: 0.9em;;
381386
}
382387

383388
.event-group {

‎templates/adj.html‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,32 +52,31 @@ <h4>Event Selection</h4>
5252
<h5>Search</h5>
5353
<form id="adj_search_form">
5454
<div class="row form-row">
55-
<div class="col-sm-11">
55+
<div class="col-sm-9">
5656
<input class="form-control"
5757
name="adj_search_input"
5858
id="adj_search_input"
5959
type="text"
6060
placeholder = "Example: Mizzou OR Missouri, Quebec AND students"/>
6161
</div>
62+
<div class="col-sm-3">
63+
<button id="adj_search_button" class="btn btn-primary">Search</button>
64+
</div>
6265
</div>
6366
</form>
6467
</div>
65-
<hr/>
6668
<div class="adj-variable-group">
6769
<h5>Filter</h5>
6870
<form id="adj_filter_form">
6971
{% include 'adj-filter.html' %}
7072
</form>
7173
</div>
72-
<hr/>
7374
<div class="adj-variable-group">
7475
<h5>Sort</h5>
7576
<form id="adj_sort_form">
7677
{% include 'adj-sort.html' %}
7778
</form>
7879
</div>
79-
<hr/>
80-
<button id="adj_search_button" class="btn btn-primary">Search</button>
8180
</div>
8281
<div class="tab-pane" id="cand_block">
8382
<ul class="nav nav-pills nav-justified">

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /