Add footer and fixup main layout

This commit is contained in:
Johannes Zellner
2020-07-10 15:27:44 +02:00
parent 8b160cbbfd
commit 799892c220
2 changed files with 75 additions and 62 deletions

View File

@@ -16,10 +16,16 @@ angular.module('Application').filter('prettyOwner', function () {
}
});
// disable sce for footer https://code.angularjs.org/1.5.8/docs/api/ng/service/$sce
app.config(function ($sceProvider) {
$sceProvider.enabled(false);
});
app.controller('FileManagerController', ['$scope', 'Client', function ($scope, Client) {
var search = decodeURIComponent(window.location.search).slice(1).split('&').map(function (item) { return item.split('='); }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {});
$scope.initialized = false;
$scope.status = null;
$scope.client = Client;
$scope.cwd = '/';
$scope.cwdParts = [];
@@ -42,8 +48,6 @@ app.controller('FileManagerController', ['$scope', 'Client', function ($scope, C
Client.filesGet($scope.appId, $scope.cwd, function (error, result) {
if (error) return Client.error(error);
console.log(result);
$scope.entries = result.entries;
});
};
@@ -255,27 +259,25 @@ app.controller('FileManagerController', ['$scope', 'Client', function ($scope, C
window.location.reload(true);
}
$scope.status = status;
console.log('Running filemanager version ', localStorage.version);
// get user profile as the first thing. this populates the "scope" and affects subsequent API calls
Client.refreshUserInfo(function (error) {
if (error) return Client.initError(error, init);
Client.refreshConfig(function (error) {
Client.getApp($scope.appId, function (error, result) {
if (error) return Client.initError(error, init);
Client.getApp($scope.appId, function (error, result) {
if (error) return Client.initError(error, init);
$scope.app = result;
$scope.app = result;
// now mark the Client to be ready
Client.setReady();
// now mark the Client to be ready
Client.setReady();
$scope.refresh();
$scope.refresh();
$scope.initialized = true;
});
$scope.initialized = true;
});
});
});