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) {
$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) {
var requiresLogin = toState.data.requiresLogin;
var Crumbs = new Object();
Crumbs = {
absUrl: decodeURIComponent($location.$$absUrl),
url: decodeURIComponent($location.$$url),
absUrl: $location.$$absUrl,
url: $location.$$url,
path: $location.$$path,
params: $location.$$search,
toPath: toState.url,
fromPath: fromState.url
};
$rootScope.urlCrumbs.push(Crumbs);
if (requiresLogin && !Auth.isLoggedIn()) {
event.preventDefault();
$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 () {
console.log('this ran');
var subject = vm.currentSubject;
var issuer = vm.issuerName;
return vm.newOauth3.authenticate({

View File

@ -396,9 +396,7 @@ app.controller('websiteCtrl', [
vm.folderName = '';
};
vm.Sites.allContents = function (r) {
vm.filesInfo = [];
vm.copyR = r;
var pkg = Auth.oauth3.pkg('www@daplie.com');
return pkg.contents({
@ -417,7 +415,6 @@ app.controller('websiteCtrl', [
result.data.forEach(function(data){
if (data.file) {
vm.siteFiles.push(data.name);
vm.filesInfo.push(data);
}
if (data.directory) {
vm.siteDirectories.push(data.name);
@ -437,19 +434,12 @@ app.controller('websiteCtrl', [
vm.closeFileUploadsContainers = function () {
vm.uploadFolderContainer = false;
vm.uploadFileContainer = false;
vm.folderStructure = undefined;
};
vm.Sites.fileContents = function (file, r) {
vm.folderStructure = undefined;
var files = vm.filesInfo;
Object.keys(files).forEach(function (key) {
if (files[key]['name'] === file) {
vm.selectFile = files[key];
}
});
var path = vm.breadcrumbsPath.join('/');
path = path + '/' + file
var path = vm.breadcrumbsPath;
path.push(file);
path = path.join('/');
cleanPathQuery(path);
var pkg = Auth.oauth3.pkg('www@daplie.com');
return pkg.contentRange({
@ -458,8 +448,6 @@ app.controller('websiteCtrl', [
tld: r.tld,
sld: r.sld,
sub: r.sub,
offset: 0,
length: vm.selectFile.size,
path: vm.cleanedPath
}).then(function (result) {
vm.folderStructure = result;
@ -469,7 +457,6 @@ app.controller('websiteCtrl', [
vm.Sites.contents = function (r, dir) {
vm.siteFiles = [];
vm.siteDirectories = [];
vm.filesInfo = [];
dir = dir + '/';
cleanPathQuery(dir);
dir = vm.cleanedPath;
@ -490,7 +477,6 @@ app.controller('websiteCtrl', [
result.data.forEach(function(data){
if (data.file) {
vm.siteFiles.push(data.name);
vm.filesInfo.push(data);
}
if (data.directory) {
vm.siteDirectories.push(data.name);
@ -622,6 +608,7 @@ app.controller('websiteCtrl', [
cleanPathQuery(vm.breadcrumbsPath.join('/'));
path = vm.cleanedPath;
}
debugger;
// FIXME: Figure out how to download specific folders
return pkg.archive({
hostname: r.domain