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

« back to all changes in this revision

Viewing changes to www/media/common/util.js

Remove www/apps/help. Replaced by ivle.webapp.help.

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