Sha256: d249a8ed1d2edd6accff8ed9f0a4220d204184480f4c0ea0f8a929eb2413d79e

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 KB

Contents

<% if @tie.new_record? %>
    $("#tie_<%=dom_id(@tie.receiver_subject)%>").html(<%= @tie.errors.to_xml %>);
<% else %>
  var old_tie = $("#tie_<%= dom_id(@tie.receiver_subject) %>");
  var link_tie = $("#tie_link<%= dom_id(@tie.receiver_subject) %>");
  <% if @tie.receiver_subject.is_a?(Group) #group tie %>
      // add to group list
      if ($('#carousel_ul').length) { // element found
        $("#carousel_ul").prepend("<%= escape_javascript(render @tie.receiver_subject) %>");
      }else{ // no element found
        $("#my_groups").html("<%= escape_javascript(render 'users/groups' )%>");
      }
      $("#group_count").html("<%=current_subject.recent_groups.count%>");
      link_tie.replaceWith("<%= escape_javascript(link_follow_state) %>");
      link_tie.slideUp(300).delay(800).fadeIn(400);
  <% else %>
    if (old_tie.parent().hasClass('suggestions')) {
      //replace with new suggestion
      old_tie.replaceWith("<%= escape_javascript(render(@tie.sender.suggestion))%>");
      } else {
      old_tie.hide();
    }

    $(".boxy-inner .close").click();
  <% end %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
social_stream-0.3.1 app/views/ties/create.js.erb
social_stream-0.3.0 app/views/ties/create.js.erb