1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Moved jquery and datatables back to asset pipline. Log out now works

This commit is contained in:
2015-05-05 12:39:15 +00:00
parent cf7b19838c
commit 89e6a81bd1
12 changed files with 35 additions and 23 deletions

View File

@@ -49,9 +49,10 @@ gem 'spring', group: :development
end end
#Other #Other
gem 'devise' gem 'devise'
gem 'cancan' gem 'cancancan'
gem 'round_robin_tournament' gem 'round_robin_tournament'
gem 'rb-readline' gem 'rb-readline'
gem 'jquery-datatables-rails'
group :development do group :development do
gem 'puma' gem 'puma'
end end

View File

@@ -39,7 +39,7 @@ GEM
arel (6.0.0) arel (6.0.0)
bcrypt (3.1.10) bcrypt (3.1.10)
builder (3.2.2) builder (3.2.2)
cancan (1.6.10) cancancan (1.10.1)
coffee-rails (4.0.1) coffee-rails (4.0.1)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0) railties (>= 4.0.0, < 5.0)
@@ -63,6 +63,11 @@ GEM
jbuilder (2.2.13) jbuilder (2.2.13)
activesupport (>= 3.0.0, < 5) activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2) multi_json (~> 1.2)
jquery-datatables-rails (3.3.0)
actionpack (>= 3.1)
jquery-rails
railties (>= 3.1)
sass-rails
jquery-rails (4.0.3) jquery-rails (4.0.3)
rails-dom-testing (~> 1.0) rails-dom-testing (~> 1.0)
railties (>= 4.2.0) railties (>= 4.2.0)
@@ -72,15 +77,15 @@ GEM
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.6.3) mail (2.6.3)
mime-types (>= 1.16, < 3) mime-types (>= 1.16, < 3)
mime-types (2.4.3) mime-types (2.5)
mini_portile (0.6.2) mini_portile (0.6.2)
minitest (5.6.0) minitest (5.6.1)
multi_json (1.11.0) multi_json (1.11.0)
mysql2 (0.3.18) mysql2 (0.3.18)
nokogiri (1.6.6.2) nokogiri (1.6.6.2)
mini_portile (~> 0.6.0) mini_portile (~> 0.6.0)
orm_adapter (0.5.0) orm_adapter (0.5.0)
passenger (5.0.6) passenger (5.0.7)
rack rack
rake (>= 0.8.1) rake (>= 0.8.1)
pg (0.18.1) pg (0.18.1)
@@ -121,6 +126,7 @@ GEM
rake (10.4.2) rake (10.4.2)
rb-readline (0.5.2) rb-readline (0.5.2)
rdoc (4.2.0) rdoc (4.2.0)
json (~> 1.4)
responders (2.1.0) responders (2.1.0)
railties (>= 4.2.0, < 5) railties (>= 4.2.0, < 5)
round_robin_tournament (0.0.1) round_robin_tournament (0.0.1)
@@ -133,7 +139,7 @@ GEM
sdoc (0.4.1) sdoc (0.4.1)
json (~> 1.7, >= 1.7.7) json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0) rdoc (~> 4.0)
spring (1.3.4) spring (1.3.5)
sprockets (2.12.3) sprockets (2.12.3)
hike (~> 1.2) hike (~> 1.2)
multi_json (~> 1.0) multi_json (~> 1.0)
@@ -161,10 +167,11 @@ PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
cancan cancancan
coffee-rails (~> 4.0.0) coffee-rails (~> 4.0.0)
devise devise
jbuilder (~> 2.0) jbuilder (~> 2.0)
jquery-datatables-rails
jquery-rails jquery-rails
mysql2 mysql2
passenger passenger

View File

@@ -11,4 +11,7 @@
// about supported directives. // about supported directives.
// //
//= require_tree . //= require_tree .
//= require jquery
//= require jquery_ujs
//= require dataTables/jquery.dataTables

View File

@@ -1,6 +1,4 @@
# Place all the behaviors and hooks related to the matching controller here. # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js. # All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/ # You can use CoffeeScript in this file: http://coffeescript.org/
jQuery ->
$('#matches').dataTable()
dJQueryUI: true

View File

@@ -1,6 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here. # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js. # All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/ # You can use CoffeeScript in this file: http://coffeescript.org/
jQuery ->
$('#tournaments').dataTable()
dJQueryUI: true

View File

@@ -12,4 +12,5 @@
* *
*= require_tree . *= require_tree .
*= require_self *= require_self
*= require dataTables/jquery.dataTables
*/ */

View File

@@ -1,17 +1,12 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<!-- Bootstrap CDN --> <!-- Bootstrap CDN -->
<!-- Latest compiled and minified CSS --> <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<!-- Optional theme --> <!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.6/css/jquery.dataTables.min.css">
<!-- Latest compiled and minified JavaScript --> <!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/1.10.6/js/jquery.dataTables.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.map"></script>
<!-- File saver does more than excel exports but that is currently what we are using it for --> <!-- File saver does more than excel exports but that is currently what we are using it for -->
<script src="https://rawgithub.com/eligrey/FileSaver.js/master/FileSaver.js" type="text/javascript"></script> <script src="https://rawgithub.com/eligrey/FileSaver.js/master/FileSaver.js" type="text/javascript"></script>

View File

@@ -11,7 +11,7 @@
<li><%= link_to "Team Scores" , "/static_pages/team_scores?tournament=#{@tournament.id}" %></li> <li><%= link_to "Team Scores" , "/static_pages/team_scores?tournament=#{@tournament.id}" %></li>
<% end %> <% end %>
<% if user_signed_in? %> <% if user_signed_in? %>
<li><%= link_to "Log Out", destroy_user_session_path, method: :delete %></li> <li><%=link_to "Log out", destroy_user_session_url ,:method => 'delete' %></li>
<% else %> <% else %>
<li><%= link_to "Log In" , new_user_session_path %></li> <li><%= link_to "Log In" , new_user_session_path %></li>
<% end %> <% end %>

View File

@@ -1,10 +1,15 @@
<h1>Pick A Tournament</h1> <h1>Pick A Tournament</h1>
<script>
$(document).ready(function() {
$('#tournamentList').dataTable();
} );
</script>
<% if user_signed_in? %> <% if user_signed_in? %>
<%= link_to 'New Tournament', new_tournament_path, :class=>"btn btn-default" %> <%= link_to 'New Tournament', new_tournament_path, :class=>"btn btn-default" %>
<% end %> <% end %>
</br> </br>
</br> </br>
<table class="display compact cell-border" id="tournaments"> <table class="display compact cell-border" id="tournamentList">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>

View File

@@ -1,10 +1,15 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %> <%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
<script>
$(document).ready(function() {
$('#matchList').dataTable();
} );
</script>
<br> <br>
<br> <br>
<h3>Upcoming Matches</h3> <h3>Upcoming Matches</h3>
<br> <br>
<br> <br>
<table class="display compact cell-border" id="matches"> <table class="display compact cell-border" id="matchList">
<thead> <thead>
<tr> <tr>
<th>Round</th> <th>Round</th>

View File

@@ -14,7 +14,6 @@ Devise.setup do |config|
# Configure the class responsible to send e-mails. # Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer' # config.mailer = 'Devise::Mailer'
# ==> ORM configuration # ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and # Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be # :mongoid (bson_ext recommended) by default. Other ORMs may be

View File

@@ -4,6 +4,7 @@ Wrestling::Application.routes.draw do
resources :matches resources :matches
devise_for :users devise_for :users
resources :tournaments resources :tournaments
resources :schools resources :schools