Convert Codearea, Slider and Zipcode to headTags
This commit is contained in:
parent
b4ee093903
commit
3c17d77a5c
3 changed files with 56 additions and 19 deletions
|
|
@ -259,6 +259,21 @@ sub getSliderVariable {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 headTags ( )
|
||||
|
||||
Set the head tags for this form plugin
|
||||
|
||||
=cut
|
||||
|
||||
sub headTags {
|
||||
my $self = shift;
|
||||
$self->session->style->setScript($self->session->url->extras("slider/js/range.js"));
|
||||
$self->session->style->setScript($self->session->url->extras("slider/js/timer.js"));
|
||||
$self->session->style->setScript($self->session->url->extras("slider/js/slider.js"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 toHtml ( )
|
||||
|
||||
Renders an input tag of type text.
|
||||
|
|
@ -267,10 +282,6 @@ Renders an input tag of type text.
|
|||
|
||||
sub toHtml {
|
||||
my $self = shift;
|
||||
$self->session->style->setScript($self->session->url->extras("slider/js/range.js"));
|
||||
$self->session->style->setScript($self->session->url->extras("slider/js/timer.js"));
|
||||
$self->session->style->setScript($self->session->url->extras("slider/js/slider.js"));
|
||||
$self->session->style->setLink($self->session->url->extras("slider/css/bluecurve/bluecurve.css"), {rel=>"stylesheet", type=>"text/css"});
|
||||
|
||||
# We need to make the variables unique because javascript does not have block scope. Also js cannot
|
||||
# have dashes in identifiers, so we convert those to dollars, which are allowed in identifiers.
|
||||
|
|
@ -337,6 +348,7 @@ sub toHtml {
|
|||
|;
|
||||
$output .= '</script>';
|
||||
|
||||
$self->headTags;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue