summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-08-20 07:28:13 +0100
committerAndrew Dolgov <[email protected]>2006-08-20 07:28:13 +0100
commit7c620da8e14269f4cbe1410aef4d9d146c2e238e (patch)
tree79a591522493f5e99a981630280edb3cdf1835fd
parent37897616fffa4d6db5e9865ed159200e83f31979 (diff)
some opera-related fixes
-rw-r--r--backend.php4
-rw-r--r--functions.js4
-rw-r--r--prefs.js35
3 files changed, 27 insertions, 16 deletions
diff --git a/backend.php b/backend.php
index 114c1d8cd..11e546459 100644
--- a/backend.php
+++ b/backend.php
@@ -2281,7 +2281,9 @@
print "<div align='right'>";
- print "<input type=\"submit\" onclick=\"return labelTest()\" value=\"Test\">
+ $is_disabled = (strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== FALSE) ? "disabled" : "";
+
+ print "<input $is_disabled type=\"submit\" onclick=\"return labelTest()\" value=\"Test\">
";
print "<input type=\"submit\"
diff --git a/functions.js b/functions.js
index 269093022..2b74731e1 100644
--- a/functions.js
+++ b/functions.js
@@ -7,6 +7,10 @@ function browser_has_opacity() {
navigator.userAgent.match("Opera") != null;
}
+function is_opera() {
+ return navigator.userAgent.match("Opera");
+}
+
function exception_error(location, e, silent) {
var msg;
diff --git a/prefs.js b/prefs.js
index 668f9ce47..eabdd3016 100644
--- a/prefs.js
+++ b/prefs.js
@@ -729,17 +729,20 @@ function labelEditSave() {
return
}
- var sql_exp = document.forms["label_edit_form"].sql_exp.value;
- var description = document.forms["label_edit_form"].description.value;
+ if (!is_opera()) {
- if (sql_exp.length == 0) {
- alert("SQL Expression cannot be blank.");
- return false;
- }
-
- if (description.length == 0) {
- alert("Caption field cannot be blank.");
- return false;
+ var sql_exp = document.forms["label_edit_form"].sql_exp.value;
+ var description = document.forms["label_edit_form"].description.value;
+
+ if (sql_exp.length == 0) {
+ alert("SQL Expression cannot be blank.");
+ return false;
+ }
+
+ if (description.length == 0) {
+ alert("Caption field cannot be blank.");
+ return false;
+ }
}
closeInfoBox();
@@ -792,11 +795,13 @@ function filterEditSave() {
return
}
- var reg_exp = document.forms["filter_edit_form"].reg_exp.value;
-
- if (reg_exp.length == 0) {
- alert("Filter expression field cannot be blank.");
- return;
+ if (!is_opera()) {
+ var reg_exp = document.forms["filter_edit_form"].reg_exp.value;
+
+ if (reg_exp.length == 0) {
+ alert("Filter expression field cannot be blank.");
+ return;
+ }
}
notify("Saving filter...");