Sha256: e3b9b8323e8ca74349633fe5ac46bc9dde7ddba51b26612b212a8fbae6cfba50
Contents?: true
Size: 892 Bytes
Versions: 15
Compression:
Stored size: 892 Bytes
Contents
$(document).ready(function() { $('#topic_category_name').on('keydown', function() { if ($('#topic_category_name').val()!='') { $('#new_category_description').show(); } }); $('#topic_name').on('keydown', function() { if ($('#topic_name').val()!='') { $('#new_topic_details').show(); } }); <% if @selected_cat %> show_category(<%= @selected_cat %>); <% end %> }); var open_category = -1; show_category = function(category_id) { if (open_category>=0) { $('#category_' + open_category).find('.category_form').html(''); $('#category_' + open_category).slideUp(); } open_category = category_id; var form = $('#category').html(); $('#category_' + category_id + ' .category_form').html(form); $('#category_' + category_id + ' .category_form .topic_category_id').val(category_id); $('#category_' + category_id).slideDown(); }
Version data entries
15 entries across 15 versions & 1 rubygems