From d220b5f8e86d1c8b4503948c09f2497d11710d98 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 3 Mar 2014 11:40:05 -0500 Subject: Some of the stuff I forgot to commit last night. Updated and cleaned up some pages as well as getting the gameType listing to work. --- app/assets/javascripts/ajax.js | 14 ++++++++++++++ app/views/layouts/application.html.erb | 1 + app/views/tournaments/index.html.erb | 8 ++++---- generate.sh | 14 ++++++++------ 4 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 app/assets/javascripts/ajax.js diff --git a/app/assets/javascripts/ajax.js b/app/assets/javascripts/ajax.js new file mode 100644 index 0000000..2b2bb3e --- /dev/null +++ b/app/assets/javascripts/ajax.js @@ -0,0 +1,14 @@ +function populate() { + //populate optionArray + //make a form element + var e = document.getElementById("tournament_id"); + var gameType = e.options[e.selectedIndex].text; + if (gameType != "") { + //populate optionArray + + for(var option in optionArray){ + //identify the number of + ; + } + }; +} \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 8a81c0a..3910cf6 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,6 +5,7 @@ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> <%= javascript_include_tag "application", "data-turbolinks-track" => true %> <%= csrf_meta_tags %> + <%= yield :head %>