Browse Source

Merge remote-tracking branch 'origin/1.10.x' into 1.10.x

Yannick Warnier 9 years ago
parent
commit
69a1797cff
3 changed files with 64 additions and 231 deletions
  1. 36 202
      app/Resources/public/css/base.css
  2. 1 1
      main/admin/user_list.php
  3. 27 28
      main/inc/lib/agenda.lib.php

+ 36 - 202
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 --------------*/
@@ -1174,7 +1000,7 @@ div.attendance-calendar-add div.row div.formw,div.attendance-calendar-edit div.r
 }
 .tableFloatingHeaderOriginal{
     font-size: 12px;
-    height: 60px;
+    height: 64px;
 }
 /**********************************************
  *  MESSAGE TOOL                           *
@@ -1652,7 +1478,7 @@ div.admin_section h4 {
 .toolbar-groups{
     margin-bottom: 30px;
 }
-.form-group  label span{
+#group_edit .form-group label span{
     display: block;
     font-size: 12px;
 }
@@ -2524,28 +2350,36 @@ form .formw .freeze {
   text-align: left;
   width: 100%;
 }
-
 .data_table_no_border td {
     line-height: normal;
     padding: 6px;
     text-align: left;
     vertical-align: middle;
 }
-
 .data_table tr.row_odd {
     background-color: #F9F9F9;
 }
+.attendance-users-table .data_table tr.row_odd {
+    height: 64px;
+}
+.attendance-users-table .data_table tr.row_even {
+    height: 60px;
+}
 .data_table tr.row_odd:hover, .data_table tr.row_even:hover {
     background-color: #E5EDF9;
 }
 .data_table tr.row_even {
     background-color: #fff;
 }
-
+.attendance-calendar-table .data_table tr.row_odd {
+    height: 64px;
+}
+.attendance-calendar-table .data_table tr.row_even {
+    height: 60px;
+}
 .data_table_no_border td .highlight{
     font-weight: bold;
 }
-
 .data_table_pagination {
   width:100%;
   margin-top: 5px;

+ 1 - 1
main/admin/user_list.php

@@ -574,7 +574,7 @@ function modify_filter($user_id, $url_params, $row) {
 	}
 
     if (api_is_platform_admin()) {
-        $result .= ' <a href="'.api_get_path(WEB_AJAX_PATH).'agenda.ajax.php?a=get_user_agenda&user_id='.$user_id.'&modal_size=lg" class="agenda_opener ajax">'.
+        $result .= ' <a data-title="'.get_lang('FreeBusyCalendar').'" href="'.api_get_path(WEB_AJAX_PATH).'agenda.ajax.php?a=get_user_agenda&user_id='.$user_id.'&modal_size=lg" class="agenda_opener ajax">'.
             Display::return_icon('calendar.png', get_lang('FreeBusyCalendar'), array(), ICON_SIZE_SMALL).'</a>';
         $deleteAllowed = !api_get_configuration_value('deny_delete_users');
         if ($deleteAllowed) {

+ 27 - 28
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 '<table id="agenda_list"><tr>';
-        echo '<th width="10%">'.$back_url.'</th>';
-        echo '<th width="80%" colspan="5"><br /><h3>'.$monthName." ".$year.'</h3></th>';
-        echo '<th width="10%">'.$next_url.'</th>';
-
-        echo '</tr>';
-
-        echo '<tr>';
+            $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 .= '<div class="actions">';
+        $html .= '<div class="row">';
+        $html .= '<div class="col-md-4">'.$back_url.'</div>';
+        $html .= '<div class="col-md-4"><p class="agenda-title text-center">'.$monthName." ".$year.'</p></div>';
+        $html .= '<div class="col-md-4">'.$next_url.'</div>';
+        $html .= '</div>';
+        $html .= '</div>';
+        $html .= '<table id="agenda_list2" class="table table-bordered">';
+        $html .= '<tr>';
         for ($ii = 1; $ii < 8; $ii ++) {
-            echo '<td class="weekdays">'.$DaysShort[$ii % 7].'</td>';
+            $html .= '<td class="weekdays">'.$DaysShort[$ii % 7].'</td>';
         }
-        echo '</tr>';
+        $html .= '</tr>';
 
         $curday = -1;
         $today = getdate();
         while ($curday <= $numberofdays[$month]) {
-            echo "<tr>";
+            $html .= "<tr>";
             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 "<td ".$class.">".$dayheader;
+                    $html .= "<td ".$class.">".$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 .= '</div>';
-                                echo $result;
+                                $html .= $result;
                                 //echo Display::div($content, array('id'=>'main_'.$value['calendar_type'].'_'.$value['id'], 'class' => 'dialog'));
                             } else {
-                                echo $result .= $icon.'</div>';
+                                $html .= $result .= $icon.'</div>';
                             }
                         }
                     }
-                    echo "</td>";
+                    $html .= "</td>";
                     $curday ++;
                 } else {
-                    echo "<td></td>";
+                    $html .= "<td></td>";
                 }
             }
-            echo "</tr>";
+            $html .= "</tr>";
         }
-        echo "</table>";
+        $html .= "</table>";
+        echo $html;
     }
 
     /**