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

« back to all changes in this revision

Viewing changes to www/media/browser/browser.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:
241
241
        return;
242
242
    }
243
243
 
 
244
    var subjects = null;
 
245
    var top_level_dir = path==username;
 
246
    if (top_level_dir)
 
247
    {
 
248
        var req = ajax_call(null, "userservice", "get_enrolments", null, "GET")
 
249
        subjects = decode_response(req);
 
250
    }
 
251
 
 
252
 
244
253
    /* This will always return a listing, whether it is a dir or a file.
245
254
     */
246
255
    var listing = response.responseText;
298
307
    var isdir = response.getResponseHeader("X-IVLE-Return") == "Dir";
299
308
    if (isdir)
300
309
    {
 
310
        setup_for_dir_listing(listing, subjects);
301
311
        handle_dir_listing(path, listing);
302
312
    }
303
313
    else