* Remove Raspberry pi Docker file * Remove old show-source/solution and plan button * Remove commented out code * Improve navigation * Remove underline from navigation and remove margin of left navigation button * Make arrow a bit smaller so it aligns a bit better with the navigation bar itself
37 lines
864 B
JavaScript
37 lines
864 B
JavaScript
define(['jquery',
|
|
'underscore',
|
|
'backbone'],
|
|
function($,_,Backbone) {
|
|
return Backbone.View.extend({
|
|
el:'#help-controls', //Check this
|
|
|
|
initialize: function (options) {
|
|
if (!options) {
|
|
return;
|
|
}
|
|
this.hasPlan = options.hasPlan;
|
|
this.hasSolution = options.hasSolution;
|
|
this.hasSource = options.hasSource;
|
|
},
|
|
|
|
showHintsButton: function(nav) {
|
|
this.$el.find('#show-hints-button').unbind().on('click',this.showHints.bind(this)).show();
|
|
},
|
|
|
|
hideHintsButton: function(){
|
|
$('#show-hints-button').hide();
|
|
},
|
|
|
|
render:function() {
|
|
this.$el.find('#restart-lesson-button').unbind().on('click',_.bind(this.restartLesson,this)).show();
|
|
},
|
|
|
|
showHints: function() {
|
|
this.trigger('hints:show','hint');
|
|
},
|
|
|
|
restartLesson: function() {
|
|
this.trigger('lesson:restart');
|
|
}
|
|
});
|
|
}); |