Permalink
Browse files

Switched to modal in bootstrap, but looks a little buggy at the moment.

  • Loading branch information...
1 parent 0c535c8 commit 0587db98534f5a034fbd0fac5b169564e8b1ccc0 @keokilee keokilee committed Apr 9, 2012
Showing with 12 additions and 21 deletions.
  1. +12 −21 makahiki/apps/widgets/prizes/templates/view_prizes/prize_list.html
@@ -15,32 +15,23 @@
{% for prize in prizes %}
<tr>
<td class="prize">
- {% if prize.image %}<img src="{{MEDIA_URL}}{{prize.image}}"/>{% endif %}
- <a id="{{name|slugify}}-{{prize.title|slugify}}-link" href="#">
+ {# {% if prize.image %}<img src="{{MEDIA_URL}}{{prize.image}}"/>{% endif %} #}
+ <a id="{{name|slugify}}-{{prize.title|slugify}}-link" data-toggle="modal"
+ href="#{{name|slugify}}-{{prize.title|slugify}}">
{{ prize.title }}
</a>
<!-- Modal Dialog stuff -->
- <div id="{{name|slugify}}-{{prize.title|slugify}}" class="prize-dialog" title="{{name}}: {{prize.title}}">
- {{ prize.long_description|markdown }}
- <div style="text-align: center">
- <input type="submit" value="OK"
- onclick='$("#{{name|slugify}}-{{prize.title|slugify}}").dialog("close");'/>
+ <div id="{{name|slugify}}-{{prize.title|slugify}}" class="modal fade">
+ <div class="modal-header">
+ <h3>{{name}}: {{prize.title}}</h3>
+ </div>
+ <div class="modal-body">
+ {{ prize.long_description|markdown }}
+ </div>
+ <div class="modal-footer">
+ <a href="#" class="btn">Close</a>
</div>
</div>
- <script type="text/javascript">
- $("#{{name|slugify}}-{{prize.title|slugify}}").dialog({
- autoOpen:false,
- modal:true,
- close:function (event, ui) {
- log_js_action("prizes", "{{name|slugify}}-{{prize.title|slugify}}", "close");
- }
- });
-
- $("#{{name|slugify}}-{{prize.title|slugify}}-link").click(function () {
- log_js_action("prizes", "{{name|slugify}}-{{prize.title|slugify}}", "open");
- $("#{{name|slugify}}-{{prize.title|slugify}}").dialog("open");
- });
- </script>
</td>
<td>
{{ prize.short_description|markdown }} <br/>

0 comments on commit 0587db9

Please sign in to comment.