summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
author无闻 <joe2010xtmf@163.com>2014-08-01 00:15:06 -0400
committer无闻 <joe2010xtmf@163.com>2014-08-01 00:15:06 -0400
commit568c9b353ec1e18fceef4bd8e9897adf115c295d (patch)
tree8190c6902e200aea1eae5c51eaf2fd9fed2e9243 /public/js
parentdabf5b057c358655d8635ed6ec8666660abeb92b (diff)
parent91480f3791f266369c343c539f8eeec245fa969a (diff)
downloadgitea-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.js14
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);