Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
What i would like to see is a small piece of javascript in this module. When were on a topic, press the quick reply link, get send to the bottom of the page to the comment form. The form should be focused so we can directly start typing. This should only get focused when the user presses the quick reply link.
Comment | File | Size | Author |
---|---|---|---|
#10 | advanced_forum_quick_reply_make_comment_form_focussed-989842.patch | 1.62 KB | mcdruid |
Comments
Comment #1
MichelleI don't know javascript but I'd be happy to add this if someone can do a patch.
Michelle
Comment #2
Michsk CreditAttribution: Michsk commentedwill do.
Comment #3
MichelleAre you still planning on doing this?
Michelle
Comment #4
Michsk CreditAttribution: Michsk commentedYes, this week.
Comment #5
Michsk CreditAttribution: Michsk commentedwill do this today.
Comment #6
Michsk CreditAttribution: Michsk commentedHere's the js
Comment #7
MichelleThanks, will have a look soon as i can.
Will changing advForumFocus to AdvancedForumFocus hurt anything? Pet peeve but I don't like that abbreviation and have removed it from the rest of the code.
Michelle
Comment #8
Michsk CreditAttribution: Michsk commentedthat's no problem.
Comment #9
MichelleI'm going to add this after alpha 4. Sorry for that but alpha 4 has been delayed for so long that I have to be strict at this point. Nothing that isn't a bug fix is going in until I get that release out, even if it's a ready to go patch. I can't risk introducing new bugs while I'm trying to clean up the remaining ones.
Michelle
Comment #10
mcdruidI thought this was going to be a quick one, but it's not turned out to be...
AFAICS the existing js/advanced_forum.js file is entirely concerned with the collapsible containers functionality. It only gets added by the preprocess function for topic_lists and it's not obvious (to me at least) how behaviours for totally unrelated functionality like this could be added to it cleanly.
So, I've added a new file js/advanced_forum_node.js which gets added by the preprocess function for nodes (it would be too messy to start messing with the existing file / code to make the namespaces consistent, IMHO so I'm leaving all that as is).
I've added lasac's new Drupal behavior in this file. I had to modify it a little though in order to accommodate some of the different configurations that could be in place. i.e.
* don't do anything if the comment form is on a separate page (otherwise breaks the reply links)
* if comment subjects are enabled, focus the subject textfield rather than the comment textarea
I'm attaching this as a patch for further review rather than committing it straight away - feedback welcomed.
Comment #11
mcdruidI reviewed this again, and realised it needed to be adapted for nodecomment, where the ids in the form will be different.
It should now work with and without nodecomment.
Committed to 6.x-2.x branch.
Thanks for the original work lasac, and sorry it took so long to get in.
Comment #12
Michsk CreditAttribution: Michsk commentedNo problem. Thanks for commiting.
I had more work with the theme for advanced forum, for which there is zero info about commiting or not. Maybe you could shine some light on that? Would be great to have it come standard with AF