Confirmation before do a rate

Jan 25, 2014 at 5:50 PM
Is that possible configure or customize the code to open some confirmation dialog before do a rate?

My code for rate is below:
    $('.ratingContainer .rateit')
    .rateit({ max:5, step: 1 , min:0 })
    .bind('rated reset', function (e) 
    {

         var ri = $(this);
         var voteValue = ri.rateit('value');
         var localID = ri.data('productid');
         var localName = ri.data('productname');

         ri.rateit('readonly', false);

         $.ajax({
             url: 'rate.php',
             data: { localID: localID, voteValue: voteValue, localName: localName },
             type: 'POST',
             success: function (data) {
                $('#responseRate'+localID).show();
             }               
         });
    });
Coordinator
Jan 26, 2014 at 8:02 AM
Hi,

I understand the feature. It's currently not supported.

I'll try to find some time the coming days to implement it.

I guess the way to go would be to add two events:

beforerated and beforereset

In these events you will be able to show your window.
Calling preventDefault on them will cancel the rated or reset event.

Gidon
Coordinator
Jan 26, 2014 at 8:03 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Jan 26, 2014 at 1:22 PM
The feature is included in rateit version 1.0.19 which is available for download.

The online examples will be updated later on today.
Jan 26, 2014 at 1:53 PM
gidon wrote:
The feature is included in rateit version 1.0.19 which is available for download.

The online examples will be updated later on today.
Gidon,

You did an excelent job including this feature so fast and working so well, as excpected for many user i guess.

I already test and implemented on my code and works amazing.

Congratulations and thank you for consider my question and develop as a feature.

Best,
Maicol
Coordinator
Jan 27, 2014 at 7:08 AM
Thanks for the review, and thanks for suggesting this great feature. Didn't think about it myself, but it is a very useful feature (which cannot be found in the other rating plugins to my best knowledge).