Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rob Lee
committed
Oct 23, 2011
1 parent
9480013
commit 40ef6f0
Showing
22 changed files
with
1,516 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Maze</title> | ||
</head> | ||
<body> | ||
<iframe name="Frame1" id="Frame1" src="" frameborder="0" width=100% height=800></iframe> | ||
|
||
<script> | ||
var arrURL=new Array ( | ||
"<%= event_path(@event.id) %>", | ||
"/pages/help"); | ||
var curIndex=0; | ||
var timer=0; | ||
var refreshRate=30; //seconds | ||
function ChangeFrame() | ||
{ | ||
clearTimeout(timer); | ||
var url=arrURL[curIndex]; | ||
document.getElementById('Frame1').setAttribute('src',url); | ||
curIndex = ((curIndex+1)%arrURL.length); | ||
timer = setTimeout("ChangeFrame()", refreshRate*1000); | ||
} | ||
ChangeFrame(); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,88 @@ | ||
<h1><%= @event.name %> dashboard</h1> | ||
|
||
<%= render :partial => '/shared/flash' , :locals => {:flash => flash} %> | ||
|
||
<div>Robots made it through the maze</div> | ||
<div>Twitter Account</div> | ||
<div>Flickr Photos</div> | ||
<div class="row"> | ||
<div class="span16"> | ||
<div class="row"> | ||
<div class="span6"> </div> | ||
<div class="span2"> | ||
<div style="font-size: 35px; line-height:38px">Robot Tries</div> | ||
</div> | ||
<div class="span2"> | ||
<div id="flip-counter" class="flip-counter"></div> | ||
</div> | ||
<div class="span6"> </div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="span6"> | ||
<% unless @event.twitter_account.blank? %> | ||
<p style="font-size: 20px;">Latest from twitter</p> | ||
<div id="twitter" style="width:300px"></div> | ||
<% end %> | ||
</div> | ||
<div class="span10"> | ||
<% unless @event.flickr_group_id.blank? %> | ||
<p style="font-size: 20px;">Latest from flickr</p> | ||
<div id="flickr"></div> | ||
<% end %> | ||
</div> | ||
</div> | ||
|
||
|
||
<script type="text/javascript"> | ||
//<![CDATA[ | ||
var robotcounter; | ||
function updateCounter(token) | ||
{ | ||
$.ajax({ | ||
method: 'get', | ||
url : '/events/'+token+'/counter', | ||
dataType : 'text', | ||
success: function (text) { robotcounter.setValue(parseInt(text)); } | ||
}); | ||
|
||
} | ||
$(function(){ | ||
// Initialize a new counter | ||
robotcounter = new flipCounter('flip-counter', {value: <%= @count %>, digits: 4, auto: false}); | ||
}); | ||
setInterval("updateCounter('<%=h @event.token %>')", 5000); | ||
//]]> | ||
</script> | ||
|
||
<% unless @event.twitter_account.blank? %> | ||
<script type="text/javascript"> | ||
$('#twitter').jTweetsAnywhere({ | ||
username: '<%=h @event.twitter_account %>', | ||
count: 5, | ||
showTweetFeed: { | ||
showTimestamp: { | ||
refreshInterval: 15 | ||
}, | ||
autorefresh: { | ||
mode: 'auto-insert', | ||
interval: 60 | ||
}, | ||
paging: { mode: 'none' } | ||
} | ||
}); | ||
</script> | ||
<% end %> | ||
<% unless @event.flickr_group_id.blank? %> | ||
<script type="text/javascript"> | ||
$.getJSON("http://api.flickr.com/services/feeds/groups_pool.gne?jsoncallback=?",{id:"<%=h @event.flickr_group_id %>", format: "json" }, | ||
function(data) { | ||
$.each(data.items, function(i,item){ | ||
console.log(item) | ||
console.log(item.media) | ||
$("<img/>").attr({src : item.media.m.replace('_m.','_z.')}).appendTo("#flickr"); | ||
if ( i == 3 ) { | ||
$('#flickr').coinslider({ hoverPause: false, navigation: true, width: 640, height: 400, delay: 5000 }); | ||
return false; | ||
} | ||
}); | ||
}); | ||
</script> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ home | |
clean | ||
|
||
repeat 4 [ | ||
forward 100 | ||
forward 1 | ||
right 90 | ||
] | ||
<% else %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Maze</title> | ||
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css"> | ||
<link rel="stylesheet" href="/stylesheets/jquery.jtweetsanywhere-1.2.1.css"> | ||
|
||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> | ||
|
||
<script src="/javascripts/jquery.jtweetsanywhere-1.2.1.min.js" type="text/javascript"></script> | ||
<%# javascript_include_tag "application" %> | ||
<%= csrf_meta_tags %> | ||
<!-- My flip counter script, REQUIRED --> | ||
<script type="text/javascript" src="/javascripts/flipcounter.min.js"></script> | ||
<!-- Style sheet for the counter, REQUIRED --> | ||
<link rel="stylesheet" type="text/css" href="/stylesheets/counter.css" /> | ||
|
||
<script type="text/javascript" src="/javascripts/coin-slider.min.js"></script> | ||
<link rel="stylesheet" type="text/css" href="/stylesheets/coin-slider-styles.css" /> | ||
</head> | ||
<body> | ||
|
||
<div class="container"> | ||
<%= yield %> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class AddSocialMediaToEvents < ActiveRecord::Migration | ||
def change | ||
add_column :events, :flickr_group_id, :string | ||
add_column :events, :twitter_account, :string | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.