mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-21 21:48:00 +02:00
Fix #281. Add mouse-over precise time and on-click switch listener.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user