initial removal (comment) of plan,solution and source views. Should remove some chattiness
This commit is contained in:
parent
b0f66f16fb
commit
e0f23bfa38
@ -3,9 +3,9 @@ define(['jquery',
|
|||||||
'libs/backbone',
|
'libs/backbone',
|
||||||
'goatApp/model/LessonContentModel',
|
'goatApp/model/LessonContentModel',
|
||||||
'goatApp/view/LessonContentView',
|
'goatApp/view/LessonContentView',
|
||||||
'goatApp/view/PlanView',
|
// 'goatApp/view/PlanView',
|
||||||
'goatApp/view/SourceView',
|
// 'goatApp/view/SourceView',
|
||||||
'goatApp/view/SolutionView',
|
// 'goatApp/view/SolutionView',
|
||||||
'goatApp/view/HintView',
|
'goatApp/view/HintView',
|
||||||
'goatApp/view/HelpControlsView',
|
'goatApp/view/HelpControlsView',
|
||||||
'goatApp/view/ParamView',
|
'goatApp/view/ParamView',
|
||||||
@ -26,9 +26,9 @@ define(['jquery',
|
|||||||
Backbone,
|
Backbone,
|
||||||
LessonContentModel,
|
LessonContentModel,
|
||||||
LessonContentView,
|
LessonContentView,
|
||||||
PlanView,
|
// PlanView,
|
||||||
SourceView,
|
// SourceView,
|
||||||
SolutionView,
|
// SolutionView,
|
||||||
HintView,
|
HintView,
|
||||||
HelpControlsView,
|
HelpControlsView,
|
||||||
ParamView,
|
ParamView,
|
||||||
@ -80,9 +80,9 @@ define(['jquery',
|
|||||||
//TODO: implement lesson not found or return to welcome page?
|
//TODO: implement lesson not found or return to welcome page?
|
||||||
}
|
}
|
||||||
this.lessonContent.loadData({'name':name});
|
this.lessonContent.loadData({'name':name});
|
||||||
this.planView = {};
|
// this.planView = {};
|
||||||
this.solutionView = {};
|
// this.solutionView = {};
|
||||||
this.sourceView = {};
|
// this.sourceView = {};
|
||||||
this.lessonHintView = {};
|
this.lessonHintView = {};
|
||||||
this.name = name;
|
this.name = name;
|
||||||
};
|
};
|
||||||
@ -96,8 +96,8 @@ define(['jquery',
|
|||||||
|
|
||||||
this.listenTo(this.helpControlsView,'hints:show',this.showHints);
|
this.listenTo(this.helpControlsView,'hints:show',this.showHints);
|
||||||
this.listenTo(this.helpControlsView,'lessonOverview:show',this.showLessonOverview)
|
this.listenTo(this.helpControlsView,'lessonOverview:show',this.showLessonOverview)
|
||||||
this.listenTo(this.helpControlsView,'solution:show',this.hideShowHelps);
|
// this.listenTo(this.helpControlsView,'solution:show',this.hideShowHelps);
|
||||||
this.listenTo(this.helpControlsView,'source:show',this.hideShowHelps);
|
// this.listenTo(this.helpControlsView,'source:show',this.hideShowHelps);
|
||||||
this.listenTo(this.helpControlsView,'lesson:restart',this.restartLesson);
|
this.listenTo(this.helpControlsView,'lesson:restart',this.restartLesson);
|
||||||
this.listenTo(this.developerControlsView, 'dev:labels', this.restartLesson);
|
this.listenTo(this.developerControlsView, 'dev:labels', this.restartLesson);
|
||||||
|
|
||||||
@ -124,9 +124,9 @@ define(['jquery',
|
|||||||
this.lessonContentView.model = this.lessonContent;
|
this.lessonContentView.model = this.lessonContent;
|
||||||
this.lessonContentView.render();
|
this.lessonContentView.render();
|
||||||
|
|
||||||
this.planView = new PlanView();
|
//this.planView = new PlanView();
|
||||||
this.solutionView = new SolutionView();
|
//this.solutionView = new SolutionView();
|
||||||
this.sourceView = new SourceView();
|
//this.sourceView = new SourceView();
|
||||||
this.lessonHintView = new HintView();
|
this.lessonHintView = new HintView();
|
||||||
|
|
||||||
//TODO: instantiate model with values (not sure why was not working before)
|
//TODO: instantiate model with values (not sure why was not working before)
|
||||||
@ -147,34 +147,34 @@ define(['jquery',
|
|||||||
this.helpsLoaded[curHelp.helpElement] = curHelp.value;
|
this.helpsLoaded[curHelp.helpElement] = curHelp.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.hideShowHelps = function(showHelp) {
|
// this.hideShowHelps = function(showHelp) {
|
||||||
var showId = '#lesson-' + showHelp + '-row';
|
// var showId = '#lesson-' + showHelp + '-row';
|
||||||
var contentId = '#lesson-' + showHelp + '-content';
|
// var contentId = '#lesson-' + showHelp + '-content';
|
||||||
$('.lesson-help').not(showId).hide();
|
// $('.lesson-help').not(showId).hide();
|
||||||
if (!showId) {
|
// if (!showId) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if ($(showId).is(':visible')) {
|
// if ($(showId).is(':visible')) {
|
||||||
$(showId).hide();
|
// $(showId).hide();
|
||||||
return;
|
// return;
|
||||||
} else {
|
// } else {
|
||||||
//TODO: move individual .html operations into individual help views
|
// //TODO: move individual .html operations into individual help views
|
||||||
switch(showHelp) {
|
// switch(showHelp) {
|
||||||
case 'plan':
|
// case 'plan':
|
||||||
$(contentId).html(this.planView.model.get('content'));
|
// $(contentId).html(this.planView.model.get('content'));
|
||||||
break;
|
// break;
|
||||||
case 'solution':
|
// case 'solution':
|
||||||
$(showId).html(this.solutionView.model.get('content'));
|
// $(showId).html(this.solutionView.model.get('content'));
|
||||||
break;
|
// break;
|
||||||
case 'source':
|
// case 'source':
|
||||||
$(contentId).html('<pre>' + this.sourceView.model.get('content') + '</pre>');
|
// $(contentId).html('<pre>' + this.sourceView.model.get('content') + '</pre>');
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
$(showId).show();
|
// $(showId).show();
|
||||||
GoatUtils.scrollToHelp()
|
// GoatUtils.scrollToHelp()
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|
||||||
this.showHints = function() {
|
this.showHints = function() {
|
||||||
this.lessonHintView.render();
|
this.lessonHintView.render();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user