misc prefs ui updates

This commit is contained in:
Andrew Dolgov 2009-01-25 07:09:46 +01:00
parent 772f04040d
commit eb70b77781
3 changed files with 21 additions and 24 deletions

View File

@ -1131,7 +1131,7 @@
if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) {
print " <input type=\"submit\" class=\"button\"
id=\"top25_feeds_btn\"
onclick=\"javascript:browseFeeds()\" value=\"".__('Other Feeds')."\">";
onclick=\"javascript:browseFeeds()\" value=\"".__('More Feeds')."\">";
}
$feeds_sort = db_escape_string($_GET["sort"]);

View File

@ -383,14 +383,8 @@
$sort = "login";
}
print "<div class=\"prefGenericAddBox\">
<input id=\"uadd_box\"
onkeyup=\"toggleSubmitNotEmpty(this, 'user_add_btn')\"
onchange=\"toggleSubmitNotEmpty(this, 'user_add_btn')\"
size=\"15\">&nbsp;";
print "<input type=\"submit\" class=\"button\"
id=\"user_add_btn\" disabled=\"true\"
id=\"user_add_btn\"
onclick=\"javascript:addUser()\" value=\"".__('Create user')."\"></div>";
if ($user_search) {

View File

@ -328,29 +328,32 @@ function addFeedCat() {
link.value = "";
}
}
function addUser() {
try {
var sqlexp = document.getElementById("uadd_box");
var login = prompt(__("Please enter login:"), "");
if (sqlexp.value.length == 0) {
alert(__("Can't add user: no login specified."));
} else {
notify_progress("Adding user...");
var query = "backend.php?op=pref-users&subop=add&login=" +
param_escape(sqlexp.value);
new Ajax.Request(query, {
onComplete: function(transport) {
userlist_callback2(transport);
} });
sqlexp.value = "";
if (login == null) {
return false;
}
if (login == "") {
alert(__("Can't create user: no login specified."));
return false;
}
notify_progress("Adding user...");
var query = "backend.php?op=pref-users&subop=add&login=" +
param_escape(login);
new Ajax.Request(query, {
onComplete: function(transport) {
userlist_callback2(transport);
} });
} catch (e) {
exception_error("addUser", e);