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