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

« back to all changes in this revision

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

  • Committer: Matt Giuca
  • Date: 2010-02-23 04:38:33 UTC
  • Revision ID: matt.giuca@gmail.com-20100223043833-f73naxuzoz6ux7rm
browser.js: Fixed generation of links in file browser to Serve, Download and Share-this-file links containing special URI characters. Now properly URL-encoded. Added util.js app_url and public_app_url, replacing calls to app_path and public_app_path. Fixes Launchpad bug #524176.

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 "http://" + 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).