Wizard refactoring

This commit is contained in:
Ilya Kitaev
2016-07-21 13:56:17 +03:00
parent ecf844120b
commit e5d5a6082f
11 changed files with 179 additions and 141 deletions

View File

@@ -41,6 +41,15 @@ Item {
onOpacityChanged: visible = opacity !== 0
function onPageOpened(settingsObject) {
checkNextButton();
}
function checkNextButton() {
var wordsArray = cleanWordsInput(uiItem.wordsTextItem.memoText).split(" ");
wizard.nextButton.enabled = wordsArray.length === 25;
}
function onPageClosed(settingsObject) {
settingsObject['account_name'] = uiItem.accountNameText
settingsObject['words'] = cleanWordsInput(uiItem.wordsTextItem.memoText)
@@ -74,8 +83,7 @@ Item {
wordsTextItem.memoTextReadOnly: false
wordsTextItem.memoText: ""
wordsTextItem.onMemoTextChanged: {
var wordsArray = cleanWordsInput(wordsTextItem.memoText).split(" ");
wizard.nextButton.enabled = wordsArray.length === 25
checkNextButton();
}
}
}