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

« back to all changes in this revision

Viewing changes to ivle/webapp/coremedia/util.js

  • Committer: William Grant
  • Date: 2010-02-23 08:48:09 UTC
  • mfrom: (1673 trunk)
  • mto: This revision was merged to the branch mainline in revision 1674.
  • Revision ID: grantw@unimelb.edu.au-20100223084809-du6dvsxrjhw15ytr
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
512
512
    return make_path(path_join.apply(null, arguments));
513
513
}
514
514
 
 
515
/** Same as app_path but creates a properly-escaped site-relative URL.
 
516
 */
 
517
function app_url(app /*,...*/)
 
518
{
 
519
    return urlencode_path(app_path.apply(null, arguments));
 
520
}
 
521
 
515
522
/** Generates an absolute URL to a public application
516
523
 */
517
 
function public_app_path(app /*,...*/)
 
524
function public_app_url(app /*,...*/)
518
525
{
519
 
    return location.protocol + "//" + public_host
520
 
        + make_path(path_join.apply(null, arguments));
 
526
    return "http://" + public_host + app_url.apply(null, arguments);
521
527
}
522
528
 
523
529
/** Given a path, gets the "basename" (the last path segment).
659
665
    else
660
666
    {
661
667
        /* POST & PUT & PATCH sends the args in the request body */
662
 
        url = encodeURI(path);
 
668
        url = urlencode_path(path);
663
669
        xhr.open(method, url, asyncronous);
664
670
        var message;
665
671
        if (content_type == "multipart/form-data")