From 90ac84dff8028b5bb499510f8620ebe5ca2a15af Mon Sep 17 00:00:00 2001
From: Andrew Dolgov
Date: Tue, 25 Jul 2006 11:47:51 +0100
Subject: [PATCH] submit behaviour fixes for opera
---
backend.php | 27 ++++++++++++++-------------
functions.js | 2 ++
prefs.js | 23 ++++++++++++++++++++++-
3 files changed, 38 insertions(+), 14 deletions(-)
diff --git a/backend.php b/backend.php
index b4b1c6f58..ff19595f5 100644
--- a/backend.php
+++ b/backend.php
@@ -1882,17 +1882,17 @@
if ($subop == "editCat") {
print "Edit category:
+ onclick=\"return feedCatEditSave()\" value=\"Save\">
";
+ onclick=\"return feedCatEditCancel()\" value=\"Cancel\">";
} else {
print "
Selection:
+ onclick=\"return editSelectedFeedCat()\" value=\"Edit\">
";
+ onclick=\"return removeSelectedFeedCats()\" value=\"Remove\">";
}
@@ -1988,11 +1988,11 @@
print " ";
print "";
print "";
@@ -2076,7 +2076,7 @@
print "";
@@ -2173,9 +2173,9 @@
print "
Selection:
+ onclick=\"return editSelectedFilter()\" value=\"Edit\">
";
+ onclick=\"return removeSelectedFilters()\" value=\"Remove\">";
print "
";
@@ -2644,11 +2644,11 @@
print " ";
print "";
print "";
@@ -3112,9 +3112,10 @@
print "
+ type=\"submit\" onclick=\"return userEditSave()\"
+ value=\"Save\">
";
print "";
diff --git a/functions.js b/functions.js
index 6473e8698..853f36e19 100644
--- a/functions.js
+++ b/functions.js
@@ -1134,6 +1134,7 @@ function closeInfoBox(cleanup) {
enableHotkeys();
+ return false;
}
@@ -1153,6 +1154,7 @@ function displayDlg(id, param) {
disableHotkeys();
+ return false;
}
function infobox_submit_callback() {
diff --git a/prefs.js b/prefs.js
index d73967313..0b15d8a10 100644
--- a/prefs.js
+++ b/prefs.js
@@ -454,6 +454,8 @@ function removeSelectedLabels() {
} else {
alert("No labels are selected.");
}
+
+ return false;
}
function removeSelectedUsers() {
@@ -481,6 +483,8 @@ function removeSelectedUsers() {
} else {
alert("No users are selected.");
}
+
+ return false;
}
function removeSelectedFilters() {
@@ -507,6 +511,8 @@ function removeSelectedFilters() {
} else {
alert("No filters are selected.");
}
+
+ return false;
}
@@ -538,7 +544,8 @@ function removeSelectedFeeds() {
alert("No feeds are selected.");
}
-
+
+ return false;
}
function removeSelectedFeedCats() {
@@ -569,6 +576,7 @@ function removeSelectedFeedCats() {
}
+ return false;
}
function feedEditCancel() {
@@ -582,6 +590,7 @@ function feedEditCancel() {
selectPrefRows('feed', false); // cleanup feed selection
+ return false;
}
function feedCatEditCancel() {
@@ -599,6 +608,7 @@ function feedCatEditCancel() {
xmlhttp.onreadystatechange=feedlist_callback;
xmlhttp.send(null);
+ return false;
}
function feedEditSave() {
@@ -647,6 +657,7 @@ function feedCatEditSave() {
active_feed_cat = false;
+ return false;
}
@@ -663,6 +674,7 @@ function labelTest() {
xmlhttp.onreadystatechange=infobox_callback;
xmlhttp.send(null);
+ return false;
}
function displayHelpInfobox(topic_id) {
@@ -692,6 +704,7 @@ function labelEditCancel() {
xmlhttp.onreadystatechange=labellist_callback;
xmlhttp.send(null);
+ return false;
}
function userEditCancel() {
@@ -703,6 +716,8 @@ function userEditCancel() {
selectPrefRows('user', false); // cleanup feed selection
closeInfoBox();
+
+ return false;
}
function filterEditCancel() {
@@ -716,6 +731,8 @@ function filterEditCancel() {
selectPrefRows('filter', false); // cleanup feed selection
closeInfoBox();
+
+ return false;
}
function labelEditSave() {
@@ -752,6 +769,7 @@ function labelEditSave() {
xmlhttp.onreadystatechange=labellist_callback;
xmlhttp.send(null);
+ return false;
}
function userEditSave() {
@@ -777,6 +795,8 @@ function userEditSave() {
xmlhttp.open("GET", "backend.php?" + query, true);
xmlhttp.onreadystatechange=userlist_callback;
xmlhttp.send(null);
+
+ return false;
}
@@ -806,6 +826,7 @@ function filterEditSave() {
xmlhttp.onreadystatechange=filterlist_callback;
xmlhttp.send(null);
+ return false;
}
function editSelectedLabel() {