summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorAndrew Patton <andrew@acusti.ca>2014-07-25 17:48:26 -0400
committerAndrew Patton <andrew@acusti.ca>2014-07-25 17:48:26 -0400
commitef430ae7ab96312b5a3b5191ae999384350cb1be (patch)
tree0d165ae2f526327a0261bf4c9f4537a47aa4839e /public
parenta447aecd953a7a4ab469777b237624cca02ebbb3 (diff)
downloadgitea-ef430ae7ab96312b5a3b5191ae999384350cb1be.tar.gz
gitea-ef430ae7ab96312b5a3b5191ae999384350cb1be.zip
Small whitespace cleanup
Diffstat (limited to 'public')
-rw-r--r--public/js/app.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/public/js/app.js b/public/js/app.js
index b69d333958..034d7e8d06 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -621,11 +621,9 @@ function initIssue() {
// Upload.
(function() {
var $attachedList = $("#attached-list");
- var $addButton = $("#attachments-button");
-
- var files = [];
-
- var fileInput = document.getElementById("attachments-input");
+ var $addButton = $("#attachments-button");
+ var files = [];
+ var fileInput = document.getElementById("attachments-input");
if (fileInput === null) {
return;
@@ -637,9 +635,9 @@ function initIssue() {
files.splice($parent.data("index"), 1);
$parent.remove();
});
-
- var clickedButton = undefined;
-
+
+ var clickedButton;
+
$('#issue-reply-btn,input[type="submit"]', fileInput.form).on('click', function() {
clickedButton = this;
@@ -651,7 +649,7 @@ function initIssue() {
$button.text("Submiting...");
});
- fileInput.form.addEventListener("submit", function(event) {
+ fileInput.form.addEventListener("submit", function(event) {
event.stopImmediatePropagation();
event.preventDefault();