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

« back to all changes in this revision

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

  • Committer: mattgiuca
  • Date: 2008-01-14 05:56:44 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:226
fileservice/action: putfile now correctly handles empty files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
function dom_make_img(src, width, height, title, alt)
94
94
{
95
95
    var img = document.createElement("img");
96
 
    img.setAttribute("src", urlencode_path(src));
 
96
    img.setAttribute("src", src);
97
97
    if (width != null)
98
98
        img.setAttribute("width", width);
99
99
    if (height != null)
334
334
    for (var i=0; i<split.length; i++)
335
335
        split[i] = encodeURIComponent(split[i]);
336
336
    path = path_join.apply(null, split);
337
 
    if (split[0] == "" && split.length > 1) path = "/" + path;
 
337
    if (split[0] == "") path = "/" + path;
338
338
    return path;
339
339
}
340
340