projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: CTI-Test gefixt
[kivitendo-erp.git]
/
SL
/
Controller
/
Base.pm
diff --git
a/SL/Controller/Base.pm
b/SL/Controller/Base.pm
index
52ec19d
..
01da48b
100644
(file)
--- a/
SL/Controller/Base.pm
+++ b/
SL/Controller/Base.pm
@@
-13,7
+13,8
@@
use SL::Presenter;
use Rose::Object::MakeMethods::Generic
(
use Rose::Object::MakeMethods::Generic
(
- scalar => [ qw(action_name) ],
+ scalar => [ qw(action_name) ],
+ 'scalar --get_set_init' => [ qw(js) ],
);
#
);
#
@@
-165,6
+166,8
@@
sub send_file {
} else {
$::locale->with_raw_io(\*STDOUT, sub { print $$file_name_or_content });
}
} else {
$::locale->with_raw_io(\*STDOUT, sub { print $$file_name_or_content });
}
+
+ return 1;
}
sub presenter {
}
sub presenter {
@@
-177,6
+180,10
@@
sub controller_name {
return $class;
}
return $class;
}
+sub init_js {
+ SL::ClientJS->new(controller => $_[0])
+}
+
#
# Before/after run hooks
#
#
# Before/after run hooks
#
@@
-615,6
+622,10
@@
name the dispatching resolved to.
Returns the global presenter object by calling
L<SL::Presenter/get>.
Returns the global presenter object by calling
L<SL::Presenter/get>.
+=item C<js>
+
+Returns an L<SL::ClientJS> instance for this controller.
+
=back
=head2 PRIVATE FUNCTIONS
=back
=head2 PRIVATE FUNCTIONS