Software /
code /
prosody-modules
Changeset
914:fa996cfec6da
mod_admin_web: Default the host selection to the administrators domainpart
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Tue, 19 Feb 2013 23:51:28 +0100 |
parents | 913:f42837829d5f |
children | 915:1d03dc7cf28f |
files | mod_admin_web/admin_web/www_files/js/main.js |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_admin_web/admin_web/www_files/js/main.js Sun Feb 17 19:29:39 2013 +0100 +++ b/mod_admin_web/admin_web/www_files/js/main.js Tue Feb 19 23:51:28 2013 +0100 @@ -120,7 +120,12 @@ return false; } for (i = 0; i < items.length; i++) { - $('#host').append('<option>' + $(items[i]).text() + '</option>'); + var host = $(items[i]).text(); + if (host == Strophe.getDomainFromJid(connection.jid)) { + $('#host').append('<option selected>' + host + '</option>'); + } else { + $('#host').append('<option>' + host + '</option>'); + } } showDisconnect(); adminsubHost = $(items[0]).text();