From d0ea91c0bb7da52ed43d486d50f86cfec00ebb4a Mon Sep 17 00:00:00 2001 From: Jon Lambson Date: Mon, 6 Nov 2017 16:33:49 -0700 Subject: [PATCH] added button and api call --- js/controllers/website-controller.js | 18 +++++++++++++++++- templates/widgets/filetree.html | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/js/controllers/website-controller.js b/js/controllers/website-controller.js index 79de5ba..3199b7d 100644 --- a/js/controllers/website-controller.js +++ b/js/controllers/website-controller.js @@ -274,7 +274,6 @@ app.controller('websiteCtrl', [ } else { $location.url($location.path()); } - }); }; @@ -429,6 +428,23 @@ app.controller('websiteCtrl', [ vm.uploadFileContainer = false; }; + vm.Sites.fileContents = function (file, r) { + vm.breadcrumbsPath.push(file); + cleanPathQuery(vm.breadcrumbsPath.join('/')) + var pkg = Auth.oauth3.pkg('www@daplie.com'); + return pkg.contentRange({ + hostname: r.domain, + domain: r.domain, + tld: r.tld, + sld: r.sld, + // sub: r.sub, + path: vm.cleanedPath + }).then(function (result) { + debugger; + vm.folderStructure = result; + }); + }; + vm.Sites.contents = function (r, dir) { vm.siteFiles = []; vm.siteDirectories = []; diff --git a/templates/widgets/filetree.html b/templates/widgets/filetree.html index c7c47f6..cdb6eb1 100644 --- a/templates/widgets/filetree.html +++ b/templates/widgets/filetree.html @@ -19,7 +19,7 @@