diff options
author | Justin Nuß <nuss.justin@gmail.com> | 2014-07-24 22:31:59 +0200 |
---|---|---|
committer | Justin Nuß <nuss.justin@gmail.com> | 2014-07-24 22:31:59 +0200 |
commit | 835e85b5ce9921ffd4d50b90b706e02685167331 (patch) | |
tree | 0edaa72fd600cfa9ef0ec73cc6786922eaf87e15 /public/js | |
parent | c20f5dc2ea1b27e80c28e00831278c7451ba6cce (diff) | |
download | gitea-835e85b5ce9921ffd4d50b90b706e02685167331.tar.gz gitea-835e85b5ce9921ffd4d50b90b706e02685167331.zip |
Fix #281. Add mouse-over precise time and on-click switch listener.
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/app.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/public/js/app.js b/public/js/app.js index 7ffcbd4a3e..cdc7d26b0d 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -960,6 +960,18 @@ function initOrganization() { console.log("init script : organization done"); } +function initTimeSwitch() { + $(".time-since[title]").on("click", function() { + var $this = $(this); + + var title = $this.attr("title"); + var text = $this.text(); + + $this.text(title); + $this.attr("title", text); + }); +} + (function ($) { $(function () { initCore(); @@ -988,6 +1000,8 @@ function initOrganization() { if ($('#body-nav').hasClass("org-nav")) { initOrganization(); } + + initTimeSwitch(); }); })(jQuery); |