Skip to content

Commit

Permalink
modified the footer. Only includes the related js file in all pages u…
Browse files Browse the repository at this point in the history
…sing content_for helper method.
  • Loading branch information
Sanghapal committed Sep 21, 2013
1 parent 2f9813a commit a8ac9e0
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 14 deletions.
7 changes: 2 additions & 5 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
//= require jquery_ujs
//= require bootstrap
//= require mediaelement_rails
//= require Acc.DC.API
//= require calendar_generator.min
//= require calendar_generator
//= require setup
//= require_directory .
//= require jquery.cookie
//= require home

$(document).ready(function() {
// add a click handler to a link
Expand Down
8 changes: 6 additions & 2 deletions app/assets/stylesheets/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ body.textsize-1425 {font:142.5%/1.5 Arial, sans-serif;}
}
.main-container{
margin-top: 20px;
min-height: 670px;
min-height: 660px;
}

.colored-block {
Expand Down Expand Up @@ -179,9 +179,13 @@ padding-bottom:150px; /* this needs to be bigger than footer height*/
.footer{
position: relative;
margin-top: -150px; /* negative value of footer height */
height: 60px;
height: 75px;
clear:both;
color:#fff;

.nav > li > a {
display: inline;
}
}

.score-wrapper {
Expand Down
2 changes: 1 addition & 1 deletion app/views/application/_footer.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.span6.pull-middle
%ul.nav
%li
%p Develop by
%p Developed by
%li
%a{:href => "http://techvision.net.in"}
%img{:src =>'/images/techvision4.jpg', :alt => 'TechVision', :width => "125px"}
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/admin.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@
.container.main-container{role: 'application'}
= yield
= javascript_include_tag "application", 'admin/application'
= yield(:javascript) if content_for?(:javascript)

2 changes: 1 addition & 1 deletion app/views/levels/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- content_for :javascript do
= javascript_include_tag 'validations'
= javascript_include_tag 'validations', 'levels', 'nested_form'
= simple_nested_form_for @level, html: {:class => 'form-horizontal'} do |f|
= f.error_notification
%p#errorcontainer
Expand Down
2 changes: 2 additions & 0 deletions app/views/levels/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :javascript do
= javascript_include_tag 'levels', 'handle_aria_event'
#grid-wrapper.lessons{:role => "application"}
%h1 Select level
#game-levels.no-focus{role: 'grid', tabindex: '0'}
Expand Down
2 changes: 2 additions & 0 deletions app/views/levels/levels_list.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :javascript do
= javascript_include_tag 'levels'
%h1.delta Display levels
%table.table
%tr
Expand Down
2 changes: 2 additions & 0 deletions app/views/levels/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :javascript do
= javascript_include_tag 'levels', 'handle_aria_event'
.level
.row
.span6
Expand Down
2 changes: 1 addition & 1 deletion app/views/topics/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- content_for :javascript do
= javascript_include_tag 'validations'
= javascript_include_tag 'validations', 'topics', 'nested_form'
= simple_nested_form_for [@level, @topic], html: {:class => 'form-horizontal'} do |f|
= @topic.errors.full_messages

Expand Down
2 changes: 2 additions & 0 deletions app/views/topics/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :javascript do
= javascript_include_tag 'topics'
%h1.delta Topic Details for #{@level.level_name} level
%table.table
%tr
Expand Down
2 changes: 0 additions & 2 deletions app/views/topics/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
%h1.delta New topic for #{@level.level_name} level
.content
= render 'form'
- content_for :javascript do
= javascript_include_tag 'nested_form'
2 changes: 2 additions & 0 deletions app/views/topics/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :javascript do
= javascript_include_tag 'topics', 'mediaelement_rails', 'mediaelement-and-player.min', 'tabPanel'
.topic
.row
.span8.offset2
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/_frmprofile.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- content_for :javascript do
= javascript_include_tag 'global'
= javascript_include_tag 'validations'
= javascript_include_tag 'validations', 'Acc.DC.API', 'calendar_generator.min', 'calendar_generator', 'setup', 'users'

= stylesheet_link_tag 'calendar'
= simple_form_for @user, url: profile_path(@user), method: :post, html: {:class => 'form-horizontal'} do |u|
Expand Down
4 changes: 3 additions & 1 deletion app/views/users/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :javascript do
= javascript_include_tag 'users'
%h1 link to profile
%table
%tr
Expand All @@ -7,4 +9,4 @@
%tr
%td= user.email

= link_to 'create new profile', new_path(current_user)
= link_to 'create new profile', new_path(current_user)
2 changes: 2 additions & 0 deletions app/views/users/profile.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :javascript do
= javascript_include_tag 'users'
%h1 Profile
%h2 Personal information:
%table.table
Expand Down

0 comments on commit a8ac9e0

Please sign in to comment.