#296 updates href according to to page nav
This commit is contained in:
parent
025ac49e19
commit
35055eeb3c
@ -13,26 +13,14 @@ define(['jquery',
|
||||
items:null,
|
||||
selectedItem:null
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
//this.scrParam = null;
|
||||
//this.menuParam = null;
|
||||
//this.stageParam = null;
|
||||
//this.numParam = null;
|
||||
//this.baseUrlRoot = '';
|
||||
|
||||
},
|
||||
|
||||
loadData: function(options) {
|
||||
this.urlRoot = _.escape(encodeURIComponent(options.name)) + '.lesson'
|
||||
// if (options.stage != null) {
|
||||
// this.urlRoot += '&stage=' + options.stage;
|
||||
// }
|
||||
// if (options.num != null) {
|
||||
// this.urlRoot += '&Num=' + options.num;
|
||||
// }
|
||||
//TODO - is below needed anymore?
|
||||
// this.set('menuParam', options.menu);
|
||||
// this.set('scrParam', options.scr);
|
||||
// this.set('stageParam', options.stage);
|
||||
// this.set('numParam', options.num);
|
||||
|
||||
var self = this;
|
||||
this.fetch().done(function(data) {
|
||||
self.setContent(data);
|
||||
@ -44,6 +32,7 @@ define(['jquery',
|
||||
loadHelps = true;
|
||||
}
|
||||
this.set('content',content);
|
||||
this.set('lessonUrl',document.URL);
|
||||
this.trigger('content:loaded',this,loadHelps);
|
||||
},
|
||||
|
||||
|
@ -27,7 +27,6 @@ define(['jquery',
|
||||
'test/:param':'testRoute'
|
||||
},
|
||||
|
||||
|
||||
lessonController: new LessonController({
|
||||
lessonContentView: lessonContentView
|
||||
}),
|
||||
@ -84,10 +83,6 @@ define(['jquery',
|
||||
this.lessonController.loadWelcome();
|
||||
});
|
||||
|
||||
goatRouter.on('route:welcomeRoute', function() {
|
||||
this.lessonController.loadWelcome();
|
||||
});
|
||||
|
||||
goatRouter.on('route:testRoute', function(param) {
|
||||
this.lessonController.testHandler(param);
|
||||
});
|
||||
|
@ -168,7 +168,8 @@ define(['jquery',
|
||||
incrementPageView: function() {
|
||||
if (this.currentPage < this.numPages -1) {
|
||||
this.currentPage++;
|
||||
this.showCurContentPage(true);
|
||||
window.location.href = this.model.get('lessonUrl') + '/' + this.currentPage;
|
||||
//this.showCurContentPage(true);
|
||||
}
|
||||
|
||||
if (this.currentPage > 0) {
|
||||
@ -184,7 +185,8 @@ define(['jquery',
|
||||
decrementPageView: function() {
|
||||
if (this.currentPage > 0) {
|
||||
this.currentPage--;
|
||||
this.showCurContentPage(false);
|
||||
window.location.href = this.model.get('lessonUrl') + '/' + this.currentPage;
|
||||
//this.showCurContentPage(false);
|
||||
}
|
||||
|
||||
if (this.currentPage < this.numPages -1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user