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;
|
||||
_.each(this.levels, function(level) {
|
||||
if (firstLevelInfo === null) {
|
||||
firstLevelInfo = intl.getName(LevelStore.getLevel(level.id));
|
||||
firstLevelInfo = this.formatLevelAbout(level.id);
|
||||
}
|
||||
this.levelIDs.push(level.id);
|
||||
}, this);
|
||||
|
@ -409,11 +409,19 @@ var SeriesView = BaseView.extend({
|
|||
},
|
||||
|
||||
updateAboutForLevelID: function(id) {
|
||||
this.setAbout(this.formatLevelAbout(id));
|
||||
},
|
||||
|
||||
formatLevelAbout: function(id) {
|
||||
var level = LevelStore.getLevel(id);
|
||||
// hack -- parse out the level number from
|
||||
// the ID
|
||||
var levelNumber = id.replace(/[^0-9]/g, '');
|
||||
this.setAbout(levelNumber + ': ' + intl.getName(level));
|
||||
return this.getLevelNumberFromID(id) +
|
||||
': ' +
|
||||
intl.getName(level);
|
||||
},
|
||||
|
||||
getLevelNumberFromID: function(id) {
|
||||
// hack -- parse out the level number from the ID
|
||||
return id.replace(/[^0-9]/g, '');
|
||||
},
|
||||
|
||||
click: function(ev) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue