From: Ant Zucaro Date: Sun, 29 Apr 2012 16:10:14 +0000 (-0400) Subject: Initial version of ajax-updating of the accuracy graph. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=026915c9eeffb932fe2efbd702f850cfc65efc90;p=xonotic%2Fxonstat.git Initial version of ajax-updating of the accuracy graph. The accuracy view needs to be changed to accommodate clicking on weapons where not enough data is supplied. Right now it results in a JS error that halts all further updates to the graph. --- diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index 5f3071c..d822845 100755 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -11,6 +11,7 @@ ${nav.nav('players')} @@ -94,6 +97,32 @@ Player Information

Nex Accuracy

+ +
+ Show nex accuracy. + +
+ +
+ Show rifle accuracy. + +
+ +
+ Show minstanex accuracy. + +
+ +
+ Show uzi accuracy. + +
+ +
+ Show shotgun accuracy. + +
+ % endif diff --git a/xonstat/views/player.py b/xonstat/views/player.py index 9f2751f..cef4a52 100755 --- a/xonstat/views/player.py +++ b/xonstat/views/player.py @@ -269,7 +269,7 @@ def player_accuracy(request): games = over how many games to display accuracy. Can be up to 50. """ player_id = request.matchdict['id'] - allowed_weapons = ['nex', 'shotgun', 'uzi', 'minstanex'] + allowed_weapons = ['nex', 'rifle', 'shotgun', 'uzi', 'minstanex'] weapon_cd = 'nex' games = 20