diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-04-12 12:29:18 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-04-12 12:29:18 -0700 |
commit | d1bfdbf97b2950f5f6ccb1255db387479d483955 (patch) | |
tree | 9756f90c12b90c15e47e14866287c5747a33abd3 /rt | |
parent | b3cecd1976e92c32740c3e2e1227a7d718e07b57 (diff) |
installers (calendaring), RT#16584
Diffstat (limited to 'rt')
-rw-r--r-- | rt/share/html/Elements/CalendarDaySchedule | 22 | ||||
-rw-r--r-- | rt/share/html/NoAuth/css/calendar.css | 1 | ||||
-rw-r--r-- | rt/share/html/Schedule/UserBar | 39 | ||||
-rw-r--r-- | rt/share/html/Search/Calendar.html | 2 | ||||
-rw-r--r-- | rt/share/html/Search/Schedule.html | 12 |
5 files changed, 74 insertions, 2 deletions
diff --git a/rt/share/html/Elements/CalendarDaySchedule b/rt/share/html/Elements/CalendarDaySchedule index 08e1a51a5..0f9f9092e 100644 --- a/rt/share/html/Elements/CalendarDaySchedule +++ b/rt/share/html/Elements/CalendarDaySchedule @@ -5,8 +5,28 @@ $DateTypes => undef @username => () </%args> % foreach my $username ( @username ) { -<span class="calendarright"><% $username %>---sparkline--*</span><br> +% my $mapname = "$username-$date"; +<span class="calendarright"><% $username %><img src="<%$RT::WebPath%>/Schedule/UserBar?Username=<%$username%>;Date=<%$date%>" useMap="#<%$mapname%>"><span><br> +<MAP name="<%$mapname%>"> +%# false laziness w/Schedule/UserBar +%#XXX block out unavailable times +%#alas. abstractions break, freeside-specific stuff to get availability +%# move availability to RT side? make it all callback/pluggable? +% +%#XXX block out / show / color code existing appointments +% +<AREA onmouseover="overlib('XX miles away<BR>more info')" + onmouseout="nd(); return true;" + shape = "rect" + coords="0,0,59,11" + href="test_href" +%# alt= +%# title= +> +</MAP> % } <%init> +my( $date, $time ) = split('T', $Date); + </%init> diff --git a/rt/share/html/NoAuth/css/calendar.css b/rt/share/html/NoAuth/css/calendar.css index 14cbabc73..96241e73f 100644 --- a/rt/share/html/NoAuth/css/calendar.css +++ b/rt/share/html/NoAuth/css/calendar.css @@ -37,6 +37,7 @@ color:#505050; } .calendarright { + text-align: right; float: right; } diff --git a/rt/share/html/Schedule/UserBar b/rt/share/html/Schedule/UserBar new file mode 100644 index 000000000..5e834a023 --- /dev/null +++ b/rt/share/html/Schedule/UserBar @@ -0,0 +1,39 @@ +<%perl> + +use GD; + +my $im = new GD::Image($width, $height) or die; + +my $white = $im->colorAllocate(255,255,255); +my $black = $im->colorAllocate(0,0,0); + +# Put a black frame around the picture +$im->rectangle(0,0,$width-1,$height-1,$black); + +#XXX block out unavailable times +#alas. abstractions break, freeside-specific stuff to get availability +# move availability to RT side? make it all callback/pluggable? + +#XXX block out / show / color code existing appointments + +$r->content_type('image/png'); +$m->clear_buffer; +$m->out($im->png); +$m->abort; + +</%perl> +<%args> +$Username => undef +$Date => undef +</%args> +<%once> + +my $stime = RT->Config->Get('CalendarWeeklyStartMin'); +$stime = 480 unless $stime =~ /^\d+$/; #8am +my $etime = RT->Config->Get('CalendarWeeklyEndMin'); +$etime = 1080 unless $etime =~ /^\d+$/; #6pm + +my $width = ( $etime - $stime ) / 10; +my $height = 12; + +</%once> diff --git a/rt/share/html/Search/Calendar.html b/rt/share/html/Search/Calendar.html index e6282b58a..c425751ff 100644 --- a/rt/share/html/Search/Calendar.html +++ b/rt/share/html/Search/Calendar.html @@ -82,7 +82,7 @@ $DayDisplay => undef <tr> <td class="labels" colspan=<% $WeekDay ? 2 : 1 %>></td> % for ( @{$week{$weekstart}} ) { -<th width="14%" colspan=<% $WeekDay ? $slots : 1 %>><%$rtdate->GetWeekday($_)%></th> +<th colspan=<% $WeekDay ? $slots : 1 %>><%$rtdate->GetWeekday($_)%></th> % } </tr> </thead> diff --git a/rt/share/html/Search/Schedule.html b/rt/share/html/Search/Schedule.html index 12d268500..bbbfffdc9 100644 --- a/rt/share/html/Search/Schedule.html +++ b/rt/share/html/Search/Schedule.html @@ -1,5 +1,10 @@ <& /Elements/Header, Title => 'Schedule' &> +%#init_overlib.html +%foreach my $file (@files) { +<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/<%$file%>.js"></SCRIPT> +%} + <& /Search/Calendar.html, @_, Embed => 'Schedule.html', @@ -7,3 +12,10 @@ DayDisplayArgs => [ username => $ARGS{username} ], &> +<%init> +my @files = (); +#if ( ! $initialized ) { + push @files, map "overlibmws$_", ( '', qw( _iframe _draggable _crossframe ) ); + push @files, map { "${_}contentmws" } qw( iframe ajax ); +#%} +</%init> |