From 5b7b80e3b163d00b3afb90dacd23c153d23cd1ea Mon Sep 17 00:00:00 2001 From: Jason Oster Date: Fri, 10 Jul 2009 17:50:21 +0000 Subject: Fix multiple HTML elements with the same id. Allow all-day divs to stretch vertically in day and week views with default template. --- functions/template.php | 16 +++++++++------- templates/default/day.tpl | 2 +- templates/default/default.css | 19 ++++++++++--------- templates/default/images/allday_1.gif | Bin 151 -> 141 bytes templates/default/images/allday_2.gif | Bin 151 -> 141 bytes templates/default/images/allday_3.gif | Bin 151 -> 141 bytes templates/default/images/allday_4.gif | Bin 151 -> 141 bytes templates/default/images/allday_5.gif | Bin 151 -> 141 bytes templates/default/images/allday_6.gif | Bin 151 -> 141 bytes templates/default/images/allday_7.gif | Bin 150 -> 140 bytes templates/default/week.tpl | 4 ++-- templates/green/default.css | 4 ++-- templates/grey/default.css | 4 ++-- templates/red/default.css | 5 +++-- templates/tan/default.css | 5 +++-- 15 files changed, 32 insertions(+), 27 deletions(-) diff --git a/functions/template.php b/functions/template.php index 1400873..982fd54 100644 --- a/functions/template.php +++ b/functions/template.php @@ -307,10 +307,10 @@ class Page { $colspan = 0; $replace .= $loop_begin; # - if ($weekarray[$day] == $getdate) $replace = str_replace('{TODAY}', "rowToday", $replace); - $replace = str_replace('{TODAY}', "rowOff", $replace); + if ($weekarray[$day] == $getdate) $replace = str_replace('{TODAY}', 'rowToday', $replace); + $replace = str_replace('{TODAY}', 'rowOff', $replace); - if(array_search($weekarray[$day], $allday_uids)){ + if(array_search($weekarray[$day], $allday_uids)){ $uid = array_search($weekarray[$day], $allday_uids); unset($allday_uids[$uid]); $allday = $master_array[$weekarray[$day]]['-1'][$uid]; @@ -325,15 +325,17 @@ class Page { $event = openevent($get_date, -1, $uid, $allday, $phpiCal_config->allday_week_lines, (8*$colspan), 'psf'); $loop_tmp = str_replace('{ALLDAY}', $event, $loop_ad); $loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp); + $replace = str_replace('{NOBORDER}', ' style="border-top: none;"', $replace); $replace .= $loop_tmp; - $replace .= $loop_end; + $replace .= $loop_end; }else{ - $colspan = $nbrGridCols[$weekarray[$day]]; - $replace .= $loop_end; + $replace = str_replace('{NOBORDER}', '', $replace); + $colspan = $nbrGridCols[$weekarray[$day]]; + $replace .= $loop_end; $day++; } unset ($ev); - $replace = str_replace('{COLSPAN}', "colspan='$colspan'", $replace); + $replace = str_replace('{COLSPAN}', "colspan=\"$colspan\"", $replace); } $row .= "$replace $loop_row_end\n"; $weekreplace .= "$row\n"; diff --git a/templates/default/day.tpl b/templates/default/day.tpl index b9cbf10..a850c4c 100644 --- a/templates/default/day.tpl +++ b/templates/default/day.tpl @@ -44,7 +44,7 @@ - +
diff --git a/templates/default/default.css b/templates/default/default.css index 1d84f0b..e62d69f 100644 --- a/templates/default/default.css +++ b/templates/default/default.css @@ -7,13 +7,13 @@ table, td {font: 11px Verdana, Arial, sans-serif; color: #000;} .tblbot {background: url(images/shadow_m.gif) repeat-x; width:100%} .tblr {background: url(images/shadow_r.gif) no-repeat; width:8px} -.alldaybg_1 {background: url(images/allday_1.gif) repeat-x; height: 19px; padding-top: 5px; text-align: center;} -.alldaybg_2 {background: url(images/allday_2.gif) repeat-x; height: 19px; padding-top: 5px; text-align: center;} -.alldaybg_3 {background: url(images/allday_3.gif) repeat-x; height: 19px; padding-top: 5px; text-align: center;} -.alldaybg_4 {background: url(images/allday_4.gif) repeat-x; height: 19px; padding-top: 5px; text-align: center;} -.alldaybg_5 {background: url(images/allday_5.gif) repeat-x; height: 19px; padding-top: 5px; text-align: center;} -.alldaybg_6 {background: url(images/allday_6.gif) repeat-x; height: 19px; padding-top: 5px; text-align: center;} -.alldaybg_7 {background: url(images/allday_7.gif) repeat-x; height: 19px; padding-top: 5px; text-align: center;} +.alldaybg_1 {background: #50739B url(images/allday_1.gif) repeat-x; border-bottom: 1px solid #3C6080; min-height: 18px; padding-top: 5px; text-align: center;} +.alldaybg_2 {background: #53AB63 url(images/allday_2.gif) repeat-x; border-bottom: 1px solid #409050; min-height: 18px; padding-top: 5px; text-align: center;} +.alldaybg_3 {background: #FF592A url(images/allday_3.gif) repeat-x; border-bottom: 1px solid #E0401C; min-height: 18px; padding-top: 5px; text-align: center;} +.alldaybg_4 {background: #BE55AD url(images/allday_4.gif) repeat-x; border-bottom: 1px solid #984080; min-height: 18px; padding-top: 5px; text-align: center;} +.alldaybg_5 {background: #FF2B2A url(images/allday_5.gif) repeat-x; border-bottom: 1px solid #D01C18; min-height: 18px; padding-top: 5px; text-align: center;} +.alldaybg_6 {background: #BA900C url(images/allday_6.gif) repeat-x; border-bottom: 1px solid #A07400; min-height: 18px; padding-top: 5px; text-align: center;} +.alldaybg_7 {background: #959595 url(images/allday_7.gif) repeat-x; border-bottom: 1px solid #888888; min-height: 18px; padding-top: 5px; text-align: center;} .rowOn { background-color: #cfc; border-top: 1px solid #fff; border-left: 1px solid #fff; } .rowOn2 { background-color: #cfc; border-top: 1px solid #fff; } @@ -31,8 +31,9 @@ table, td {font: 11px Verdana, Arial, sans-serif; color: #000;} .eventbg_5 { background-color: #D42020; padding: 2px;} .eventbg_6 { background-color: #B88F0B; padding: 2px;} .eventbg_7 { background-color: #73738C; padding: 2px;} -#allday a { font-size: 9px; color: #fff; font-weight: 900; text-decoration:none;} -#allday a:hover { text-decoration:underline;} + +.allday a { font-size: 9px; color: #fff !important; font-weight: 900; text-decoration:none;} +.allday a:hover { text-decoration:underline;} .eventbg2_1 { background-color: #6699CC; border: 1px solid #557CA3; } .eventbg2_2 { background-color: #4FC464; border: 1px solid #53A062; } diff --git a/templates/default/images/allday_1.gif b/templates/default/images/allday_1.gif index 74046ed..b1696ec 100644 Binary files a/templates/default/images/allday_1.gif and b/templates/default/images/allday_1.gif differ diff --git a/templates/default/images/allday_2.gif b/templates/default/images/allday_2.gif index 648df18..84bc361 100644 Binary files a/templates/default/images/allday_2.gif and b/templates/default/images/allday_2.gif differ diff --git a/templates/default/images/allday_3.gif b/templates/default/images/allday_3.gif index 554acc4..55c779e 100644 Binary files a/templates/default/images/allday_3.gif and b/templates/default/images/allday_3.gif differ diff --git a/templates/default/images/allday_4.gif b/templates/default/images/allday_4.gif index 06f3911..12dba86 100644 Binary files a/templates/default/images/allday_4.gif and b/templates/default/images/allday_4.gif differ diff --git a/templates/default/images/allday_5.gif b/templates/default/images/allday_5.gif index edf48df..3358cea 100644 Binary files a/templates/default/images/allday_5.gif and b/templates/default/images/allday_5.gif differ diff --git a/templates/default/images/allday_6.gif b/templates/default/images/allday_6.gif index 74df382..2a8718b 100644 Binary files a/templates/default/images/allday_6.gif and b/templates/default/images/allday_6.gif differ diff --git a/templates/default/images/allday_7.gif b/templates/default/images/allday_7.gif index ad2aa49..60ab997 100644 Binary files a/templates/default/images/allday_7.gif and b/templates/default/images/allday_7.gif differ diff --git a/templates/default/week.tpl b/templates/default/week.tpl index f312bb0..216348f 100644 --- a/templates/default/week.tpl +++ b/templates/default/week.tpl @@ -49,11 +49,11 @@ - +  - +
{ALLDAY} diff --git a/templates/green/default.css b/templates/green/default.css index 6bf7724..2ce4bc0 100644 --- a/templates/green/default.css +++ b/templates/green/default.css @@ -32,8 +32,8 @@ table, td {font: 11px Verdana, Arial, sans-serif; color: #000;} .eventbg_6 { background-color: #ac9200; padding: 2px;} .eventbg_7 { background-color: #00a28f; padding: 2px;} -#allday a { font-size: 9px; color: #fff; font-weight: 900; text-decoration:none;} -#allday a:hover { text-decoration:underline;} +.allday a { font-size: 9px; color: #fff !important; font-weight: 900; text-decoration:none;} +.allday a:hover { text-decoration:underline;} .eventbg2_1 { background-color: #00992c; border: 1px solid #00790c; } .eventbg2_2 { background-color: #00e400; border: 1px solid #00c400; } diff --git a/templates/grey/default.css b/templates/grey/default.css index 79f298b..8042ff1 100644 --- a/templates/grey/default.css +++ b/templates/grey/default.css @@ -31,9 +31,9 @@ table, td {font: 11px Verdana, Arial, sans-serif; color: #000;} .eventbg_5 { background-color: #705f60; padding: 2px;} .eventbg_6 { background-color: #608060; padding: 2px;} .eventbg_7 { background-color: #a0a090; padding: 2px;} -#allday a { font-size: 9px; color: #fff; font-weight: 900; text-decoration:none;} -#allday a:hover { text-decoration:underline;} +.allday a { font-size: 9px; color: #fff !important; font-weight: 900; text-decoration:none;} +.allday a:hover { text-decoration:underline;} .eventbg2_1 { background-color: #505050; border: 1px solid #303030; } .eventbg2_2 { background-color: #909080; border: 1px solid #707060; } diff --git a/templates/red/default.css b/templates/red/default.css index 6b6d998..717394e 100644 --- a/templates/red/default.css +++ b/templates/red/default.css @@ -31,9 +31,9 @@ table, td {font: 11px Verdana, Arial, sans-serif; color: #000;} .eventbg_5 { background-color: #bc4700; padding: 2px;} .eventbg_6 { background-color: #df2c6c; padding: 2px;} .eventbg_7 { background-color: #ac4848; padding: 2px;} -#allday a { font-size: 9px; color: #fff; font-weight: 900; text-decoration:none;} -#allday a:hover { text-decoration:underline;} +.allday a { font-size: 9px; color: #fff !important; font-weight: 900; text-decoration:none;} +.allday a:hover { text-decoration:underline;} .eventbg2_1 { background-color: #c03030; border: 1px solid #a01010; } .eventbg2_2 { background-color: #cb8c00; border: 1px solid #ab6c00; } @@ -42,6 +42,7 @@ table, td {font: 11px Verdana, Arial, sans-serif; color: #000;} .eventbg2_5 { background-color: #dc6700; border: 1px solid #bc4700; } .eventbg2_6 { background-color: #ff4c8c; border: 1px solid #df2c6c; } .eventbg2_7 { background-color: #cc6868; border: 1px solid #ac4848; } + .dayborder { background-color: #fff; border-top: 1px solid #A1A5A9; } .dayborder2 { background-color: #fff; border-top: 1px dashed #ccc; } diff --git a/templates/tan/default.css b/templates/tan/default.css index c212416..73a21dd 100644 --- a/templates/tan/default.css +++ b/templates/tan/default.css @@ -32,8 +32,9 @@ table, td {font: 11px Verdana, Arial, sans-serif; color: #000;} .eventbg_6 { background-color: #CCCC99; padding: 2px;} .eventbg_7 { background-color: #666666; padding: 2px;} -#allday a { font-size: 9px; color: #fff; font-weight: 900; text-decoration:none;} -#allday a:hover { text-decoration:underline;} +.allday a { font-size: 9px; color: #fff !important; font-weight: 900; text-decoration:none;} +.allday a:hover { text-decoration:underline;} + /*varies*/ .eventbg2_1 { background-color: #A6A978; border: 1px solid #FFFFFF; } .eventbg2_2 { background-color: #CC8B00; border: 1px solid #FFFFFF; } -- cgit v1.2.3