adding more info to contentRange params
This commit is contained in:
parent
39b9dae216
commit
0dce885778
|
@ -396,7 +396,9 @@ app.controller('websiteCtrl', [
|
||||||
vm.folderName = '';
|
vm.folderName = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
vm.Sites.allContents = function (r) {
|
vm.Sites.allContents = function (r) {
|
||||||
|
vm.filesInfo = [];
|
||||||
vm.copyR = r;
|
vm.copyR = r;
|
||||||
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
||||||
return pkg.contents({
|
return pkg.contents({
|
||||||
|
@ -415,6 +417,7 @@ app.controller('websiteCtrl', [
|
||||||
result.data.forEach(function(data){
|
result.data.forEach(function(data){
|
||||||
if (data.file) {
|
if (data.file) {
|
||||||
vm.siteFiles.push(data.name);
|
vm.siteFiles.push(data.name);
|
||||||
|
vm.filesInfo.push(data);
|
||||||
}
|
}
|
||||||
if (data.directory) {
|
if (data.directory) {
|
||||||
vm.siteDirectories.push(data.name);
|
vm.siteDirectories.push(data.name);
|
||||||
|
@ -434,20 +437,30 @@ app.controller('websiteCtrl', [
|
||||||
vm.closeFileUploadsContainers = function () {
|
vm.closeFileUploadsContainers = function () {
|
||||||
vm.uploadFolderContainer = false;
|
vm.uploadFolderContainer = false;
|
||||||
vm.uploadFileContainer = false;
|
vm.uploadFileContainer = false;
|
||||||
|
vm.folderStructure = undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
vm.Sites.fileContents = function (file, r) {
|
vm.Sites.fileContents = function (file, r) {
|
||||||
var path = vm.breadcrumbsPath;
|
vm.folderStructure = undefined;
|
||||||
path.push(file);
|
var files = vm.filesInfo;
|
||||||
path = path.join('/');
|
Object.keys(files).forEach(function (key) {
|
||||||
|
if (files[key]['name'] === file) {
|
||||||
|
vm.selectFile = files[key];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
var path = vm.breadcrumbsPath.join('/');
|
||||||
|
path = path + '/' + file
|
||||||
cleanPathQuery(path);
|
cleanPathQuery(path);
|
||||||
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
||||||
|
debugger;
|
||||||
return pkg.contentRange({
|
return pkg.contentRange({
|
||||||
hostname: r.domain,
|
hostname: r.domain,
|
||||||
domain: r.domain,
|
domain: r.domain,
|
||||||
tld: r.tld,
|
tld: r.tld,
|
||||||
sld: r.sld,
|
sld: r.sld,
|
||||||
sub: r.sub,
|
sub: r.sub,
|
||||||
|
offset: 0,
|
||||||
|
length: vm.selectFile.size,
|
||||||
path: vm.cleanedPath
|
path: vm.cleanedPath
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
vm.folderStructure = result;
|
vm.folderStructure = result;
|
||||||
|
@ -457,6 +470,7 @@ app.controller('websiteCtrl', [
|
||||||
vm.Sites.contents = function (r, dir) {
|
vm.Sites.contents = function (r, dir) {
|
||||||
vm.siteFiles = [];
|
vm.siteFiles = [];
|
||||||
vm.siteDirectories = [];
|
vm.siteDirectories = [];
|
||||||
|
vm.filesInfo = [];
|
||||||
dir = dir + '/';
|
dir = dir + '/';
|
||||||
cleanPathQuery(dir);
|
cleanPathQuery(dir);
|
||||||
dir = vm.cleanedPath;
|
dir = vm.cleanedPath;
|
||||||
|
@ -477,6 +491,7 @@ app.controller('websiteCtrl', [
|
||||||
result.data.forEach(function(data){
|
result.data.forEach(function(data){
|
||||||
if (data.file) {
|
if (data.file) {
|
||||||
vm.siteFiles.push(data.name);
|
vm.siteFiles.push(data.name);
|
||||||
|
vm.filesInfo.push(data);
|
||||||
}
|
}
|
||||||
if (data.directory) {
|
if (data.directory) {
|
||||||
vm.siteDirectories.push(data.name);
|
vm.siteDirectories.push(data.name);
|
||||||
|
|
Loading…
Reference in New Issue