~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/media/browser/listing.js

  • Committer: dcoles
  • Date: 2008-07-23 07:38:03 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:944
Special Home Directory: Work to create a special home directory that shows the 
subjects you are enrolled in, the repositories that you have for those subjects 
and aranges the files in a sensible fashion. (See bugtracker [ 2010232 ] Home 
directory: special user interface)

This should also support showing group repositories at a later date.

Show diffs side-by-side

added added

removed removed

Lines of Context:
555
555
 * assuming that clear_page has just been called or the page just
556
556
 * loaded for the first time.
557
557
 */
558
 
function setup_for_dir_listing()
 
558
function setup_for_dir_listing(listing, subjects)
559
559
{
560
560
    var filesbody = document.getElementById("filesbody");
561
561
 
573
573
    var filetablediv = document.createElement("div");
574
574
    filetable.appendChild(filetablediv);
575
575
    filetablediv.setAttribute("id", "filetablediv");
 
576
    /* Do the home listing */
 
577
    if (subjects != null)
 
578
        home_listing(listing, subjects);
576
579
    /* A nested table within this div - the actual files listing */
577
580
    var filetabletable = document.createElement("table");
578
581
    filetablediv.appendChild(filetabletable);
626
629
 
627
630
/** Presents the directory listing.
628
631
 */
629
 
function handle_dir_listing(path, listing)
 
632
function handle_dir_listing(path, listing, subjects)
630
633
{
631
 
    setup_for_dir_listing();
632
634
    var row_toggle = 1;
633
635
    /* Nav through the top-level of the JSON to the actual listing object. */
634
636
    var listing = listing.listing;
635
637
 
636
638
    /* Is this dir under svn? */
637
 
    var under_subversion = "svnstatus" in current_file;
 
639
    var under_subversion = ("svnstatus" in current_file) && (current_file.svnstatus != "unversioned");
638
640
 
639
641
    var files = document.getElementById("files");
640
642
    var file;