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

Version Path
kit_cms-2.3.22 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.20 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.19 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.18 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.17 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.16 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.15 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.14 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.13 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.11 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.10 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.9 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.8 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.7 app/views/admin/forum/_page_scripts.js.erb
kit_cms-2.3.6 app/views/admin/forum/_page_scripts.js.erb