X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Fshare%2Fhtml%2FElements%2FCalendarSlotSchedule;h=5b400406295fe0a4200a6e7696fa708d77cb4115;hb=ddcefead29544e7813f942e0eca062bf6433763e;hp=8a0c617d9336a1a84513eb478b1a810be23b1d30;hpb=7ad03f9ad66d734f082e860c71ca467a43842426;p=freeside.git diff --git a/rt/share/html/Elements/CalendarSlotSchedule b/rt/share/html/Elements/CalendarSlotSchedule index 8a0c617d9..5b4004062 100644 --- a/rt/share/html/Elements/CalendarSlotSchedule +++ b/rt/share/html/Elements/CalendarSlotSchedule @@ -1,11 +1,12 @@ <%ARGS> - $Date => undef - @Tickets => () - $slots => $default_slots - $sday => undef - $tod_row => undef - $timestep => $default_timestep - @username => () + $Date => undef + @Tickets => () + $slots => $default_slots + $sday => undef + $tod_row => undef + $timestep => $default_timestep + @username => () + $LengthMin => $default_timestep % foreach my $username ( @username ) { % @@ -16,12 +17,17 @@ % % my $bgcolor = '666666;border-color:#555555'; % my $content = ''; +% my $onmouse = 0; % % #white out available times % foreach my $avail ( @{ $schedule{'avail'} } ) { % my( $start, $end ) = @$avail; % next if $start >= ($tod_row+$timestep) || $end <= $tod_row; % $bgcolor = 'FFFFFF'; +% $onmouse = 1 +% if $LengthMin <= $end - $tod_row #the slot is long enough +% && ! grep { $_ > $tod_row && $LengthMin > $_ - $tod_row } +% map $_->[0], values %{ $schedule{'scheduled'} }; % } % % #block out / show / color code existing appointments @@ -31,11 +37,11 @@ % % next if $starts >= ($tod_row+$timestep) || $due < $tod_row; % -% if ( $starts >= $tod_row ) { -% $bgcolor = $col; +% $bgcolor = $col; +% $onmouse = 0; +% +% if ( $starts >= $tod_row ) { #first row % $content .= ($content?', ':''). $id; #XXX more -% } else { -% $bgcolor = $col; % } % } @@ -45,6 +51,10 @@ %# : $is_aweekago ? 'aweekago' %# : '' %# %>" +% if ( $onmouse ) { + onmouseover="boxon(this);" + onmouseout ="boxoff(this);" +% } ><% $content %> % } <%ONCE>