The floating feedback box doesn't play nicely with the Zen Classic theme. It floats over on the right and doesn't say "feedback" by default. It also doesn't have a text field in it when you click to open it, it's just clear.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | feedback-DRUPAL-5--2.zen_.patch | 2.22 KB | sun |
| #9 | play_nice_with_all2.patch | 1.62 KB | sumeet.pareek |
| #7 | play_nice_with_all.patch | 1.61 KB | sumeet.pareek |
| #3 | play_nice_with_zen.patch | 450 bytes | sumeet.pareek |
Comments
Comment #1
sunI'm not working with Zen themes, so someone else needs to provide a patch for this issue.
Comment #2
scottrigbyhmm, same here – Zen.
It floats to the right for me too... but this in itself isn't bad for my site layout -
But the real problem, like above – When I try to click in the popup, it just closes again (maybe it's the same, no edit form so clicking registers as trying to close it).
Look forward to any suggestions... maybe this issue could move to the zen theme issue queue?
Cheers!
:) Scott
Comment #3
sumeet.pareek commentedAttached is the patch that makes the feedback "box" work like expected on (hopefully) all themes.
Explanation
To wrap the title of feedback block into a clickable div (for the toggle) effect, the following code was used -
which is wrong because the title need not always be the first child of div#block-feedback-from (in zen the first child is div#block-inner)
So the patch changes the above code to
(It is assumed that even custom block.tpl.php files of all themes will have the block title inside the first h2 tags in the block)
Comment #4
sunThe only problem I have with this patch is that "h2" is a similar assumption, too. Block templates can validly use h3, h4 or even h5. With jQuery 1.2, we might use ":heading", but would have to make sure that we are really selecting the block's title and no other title.
Comment #5
sumeet.pareek commentedOfcourse a developer might use any HTML tag for block titles in templates. In such a case i think the only way to have a completely generic solution is for us to wrap the feedback-block's title into something unique and modify the js accordingly.
Let me know if the following is acceptable so that i can write a full-proof patch for this issue
$block['subject'] = t('<span id="feedback-block-title">Feedback</span>');Meanwhile I have encountered another bug and filed an issue here
Comment #6
sunWell, that might work. However, we should then remove
.wrap('<div class="feedback-link"></div>')and unnecessary code from the JS and useinstead then.
Comment #7
sumeet.pareek commentedWhat was i thinking :P
Your suggestion is much better. I have attached a new patch that uses the above idea. It has necessary changes for the js. Might look like the patch has an extra/redundant span, but that was necessary to maintain the 12px font consistency.
I have tested the patch to my satisfaction by using all kinds of block templates. Works in all the cases (as long as $block->subject is used in the template of course)
Comment #8
sunLooks better. However, two caveats:
- This is unnecessary duplicate code, should use $block as context for selecting div.feedback-link:
- Can we move #feedback-form-toggle back into the JS? I know it's not perfect either way, but my hope is to have Feedback degrading gracefully for users without JS some time in the future (which means that the form won't be collapsible)
Comment #9
sumeet.pareek commentedFair enough. Guess you were trying to guide me to the present patch.
Comment #10
sunGreat! I did not test the patch yet, but if it works, I only have minor coding-style issues:
- This line should be kept as is (note the trailing space and indentation):
- If we pass $block instead of node to feedbackFormToggle(), the first argument should be
$blockand we probably do not need $($block) in that function then :)Please set the status to PNR afterwards.
Comment #11
elioshIt works like a charms for my custom theme. Thanks a lot!
PS: tested with Chamaleon, and it works gr8.
Comment #12
elioshThis last patch doesn't validate with a XHTML 1.0 Strict layout, because DIV is not permitted inside a H2 (or H3, H4)
I'm not capable to do a patch file, but i resolve this problem changing
$block.find('div.feedback-link')with
$block.find('span.feedback-link')in javascript file and changing
$block['subject'] = '<div class="feedback-link"><span>'.t('Feedback').'</span></div>';with
$block['subject'] = '<span class="feedback-link"><span>'.t('Feedback').'</span></span>';in .module file.
Tested against Firefox 3 and Opera 9.5 (Linux) and W3C HTML validator
Comment #13
sunUpdated patch according to #10 and #12. Please test.
Comment #14
asak commentedThis works!
Another issue I had was that the block doesn't float.
adding
divbefore#block-feedback-form {in the css fyle fixed that.Comment #15
sun@asak: Which patch in this issue did you test? And, could you please elaborate a bit more on the CSS fix you needed to apply?
Comment #16
asak commentedI tested the patch you submitted in #13, and had additionaly to change in the css:
instead of:
#block-feedback-form {Use:
div#block-feedback-form {And everything works... thanks!
Comment #17
sunUhm. #block-feedback-form appears a lot of times in feedback.css - which one do you mean or do you mean all?
Comment #18
Flying Drupalist commentedI get this too, but in D6. Hopefully someone will port the patch.
Comment #19
asak commented@sun:
This is what the top of the .css looks like now:
And it works... ;)
Comment #20
sunThanks, committed!
Comment #21
scottrigbyhas this been committed to the 6.x version (or was it not a problem there)?
:) Scott
Comment #22
sunIt has been committed to all branches.
Comment #23
scottrigbygreat - thx for clarifying sun :)
Comment #24
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #25
kay_v commentedworth noting at date of this writing, it is committed to all branches in the development snapshots (e.g. 5.x-2.x-dev - silly me: I had read "all branches" to mean the stable releases; another lesson that cost nothing but time and a little pride :-* ).