From 2b7f7e75b4cfe8e111775970a4524ab48ec898bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 22 Sep 2015 14:18:32 +0200 Subject: [PATCH] Controller::Base: js accessor bereitstellen MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Der wird eh überall benutzt, also kann er auch gleich dahin. --- SL/Controller/Base.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- 2.20.1