added ability to not select a subdomain

This commit is contained in:
Jon Lambson 2017-11-06 12:59:29 -07:00
parent 574857233d
commit a47b7ac969
1 changed files with 10 additions and 8 deletions

View File

@ -180,12 +180,11 @@ app.controller('websiteCtrl', [
// TODO set record based on (record.host === sub + domain.domain)
var sub = vm.newRecord;
if ('@' === sub) {
if ('@' === sub || sub === undefined) {
sub = '';
}
vm.record = { sub: sub, host: (sub ? sub + '.' : '') + vm.domain.domain };
vm.currentHost = vm.record.host;
console.log('[setRecord] vm.record:');
console.log(vm.record);
};
@ -290,9 +289,9 @@ app.controller('websiteCtrl', [
return;
}
if (!vm.currentHost) {
window.alert('No hostname chosen.');
return;
vm.setRecord();
}
debugger;
if (vm.domain) {
if (!vm.domain.tld || !vm.domain.sld) {
@ -764,10 +763,11 @@ app.controller('websiteCtrl', [
$scope.domain = vm.domains;
}
})
} else {
vm.domains = els;
$scope.domain = vm.domains;
}
vm.domains = els;
$scope.domain = vm.domains;
});
vm.listSites();
@ -795,9 +795,11 @@ app.controller('websiteCtrl', [
vm.breadcrumbs.push(crumb);
}
});
if (vm.copyR.shareAccess.path !== '/') {
} else {
vm.breadcrumbs.unshift('root');
if (vm.copyR !== undefined) {
if (vm.copyR.shareAccess.path !== '/') {
} else {
vm.breadcrumbs.unshift('root');
}
}
};