Skip to content

Commit

Permalink
#138 [TimeSpent] add: js effect on tooltip for show more info with shift
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Feb 8, 2023
1 parent c610239 commit 5b20e25
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
7 changes: 7 additions & 0 deletions js/dolisirh.js
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,13 @@ window.eoxiaJS.keyEvent.keyup = function(event) {
$(this).find('.button_removefilter').click();
}
}
if ($(event.target).is('body')) {
let height = '';
if (event.shiftKey) {
height = 200 + 'px';
$('body').find('.wpeo-tooltip').css('height', height);
}
}
};

/**
Expand Down
3 changes: 2 additions & 1 deletion langs/fr_FR/dolisirh.lang
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,12 @@ MarkYourTime = Pointer son temps
MissingTaskWithTimeSpentOption = Erreur : il faut choisir une tâche pour pointer son temps
MissingEndDateWithTimeSpentOption = Erreur : il faut choisir une date de fin d'événement pour pointer son temps
ErrorTimeSpentDurationCantBeNegative = Erreur : la date de fin d'événement ne peut pas être une valeur négative
KeyEventTips = La touche 'Enter' permet de lancer la recherche. <br> Les touches 'shift + Enter' permettent de supprimer les paramètres de recherche.
KeyEventTips = La touche 'Enter' permet de lancer la recherche. <br> Les touches 'shift + Enter' permettent de supprimer les paramètres de recherche. <br> La touche 'shift sur une tooltip affiche plus d'informations sur les commentaires.
TimeSpentAutoCreate = Temps consommé ajouté depuis l'événement : %s
TimeSpentCurrentMonthByTaskAndProject = Répartition du temps consommé au mois de %s par tâche sur chaque projet
NotConsumedWorkedHours = Heures de travail non consommées
GlobalTimeSpentCurrentMonthByTaskAndProject = Répartition du temps consommé global au mois de %s par tâche sur chaque projet
KeyEvent = Raccourci clavier



Expand Down
5 changes: 1 addition & 4 deletions lib/dolisirh_function.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1327,10 +1327,7 @@ function doliSirhTaskLinesWithinRange(&$inc, $firstdaytoshow, $lastdaytoshow, $f
if ($totalforeachday[$tmpday] > 0) {
$timeSpentComments = $timeSpentOnTasks[$lines[$i]->id]['comments'][dol_print_date($tmpday, 'day')];
if (is_array($timeSpentComments) && !empty($timeSpentComments)) {
$text_tooltip = '';
foreach ($timeSpentComments as $timeSpentComment) {
$text_tooltip .= $langs->trans('Comment') . ' : ' . $timeSpentComment . ' - ';
}
$text_tooltip = implode('', $timeSpentComments);
} else {
$text_tooltip = $langs->trans('TimeSpentAddWithNoComment');
}
Expand Down
2 changes: 1 addition & 1 deletion view/timespent_month.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@
print '</div>';

print '<div class="clearboth" style="padding-bottom: 20px;"></div>';
print img_picto('', 'info', 'class="pictofixedwidth"') . ' ' . $langs->trans('KeyEventTips') . '<br><br>';
print img_help(1, $langs->trans('KeyEvent')) . ' ' . $langs->trans('KeyEventTips') . '<br><br>';
print $langs->trans('ShowOnlyFavoriteTasks');
print '<input type="checkbox" class="show-only-favorite-tasks"'. ($user->conf->DOLISIRH_SHOW_ONLY_FAVORITE_TASKS ? ' checked' : '').' >';
if ($user->conf->DOLISIRH_SHOW_ONLY_FAVORITE_TASKS > 0) {
Expand Down
2 changes: 1 addition & 1 deletion view/timespent_week.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@
print '</div>';

print '<div class="clearboth" style="padding-bottom: 20px;"></div>';
print img_picto('', 'info', 'class="pictofixedwidth"') . ' ' . $langs->trans('KeyEventTips') . '<br><br>';
print img_help(1, $langs->trans('KeyEvent')) . ' ' . $langs->trans('KeyEventTips') . '<br><br>';
print $langs->trans('ShowOnlyFavoriteTasks');
print '<input type="checkbox" class="show-only-favorite-tasks"'. ($user->conf->DOLISIRH_SHOW_ONLY_FAVORITE_TASKS ? ' checked' : '').' >';
if ($user->conf->DOLISIRH_SHOW_ONLY_FAVORITE_TASKS > 0) {
Expand Down

0 comments on commit 5b20e25

Please sign in to comment.