Skip to content
This repository has been archived by the owner on Jan 31, 2018. It is now read-only.

Commit

Permalink
[bug 986071] Fixes the cyoa page
Browse files Browse the repository at this point in the history
The cyoa page broke when we updated brick and changed around
generic_feedback.js. It probably shouldn't be relying on
generic_feedback.js, so this fixes that and also makes it work properly.
  • Loading branch information
willkg committed Mar 20, 2014
1 parent 5e417e7 commit 126bd8c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
8 changes: 8 additions & 0 deletions fjord/feedback/static/js/cyoa.js
@@ -0,0 +1,8 @@
(function($) {
document.addEventListener('DOMComponentsLoaded', function firstCard() {
var xdeck = $('x-deck')[0];
document.removeEventListener('DOMComponentsLoaded', firstCard);
xdeck.showCard(0);
});

}(jQuery));
9 changes: 6 additions & 3 deletions fjord/feedback/templates/feedback/cyoa.html
Expand Up @@ -3,12 +3,15 @@

{% block page_title %}Which product?{% endblock %}

{% block site_js %}
<script src="{{ settings.STATIC_URL }}js/lib/brick-1.0.0.byob.min.js"></script>
{{ js('cyoa') }}
{% endblock %}

{% block body %}
<x-deck>
<x-card id="picker">
<x-appbar>
<header>Which product?</header>
</x-appbar>
<x-appbar heading="Which product?" subheading=""></x-appbar>

<section>
<p>
Expand Down
5 changes: 5 additions & 0 deletions fjord/settings/base.py
Expand Up @@ -262,6 +262,11 @@
'js/init.js',
'js/ga.js',
),
'cyoa': (
'js/lib/jquery.min.js',
'js/cyoa.js',
'js/ga.js',
),
'generic_feedback': (
'js/lib/jquery.min.js',
'js/common_feedback.js',
Expand Down

0 comments on commit 126bd8c

Please sign in to comment.