Analytics and jquery fallback

This commit is contained in:
Godwin
2014-07-13 21:27:59 -06:00
parent 7553364157
commit e64eb1f153
15 changed files with 119 additions and 24 deletions
@@ -0,0 +1,4 @@
= form_tag (@conference.url + '/register/').gsub(/\/\/+/, '/'), :method => :post do
= hidden_field_tag :step, @register_step
= email_field_tag :email
= form_actions :next
@@ -0,0 +1,14 @@
= form_tag (@conference.url + '/register/').gsub(/\/\/+/, '/'), :class => 'row', :method => :post do
= hidden_field_tag :step, @register_step
- user = session[:registration][:user]
.columns.medium-6= text_field_tag :firstname, user ? (user.firstname || user.username) : nil, :required => true
.columns.medium-6= text_field_tag :lastname, user ? user.lastname : nil, :required => true
.columns
= text_field_tag :username, user ? user.username : nil, :readonly => (user && user.username)
.columns
%h3
Attending as:
.columns.small-offset-1
= check_box_tag :is_participant
= check_box_tag :is_volunteer
.columns= form_actions :next
+1
View File
@@ -11,6 +11,7 @@
.columns.large-10
- if @register_step
%h2='Register!'
= @register_content.html_safe
- else
%h2=('About '+@conference.title)
=p @conference, :info
+1
View File
@@ -48,6 +48,7 @@
.container= render 'shared/footer'
= javascript_include_tag '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'
:javascript
window.jQuery||document.write('<script src="/javascripts/jquery.min.js"><\/script>');(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;e=o.createElement(i);r=o.getElementsByTagName(i)[0];e.src='//www.google-analytics.com/analytics.js';r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));ga('create','UA-42449204-1');ga('send','pageview');
#{yield :scripts}
!function(a,b,c,d){d&&a.addEventListener("DOMContentLoaded",function(){$.ajax({url:$("use").first().attr("xlink:href").replace(/^(.*)\#.*$/,"$1"),dataType:"text",success:function(a){$("body").append('<div class="hide">'+a+"</div>"),$("use").each(function(){$(this).attr("xlink:href",function(a,b){return b.replace(/^.*(#.*)$/,"$1")})})}})})}(document,navigator,{},/Trident\/[567]\b/.test(navigator.userAgent));
$(function(){