mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-09 06:04:26 +02:00
Small fix for #288
This commit is contained in:
parent
718e4049a6
commit
1b612dc327
1 changed files with 13 additions and 5 deletions
|
@ -366,7 +366,7 @@ var SeriesView = BaseView.extend({
|
||||||
var firstLevelInfo = null;
|
var firstLevelInfo = null;
|
||||||
_.each(this.levels, function(level) {
|
_.each(this.levels, function(level) {
|
||||||
if (firstLevelInfo === null) {
|
if (firstLevelInfo === null) {
|
||||||
firstLevelInfo = intl.getName(LevelStore.getLevel(level.id));
|
firstLevelInfo = this.formatLevelAbout(level.id);
|
||||||
}
|
}
|
||||||
this.levelIDs.push(level.id);
|
this.levelIDs.push(level.id);
|
||||||
}, this);
|
}, this);
|
||||||
|
@ -409,11 +409,19 @@ var SeriesView = BaseView.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
updateAboutForLevelID: function(id) {
|
updateAboutForLevelID: function(id) {
|
||||||
|
this.setAbout(this.formatLevelAbout(id));
|
||||||
|
},
|
||||||
|
|
||||||
|
formatLevelAbout: function(id) {
|
||||||
var level = LevelStore.getLevel(id);
|
var level = LevelStore.getLevel(id);
|
||||||
// hack -- parse out the level number from
|
return this.getLevelNumberFromID(id) +
|
||||||
// the ID
|
': ' +
|
||||||
var levelNumber = id.replace(/[^0-9]/g, '');
|
intl.getName(level);
|
||||||
this.setAbout(levelNumber + ': ' + intl.getName(level));
|
},
|
||||||
|
|
||||||
|
getLevelNumberFromID: function(id) {
|
||||||
|
// hack -- parse out the level number from the ID
|
||||||
|
return id.replace(/[^0-9]/g, '');
|
||||||
},
|
},
|
||||||
|
|
||||||
click: function(ev) {
|
click: function(ev) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue