Commit 308a1c53 authored by Mario Manno's avatar Mario Manno

remove event_ratings link_to_function

parent b4d86a8a
$(document).ready(function() {
$("#my_rating").raty({
path: "",
starOn: '#{raty_icon_path("on")}',
starHalf: '#{raty_icon_path("half")}',
starOff: '#{raty_icon_path("off")}',
half: true,
start: $("#event_rating_rating").val(),
target: "#event_rating_rating",
targetType: "number",
targetKeep: true
});
$("#total_rating").raty({
readOnly: true,
path: "",
starOn: '#{raty_icon_path("on")}',
starHalf: '#{raty_icon_path("half")}',
starOff: '#{raty_icon_path("off")}',
half: true,
start: $("#total_rating").data("rating")
});
$("td .rating").each(function(index) {
$(this).raty({
readOnly: true,
path: "",
starOn: '#{raty_icon_path("on")}',
starHalf: '#{raty_icon_path("half")}',
starOff: '#{raty_icon_path("off")}',
half: true,
start: $(this).data('rating')
});
});
$('[data-function="toggle-description"]').click(function() {
$('#full_description').toggle();
return false
});
});
class RatingInput < FormtasticBootstrap::Inputs::HiddenInput
def to_html
generic_input_wrapping do
builder.hidden_field(method, input_html_options) + "<div id=\"my_rating\"></div>".html_safe
end
builder.hidden_field(method, input_html_options) + "<div id=\"my_rating\"></div>".html_safe
end
end
......@@ -12,7 +12,7 @@
%li= link_to "Feedback", event_event_feedbacks_path(@event)
.row
.span16
%small= link_to_function "Toggle Description >>", "$('#full_description').toggle();"
%small= link_to "Toggle Description >>", "#", data: { function: 'notification-defaults' }
#full_description{:style => "display:none;"}
.row
.span16
......@@ -146,3 +146,4 @@
});
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment