From 0efed5c216315e9feae45f3193c510d9007f682a Mon Sep 17 00:00:00 2001 From: Jakob Sack <mail@jakobsack.de> Date: Sat, 28 Feb 2015 21:48:19 +0100 Subject: [PATCH] Add absolute time of last cronjob as hover tip --- settings/js/admin.js | 2 ++ settings/templates/admin.php | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/settings/js/admin.js b/settings/js/admin.js index face18beef..34bc246604 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -39,6 +39,8 @@ $(document).ready(function(){ } ); }); + $('#backgroundjobs span.crondate').tipsy({fade: true, gravity: 's', live: true}); + $('#backgroundjobs input').change(function(){ if($(this).attr('checked')){ var mode = $(this).val(); diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 1de1e2851b..7ed1afbd26 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -237,13 +237,18 @@ if ($_['suggestedOverwriteCliUrl']) { <p class="cronlog inlineblock"> <?php if ($_['lastcron'] !== false): $human_time = relative_modified_date($_['lastcron']); + $absolute_time = OC_Util::formatDate($_['lastcron']); if (time() - $_['lastcron'] <= 3600): ?> <span class="cronstatus success"></span> - <?php p($l->t("Last cron was executed %s.", array($human_time))); - else: ?> + <span class="crondate" original-title="<?php p($absolute_time);?>"> + <?php p($l->t("Last cron was executed %s.", array($human_time)));?> + </span> + <?php else: ?> <span class="cronstatus error"></span> - <?php p($l->t("Last cron was executed %s. Something seems wrong.", array($human_time))); - endif; + <span class="crondate" original-title="<?php p($absolute_time);?>"> + <?php p($l->t("Last cron was executed %s. Something seems wrong.", array($human_time)));?> + </span> + <?php endif; else: ?> <span class="cronstatus error"></span> <?php p($l->t("Cron was not executed yet!")); -- GitLab