Skip to content

Commit

Permalink
Merge pull request #31 from UCF/whoops
Browse files Browse the repository at this point in the history
Announcement Keyword Bug Fix
  • Loading branch information
jmbarne3 authored Feb 14, 2019
2 parents 8c259ee + c361d9d commit fbac00d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/js/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
},
"globals": {
"Bloodhound": true,
"tinymce": true
"tinymce": true,
"ANNOUNCEMENTS_CONST": true
},
"extends": "eslint:recommended",
"parserOptions": {
Expand Down
12 changes: 6 additions & 6 deletions src/js/backend-script.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function confirmNewUser() {
const $urlInput = $('#confirmUserURL'),
url = $urlInput.val(),
$token = $('input[name="csrfmiddlewaretoken"]');
const $urlInput = $('#confirmUserURL');
const url = $urlInput.val();
const $token = $('input[name="csrfmiddlewaretoken"]');

$.post(
url,
Expand All @@ -12,9 +12,9 @@ function confirmNewUser() {
}

function showNewUserModal($) {
const $hfShowModal = $('#showNewUserModal'),
$newUserModal = $('#newUserModal'),
showModal = $hfShowModal ? $hfShowModal.val() : false;
const $hfShowModal = $('#showNewUserModal');
const $newUserModal = $('#newUserModal');
const showModal = $hfShowModal ? $hfShowModal.val() : false;

if (showModal === 'True') {
$newUserModal.modal();
Expand Down
2 changes: 1 addition & 1 deletion src/js/frontend-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function tagsInput($) {
},
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: {
url: 'http://127.0.0.1:8000/api/keywords/?s=%QUERY&format=json',
url: `${ANNOUNCEMENTS_CONST.KEYWORDS_API}?s=%QUERY&format=json`,
wildcard: '%QUERY'
}
});
Expand Down
3 changes: 2 additions & 1 deletion src/scss/_forms.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.tt-menu {
background-color: $white;
border: 1px solid $black;
font-size: 13px !important;
width: 100%;

Expand Down Expand Up @@ -31,4 +32,4 @@
[type="checkbox"] {
@extend .form-check-input;
}
}
}
4 changes: 2 additions & 2 deletions static/css/style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/js/script.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
</main>
{% block footer %}{% endblock %}
{% block footer_scripts %}
<script type="text/javascript">
var ANNOUNCEMENTS_CONST = {
KEYWORDS_API: "{% url 'announcements.api.keywords' %}"
};
</script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.min.js" integrity="sha256-tQ3x4V2JW+L0ew/P3v2xzL46XDjEWUExFkCDY0Rflqc=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script>
Expand Down

0 comments on commit fbac00d

Please sign in to comment.