Sha256: 90873bc7f048d02a56ed85ddb1608f8a7474d47ac26d5eeec747bf68d98ccd44
Contents?: true
Size: 1.6 KB
Versions: 155
Compression:
Stored size: 1.6 KB
Contents
/** * @ngdoc object * @name Bastion.errata.controller:ErratumController * * @requires $scope * @requires Errata * @requires ApiErrorHandler * * @description * Provides the functionality for the errata pages. */ angular.module('Bastion.errata').controller('ErratumController', ['$scope', 'Erratum', 'ApiErrorHandler', function ($scope, Erratum, ApiErrorHandler) { $scope.panel = { error: false, loading: true }; $scope.moduleStreamShowMap = {}; if ($scope.errata) { $scope.panel.loading = false; } $scope.errata = Erratum.get({id: $scope.$stateParams.errataId}, function () { $scope.panel.loading = false; }, function (response) { $scope.panel.loading = false; ApiErrorHandler.handleGETRequestErrors(response, $scope); }); $scope.showModuleStreamList = function (moduleStreamId) { return (!$scope.moduleStreamShowMap.hasOwnProperty(moduleStreamId) || $scope.moduleStreamShowMap[moduleStreamId]); }; $scope.toggleModuleStreamList = function (moduleStreamId) { if ($scope.moduleStreamShowMap.hasOwnProperty(moduleStreamId)) { $scope.moduleStreamShowMap[moduleStreamId] = !$scope.moduleStreamShowMap[moduleStreamId]; } else { $scope.moduleStreamShowMap[moduleStreamId] = false; } }; $scope.moduleStreamChevron = function (moduleStreamId) { return $scope.showModuleStreamList(moduleStreamId) ? 'down' : 'right'; }; } ]);
Version data entries
155 entries across 155 versions & 1 rubygems