Zeile 11 | Zeile 11 |
---|
elements.each(function() { var element = $(this);
|
elements.each(function() { var element = $(this);
|
element.click(function()
| element.on('click', function()
|
{ var parameterString = element.attr("href").replace(/.*\?(.*)/, "$1"); return Rating.add_rating(parameterString);
| { var parameterString = element.attr("href").replace(/.*\?(.*)/, "$1"); return Rating.add_rating(parameterString);
|
Zeile 34 | Zeile 34 |
---|
build_forumdisplay: function(tid, options) {
|
build_forumdisplay: function(tid, options) {
|
if(!$("#rating_thread_"+tid))
| var list = $("#rating_thread_"+tid); if(!list.length)
|
{ return; }
|
{ return; }
|
var list = $("#rating_thread_"+tid);
|
|
list.addClass("star_rating") .addClass(options.extra_class);
| list.addClass("star_rating") .addClass(options.extra_class);
|
Zeile 82 | Zeile 83 |
---|
rating_added: function(request, element_id) {
|
rating_added: function(request, element_id) {
|
var json = $.parseJSON(request.responseText);
| var json = JSON.parse(request.responseText);
|
if(json.hasOwnProperty("errors")) { $.each(json.errors, function(i, error) {
|
if(json.hasOwnProperty("errors")) { $.each(json.errors, function(i, error) {
|
$.jGrowl(lang.ratings_update_error + ' ' + error);
| $.jGrowl(lang.ratings_update_error + ' ' + error, {theme:'jgrowl_error'});
|
}); } else if(json.hasOwnProperty("success"))
| }); } else if(json.hasOwnProperty("success"))
|
Zeile 96 | Zeile 97 |
---|
element.parent().before(element.next()); element.removeClass("star_rating_notrated");
|
element.parent().before(element.next()); element.removeClass("star_rating_notrated");
|
$.jGrowl(json.success);
| $.jGrowl(json.success, {theme:'jgrowl_success'});
|
if(json.hasOwnProperty("average")) { $("#current_rating_"+element_id).html(json.average);
| if(json.hasOwnProperty("average")) { $("#current_rating_"+element_id).html(json.average);
|