From 93b41798837427a0bb5dfe683a29d138e3b93ffb Mon Sep 17 00:00:00 2001 From: Alex Aragon Date: Fri, 18 Mar 2016 12:13:20 -0500 Subject: [PATCH] fix css free busy calendar user list CT#8135 --- app/Resources/public/css/base.css | 218 +++--------------------------- main/admin/user_list.php | 2 +- main/inc/lib/agenda.lib.php | 55 ++++---- 3 files changed, 50 insertions(+), 225 deletions(-) diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index 8828bcedf5..28f9b1d865 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -561,172 +561,34 @@ ul#navigation .report a { #simple-dialog-form .control-label{ padding-top: 0; } -/* --------------------------------------------------- - styles for the agenda (day, week, month view) ------------------------------------------------------*/ -#agenda_list { - width: 100%; - margin: 0 auto; - border: 1px solid #fff; - border-collapse: collapse; -} -/*The caption of the calendar (displays the month and the << and >> links*/ -#agenda_list .title { - background-color: #dcdcdc; - font-weight: bold; - font-size: 12px; - color: #666; - text-align: left; - padding: 2px 10px; - text-align: center; - border: 1px solid #bbb; -} -#agenda_list .title a:link, #agenda_list #title a:visited { - background-color: #dcdcdc; - font-weight: bold; - font-size: 11px; - color: #666; - padding: 2px 10px; - text-align: center; -} -#agenda_list .title a:hover { - background-color: #dcdcdc; - font-weight: bold; - font-size: 11px; - color: #f3840d; - padding: 2px 10px; - text-align: center; -} -/* The cells with the name of the days of the weeks (mon->sun)*/ -#agenda_list .weekdays, .data_table .weekdays { - background-color: #dcdcdc; - text-align: center; - font-weight: bold; - border: 1px solid #264269; - border-collapse: collapse; -} -/* The cells for the days (1->31) */ -#agenda_list .days_week { - height: 40px; - width: 12%; - text-align: left; - vertical-align: top; - border: 1px solid #ccc; - border-collapse: collapse; - background-color: #fff; +.agenda_day { + float:left; + color: #666666; + line-height: 16px; + overflow: hidden; + margin-bottom:5px; } -#agenda_list .days_week_selected { - height: 40px; - width: 12%; - text-align: left; - vertical-align: top; - border: 1px solid #ccc; - border-collapse: collapse; - background-color: #f5f5f5; +.agenda-title{ + font-size: 20px; } - -#agenda_list .days_weekend { - height: 40px; - width: 12%; - text-align: left; - vertical-align: top; - border: 1px solid #ccc; - border-collapse: collapse; - background-color: #e6e6e6; +.days_today{ + background-color: #E8E8E8; } -#agenda_list .days_today { - height: 40px; - width: 12%; - text-align: left; - vertical-align: top; - border: 1px solid #ccc; - border-collapse: collapse; - background-color: #FFFFC0; +.days_today .agenda_day { + float:left; + width:100%; + color: #000; + line-height: 16px; + overflow: hidden; + margin-bottom:5px; } #agenda_list th { - background-color:#E5EDF9; - border:1px solid gray; - padding-right:12px; + background-color: #F2F2F2; } -/* text in the cells: display of agenda items (visible)*/ -#agenda_list .data { - background-color: #eee; - text-align: left; - padding: 2px 10px; - font-weight: bold; - border: 0px solid #dcdcdc; - border-collapse: collapse; -} -#agenda_list .datanotbold { - background-color: #eee; - text-align: left; - padding: 2px 10px; - font-weight: normal; - border: 0px solid #dcdcdc; - border-collapse: collapse; -} -#agenda_list .text { - background-color: #fff; - text-align: left; - padding: 2px 10px; - font-weight: normal; - border: 0px solid #dcdcdc; - border-collapse: collapse; -} -/*text in the cells: display of agenda items (invisible)*/ -#agenda_list .data_hidden { - background-color: #eee; - text-align: left; - padding: 2px 10px; - font-weight: bold; - border: 0px solid #dcdcdc; - border-collapse: collapse; - color: #999999; -} -#agenda_list .datanotbold_hidden { - background-color: #eee; - text-align: left; - padding: 2px 10px; - font-weight: normal; - border: 0px solid #dcdcdc; - border-collapse: collapse; - color: #999999; -} -#agenda_list .text_hidden { - background-color: #fff; - text-align: left; - padding: 2px 10px; - font-weight: normal; - border: 0px solid #dcdcdc; - border-collapse: collapse; - color: #999999; -} -/*text in the cells: display of agenda items (highlighted)*/ -#agenda_list .datanow { - background-color: #FFCC00; - text-align: left; - padding: 2px 10px; - font-weight: bold; - border: 0px solid #dcdcdc; - border-collapse: collapse; -} -#agenda_list .datanotboldnow { - background-color: #FFCC00; - text-align: left; - padding: 2px 10px; - font-weight: normal; - border: 0px solid #dcdcdc; - border-collapse: collapse; -} -#agenda_list .textnow { - background-color: #fff; - text-align: left; - padding: 2px 10px; - font-weight: normal; - border: 0px solid #dcdcdc; - border-collapse: collapse; +#agenda_list .days_week { + height: 100px; } /* --------------------------------------------------- styles for the mini agenda @@ -798,47 +660,11 @@ a.personal_agenda:hover, a.personal_agenda:hover { .rounded_div_agenda { background: none repeat scroll 0 0 #FFFFFF; - -webkit-border-radius: 6px; - -opera-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 2px 5px #C8C8C8; - -opera-box-shadow: 0 2px 5px #C8C8C8; - -moz-box-shadow: 0 2px 5px #C8C8C8; - box-shadow: 0 2px 5px #C8C8C8; float: left; height: auto; - margin: 2px 4px 15px; + margin: 2px 4px 5px; padding: 8px; - width: 75%; -} - -.agenda_day { - float:left; - width:100%; - background-color: #F8F9FF; - color: #666666; - line-height: 16px; - overflow: hidden; - margin-bottom:5px; -} -.days_today .agenda_day { - float:left; - - width:100%; - background-color: #FAD163; - color: #666666; - line-height: 16px; - overflow: hidden; - margin-bottom:5px; -} - -#agenda_list th { - background-color: #F2F2F2; -} - -#agenda_list .days_week { - height: 100px; + width: 100%; } /* -------------- DOCUMENT --------------*/ diff --git a/main/admin/user_list.php b/main/admin/user_list.php index f94a6ef57d..034d9e06ac 100755 --- a/main/admin/user_list.php +++ b/main/admin/user_list.php @@ -574,7 +574,7 @@ function modify_filter($user_id, $url_params, $row) { } if (api_is_platform_admin()) { - $result .= ' '. + $result .= ' '. Display::return_icon('calendar.png', get_lang('FreeBusyCalendar'), array(), ICON_SIZE_SMALL).''; $deleteAllowed = !api_get_configuration_value('deny_delete_users'); if ($deleteAllowed) { diff --git a/main/inc/lib/agenda.lib.php b/main/inc/lib/agenda.lib.php index b281652fb9..69f7a0f9a8 100644 --- a/main/inc/lib/agenda.lib.php +++ b/main/inc/lib/agenda.lib.php @@ -3128,9 +3128,6 @@ class Agenda $startdayofweek = $dayone['wday'] <> 0 ? ($dayone['wday'] - 1) : 6; $g_cc = (isset($_GET['courseCode'])?$_GET['courseCode']:''); - $prev_icon = Display::return_icon('action_prev.png',get_lang('Previous')); - $next_icon = Display::return_icon('action_next.png',get_lang('Next')); - $next_month = ($month == 1 ? 12 : $month -1); $prev_month = ($month == 12 ? 1 : $month +1); @@ -3138,30 +3135,31 @@ class Agenda $prev_year = ($month == 12 ? $year +1 : $year); if ($show_content) { - $back_url = Display::url($prev_icon, api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=".$next_month."&year=".$next_year); - $next_url = Display::url($next_icon, api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=".$prev_month."&year=".$prev_year); + $back_url = Display::url(get_lang('Previous'), api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=".$next_month."&year=".$next_year); + $next_url = Display::url(get_lang('Next'), api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=".$prev_month."&year=".$prev_year); } else { - $back_url = Display::url($prev_icon, '', array('onclick'=>"load_calendar('".$user_id."','".$next_month."', '".$next_year."'); ")); - $next_url = Display::url($next_icon, '', array('onclick'=>"load_calendar('".$user_id."','".$prev_month."', '".$prev_year."'); ")); - } - - echo ''; - echo ''; - echo ''; - echo ''; - - echo ''; - - echo ''; + $back_url = Display::url(get_lang('Previous'), '', array('onclick'=>"load_calendar('".$user_id."','".$next_month."', '".$next_year."'); ", 'class' => 'btn ui-button ui-widget ui-state-default')); + $next_url = Display::url(get_lang('Next'), '', array('onclick'=>"load_calendar('".$user_id."','".$prev_month."', '".$prev_year."'); ", 'class' => 'pull-right btn ui-button ui-widget ui-state-default')); + } + $html = ''; + $html .= '
'; + $html .= '
'; + $html .= '
'.$back_url.'
'; + $html .= '

