Sha256: 12a947725c978f937931f4f7892dbfe25dbdb9ed6c75b073b15e2250953c3a18
Contents?: true
Size: 1.91 KB
Versions: 6
Compression:
Stored size: 1.91 KB
Contents
!(angular => { 'use strict'; angular .module('alephControllers', [ 'alephControllers.schemaIndexController', 'alephControllers.queryIndexController', 'alephControllers.queryShowController', 'alephControllers.queryReplController', 'alephControllers.alertIndexController', 'alephControllers.alertShowController', 'alephControllers.snippetIndexController', 'alephControllers.singleResultShowController', 'alephServices', 'ui.ace', 'ngRoute', 'ui.bootstrap.alert' ]) .controller('BodyController', ['$scope', 'SpinnerState', 'ServerConfigurations', function NavBarController($scope, SpinnerState, ServerConfigurations) { $scope.SpinnerState = SpinnerState; $scope.ServerConfigurations = ServerConfigurations; } ]) .controller('NavBarController', ['$scope', '$window', '$location', function NavBarController($scope, $window, $location) { $scope.pathIncludes = function pathIncludes(string) { return ($location.path().indexOf(string) > -1); }; $scope.signOut = function signOut() { $window.location.href = '/sign_out'; }; } ]) .controller('AlertBarController', ['$scope', '$rootScope', function ($scope, $rootScope) { $scope.alerts = []; $scope.dismiss = function dismiss() { $scope.alerts.length = 0; }; $rootScope.$on('$routeChangeSuccess', () => { if ($scope.scheduledAlert) { $scope.alerts.push($scope.scheduledAlert); $scope.scheduledAlert = null; } else { $scope.dismiss(); } }); $rootScope.$on('scheduleAlert', (event, alert) => { $scope.scheduledAlert = alert; }); $rootScope.$on('setAlert', (event, alert) => { $scope.alerts.push(alert); }); } ]); }(angular));
Version data entries
6 entries across 3 versions & 1 rubygems