Compare commits

..

5 Commits

Author SHA1 Message Date
AJ ONeal
9d57c66492 update urls 2018-05-17 03:02:49 -06:00
AJ ONeal
1503056c65 remove oauth3.js submodule 2017-11-10 13:04:16 -07:00
AJ ONeal
df5819ee32 Merge branch 'master' into v1.2 2017-11-10 13:01:58 -07:00
AJ ONeal
76d9d51e5a add oauth3.js submodule 2017-11-10 13:01:44 -07:00
AJ ONeal
e06188d9c2 remove oauth3.js submodule 2017-11-10 13:00:01 -07:00
5 changed files with 7 additions and 37 deletions

0
.gitmodules vendored Normal file
View File

@ -1 +0,0 @@
Subproject commit db284fbf911dc4f9d0cb99bb512d9663dcfd0ece

View File

@ -156,36 +156,21 @@ app.config([
app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $state, Auth, $location) { app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $state, Auth, $location) {
$rootScope.urlCrumbs = []; $rootScope.urlCrumbs = [];
var Crumbs = new Object();
var param;
Crumbs = {
absUrl: decodeURIComponent($location.$$absUrl),
url: decodeURIComponent($location.$$url),
path: $location.$$path,
params: $location.$$search,
};
if (Crumbs.url.includes('%')) {
param = $location.$$path;
}
$rootScope.urlCrumbs.push(Crumbs);
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) { $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
var requiresLogin = toState.data.requiresLogin; var requiresLogin = toState.data.requiresLogin;
var Crumbs = new Object();
Crumbs = { Crumbs = {
absUrl: decodeURIComponent($location.$$absUrl), absUrl: $location.$$absUrl,
url: decodeURIComponent($location.$$url), url: $location.$$url,
path: $location.$$path, path: $location.$$path,
params: $location.$$search, params: $location.$$search,
toPath: toState.url, toPath: toState.url,
fromPath: fromState.url fromPath: fromState.url
}; };
$rootScope.urlCrumbs.push(Crumbs); $rootScope.urlCrumbs.push(Crumbs);
if (requiresLogin && !Auth.isLoggedIn()) { if (requiresLogin && !Auth.isLoggedIn()) {
event.preventDefault(); event.preventDefault();
$state.go('splash-page', { 'toState': toState.name }); $state.go('splash-page', { 'toState': toState.name });
} else {
window.location.replace($rootScope.urlCrumbs[0].absUrl);
} }
}); });
}]); }]);

View File

@ -126,7 +126,6 @@ app.controller('loginCtrl', [
}; };
vm.auth = function () { vm.auth = function () {
console.log('this ran');
var subject = vm.currentSubject; var subject = vm.currentSubject;
var issuer = vm.issuerName; var issuer = vm.issuerName;
return vm.newOauth3.authenticate({ return vm.newOauth3.authenticate({

View File

@ -396,9 +396,7 @@ 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({
@ -417,7 +415,6 @@ 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);
@ -437,19 +434,12 @@ 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) {
vm.folderStructure = undefined; var path = vm.breadcrumbsPath;
var files = vm.filesInfo; path.push(file);
Object.keys(files).forEach(function (key) { path = path.join('/');
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');
return pkg.contentRange({ return pkg.contentRange({
@ -458,8 +448,6 @@ app.controller('websiteCtrl', [
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;
@ -469,7 +457,6 @@ 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;
@ -490,7 +477,6 @@ 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);
@ -622,6 +608,7 @@ app.controller('websiteCtrl', [
cleanPathQuery(vm.breadcrumbsPath.join('/')); cleanPathQuery(vm.breadcrumbsPath.join('/'));
path = vm.cleanedPath; path = vm.cleanedPath;
} }
debugger;
// FIXME: Figure out how to download specific folders // FIXME: Figure out how to download specific folders
return pkg.archive({ return pkg.archive({
hostname: r.domain hostname: r.domain