spaces: use edition instead of setting
This commit is contained in:
@@ -64,23 +64,6 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
}
|
||||
};
|
||||
|
||||
$scope.spaces = {
|
||||
error: '',
|
||||
busy: false,
|
||||
enabled: false,
|
||||
|
||||
submit: function () {
|
||||
$scope.spaces.error = null;
|
||||
$scope.spaces.busy = true;
|
||||
|
||||
Client.setSpacesConfig({ enabled: !$scope.spaces.enabled }, function (error) {
|
||||
if (error) $scope.spaces.error = error.message;
|
||||
|
||||
getSpacesConfig();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.planChange = {
|
||||
busy: false,
|
||||
error: {},
|
||||
@@ -313,17 +296,6 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
});
|
||||
}
|
||||
|
||||
function getSpacesConfig() {
|
||||
$scope.spaces.busy = true;
|
||||
|
||||
Client.getSpacesConfig(function (error, result) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.spaces.busy = false;
|
||||
$scope.spaces.enabled = result.enabled;
|
||||
});
|
||||
}
|
||||
|
||||
function getSubscription() {
|
||||
AppStore.getSubscription($scope.appstoreConfig, function (error, result) {
|
||||
if (error) return console.error(error);
|
||||
@@ -433,7 +405,6 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
|
||||
Client.onReady(function () {
|
||||
getAutoupdatePattern();
|
||||
getSpacesConfig();
|
||||
|
||||
if ($scope.config.provider === 'caas') {
|
||||
Client.getCaasConfig(function (error, caasConfig) {
|
||||
|
||||
Reference in New Issue
Block a user