(function () { "use strict"; angular.module("enrDetailsPaneModule") .directive("enrSplash", [function () { return { templateUrl: "Scripts/EnrAngular/EnrDetailsPane/enrSplash.html", controller: "enrSplashController", restrict: "E" }; }]) .controller("enrSplashController", ["$scope", "$rootScope", "primaryService", "enrModeManager", function ($scope, $rootScope, primaryService, enrModeManager) { $scope.onPrimaryPartyClick = function (partyCode) { primaryService.setSelectedParty(partyCode, true); } $scope.navReferendumClick = function (index) { $rootScope.$broadcast("SELECT_FROM_SPLASH", enrModeManager.modeEnum.referendums); } $scope.voterStatisticsClick = function () { $rootScope.$broadcast("SELECT_FROM_SPLASH", enrModeManager.modeEnum.turnout); } // This could take some time. Show busy working. $rootScope.$broadcast("PUSH_BUSY_WORKING"); }]); }());