parent
d9056b2cb7
commit
f60017b725
|
@ -67,6 +67,7 @@ app.controller('websiteCtrl', [
|
|||
vm.domains = [];
|
||||
//vm.unzipPath = '/';
|
||||
vm.uploadPath = '/';
|
||||
vm.deleteAllFiles = false;
|
||||
|
||||
// already validated
|
||||
function domainIsVerified(r) {
|
||||
|
@ -346,11 +347,9 @@ app.controller('websiteCtrl', [
|
|||
});
|
||||
};
|
||||
vm.Sites.remove = function (r, opts) {
|
||||
debugger;
|
||||
if (!window.confirm("Delete files for this site?")) {
|
||||
return;
|
||||
}
|
||||
|
||||
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
||||
return pkg.remove({
|
||||
hostname: r.domain
|
||||
|
@ -361,6 +360,7 @@ app.controller('websiteCtrl', [
|
|||
, path: opts.path || r.path
|
||||
, confirm: opts.confirm || r.confirm
|
||||
}).then(function (result) {
|
||||
console.log('the result', result);
|
||||
window.alert(JSON.stringify(result));
|
||||
});
|
||||
};
|
||||
|
@ -541,8 +541,8 @@ app.controller('websiteCtrl', [
|
|||
sites.forEach(function (site) {
|
||||
site.pending = !domainIsVerified(site);
|
||||
});
|
||||
console.log('[listSites] sites:');
|
||||
console.log(sites);
|
||||
// console.log('[listSites] sites:');
|
||||
// console.log(sites);
|
||||
vm.sites = sites;
|
||||
vm.sites.forEach(function(site) {
|
||||
site.urlSafeDomain = "https://" + site.domain;
|
||||
|
@ -553,8 +553,8 @@ app.controller('websiteCtrl', [
|
|||
|
||||
//vm.getDomains();
|
||||
Auth.api('domains.list', {}).then(function (els) {
|
||||
console.log('[init] domains.list els:');
|
||||
console.log(els);
|
||||
// console.log('[init] domains.list els:');
|
||||
// console.log(els);
|
||||
vm.domains = els;
|
||||
$scope.domain = vm.domains;
|
||||
});
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<button type="button" class="btn btn-danger" ng-click="vm.Sites.remove(r)"><i class="fa fa-trash"></i> Remove all Files</button>
|
||||
<button type="button" class="btn btn-danger" ng-click="vm.Sites.remove(r);"><i class="fa fa-trash"></i> Remove all Files</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue