1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 03:04:09 +02:00

[ticket/11795] Use data-reset-on-edit attr to reset elements

Use data-reset-on-edit attribute to reset other inputs
when editing input with data.

Do not unbind event (old code unbound it after one use for
no reason)

PHPBB3-11795
This commit is contained in:
Vjacheslav Trushkin
2013-08-16 18:31:10 +03:00
parent 605cd0cafb
commit a92a3cfeb9
3 changed files with 7 additions and 30 deletions

View File

@@ -302,6 +302,11 @@ jQuery(document).ready(apply_onkeypress_event);
$('#' + this.getAttribute('data-focus')).focus();
});
// Reset avatar dimensions when changing URL or EMAIL
$('input[data-reset-on-edit]').bind('keyup', function() {
$(this.getAttribute('data-reset-on-edit')).val('');
});
// Adjust HTML code for IE8 and older versions
var test = document.createElement('div'),
oldBrowser = (typeof test.style.borderRadius == 'undefined');