2013-03-04 09:56:29 -07:00
|
|
|
|
var WizardFinishPage = {
|
2013-04-23 12:17:21 -07:00
|
|
|
|
|
|
|
|
|
onFinish: function () {
|
|
|
|
|
|
2013-03-04 09:56:29 -07:00
|
|
|
|
ApiClient.getServerConfiguration().done(function (config) {
|
|
|
|
|
|
|
|
|
|
config.IsStartupWizardCompleted = true;
|
2013-10-23 09:51:51 -07:00
|
|
|
|
|
2013-04-23 12:17:21 -07:00
|
|
|
|
ApiClient.updateServerConfiguration(config).done(function () {
|
|
|
|
|
|
|
|
|
|
ApiClient.getUsers().done(function (users) {
|
|
|
|
|
|
|
|
|
|
for (var i = 0, length = users.length; i < length; i++) {
|
|
|
|
|
|
|
|
|
|
if (users[i].Configuration.IsAdministrator) {
|
|
|
|
|
Dashboard.setCurrentUser(users[i].Id);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Dashboard.navigate('dashboard.html');
|
|
|
|
|
});
|
2013-03-04 09:56:29 -07:00
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|