Sha256: 48e53ebb6eeab0fab5da08fc0bf3a0e6ea228ba2bd209fd1ad8fad1f0b4dad63

Contents?: true

Size: 1.17 KB

Versions: 6

Compression:

Stored size: 1.17 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) && ! @tie.relation.granted  #group follower %>
      // 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 "groups/groups" )%>");
      }
      $("#group_count").html("<%=current_user.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();
    }
    <% if @tie.relation.granted # There was boxy dialog %>
      $(".boxy-inner .close").click();
    <% end %>
  <% end %>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
social_stream-0.1.6 app/views/ties/create.js.erb
social_stream-0.1.5 app/views/ties/create.js.erb
social_stream-0.1.4 app/views/ties/create.js.erb
social_stream-0.1.3 app/views/ties/create.js.erb
social_stream-0.1.2 app/views/ties/create.js.erb
social_stream-0.1.1 app/views/ties/create.js.erb