In area chapter, make sure user really added Description field

This commit is contained in:
Bryan Housel
2017-04-05 17:24:30 -04:00
parent 500dbfa054
commit be73f1cddb
3 changed files with 24 additions and 1 deletions
+1
View File
@@ -934,6 +934,7 @@ en:
choose: "**Choose Playground from the list.**"
add_field: "This playground doesn't have an official name, so we won't add anything in the Name field. Instead let's add some additional details about the playground to the Description field. **Open the Add Field list.**"
choose_field: "**Choose Description from the list.**"
retry_add_field: "You didn't select the Description field. Let's try again."
describe: "**Add a description, then click the {button} button to close the feature editor.**"
play: "Good job! Try drawing a few more areas. Explore the presets and see what other kinds of areas you can add to OpenStreetMap. **When you are ready to continue to the next chapter, click '{next}'.**"
lines:
+1
View File
@@ -796,6 +796,7 @@
"choose": "**Choose Playground from the list.**",
"add_field": "This playground doesn't have an official name, so we won't add anything in the Name field. Instead let's add some additional details about the playground to the Description field. **Open the Add Field list.**",
"choose_field": "**Choose Description from the list.**",
"retry_add_field": "You didn't select the Description field. Let's try again.",
"describe": "**Add a description, then click the {button} button to close the feature editor.**",
"play": "Good job! Try drawing a few more areas. Explore the presets and see what other kinds of areas you can add to OpenStreetMap. **When you are ready to continue to the next chapter, click '{next}'.**"
},
+22 -1
View File
@@ -186,7 +186,12 @@ export function uiIntroArea(context, reveal) {
d3.select('div.combobox')
.on('click.intro', function() {
continueTo(addDescription);
timeout(function() {
if (d3.select('.form-field-description').empty())
continueTo(retryChooseDescription);
else
continueTo(addDescription);
}, 100);
});
function continueTo(nextStep) {
@@ -213,6 +218,22 @@ export function uiIntroArea(context, reveal) {
}
function retryChooseDescription() {
context.on('exit.intro', function() {
return chapter.restart();
});
reveal('.entity-editor-pane', t('intro.areas.retry_add_field'), {
buttonText: t('intro.ok'),
buttonCallback: function() { continueTo(clickAddField); }
});
function continueTo(nextStep) {
nextStep();
}
}
function play() {
dispatch.call('done');
reveal('.intro-nav-wrap .chapter-line',