added: Delete columns in DataTable

fixed: Now more than one DataTable can be on a page
This commit is contained in:
Doug Bell 2008-11-07 03:32:18 +00:00
parent 78dbd7f5fd
commit d224376d02
6 changed files with 161 additions and 47 deletions

View file

@ -220,7 +220,7 @@ sub prepareView {
# TODO Use a WebGUI::DataSource
my $dt = WebGUI::Form::DataTable->new(
$session, {
name => "data",
name => $self->getId,
value => $self->get('data'),
defaultValue => undef,
}

View file

@ -161,7 +161,7 @@ sub getDataTableHtml {
# Progressively enhance the bejesus out of it
$html .= <<"ENDJS";
<script type="text/javascript">
var myDataTable = WebGUI.Form.DataTable( "$id-container", $columnsJson, $optionsJson );
new WebGUI.Form.DataTable( "$id-container", $columnsJson, $optionsJson );
</script>
ENDJS

View file

@ -68,6 +68,12 @@ our $I18N = {
context => q{Format for a column with numbers},
},
"format date" => {
message => q{Date},
lastUpdated => 0,
context => q{Format for a column with a date},
},
"add column" => {
message => q{Add Column},
lastUpdated => 0,
@ -127,6 +133,12 @@ our $I18N = {
lastUpdated => 0,
context => q{How to reorder columns. Shown in the help pop-up},
},
"delete column" => {
message => q{Delete},
lastUpdated => 0,
context => q{Button to delete a column, shown in the Edit Schema dialog},
},
};
1;