summaryrefslogtreecommitdiffstats
path: root/public/js/gogs.js
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-11 16:19:28 -0500
committerUnknwon <u@gogs.io>2015-11-11 16:19:28 -0500
commit908f2924ceacc89bd75c5b89f68a653a16dcfbec (patch)
tree83fcf226c66d3900856424e6cd835305f842a1b2 /public/js/gogs.js
parentf28173bf50e5f3491edc1e3bd6fd2d5828a81333 (diff)
downloadgitea-908f2924ceacc89bd75c5b89f68a653a16dcfbec.tar.gz
gitea-908f2924ceacc89bd75c5b89f68a653a16dcfbec.zip
fix #1824 and fix #1917
Diffstat (limited to 'public/js/gogs.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();