diff options
author | 无闻 <joe2010xtmf@163.com> | 2014-08-01 00:15:06 -0400 |
---|---|---|
committer | 无闻 <joe2010xtmf@163.com> | 2014-08-01 00:15:06 -0400 |
commit | 568c9b353ec1e18fceef4bd8e9897adf115c295d (patch) | |
tree | 8190c6902e200aea1eae5c51eaf2fd9fed2e9243 /public/js | |
parent | dabf5b057c358655d8635ed6ec8666660abeb92b (diff) | |
parent | 91480f3791f266369c343c539f8eeec245fa969a (diff) | |
download | gitea-568c9b353ec1e18fceef4bd8e9897adf115c295d.tar.gz gitea-568c9b353ec1e18fceef4bd8e9897adf115c295d.zip |
Merge pull request #311 from nuss-justin/issue/281
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 9451407b1e..2069c1e8d2 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1120,6 +1120,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(); @@ -1148,6 +1160,8 @@ function initOrganization() { if ($('#body-nav').hasClass("org-nav")) { initOrganization(); } + + initTimeSwitch(); }); })(jQuery); |