mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Retreive dyndns dynamic list.
This commit is contained in:
parent
67a7d319be
commit
e75a3b7ec8
1 changed files with 41 additions and 22 deletions
25
js/app.js
25
js/app.js
|
@ -484,7 +484,16 @@ app = Sammy('#main', function (sam) {
|
||||||
|
|
||||||
sam.get('#/postinstall/domain', function(c) {
|
sam.get('#/postinstall/domain', function(c) {
|
||||||
$('#masthead').hide();
|
$('#masthead').hide();
|
||||||
c.view('postinstall/postinstall_2', {'ddomains': ['.nohost.me', '.noho.st']}, function() {
|
$.get('http://dyndns.yunohost.org/domains', function() {})
|
||||||
|
.done(function(data){
|
||||||
|
c.params.ddomains = data.map(function(dom){return '.'+dom;});
|
||||||
|
// c.view('domain/domain_add', c.params);
|
||||||
|
})
|
||||||
|
.fail(function() {
|
||||||
|
c.params.ddomains = ['.nohost.me', '.noho.st'];
|
||||||
|
})
|
||||||
|
.always(function() {
|
||||||
|
c.view('postinstall/postinstall_2', c.params, function() {
|
||||||
$('#domain, #ddomain').keyup(function(event){
|
$('#domain, #ddomain').keyup(function(event){
|
||||||
if(event.keyCode == 13){
|
if(event.keyCode == 13){
|
||||||
$('a.savedomain').click();
|
$('a.savedomain').click();
|
||||||
|
@ -505,7 +514,7 @@ app = Sammy('#main', function (sam) {
|
||||||
store.set('maindomain', domain);
|
store.set('maindomain', domain);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/postinstall/password', function(c) {
|
sam.get('#/postinstall/password', function(c) {
|
||||||
|
@ -694,7 +703,17 @@ app = Sammy('#main', function (sam) {
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/domains/add', function (c) {
|
sam.get('#/domains/add', function (c) {
|
||||||
c.view('domain/domain_add', {'ddomains': ['.nohost.me', '.noho.st']});
|
$.get('http://dyndns.yunohost.org/domains', function() {})
|
||||||
|
.done(function(data){
|
||||||
|
c.params.ddomains = data.map(function(dom){return '.'+dom;});
|
||||||
|
// c.view('domain/domain_add', c.params);
|
||||||
|
})
|
||||||
|
.fail(function() {
|
||||||
|
c.params.ddomains = ['.nohost.me', '.noho.st'];
|
||||||
|
})
|
||||||
|
.always(function() {
|
||||||
|
c.view('domain/domain_add', c.params);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.post('#/domains/add', function (c) {
|
sam.post('#/domains/add', function (c) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue