Web (Storycraft): since the lines array includes the prompt for the next line (''), subtract 1 when drawing the progress bar

This commit is contained in:
Brian S. Stephan 2011-02-22 22:55:13 -06:00
parent cdf6b3db95
commit 902b7755e5
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@
<div class="progressblock" id="progressblock{{game.id}}">
<div class="progressbar" id="progressbar{{game.id}}"></div>
</div>
<script>var pb = new YAHOO.widget.ProgressBar().render('progressbar{{game.id}}'); var space = YAHOO.util.Dom.getRegion('progressblock{{game.id}}'); pb.set('width', space.width-35); pb.set('minValue', 0); pb.set('maxValue', {{ game.game_length }}); pb.set('value', 0); if (0) { pb.set('anim', true); var anim = pb.get('anim'); anim.duration = 2; } pb.set('value', {{ lines|length }});</script>
<script>var pb = new YAHOO.widget.ProgressBar().render('progressbar{{game.id}}'); var space = YAHOO.util.Dom.getRegion('progressblock{{game.id}}'); pb.set('width', space.width-35); pb.set('minValue', 0); pb.set('maxValue', {{ game.game_length }}); pb.set('value', 0); if (0) { pb.set('anim', true); var anim = pb.get('anim'); anim.duration = 2; } pb.set('value', {{ lines|length }}-1);</script>
{% endif %}
</div>