afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-10-25 09:42 am

[dw-free] account creation: interest examples or copy-pasted text disappear if field loses focus

[commit: http://hg.dwscoalition.org/dw-free/rev/41b7798135b5]

http://bugs.dwscoalition.org/show_bug.cgi?id=602

Re-add example interests on blur, if you have not added your own interests.

Patch by [personal profile] wyntarvox.

Files modified:
  • htdocs/js/widgets/createaccountprofile.js
--------------------------------------------------------------------------------
diff -r 57eaba5c72e2 -r 41b7798135b5 htdocs/js/widgets/createaccountprofile.js
--- a/htdocs/js/widgets/createaccountprofile.js	Sun Oct 25 04:31:04 2009 +0000
+++ b/htdocs/js/widgets/createaccountprofile.js	Sun Oct 25 09:41:51 2009 +0000
@@ -26,6 +26,12 @@ CreateAccountProfile.init = function () 
     DOM.addEventListener($('interests_books'), "focus", CreateAccountProfile.removeText.bindEventListener("interests_books"));
     DOM.addEventListener($('interests_hobbies'), "focus", CreateAccountProfile.removeText.bindEventListener("interests_hobbies"));
     DOM.addEventListener($('interests_other'), "focus", CreateAccountProfile.removeText.bindEventListener("interests_other"));
+
+    DOM.addEventListener($('interests_music'), "blur", CreateAccountProfile.addText.bindEventListener("interests_music"));
+    DOM.addEventListener($('interests_moviestv'), "blur", CreateAccountProfile.addText.bindEventListener("interests_moviestv"));
+    DOM.addEventListener($('interests_books'), "blur", CreateAccountProfile.addText.bindEventListener("interests_books"));
+    DOM.addEventListener($('interests_hobbies'), "blur", CreateAccountProfile.addText.bindEventListener("interests_hobbies"));
+    DOM.addEventListener($('interests_other'), "blur", CreateAccountProfile.addText.bindEventListener("interests_other"));
 
     DOM.addEventListener($('interests_music'), "change", CreateAccountProfile.markAsChanged.bindEventListener("interests_music"));
     DOM.addEventListener($('interests_moviestv'), "change", CreateAccountProfile.markAsChanged.bindEventListener("interests_moviestv"));
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org