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

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/browser/media/listing.js

  • Committer: William Grant
  • Date: 2009-05-19 02:55:01 UTC
  • Revision ID: grantw@unimelb.edu.au-20090519025501-uc2pp8jegxizve6y
Replace some horrible filebrowser JS with XHTML.

Show diffs side-by-side

added added

removed removed

Lines of Context:
614
614
    var filetabletable = document.createElement("table");
615
615
    filetablediv.appendChild(filetabletable);
616
616
    filetabletable.setAttribute("width", "100%");
617
 
    var filetablethead = document.createElement("thead");
618
 
    filetabletable.appendChild(filetablethead);
619
 
    var filetablethead_tr = document.createElement("tr");
620
 
    filetablethead.appendChild(filetablethead_tr);
621
 
    filetablethead_tr.setAttribute("class", "rowhead");
622
 
    /* Row headers */
623
 
    var filetablethead_th = document.createElement("th");
624
 
    $('<input type="checkbox" title="Select All" onchange="action_selectall(this.checked)" />').appendTo(filetablethead_th);
625
 
    filetablethead_tr.appendChild(filetablethead_th);
626
 
    filetablethead_th.setAttribute("class", "col-check");
627
 
    filetablethead_th = dom_make_link_elem("th", "Filename",
628
 
        "Sort by filename", null,
629
 
        "return sort_listing(\"filename\", !sort_ascending)");
630
 
    filetablethead_tr.appendChild(filetablethead_th);
631
 
    filetablethead_th.setAttribute("class", "col-filename");
632
 
    filetablethead_th.setAttribute("colspan", 3);
633
 
    filetablethead_th = dom_make_link_elem("th", "Size",
634
 
        "Sort by file size", null, "return sort_listing(\"size\",!sort_ascending)");
635
 
    filetablethead_tr.appendChild(filetablethead_th);
636
 
    filetablethead_th.setAttribute("class", "col-size");
637
 
    filetablethead_th = dom_make_link_elem("th", "Modified",
638
 
        "Sort by date modified", null, "return sort_listing(\"mtime\",!sort_ascending)");
639
 
    filetablethead_tr.appendChild(filetablethead_th);
640
 
    filetablethead_th.setAttribute("class", "col-date");
 
617
 
 
618
    $('\
 
619
<thead> \
 
620
  <tr class="rowhead"> \
 
621
    <th class="col-check"> \
 
622
      <input title="Select All" onchange="action_selectall(this.checked)" type="checkbox"> \
 
623
    </th> \
 
624
    <th colspan="3" class="col-filename"> \
 
625
      <a onclick="return sort_listing(\'filename\', !sort_ascending)" title="Sort by filename" href="">Filename</a> \
 
626
    </th> \
 
627
    <th class="col-size"> \
 
628
      <a onclick="return sort_listing(\'size\', !sort_ascending)" title="Sort by file size" href="">Size</a> \
 
629
    </th> \
 
630
    <th class="col-date"> \
 
631
      <a onclick="return sort_listing(\'mtime\', !sort_ascending)" title="Sort by date modified" href="">Modified</a> \
 
632
    </th> \
 
633
  </tr> \
 
634
</thead>').appendTo(filetabletable);
 
635
 
641
636
    /* Empty body */
642
637
    var filetabletbody = document.createElement("tbody");
643
638
    filetabletable.appendChild(filetabletbody);