rfe #10521: Use monospaced font in template edit textarea
This commit is contained in:
parent
5fc7b42a88
commit
28f4b1b4d2
4 changed files with 81 additions and 0 deletions
|
|
@ -100,4 +100,37 @@ sub getName {
|
|||
return WebGUI::International->new($session, 'WebGUI')->get('codearea');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 headTags
|
||||
|
||||
Includes script files for the code area
|
||||
|
||||
=cut
|
||||
|
||||
sub headTags {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
$self->SUPER::headTags(@_);
|
||||
$session->style->setScript(
|
||||
$session->url->extras('yui-webgui/build/codeArea/codeArea-min.js')
|
||||
);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 toHtml
|
||||
|
||||
Add some javascript to fix hitting the tab key.
|
||||
|
||||
=cut
|
||||
|
||||
sub toHtml {
|
||||
my $self = shift;
|
||||
$self->headTags;
|
||||
my $id = $self->get('id');
|
||||
return $self->SUPER::toHtml(@_)
|
||||
. qq{<script>new YAHOO.WebGUI.CodeArea('$id').render()</script>};
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue