From e47e83cf6bded3d1924b4d500193e7876833ef83 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 2 Jul 2017 13:03:43 -0400 Subject: Created admin panel Currently allows you to create and edit blogs, including associated records. Uses a WYSIWYG editor that allows uploading images. Also included jQuery :( --- app/assets/javascripts/records.coffee | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/assets/javascripts/records.coffee') diff --git a/app/assets/javascripts/records.coffee b/app/assets/javascripts/records.coffee index 24f83d1..69cd471 100644 --- a/app/assets/javascripts/records.coffee +++ b/app/assets/javascripts/records.coffee @@ -1,3 +1,9 @@ # Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ +$(document).on "turbolinks:load", -> + $(".should-create-record-field input[type=checkbox]").change -> + if $(".should-create-record-field input[type=checkbox]").prop("checked") + $(".record-description-field").show() + else + $(".record-description-field").hide() -- cgit 1.4.1