Skip to content

Commit

Permalink
Fix planning tooltip view (glpi-project#1098)
Browse files Browse the repository at this point in the history
* Add planning tooltip view

* Add style for begin & end planning
  • Loading branch information
tsmr authored and trasher committed Oct 3, 2016
1 parent 3a2dee7 commit fe7b441
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1817,6 +1817,10 @@ a.icon_nav_move:hover img {
height: 10px;
}

#planning .fc-divider {
border:1px dashed #cccccc;
}

/* for checkavailable */

.planning {
Expand Down
7 changes: 5 additions & 2 deletions inc/planning.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ static function showPlanning($fullview = true) {
element.find('.fc-list-item-title > a').prepend(eventtype_marker);
var content = event.content;
var tooltip = event.tooltip;
if(view.name !== 'month' && view.name !== 'listYear' && !event.allDay){
element
.append('<div class=\"content\">'+content+'</div>');
Expand Down Expand Up @@ -639,7 +640,7 @@ static function showPlanning($fullview = true) {
}
element.qtip({
position: qtip_position,
content: content,
content: tooltip,
style: {
classes: 'qtip-shadow qtip-bootstrap'
},
Expand Down Expand Up @@ -1748,7 +1749,8 @@ static function constructEventsArray($options = array()) {
$users_id = (isset($event['users_id_tech']) && !empty($event['users_id_tech'])?
$event['users_id_tech']:
$event['users_id']);
$content = Planning::displayPlanningItem($event, $users_id, 'in', true);
$content = Planning::displayPlanningItem($event, $users_id, 'in', false);
$tooltip = Planning::displayPlanningItem($event, $users_id, 'in', true);

$begin = date('c', strtotime($event['begin']));
$end = date('c', strtotime($event['end']));
Expand All @@ -1763,6 +1765,7 @@ static function constructEventsArray($options = array()) {
$index_color = array_search("user_$users_id", array_keys($_SESSION['glpi_plannings']));
$events[] = array('title' => $event['name'],
'content' => $content,
'tooltip' => $tooltip,
'start' => $begin,
'end' => $end,
'editable' => isset($event['editable'])?$event['editable']:false,
Expand Down

0 comments on commit fe7b441

Please sign in to comment.