added button and api call
This commit is contained in:
parent
ab43fefc49
commit
d0ea91c0bb
|
@ -274,7 +274,6 @@ app.controller('websiteCtrl', [
|
||||||
} else {
|
} else {
|
||||||
$location.url($location.path());
|
$location.url($location.path());
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -429,6 +428,23 @@ app.controller('websiteCtrl', [
|
||||||
vm.uploadFileContainer = false;
|
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.Sites.contents = function (r, dir) {
|
||||||
vm.siteFiles = [];
|
vm.siteFiles = [];
|
||||||
vm.siteDirectories = [];
|
vm.siteDirectories = [];
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="tree files-only ls-none">
|
<ul class="tree files-only ls-none">
|
||||||
<li ng-repeat="file in vm.siteFiles track by $index">
|
<li ng-repeat="file in vm.siteFiles track by $index">
|
||||||
<span class="tree_label filez">{{ file }}</span><span class="pull-right"><button ng-if="r.shareAccess.write" type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, file); vm.closeFileUploadsContainers();" data="{{ file }}" ><i class="fa fa-trash"></i></button></span><br>
|
<span class="tree_label filez">{{ file }}</span><span class="pull-right"><button ng-if="r.shareAccess.read" type="button" class="btn btn-default btn-xs" ng-click="vm.Sites.fileContents(file, r);" data="{{ file }}" ><i class="fa fa-code"></i></button> <button ng-if="r.shareAccess.write" type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, file); vm.closeFileUploadsContainers();" data="{{ file }}" ><i class="fa fa-trash"></i></button></span><br>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="folder-actions">
|
<div class="folder-actions">
|
||||||
|
|
Loading…
Reference in New Issue