Coder Social home page Coder Social logo

Comments (11)

radar avatar radar commented on August 20, 2024

I would rather we didn't use the jquery.migrate kludge. jQuery removed those helpers for a reason and so we shouldn't be forcing them back in. Let's fix this extension instead.

from spree_reviews.

iloveitaly avatar iloveitaly commented on August 20, 2024

The jQuery rating library used in this plugin is pretty out of date (hasn't been updated in close to a year).

What do you think about moving to a more maintained rating library (https://github.com/wbotelhos/raty)?

from spree_reviews.

radar avatar radar commented on August 20, 2024

I think that would be a good move. Could you please look into this?

from spree_reviews.

iloveitaly avatar iloveitaly commented on August 20, 2024

I don't think I'll have time within the next month, but as soon as I find time I'll look into it.

On Feb 6, 2013, at 5:29 PM, Ryan Bigg [email protected] wrote:

I think that would be a good move. Could you please look into this?


Reply to this email directly or view it on GitHub.

from spree_reviews.

yuji101 avatar yuji101 commented on August 20, 2024

I think this libraly(https://github.com/bmc/jquery-raty-rails) is useful for the move.

Maybe, it will work with the code like below.

_stars.html.erb

<% if defined? edit_enabled %>
    <div data-score="0" class="raty-star vote-star" > </div>
<%  else  %>
    <div data-score="<%= stars %>" class="raty-star readonly-star" > </div>
<%  end %>

js file

jQuery(document).ready(function($){
    $('.raty-star').raty();
    $('.readonly-star').raty('readOnly', true);

    $('.vote-star').raty({
      cancel: true,
      score: function() {
        return $(this).attr('data-score');
      }
    });

    $("input[name=score]").first().attr('name',"review[rating]");
});

from spree_reviews.

JDutil avatar JDutil commented on August 20, 2024

@yuji101 would you mind putting together a PR?

from spree_reviews.

JDutil avatar JDutil commented on August 20, 2024

Actually I would not recommend using that gem @yuji101 it is not very active, and would probably be best to simply use the jquery library itself as @iloveitaly mentioned.

from spree_reviews.

yuji101 avatar yuji101 commented on August 20, 2024

I think original raty perhaps don't work well with spree on rails , so I mentioned jquery-raty-rails.
Please use the gem and the code I commented as reference for improving spree_reviews.
I don't have enough time for putting together it now.

from spree_reviews.

createthis avatar createthis commented on August 20, 2024

Maybe the best solution is to just implement Modernizr instead of jQuery.browser as suggested by the jQuery 1.9 upgrade guide: http://jquery.com/upgrade-guide/1.9/#jquery-browser-removed

from spree_reviews.

navygator avatar navygator commented on August 20, 2024

http://www.fyneworks.com/jquery/star-rating/ updated to works with 1.9

from spree_reviews.

JDutil avatar JDutil commented on August 20, 2024

Thanks @navygator for pointing that out. I've updated master w/ae1aa207f9fd9b0c9be297a1228bd98df5255978 and 2-0-stable and 1-3-stable to use the latest jquery.rating plugin for 1.9 compatibility.

from spree_reviews.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.