Changeset 1151

Show
Ignore:
Timestamp:
02/05/09 20:19:21 (10 years ago)
Author:
sean
Message:

made nymygeni load s s line, and those below, will be ignored--

M media/scripts/mygeni.js
M control/views.py

Location:
seattle/trunk/www/geni
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • seattle/trunk/www/geni/control/views.py

    r1150 r1151  
    3737from django.http import Http404 
    3838from models import User, Donation, Vessel, VesselMap, Share 
    39 from resource_operations import acquire_resources, release_resources 
     39#from resource_operations import acquire_resources, release_resources 
    4040from db_operations import pop_key 
    4141from django.http import HttpResponseRedirect 
  • seattle/trunk/www/geni/media/scripts/mygeni.js

    r1143 r1151  
    257257} 
    258258 
     259 
    259260function update_blocks(type, data) { 
    260261        if (type == "credits") { 
    261262                var credits = $("#credits"); 
    262263                var creditnames = $("#creditnames"); 
    263                 for (var i = 0; i < data.length; i++) { 
    264                         create_block(credits, data[i].username, data[i].percent, false); 
    265                         create_label(creditnames, data[i].username, data[i].percent, false); 
     264                json = eval('(' + data + ')'); 
     265                for (var i = 0; i < json.length; i++) { 
     266                        create_block(credits, json[i].username, json[i].percent, false); 
     267                        create_label(creditnames, json[i].username, json[i].percent, false); 
    266268                } 
    267269        } else if (type == "shares") { 
    268270                var usage = $("#usage"); 
    269271                var usagenames = $("#usagenames"); 
    270                 for (var i = 0; i < data.length; i++) { 
    271                         create_block(usage, data[i].username, data[i].percent, true); 
    272                         create_label(usagenames, data[i].username, data[i].percent, true); 
    273                 } 
    274         } 
    275 } 
     272                json = eval('(' + data + ')'); 
     273                for (var i = 0; i < json.length; i++) { 
     274                        create_block(usage, json[i].username, json[i].percent, true); 
     275                        create_label(usagenames, json[i].username, json[i].percent, true); 
     276                } 
     277        } 
     278}