mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-21 05:45:41 +02:00
#1235 -- option to skip the intro dialog
This commit is contained in:
parent
79b5471273
commit
55fa0a4f35
3 changed files with 9 additions and 6 deletions
|
@ -46,10 +46,12 @@ var LevelBuilder = Level.extend({
|
|||
this.options = options;
|
||||
|
||||
var locale = LocaleStore.getLocale();
|
||||
options.level.startDialog = {};
|
||||
options.level.startDialog[locale] = {
|
||||
childViews: intl.getDialog(require('../dialogs/levelBuilder'))
|
||||
};
|
||||
if (!options.skipIntro) {
|
||||
options.level.startDialog = {};
|
||||
options.level.startDialog[locale] = {
|
||||
childViews: intl.getDialog(require('../dialogs/levelBuilder')),
|
||||
};
|
||||
}
|
||||
|
||||
// if we are editing a level our behavior is a bit different
|
||||
var editLevelJSON;
|
||||
|
|
|
@ -184,7 +184,7 @@ var regexMap = {
|
|||
'level': /^level\s?([a-zA-Z0-9]*)/,
|
||||
'levels': /^levels($|\s)/,
|
||||
'mobileAlert': /^mobile alert($|\s)/,
|
||||
'build level': /^build +level\s?([a-zA-Z0-9]*)$/,
|
||||
'build level': /^build +level\s?([a-zA-Z0-9]*)( +--skipIntro)?$/,
|
||||
'export tree': /^export +tree$/,
|
||||
'importTreeNow': /^importTreeNow($|\s)/,
|
||||
'importLevelNow': /^importLevelNow($|\s)/,
|
||||
|
|
|
@ -210,7 +210,8 @@ var Sandbox = Backbone.View.extend({
|
|||
var toEdit = regexResults[1] || false;
|
||||
this.levelBuilder = new LevelBuilder({
|
||||
deferred: whenBuilderOpen,
|
||||
editLevel: toEdit
|
||||
editLevel: toEdit,
|
||||
skipIntro: command.attributes.rawStr.indexOf('skipIntro') !== -1,
|
||||
});
|
||||
whenBuilderOpen.promise.then(function() {
|
||||
command.finishWith(deferred);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue