665
666
checkbox.checked = filename in sel_files_dict;
666
667
td.appendChild(checkbox);
667
668
row.appendChild(td);
670
/* Column 2: Filetype and subversion icons. */
671
td = document.createElement("td");
672
td.setAttribute("class", "thincol");
673
td.setAttribute("onclick", selection_string);
674
/* Directories don't really have a MIME type, so we fake one. */
675
if (file.isdir) file.type = "text/directory";
676
td.appendChild(dom_make_img(mime_type_to_icon(file.type),
677
icon_size, icon_size, file.type_nice));
679
td = document.createElement("td");
680
td.setAttribute("class", "thincol");
681
if (under_subversion)
683
var icon = svnstatus_to_icon(file.svnstatus);
685
td.appendChild(dom_make_img(icon, icon_size, icon_size,
686
svnstatus_to_string(file.svnstatus)));
690
/* Column 3: Filename */
670
/* Column 2: Filetype and subversion icons. */
671
td = document.createElement("td");
672
td.setAttribute("class", "thincol");
673
td.setAttribute("onclick", selection_string);
674
td.appendChild(dom_make_img(mime_type_to_icon("text/directory"),
675
icon_size, icon_size, file.type_nice));
677
td = document.createElement("td");
678
td.setAttribute("class", "thincol");
679
if (under_subversion)
681
var icon = svnstatus_to_icon(file.svnstatus);
683
td.appendChild(dom_make_img(icon, icon_size, icon_size,
684
svnstatus_to_string(file.svnstatus)));
687
/* Column 3: Filename */
688
693
td = dom_make_link_elem("td", filename,
689
"Navigate to " + path_join(path, filename),
690
app_path(this_app, path, filename)/*,
691
"navigate(" + repr(path_join(path, filename)) + ")"*/);
692
td.setAttribute("onclick", selection_string);
694
"Navigate to " + path_join(path, filename),
695
app_path(this_app, path, filename));
697
/* Column 2: Filetype and subversion icons. */
698
td = document.createElement("td");
699
td.setAttribute("class", "thincol");
700
td.appendChild(dom_make_img(mime_type_to_icon(file.type),
701
icon_size, icon_size, file.type_nice));
703
td = document.createElement("td");
704
td.setAttribute("class", "thincol");
705
if (under_subversion)
707
var icon = svnstatus_to_icon(file.svnstatus);
709
td.appendChild(dom_make_img(icon, icon_size, icon_size,
710
svnstatus_to_string(file.svnstatus)));
713
/* Column 3: Filename */
714
699
td = dom_make_text_elem("td", filename);
715
td.setAttribute("onclick", selection_string);
701
td.setAttribute("onclick", selection_string);
718
704
/* Column 4: Size */
719
705
td = dom_make_text_elem("td", nice_filesize(file.size));
720
706
td.setAttribute("onclick", selection_string);
721
707
row.appendChild(td);
723
710
td = dom_make_text_elem("td", file.mtime_short, file.mtime_nice);
724
711
td.setAttribute("onclick", selection_string);
725
712
row.appendChild(td);