From: Sven Schöling Date: Tue, 22 Sep 2015 12:18:32 +0000 (+0200) Subject: Controller::Base: js accessor bereitstellen X-Git-Tag: release-3.4.1~724 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2b7f7e75b4cfe8e111775970a4524ab48ec898bb;p=kivitendo-erp.git Controller::Base: js accessor bereitstellen Der wird eh überall benutzt, also kann er auch gleich dahin. --- diff --git a/SL/Controller/Base.pm b/SL/Controller/Base.pm index 52ec19dcb..b97f3c509 100644 --- a/SL/Controller/Base.pm +++ b/SL/Controller/Base.pm @@ -13,7 +13,8 @@ use SL::Presenter; use Rose::Object::MakeMethods::Generic ( - scalar => [ qw(action_name) ], + scalar => [ qw(action_name) ], + 'scalar --get_set_init' => [ qw(js) ], ); # @@ -177,6 +178,10 @@ sub controller_name { return $class; } +sub init_js { + SL::ClientJS->new(controller => $_[0]) +} + # # Before/after run hooks # @@ -615,6 +620,10 @@ name the dispatching resolved to. Returns the global presenter object by calling L. +=item C + +Returns an L instance for this controller. + =back =head2 PRIVATE FUNCTIONS