mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Allow to delete domain from admin.
This commit is contained in:
parent
0dbe01e399
commit
ba9692e966
2 changed files with 22 additions and 7 deletions
13
js/app.js
13
js/app.js
|
@ -481,6 +481,19 @@ app = Sammy('#main', function (sam) {
|
||||||
}, 'POST', params);
|
}, 'POST', params);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
sam.get('#/domains/:domain/delete', function (c) {
|
||||||
|
if (confirm('Are you sure you want to delete '+ c.params['domain'] +' ?')) {
|
||||||
|
c.api('/domains/'+ c.params['domain'], function(data) { // http://api.yunohost.org/#!/domain/domain_remove_delete_3
|
||||||
|
store.clear('slide');
|
||||||
|
c.redirect('#/domains');
|
||||||
|
}, 'DELETE');
|
||||||
|
} else {
|
||||||
|
store.clear('slide');
|
||||||
|
c.redirect('#/domains');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apps
|
* Apps
|
||||||
*
|
*
|
||||||
|
|
|
@ -9,11 +9,13 @@
|
||||||
<div class="br"></div>
|
<div class="br"></div>
|
||||||
|
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
{{#Domains}}
|
{{#Domains}}
|
||||||
<a href="#/domains/{{.}}" class="list-group-item slide">
|
<div class="list-group-item">
|
||||||
<h4 class="pull-left list-group-item-heading">{{.}}</h4>
|
<a href="#/domains/{{.}}/delete" class="btn btn-danger slide back pull-right">
|
||||||
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
|
<span class="glyphicon glyphicon-trash"></span> Delete
|
||||||
<div class="clearfix"></div>
|
|
||||||
</a>
|
</a>
|
||||||
{{/Domains}}
|
<h2 class="list-group-item-heading">{{.}}</h2>
|
||||||
|
<a href="https://{{.}}" target="_blank">https://{{.}}</a>
|
||||||
|
</div>
|
||||||
|
{{/Domains}}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue