view release on metacpan or search on metacpan
lib/HTML/Obj2HTML/Plugin/SemanticUIForms.pm view on Meta::CPAN
delete($obj->{readonly});
if ($readonly) {
return HTML::Obj2HTML::gen(commonfield($obj, [ span => $obj->{value} ] ));
} else {
return HTML::Obj2HTML::gen(commonfield($obj, [
div => { class => "ui calendar ".$obj->{class}, _ => [
div => { class => "ui input left icon", _ => [
i => { class => "calendar icon", _ => [] },
input => { type => "text", name => $obj->{name}, placeholder => $obj->{placeholder}, value => $obj->{value} }
]}
]}
]));
}
lib/HTML/Obj2HTML/Plugin/SemanticUIForms.pm view on Meta::CPAN
my $obj = shift;
if (ref $obj ne "HASH") { return ""; }
return HTML::Obj2HTML::gen([
div => { class => "ui calendar dateonly", _ => [
div => { class => "ui input left icon", _ => [
i => { class => "calendar icon", _ => [] },
labeledinput => $obj
]}
]}
]);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/Pen.pm view on Meta::CPAN
set, in parent-child relationships. Each block recurses by calling
C<iterate()> with the common iterator and the name of the child
block.
L<HTML::Pen::Iterator> illustrates a relatively sophisticated example of a
4 dimensional data set calendar to be presented as a table. The iterator data
consists of an array of weeks; each week consists of an array of days; each
day consists of an array of times; each time consists of an array of events.
Each event is represented by an event object that is a blessed hash reference.
With a Pen iterator, the rendering code is a few simple lines of HTML. The
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/QuickTable.pm view on Meta::CPAN
labels => 'LT'
Would alter the table so that both the first row AND first column
had C<< <th> >> instead of C<< <td> >> elements. This is useful
for creating tables that have two axes, such as calendars.
=item null => $string
If set, then null (undef) fields will be set to that string instead.
This is useful if pulling a bunch of records out of a database and
view all matches for this distribution
view release on metacpan or search on metacpan
- Converted HTML tags in lowercase.
- Changed tests to lowercase tags
- Added validation for day/month/year fields
- Added prerequisites for Class::Builder and Tie::IxHash.
- Add Changes file
- Remove a bug in DATE.pm that opens the calendar instead of submit form if you press the "enter" key in whatever form field.
00.01 (2005-09-12)
- First public release
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/Widget/Factory.pm view on Meta::CPAN
#pod =item * fixed_args for args that are fixed, like (type => 'checkbox')
#pod
#pod =item * a simple way to say "only include this output if you haven't before"
#pod
#pod This will make it easy to do JavaScript inclusions: if you've already made a
#pod calendar (or whatever) widget, don't bother including this hunk of JS, for
#pod example.
#pod
#pod =item * giving the constructor a data store
#pod
#pod Create a factory that has a CGI.pm object and let it default values to the
lib/HTML/Widget/Factory.pm view on Meta::CPAN
=item * fixed_args for args that are fixed, like (type => 'checkbox')
=item * a simple way to say "only include this output if you haven't before"
This will make it easy to do JavaScript inclusions: if you've already made a
calendar (or whatever) widget, don't bother including this hunk of JS, for
example.
=item * giving the constructor a data store
Create a factory that has a CGI.pm object and let it default values to the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/Widget/Plugin/Calendar.pm view on Meta::CPAN
use strict;
use warnings;
package HTML::Widget::Plugin::Calendar;
# ABSTRACT: simple construction of jscalendar inputs
$HTML::Widget::Plugin::Calendar::VERSION = '0.022';
use parent qw(HTML::Widget::Plugin Class::Data::Inheritable);
use HTML::Element;
use HTML::TreeBuilder;
use Data::JavaScript::Anon;
#pod =head1 SYNOPSIS
#pod
#pod $factory->calendar({
#pod name => 'date_of_birth',
#pod format => '%Y-%m-%d',
#pod value => $user->date_of_birth,
#pod });
#pod
#pod =head1 DESCRIPTION
#pod
#pod This module plugs in to HTML::Widget::Factory and provides a calendar widget
#pod using the excellent jscalendar.
#pod
#pod =head1 METHODS
#pod
#pod =head2 C< provided_widgets >
#pod
#pod This plugin provides the following widgets: calendar, calendar_js
#pod
#pod =cut
sub provided_widgets { qw(calendar calendar_js) }
#pod =head2 calendar
#pod
#pod =cut
sub calendar {
my ($self, $factory, $arg) = @_;
$arg->{attr}{name} ||= $arg->{attr}{id};
Carp::croak "you must supply a widget id for calendar"
unless $arg->{attr}{id};
$arg->{jscalendar} ||= {};
$arg->{jscalendar}{showsTime} = 1 if $arg->{time};
$arg->{format}
||= '%Y-%m-%d' . ($arg->{jscalendar}{showsTime} ? ' %H:%M' : '');
my $widget = HTML::Element->new('input');
$widget->attr($_ => $arg->{attr}{$_}) for keys %{ $arg->{attr} };
$widget->attr(value => $arg->{value}) if exists $arg->{value};
lib/HTML/Widget/Plugin/Calendar.pm view on Meta::CPAN
= sprintf "Calendar.setup(%s);",
Data::JavaScript::Anon->anon_dump({
inputField => $widget->attr('id'),
ifFormat => $arg->{format},
($arg->{no_button} ? () : (button => $button->attr('id'))),
%{ $arg->{jscalendar} },
})
;
# we need to make this an HTML::Element literal to avoid escaping the JS
$js = HTML::Element->new('~literal', text => $js);
$script->push_content($js);
return join q{},
$self->calendar_js($factory, $arg),
map { $_->as_XML } ($widget, ($arg->{no_button} ? () : $button), $script),
;
}
#pod =head2 C< calendar_js >
#pod
#pod This method returns the JavaScript needed to use the calendar. It will only
#pod return the JavaScript the first time it's called.
#pod
#pod Normally it's called when the calendar widget is used, but it may be called
#pod manually to force the JavaScript to be placed in your document at the location
#pod of your choosing.
#pod
#pod =cut
sub calendar_js {
my ($self, $factory, $arg) = @_;
return '' if $factory->{$self}->{output_js}++;
my $base = $self->calendar_baseurl;
Carp::croak "calendar_baseurl is not defined" if not defined $base;
$base =~ s{/\z}{}; # to avoid baseurl//yourface or baseurlyourface
my $scripts = <<END_HTML;
<script type="text/javascript" src="$base/calendar.js"></script>
<script type="text/javascript" src="$base/lang/calendar-en.js"></script>
<script type="text/javascript" src="$base/calendar-setup.js"></script>
END_HTML
}
#pod =head2 C< calendar_baseurl >
#pod
#pod This method sets or returns the plugin's base URL for the jscalendar files.
#pod This must be set or calendar plugin creation will throw an exception.
#pod
#pod =cut
__PACKAGE__->mk_classdata( qw(calendar_baseurl) );
1;
__END__
lib/HTML/Widget/Plugin/Calendar.pm view on Meta::CPAN
=encoding UTF-8
=head1 NAME
HTML::Widget::Plugin::Calendar - simple construction of jscalendar inputs
=head1 VERSION
version 0.022
=head1 SYNOPSIS
$factory->calendar({
name => 'date_of_birth',
format => '%Y-%m-%d',
value => $user->date_of_birth,
});
=head1 DESCRIPTION
This module plugs in to HTML::Widget::Factory and provides a calendar widget
using the excellent jscalendar.
=head1 METHODS
=head2 C< provided_widgets >
This plugin provides the following widgets: calendar, calendar_js
=head2 calendar
=head2 C< calendar_js >
This method returns the JavaScript needed to use the calendar. It will only
return the JavaScript the first time it's called.
Normally it's called when the calendar widget is used, but it may be called
manually to force the JavaScript to be placed in your document at the location
of your choosing.
=head2 C< calendar_baseurl >
This method sets or returns the plugin's base URL for the jscalendar files.
This must be set or calendar plugin creation will throw an exception.
=head1 AUTHOR
Ricardo SIGNES
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Promise/MIME.pm view on Meta::CPAN
# The data herein is the result of creating a new instance and dumping its data, like:
# say json_encode( HTTP::Promise::MIME->new( '/some/where/mime.types' )->types );
sub _data
{
my $data = <<'EOT';
{"application/vnd.sun.xml.impress":["sxi"],"application/vnd.mcd":["mcd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.jisp":["jisp"],"image/webp":["webp"],"application/pkcs7-signature":["p7s"],"application/xspf+xml":["xspf"],"audio/vnd.nue...
EOT
return( \$data );
}
# NOTE: sub FREEZE is inherited
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Proxy/Selective.pm view on Meta::CPAN
msh => "model/mesh",
mesh => "model/mesh",
silo => "model/mesh",
wrl => "model/vrml",
vrml => "model/vrml",
ics => "text/calendar",
icz => "text/calendar",
css => "text/css",
csv => "text/csv",
323 => "text/h323",
html => "text/html",
htm => "text/html",
lib/HTTP/Proxy/Selective.pm view on Meta::CPAN
tk => "text/x-tcl",
tex => "text/x-tex",
ltx => "text/x-tex",
sty => "text/x-tex",
cls => "text/x-tex",
vcs => "text/x-vcalendar",
vcf => "text/x-vcard",
'3gp' => "video/3gpp",
dl => "video/dl",
dif => "video/dv",
dv => "video/dv",
view all matches for this distribution
view release on metacpan or search on metacpan
Word/noun.txt view on Meta::CPAN
cal,cals
calamity,calamities
calcite,calcites
calculation,calculations
calculator,calculators
calendar,calendars
calf,calves
calibration,calibrations
californian,californians
caliper,calipers
call,calls
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Hobocamp/Calendar.pm view on Meta::CPAN
}
use v5.10;
use warnings;
# ABSTRACT: calendar widget
use Moose;
with qw(Hobocamp::Role::Widget Hobocamp::Role::Window);
lib/Hobocamp/Calendar.pm view on Meta::CPAN
);
sub run {
my ($self) = @_;
my $retcode = Hobocamp::Dialog::dialog_calendar($self->title, $self->prompt, $self->width, $self->height, $self->day, $self->month, $self->year);
$self->value($self->_get_user_input_result());
return $retcode;
}
lib/Hobocamp/Calendar.pm view on Meta::CPAN
__END__
=pod
=head1 NAME
Hobocamp::Calendar - calendar widget
=head1 VERSION
version 0.600
view all matches for this distribution
view release on metacpan or search on metacpan
share/root/static/yui/build/assets/skins/sam/autocomplete.css
share/root/static/yui/build/assets/skins/sam/bg-h.gif
share/root/static/yui/build/assets/skins/sam/bg-v.gif
share/root/static/yui/build/assets/skins/sam/blankimage.png
share/root/static/yui/build/assets/skins/sam/button.css
share/root/static/yui/build/assets/skins/sam/calendar.css
share/root/static/yui/build/assets/skins/sam/carousel.css
share/root/static/yui/build/assets/skins/sam/colorpicker.css
share/root/static/yui/build/assets/skins/sam/container.css
share/root/static/yui/build/assets/skins/sam/datatable.css
share/root/static/yui/build/assets/skins/sam/desc.gif
share/root/static/yui/build/button/assets/skins/sam/split-button-arrow-hover.png
share/root/static/yui/build/button/assets/skins/sam/split-button-arrow.png
share/root/static/yui/build/button/button-debug.js
share/root/static/yui/build/button/button-min.js
share/root/static/yui/build/button/button.js
share/root/static/yui/build/calendar/assets/calendar-core.css
share/root/static/yui/build/calendar/assets/calendar.css
share/root/static/yui/build/calendar/assets/calgrad.png
share/root/static/yui/build/calendar/assets/callt.gif
share/root/static/yui/build/calendar/assets/calrt.gif
share/root/static/yui/build/calendar/assets/calx.gif
share/root/static/yui/build/calendar/assets/skins/sam/calendar-skin.css
share/root/static/yui/build/calendar/assets/skins/sam/calendar.css
share/root/static/yui/build/calendar/calendar-debug.js
share/root/static/yui/build/calendar/calendar-min.js
share/root/static/yui/build/calendar/calendar.js
share/root/static/yui/build/carousel/assets/ajax-loader.gif
share/root/static/yui/build/carousel/assets/carousel-core.css
share/root/static/yui/build/carousel/assets/skins/sam/ajax-loader.gif
share/root/static/yui/build/carousel/assets/skins/sam/carousel-skin.css
share/root/static/yui/build/carousel/assets/skins/sam/carousel.css
view all matches for this distribution