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

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/browser/media/browser.js

  • Committer: David Coles
  • Date: 2009-12-02 19:16:46 UTC
  • mfrom: (1332.1.4 console-fix)
  • Revision ID: coles.david@gmail.com-20091202191646-e55k83yd7sera1fk
When a console is restarted due to either being reset from the UI or killed 
due to inactivity/resource limits then will restart at the correct working 
directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 */
22
22
 
23
23
/* Url names for apps */
24
 
this_app = "files";
25
24
edit_app = "edit";
26
25
service_app = "fileservice";
27
26
serve_app = "serve";
960
959
    navigate(path);
961
960
}
962
961
 
963
 
/** Gets the current path of the window */
964
 
function get_path() {
965
 
    var path = parse_url(window.location.href).path;
966
 
    /* Strip out root_dir + "/files" from the front of the path */
967
 
    var strip = make_path(this_app);
968
 
    if (path.substr(0, strip.length) == strip)
969
 
        path = path.substr(strip.length+1);
970
 
    else
971
 
    {
972
 
        /* See if this is an edit path */
973
 
        strip = make_path(edit_app);
974
 
        if (path.substr(0, strip.length) == strip)
975
 
        {
976
 
            path = path.substr(strip.length+1);
977
 
        }
978
 
    }
979
 
 
980
 
    if (path.length == 0)
981
 
    {
982
 
        /* Navigate to the user's home directory by default */
983
 
        /* TEMP? */
984
 
        path = username;
985
 
    }
986
 
 
987
 
    return path;
988
 
}