Adding ADR to Github

This commit is contained in:
Michael Townsend
2013-07-03 07:56:13 -07:00
parent 9616c79816
commit 19abccfcc4
36 changed files with 9668 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
/**
* Module that takes care of header buttons
*/
var Header = {
init: function(options) {
this.options = $.extend(
this.options,
options
);
},
options: {}, // Nothing for now
canTravel: function() {
return $('div#header div.headerButton').length > 1;
},
addLocation: function(text, id, module) {
return $('<div>').attr('id', "location_" + id)
.addClass('headerButton')
.text(text).click(function() {
if(Header.canTravel()) {
Engine.travelTo(module);
}
}).appendTo($('div#header'));
}
};