summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-01-25 23:12:08 +0300
committerAndrew Dolgov <[email protected]>2010-01-25 23:12:08 +0300
commit0456176a44865be077234efbe9028316e18cb58e (patch)
tree39860d7ebd8a7bb9f0eb0406000ce2f03f9bb0b4
parentb62f7265cc33490cbaf4dfa467b8bd49fd5c8a94 (diff)
enable translations by default; misc fixes
-rw-r--r--backend.php3
-rw-r--r--config.php-dist5
-rw-r--r--login_form.php20
3 files changed, 10 insertions, 18 deletions
diff --git a/backend.php b/backend.php
index b9b60a542..a87195c44 100644
--- a/backend.php
+++ b/backend.php
@@ -539,9 +539,8 @@
print "</select>";
$_SESSION = array();
-
+ }
break;
- }
} // Select action according to $op value.
diff --git a/config.php-dist b/config.php-dist
index 85fe7cdc4..58811646d 100644
--- a/config.php-dist
+++ b/config.php-dist
@@ -100,9 +100,8 @@
// If update daemon and update_feeds should send digests
// Disable if you prefer querying special URL (see wiki)
- define('ENABLE_TRANSLATIONS', false);
- // Enable experimental support for interface translations
- // based on PHP-Gettext. This is of no much use right now.
+ define('ENABLE_TRANSLATIONS', true);
+ // Enable support for interface translations
define('MYSQL_CHARSET', '');
// Connection charset for MySQL. Only enable if having charset-related
diff --git a/login_form.php b/login_form.php
index af5e70e9b..ea3d3fcc2 100644
--- a/login_form.php
+++ b/login_form.php
@@ -14,20 +14,15 @@
<script type="text/javascript">
function init() {
- if (arguments.callee.done) return;
- arguments.callee.done = true;
-
- var login = document.forms["loginForm"].login;
-
var limit_set = getCookie("ttrss_bwlimit");
if (limit_set == "true") {
document.forms["loginForm"].bw_limit.checked = true;
}
- login.focus();
-
+ document.forms["loginForm"].login.focus();
}
+
function fetchProfiles() {
try {
var params = Form.serialize('loginForm');
@@ -102,10 +97,9 @@ function validateLoginForm(f) {
</script>
<script type="text/javascript">
-if (document.addEventListener) {
- document.addEventListener("DOMContentLoaded", init, null);
-}
-window.onload = init;
+ Event.observe(window, 'load', function() {
+ init();
+ });
</script>
<form action="" method="POST" id="loginForm" name="loginForm" onsubmit="return validateLoginForm(this)">
@@ -125,11 +119,11 @@ window.onload = init;
<table>
<tr><td align="right"><?php echo __("Login:") ?></td>
<td align="right"><input name="login"
- onchange="fetchProfiles()"
+ onchange="fetchProfiles()" onfocus="fetchProfiles()"
value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr>
<tr><td align="right"><?php echo __("Password:") ?></td>
<td align="right"><input type="password" name="password"
- onchange="fetchProfiles()"
+ onchange="fetchProfiles()" onfocus="fetchProfiles()"
value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr>
<?php if (ENABLE_TRANSLATIONS) { ?>
<tr><td align="right"><?php echo __("Language:") ?></td>