envato/graphbox — pull request #13 by bekema (2014-09-24 07:35:38+00:00)
Title: Make the buttons do something

Yup, now the buttons do something ! not much but still, it shows an associated content pane and hides the others, see it now ! or just :+1:

```javascript

(function(){var _base,__bind=function(fn,me){return function(){return fn.apply(me,arguments);};};if(window.Graphbox==null){window.Graphbox={};}
if((_base=window.Graphbox).Injection==null){_base.Injection={};}
Graphbox.Injection.Base=(function(){function Base(content,patient,method){this.content=content;this.patient=patient;this.method=method;this.inject=__bind(this.inject,this);}
Base.prototype.inject=function(){return new Graphbox.Injector(this.content,this.patient,this.method).inject();};return Base;})();}).call(this);(function(){var _base,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child;};if(window.Graphbox==null){window.Graphbox={};}
if((_base=window.Graphbox).Injection==null){_base.Injection={};}
Graphbox.Injection.ContentPane=(function(_super){__extends(ContentPane,_super);function ContentPane(pane_id){var $pane,$title;this.pane_id=pane_id;$pane=$("

");$pane.hide();$title=$("

"+this.pane_id+"

");$pane.append($title);this.content=$pane;this.method='after';this.patient=$('h2.builds-branch-query');}
return ContentPane;})(Graphbox.Injection.Base);}).call(this);(function(){if(window.Graphbox==null){window.Graphbox={};}
Graphbox.Injector=(function(){function Injector(payload,patient,method){this.payload=payload;this.patient=patient;this.method=method;}
Injector.prototype.inject=function(){switch(this.method){case"append":return $(this.patient).append(this.payload);case"after":return $(this.payload).insertAfter($(this.patient));}};return Injector;})();}).call(this);(function(){var _base,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child;};if(window.Graphbox==null){window.Graphbox={};}
if((_base=window.Graphbox).Injection==null){_base.Injection={};}
Graphbox.Injection.MenuNavigation=(function(_super){__extends(MenuNavigation,_super);function MenuNavigation(){var $build_btn,$nav,$performance_btn,$test_btn;$nav=$("

");$build_btn=$("
Build Lists
");$performance_btn=$("
Performance Time-Series
");$test_btn=$("
Test Time-Series
");$build_btn.on('click',function(){$('.graphbox-js_shown').removeClass('graphbox-js_shown').hide();$('#builds-list').addClass('graphbox-js_shown').show();return $('ul.pagination').addClass('graphbox-js_shown').show();});$performance_btn.on('click',function(){$('.graphbox-js_shown').removeClass('graphbox-js_shown').hide();return $('#graphbox-js_performance_graph_pane').addClass('graphbox-js_shown').show();});$test_btn.on('click',function(){$('.graphbox-js_shown').removeClass('graphbox-js_shown').hide();return $('#graphbox-js_test_graph_pane').addClass('graphbox-js_shown').show();});$nav.append($build_btn).append($performance_btn).append($test_btn);this.content=$nav;this.method='append';this.patient=$('h2.builds-branch-query');}
return MenuNavigation;})(Graphbox.Injection.Base);}).call(this);(function(){if(window.Graphbox==null){window.Graphbox={};}
$(function(){(new Graphbox.Injection.MenuNavigation).inject();(new Graphbox.Injection.ContentPane('graphbox-js_test_graph_pane')).inject();(new Graphbox.Injection.ContentPane('graphbox-js_performance_graph_pane')).inject();$('#builds-list').addClass('graphbox-js_shown');return $('ul.pagination').addClass('graphbox-js_shown');});}).call(this);
```