-
{{ 'appstore.category.popular' | tr }} ({{ repository }})
+ {{ 'appstore.category.popular' | tr }}
diff --git a/src/views/appstore.js b/src/views/appstore.js
index 2b76cc174..cacdd208e 100644
--- a/src/views/appstore.js
+++ b/src/views/appstore.js
@@ -30,12 +30,27 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
$scope.memory = null; // { memory, swap }
$scope.repository = 'core'; // core or community
- $scope.setRepository = function (repository) {
- $scope.repository = repository;
+ $scope.setCoreRepository = function () {
+ if ($scope.repository === 'core') return;
+ $scope.repository = 'core';
$scope.showCategory($scope.category);
};
+ $scope.enableCommunityRepo = {
+ show: function () {
+ if ($scope.repository === 'community') return;
+
+ $('#communityRepoModal').modal('show');
+ },
+
+ accept: function () {
+ $scope.repository = 'community';
+ $scope.showCategory($scope.category);
+ $('#communityRepoModal').modal('hide');
+ }
+ };
+
$scope.showView = function (view) {
// wait for dialog to be fully closed to avoid modal behavior breakage when moving to a different view already
$('.modal').on('hidden.bs.modal', function () {