1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[feature/avatars] Move avatars JavaScript code to external JS file

PHPBB3-10018
This commit is contained in:
Igor Wiedler
2012-06-27 18:23:26 +02:00
parent f40e6963c6
commit 21df013210
5 changed files with 40 additions and 64 deletions

View File

@@ -0,0 +1,17 @@
function avatar_simplify() {
var node = document.getElementById('av_options');
for (var i = 0; i < node.children.length; i++) {
child = node.children[i];
child.style.display = 'none';
}
var selected = document.getElementById('avatar_driver').value;
var id = 'av_option_' + selected;
node = document.getElementById(id);
if (node != null) {
node.style.display = 'block';
}
}
avatar_simplify();
document.getElementById('avatar_driver').onchange = avatar_simplify;