more hintview patching
This commit is contained in:
parent
0ff6000511
commit
a73bf58d36
@ -126,11 +126,7 @@ define(['jquery',
|
|||||||
this.lessonContentView.model = this.lessonContent;
|
this.lessonContentView.model = this.lessonContent;
|
||||||
this.lessonContentView.render();
|
this.lessonContentView.render();
|
||||||
//TODO: consider moving hintView as child of lessonContentView ...
|
//TODO: consider moving hintView as child of lessonContentView ...
|
||||||
if (this.lessonHintView) {
|
this.createLessonHintView();
|
||||||
this.lessonHintView.stopListening();
|
|
||||||
this.lessonHintView = null;
|
|
||||||
}
|
|
||||||
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)
|
||||||
var paramModel = new ParamModel({});
|
var paramModel = new ParamModel({});
|
||||||
@ -146,11 +142,23 @@ define(['jquery',
|
|||||||
this.lessonProgressModel.completed();
|
this.lessonProgressModel.completed();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.createLessonHintView = function () {
|
||||||
|
if (this.lessonHintView) {
|
||||||
|
this.lessonHintView.stopListening();
|
||||||
|
this.lessonHintView = null;
|
||||||
|
}
|
||||||
|
this.lessonHintView = new HintView();
|
||||||
|
}
|
||||||
|
|
||||||
this.addCurHelpState = function (curHelp) {
|
this.addCurHelpState = function (curHelp) {
|
||||||
this.helpsLoaded[curHelp.helpElement] = curHelp.value;
|
this.helpsLoaded[curHelp.helpElement] = curHelp.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.showHintsView = function() {
|
this.showHintsView = function() {
|
||||||
|
if (!this.lessonHintView) {
|
||||||
|
this.createLessonHintView();
|
||||||
|
}
|
||||||
|
//
|
||||||
this.lessonHintView.render();
|
this.lessonHintView.render();
|
||||||
if (this.lessonHintView.getHintsCount > 0) {
|
if (this.lessonHintView.getHintsCount > 0) {
|
||||||
this.helpControlsView.showHintsButton();
|
this.helpControlsView.showHintsButton();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user