X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/f9c6711c22848fbc30edac1944e46bb21aba8c05..7cd6d451d97d1f1e7f3c0f9db2de03735dc8c8f0:/SL/Layout/ActionBar/Action.pm diff --git a/SL/Layout/ActionBar/Action.pm b/SL/Layout/ActionBar/Action.pm index 4243b652b..90eb8498c 100644 --- a/SL/Layout/ActionBar/Action.pm +++ b/SL/Layout/ActionBar/Action.pm @@ -49,29 +49,174 @@ sub init_id { $_[0]->p->name_to_id('action[]') } - 1; __END__ -=head 1 +=encoding utf-8 + +=head1 NAME + +SL::Layout::ActionBar::Action - base class for action bar actions + +=head1 DESCRIPTION + +This base class for actions can be used to implement elements that can be +added to L. + +Elements can be interactive or simply used for layout. Most of the actual +semantics are handled in the corresponding javascript C, so +this is only used to generate the DOM elements and to provide information for +request time logic decisions. + + +=head1 SYNOPSIS + + # implement: + package SL::Layout::ActionBar::Custom; + use parent qw(SL::Layout::ActionBar::Action); + + # unsugared use + SL::Layout::ActionBar::Custom->new( + text => t8('Description'), + params => { + key => $attr, + key => $attr, + ... + }, + ); + + # parse sugared version: + SL::Layout::ActionBar::Custom->from_params( + t8('Description'), + key => $attr, + key => $attr, + ... + ); + +=head1 INTERFACE + +=over 4 + +=item * C + +Needs to be implemented. Should render only the bare minimum necessary to +identify the element at run time. + +=item * C