'.$monthName." ".$year.'

'; + $html .= '
'.$next_url.'
'; + $html .= '
'; + $html .= '
'; + $html .= '
'.$back_url.'

'.$monthName." ".$year.'

'.$next_url.'
'; + $html .= ''; for ($ii = 1; $ii < 8; $ii ++) { - echo ''; + $html .= ''; } - echo ''; + $html .= ''; $curday = -1; $today = getdate(); while ($curday <= $numberofdays[$month]) { - echo ""; + $html .= ""; for ($ii = 0; $ii < 7; $ii ++) { if (($curday == -1) && ($ii == $startdayofweek)) { $curday = 1; @@ -3173,12 +3171,12 @@ class Agenda $class = "class=\"days_today\" style=\"width:10%;\""; } - echo ""; + $html .= ""; $curday ++; } else { - echo ""; + $html .= ""; } } - echo ""; + $html .= ""; } - echo "
'.$DaysShort[$ii % 7].''.$DaysShort[$ii % 7].'
".$dayheader; + $html .= "".$dayheader; if (!empty($agendaitems[$curday])) { $items = $agendaitems[$curday]; $items = msort($items, 'start_date_tms'); - + foreach($items as $value) { $value['title'] = Security::remove_XSS($value['title']); $start_time = api_format_date($value['start_date'], TIME_NO_SEC_FORMAT); @@ -3234,22 +3232,23 @@ class Agenda //Main div $result .= Display::div($content, array('id'=>'main_'.$link, 'class' => 'dialog', 'style' => 'display:none')); $result .= ''; - echo $result; + $html .= $result; //echo Display::div($content, array('id'=>'main_'.$value['calendar_type'].'_'.$value['id'], 'class' => 'dialog')); } else { - echo $result .= $icon.''; + $html .= $result .= $icon.''; } } } - echo "
"; + $html .= ""; + echo $html; } /**