This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Reply Message. Disable Star Rating.
#1

Hello,
Please help.
How to disable rating, when user replys to someone message.
Thank you for help.
Reply
#2

Hi Tim,

Try adding the following to your page, just before the closing </body> tag:

Code:
$(document).ready(function() {
    $('#cmtx_container').on('click', '.cmtx_reply_link', function(e) { // user clicks the comment reply link
        e.preventDefault();

        $('.cmtx_rating_row').hide(); // hide the rating field
    });

    $('body').on('click', '.cmtx_message_reply a', function(e) { // user clicks to cancel the reply
        e.preventDefault();

        $('.cmtx_rating_row').show(); // show the rating field
    });
});

Have you completed the interview?
Reply
#3

Hello,
Sorry for my late answer (been some health problems)

Done that.
http://joxi.ru/a2XX3Mxiwn6M72
Noop!
Does not helps. Rating is still active, while user replays.
Reply
#4

Okay, without checking your page, I can think of two possible reasons why it's not working. Firstly, jQuery might not be loaded at the point when that code runs. Secondly, the code might successfully be hiding it but then clicking on the various form fields might be causing it to re-appear. The below code addresses this.

Code:
<script>
setTimeout(function(){
    $(document).ready(function() {
        $('#cmtx_container').on('click', '.cmtx_reply_link', function(e) { // user clicks the comment reply link
            e.preventDefault();

            // hide the rating field
            $('#cmtx_form').css('overflow-x', 'hidden');
            $('#cmtx_form').css('position', 'relative');
            $('.cmtx_rating_row').css('position', 'absolute');
            $('.cmtx_rating_row').css('margin-left', '2000px');
        });

        $('body').on('click', '.cmtx_message_reply a', function(e) { // user clicks to cancel the reply
            e.preventDefault();

            // show the rating field
            $('#cmtx_form').css('overflow-x', 'visible');
            $('#cmtx_form').css('position', 'static');
            $('.cmtx_rating_row').css('position', 'static');
            $('.cmtx_rating_row').css('margin-left', '0');
        });
    });
}, 3000);
</script>

Have you completed the interview?
Reply
#5

All right. It works.
Thanks again. A true coder.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
19-Nov-2020, 07:53 PM
Last Post by gongong
15-Jun-2017, 01:34 PM
Last Post by Steven
19-Nov-2015, 07:13 PM
Last Post by Steven
27-Feb-2013, 01:15 PM
Last Post by Steven
13-Oct-2012, 12:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)