Remove subscription setup modal, instead open cloudron.io directly
This commit is contained in:
@@ -34,11 +34,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
$scope.update.error.generic = null;
|
||||
$scope.update.busy = false;
|
||||
|
||||
if (!$scope.config.update.box.sourceTarballUrl) {
|
||||
$('#setupSubscriptionModal').modal('show');
|
||||
} else {
|
||||
$('#updateModal').modal('show');
|
||||
}
|
||||
$('#updateModal').modal('show');
|
||||
},
|
||||
|
||||
stopUpdate: function () {
|
||||
@@ -359,18 +355,10 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
}
|
||||
|
||||
$scope.pollSubscriptionStatus = function () {
|
||||
Client.getSubscription(function (error, result) {
|
||||
if (error && error.statusCode === 412) return; // not yet registered
|
||||
if (error) return console.error(error);
|
||||
if (!$scope.$parent) return; // user changed view. otherwise we get an error that $scope.$parent is null
|
||||
if (!$scope.$parent) return; // user changed view. otherwise we get an error that $scope.$parent is null
|
||||
|
||||
$scope.subscription = result;
|
||||
|
||||
// also reload the subscription on the main controller
|
||||
$scope.$parent.updateSubscriptionStatus();
|
||||
|
||||
$timeout($scope.pollSubscriptionStatus, 10 * 1000);
|
||||
});
|
||||
// poll on the main controller
|
||||
$scope.$parent.pollSubscriptionStatus();
|
||||
};
|
||||
|
||||
$('#avatarFileInput').get(0).onchange = function (event) {
|
||||
|
||||
Reference in New Issue
Block a user