// nothing quite like a quick "database" in JavaScript, huh?

// columns per row are:
// project name, brief description, importance (1-5), difficulty (1-5), area
projects = [
    ["AdditionalInstall", "additional installation instructions to deal with complex cases", 5, 3, "website"],
    ["TestingApps", "Detailed instructions and examples for testing TurboGears apps", 4, 2, "website"],
    ["Utf8Flash", "Flash message has some trouble with UTF-8", 4, 1, "turbogears"],
    ["ChangedDocuments", "Extend docgen.py to create a changed documents list", 3, 2, "turbogears"],
    ["BaseTemplateReload", "Make base templates reload automatically when developing", 4, 3, "turbogears/kid"],
    ["GetVar", "Add a 'getVar' function to deal with nonexistent values", 5, 2, "kid"],
    ["WebShell", "Make a cross-browser Python shell that can be accessed via the web", 3, 3, "turbogears"],
    ["KidEscaping", "Escaping of $ is not always handled correctly", 5, 3, "kid"],
    ["KidErrorReporting", "Provide better error context for template problems", 4, 5, "kid"],
    ["SQLObjectLogging", "Change SQLObject to use the logging module rather than prints", 3, 2, "sqlobject"],
    ["SQLObjectCaching", "Cleanup and document SQLObject's caching so that people can make better use of it", 4, 4, "sqlobject"],
    ["MochiKitAnimation", "Port animation tools to MochiKit", 5, 3, "mochikit"],
    ["FindingDOMNodes", "Better javascript functions for finding and selecting DOM nodes", 3, 3, "mochikit"],
    ["DebuggingBookmarklet", "Make the debugging bookmarklet a little nicer than an alert", 3, 4, "mochikit"],
    ["JSToServerLog", "Send logging messages to the server to work around browser or script death", 4, 2, "turbogears"],
    ["AcceptHeader", "Use the Accept header as an alternative to the ?tg_format parameter", 3, 1, "turbogears"],
    ["AuthenAuthorize", "Easy to use, configure and extend authentication/authorization", 5, 4, "turbogears"],
    ["SimpleCrud", "Provide code to handle simple CRUD tasks", 5, 3, "turbogears"],
    ["JavaScriptValidation", "Port the validation part of FormEncode in some form to JavaScript", 3, 3, "turbogears"],
    ["ExtendJson", "JSON serialization needs to be extendable to other types", 5, 2, "turbogears"],
    ["DjangoCache", "See if Django's robust caching mechanism can be used with TurboGears", 4, 4, "turbogears"],
]

function imgscore(value, image) {
    elems = [DIV({"style" : "display: none"}, value)];
    for (i = 0; i < value; i++) {
        elems[i+1] = IMG({"src" : image, "width" : 16, "height" : 16})
    }
    return elems;
}

function row_display(row) {
    return TR(null,
        TD(null, row[0]),
        TD(null, row[1]),
        TD(null, imgscore(row[2], "../gear.gif")),
        TD(null, imgscore(row[3], "difficulty.gif")),
        TD(null, row[4])
    );
}

newbody = map(row_display, projects);
replaceChildNodes("ptablebody", newbody);
