Merge pull request #480 from matthias-g/fixPageNum
Fix next page button when url doesn't end with page number
This commit is contained in:
commit
0030c7bdfb
@ -32,7 +32,11 @@ define(['jquery',
|
||||
}
|
||||
this.set('content',content);
|
||||
this.set('lessonUrl',document.URL.replace(/\.lesson.*/,'.lesson'));
|
||||
if (/.*\.lesson\/(\d{1,4})$/.test(document.URL)) {
|
||||
this.set('pageNum',document.URL.replace(/.*\.lesson\/(\d{1,4})$/,'$1'));
|
||||
} else {
|
||||
this.set('pageNum',0);
|
||||
}
|
||||
this.trigger('content:loaded',this,loadHelps);
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user