1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/9388] Use the new toggle function for the avatar type <select>.

PHPBB3-9388
This commit is contained in:
Cesar G
2014-05-06 18:19:05 -07:00
parent e378037516
commit 1836b01303
7 changed files with 8 additions and 61 deletions

View File

@@ -1,15 +0,0 @@
(function($) { // Avoid conflicts with other libraries
"use strict";
function avatarHide() {
$('.[class^="avatar_option_"]').hide();
var selected = $('#avatar_driver').val();
$('.avatar_option_' + selected).show();
}
avatarHide();
$('#avatar_driver').bind('change', avatarHide);
})(jQuery); // Avoid conflicts with other libraries

View File

@@ -27,10 +27,10 @@
<tr>
<td class="row1" width="35%"><b class="genmed">{L_AVATAR_TYPE}{L_COLON}</b></td>
<td class="row2">
<select name="avatar_driver" id="avatar_driver">
<select name="avatar_driver" id="avatar_driver" data-toggable-settings="true">
<option value="">{L_NO_AVATAR_CATEGORY}</option>
<!-- BEGIN avatar_drivers -->
<option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_drivers.L_TITLE}</option>
<option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF --> data-toggle-setting=".avatar_option_{avatar_drivers.DRIVER}">{avatar_drivers.L_TITLE}</option>
<!-- END avatar_drivers -->
</select></td>
</tr>
@@ -48,6 +48,4 @@
</tr>
</table>
<!-- INCLUDEJS avatars.js -->
<!-- INCLUDE ucp_footer.html -->