fixes to DataTable form control
removed stupid configuration and added some necessary ones
This commit is contained in:
parent
503c216741
commit
b74fa78ee2
1 changed files with 10 additions and 10 deletions
|
|
@ -50,10 +50,6 @@ The following additional parameters have been added via this sub class.
|
||||||
|
|
||||||
This is the URL to get the data from, AJAX-style.
|
This is the URL to get the data from, AJAX-style.
|
||||||
|
|
||||||
=head4 ajaxDataFunc
|
|
||||||
|
|
||||||
This is the ?func= to get the data from.
|
|
||||||
|
|
||||||
=head4 ajaxSaveUrl
|
=head4 ajaxSaveUrl
|
||||||
|
|
||||||
This is the URL to send AJAX requests to. If this exists, will send
|
This is the URL to send AJAX requests to. If this exists, will send
|
||||||
|
|
@ -63,6 +59,10 @@ updates to the table asyncronously.
|
||||||
|
|
||||||
This is the ?func= to send AJAX requests to.
|
This is the ?func= to send AJAX requests to.
|
||||||
|
|
||||||
|
=head4 ajaxSaveExtras
|
||||||
|
|
||||||
|
Any extra name=value pairs needed to save the data successfully
|
||||||
|
|
||||||
=head4 showEdit
|
=head4 showEdit
|
||||||
|
|
||||||
If true, will enable the table for editing. This is only necessary when
|
If true, will enable the table for editing. This is only necessary when
|
||||||
|
|
@ -82,15 +82,15 @@ sub definition {
|
||||||
ajaxDataUrl => {
|
ajaxDataUrl => {
|
||||||
defaultValue => undef,
|
defaultValue => undef,
|
||||||
},
|
},
|
||||||
ajaxDataFunc => {
|
|
||||||
defaultValue => "view",
|
|
||||||
},
|
|
||||||
ajaxSaveUrl => {
|
ajaxSaveUrl => {
|
||||||
defaultValue => undef,
|
defaultValue => undef,
|
||||||
},
|
},
|
||||||
ajaxSaveFunc => {
|
ajaxSaveFunc => {
|
||||||
defaultValue => "view",
|
defaultValue => "view",
|
||||||
},
|
},
|
||||||
|
ajaxSaveExtras => {
|
||||||
|
defaultValue => undef,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
return $class->SUPER::definition($session, $definition);
|
return $class->SUPER::definition($session, $definition);
|
||||||
|
|
@ -282,7 +282,7 @@ sub getValue {
|
||||||
if ( ref $value eq "HASH" ) {
|
if ( ref $value eq "HASH" ) {
|
||||||
$value = JSON->new->encode( $value );
|
$value = JSON->new->encode( $value );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -301,10 +301,10 @@ sub getValueAsHtml {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 getTableHtml ( [data] )
|
=head2 getTableHtml ( data )
|
||||||
|
|
||||||
Get the HTML to render the table. C<data> is the data structure with
|
Get the HTML to render the table. C<data> is the data structure with
|
||||||
columns and rows to render. Defaults to C<getValue>.
|
columns and rows to render.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue