Changeset 1073


Ignore:
Timestamp:
12/13/09 14:15:39 (2 years ago)
Author:
gcosmin
Message:

Select all attachments checkbox.

Solved ticket #381.
Review URL: http://reviewboard.infoarena.ro/r/110/

Location:
trunk/www
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/format/table.php

    r934 r1073  
    9393 
    9494            $key = getattr($column, 'key'); 
    95             $caption = html_escape(getattr($column, 'title', $key)); 
     95            if (isset($column['html_title'])) { 
     96                $caption = getattr($column, 'html_title', $key); 
     97            } else { 
     98                $caption = html_escape(getattr($column, 'title', $key)); 
     99            } 
    96100 
    97101            // sortable columns 
  • trunk/www/views/listattach.php

    r1034 r1073  
    1919        } 
    2020 
     21    } 
     22    function attachments_toggle_selection(checked) { 
     23        var check_boxes = getElementsByTagAndClassName('input', 'attach-checkbox'); 
     24 
     25        for (var index in check_boxes) { 
     26            check_boxes[index].checked = checked; 
     27        } 
    2128    } 
    2229</script> 
     
    5259    $id = html_escape($row["id"]); 
    5360    $name = html_escape($row["name"]); 
    54     $attachurl = "<input type='checkbox' name='$id' value='$name'>"; 
    55  
     61    $attachurl = "<input type='checkbox' name='$id' value='$name' class='attach-checkbox'>"; 
    5662    return $attachurl; 
    5763} 
     
    7985$column_infos = array( 
    8086    array ( 
    81         'title' => '', 
     87        'html_title' => '<input type="checkbox" ' . 
     88                'onclick="attachments_toggle_selection(this.checked)" />', 
    8289        'key' => 'zip', 
    8390        'rowform' => 'format_attach_zip' 
Note: See TracChangeset for help on using the changeset viewer.