aboutsummaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/gogs.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js
index f297191a90..68e286bc8c 100644
--- a/public/js/gogs.js
+++ b/public/js/gogs.js
@@ -21,6 +21,8 @@ function initCommentPreviewTab($form) {
}
);
});
+
+ buttonsClickOnEnter();
}
function initCommentForm() {
@@ -537,6 +539,13 @@ function initAdmin() {
}
}
+function buttonsClickOnEnter() {
+ $('.ui.button').keypress(function(e){
+ if (e.keyCode == 13)
+ $(this).click();
+ });
+}
+
$(document).ready(function () {
csrf = $('meta[name=_csrf]').attr("content");
suburl = $('meta[name=_suburl]').attr("content");
@@ -670,6 +679,8 @@ $(document).ready(function () {
$($(this).data('modal')).modal('show');
});
+ buttonsClickOnEnter();
+
initCommentForm();
initInstall();
initRepository();