aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-02-05 15:00:10 +0100
committerMatěj Cepl <mcepl@redhat.com>2010-02-05 15:00:10 +0100
commitfcca737f372432da3d9bdb3f3ec1ee0eac6abe69 (patch)
tree896fdc29301c6da418bc56cb31ec5b43c8dfb1e2
parentc1f9129f8b0277beab034ecc9224fc208425d5ed (diff)
downloadbugzilla-triage-fcca737f372432da3d9bdb3f3ec1ee0eac6abe69.tar.gz
Unsuccesful attempt to make prompt cancellabling.
-rw-r--r--bugzillaBugTriage.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js
index e2b07aa..7ada462 100644
--- a/bugzillaBugTriage.js
+++ b/bugzillaBugTriage.js
@@ -1702,6 +1702,8 @@ BzPage.prototype.addLogRecord = function () {
myStorage.logs[recKey] = rec;
}
jetpack.storage.simple.sync();
+ } else if (comment === null) {
+ return null;
}
};
@@ -1907,7 +1909,13 @@ function BzPage(doc) {
console.log("logSubmits = " + logSubmits);
if (logSubmits) {
this.dok.forms.namedItem("changeform").addEventListener("submit",
- function () {that.addLogRecord();}
+ function (evt) {
+ if (that.addLogRecord() === null) {
+ // FIXME doesn't work ... still submitting'
+ evt.stopPropagation();
+ evt.preventDefault();
+ }
+ }
,false);
var generateTimeSheetUI = this.dok.createElement("li");