Sha256: 9f094f19a53e9d8444f9e364ef62da6235de781a41ff4f0d026c70c93db504e8
Contents?: true
Size: 581 Bytes
Versions: 6
Compression:
Stored size: 581 Bytes
Contents
(function($){ var $el = $('.tree [data-id=<%= node.id %>]'); <% if node.errors.empty? -%> var state = $el.find('form').is(':visible'); $el.html($('<%=j render(:partial => 'amalgam/admin/tree/node', :locals => {:node => node, :collection => node.self_and_descendants}) %>').html()); if(state) $('.tree [data-id=<%= node.id %>] > form').show(); <% else -%> $('<div class="alert alert-error"><%=j(node.errors.full_messages.join(',')) %><a href="#" data-dismiss="alert" class="close">×</a></div>').hide().prependTo($el.children('form')).fadeIn(); <% end -%> })(window.jQuery)
Version data entries
6 entries across 6 versions & 1 rubygems