{"version":3,"sources":["/source/modules/home/module_create.ts","/source/modules/home/controllers/homeCtrl.ts","/source/modules/home/controllers/MainController.ts","/source/modules/home/config/route.ts","/source/modules/home/module.ts","home-tmpl.js"],"names":["home","home.controllers","home.controllers.HomeCtrl","home.controllers.HomeCtrl.constructor","home.controllers.HomeCtrl.logout","home.controllers.MainCtrl","home.controllers.MainCtrl.constructor","defer","$q","$http","get","success","data","resolve","error","reject","promise","module","angular","err","run","$templateCache","put"],"mappings":"AAEA,GAAOA,OAAP,SAAOA,MACHA,QAAQA,OAAOA,QAASA,iBAAiBA,aAAcA,YAAYA,SAASA,kBADzEA,OAAAA,SCFP,IAAOA,OAAP,SAAOA,MAAKA,GAAAA,cAAAA,SAAAA,aAERC,GAAAA,UAAAA,WAGIC,QAAAA,UAAoBA,OAAaA,eAAmDA,YAAsCA,OAAaA,eAAsBA,YAHjKC,GAAAA,OAAAA,IAGwBA,MAAAA,OAAAA,OAAgEA,KAAAA,YAAAA,YAAyEA,KAAAA,WAAAA,WACzJA,OAAOA,OAASA,WAAMA,MAAAA,OAAKA,UAC3BA,OAAOA,KAAKA,WAAKA,MAAOA,OAAKA,YAAYA,WACzCA,OAAOA,eAAeA,eACtBA,OAAOA,eAAiBA,eAkBhCD,MAPIA,UAAAA,UAAAA,OAAAA,WAEIE,KAAKA,YAAYA,SACjBA,KAAKA,OAAOA,GAAGA,mBApBZF,SAAAA,SAAWA,SAAUA,iBAAkBA,cAAeA,SAAUA,iBAAiBA,gBAwB5FA,WAzBaD,aAAAA,SAAQA,UAFbD,YAAAA,KAAAA,cAAAA,KAAAA,kBAALA,OAAAA,SCAP,IAAOA,OAAP,SAAOA,MAAKA,GAAAA,cAAAA,SAAAA,aAERC,GAAAA,UAAAA,WAMII,QAAAA,UACYA,mBACCA,mBACRA,eAAwBA,OAAqBA,OAErCA,YAAqBA,KAXtCC,GAAAA,OAAAA,IAOgBA,MAAAA,mBAAAA,mBACCA,KAAAA,mBAAAA,mBACgBA,KAAAA,OAA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\r\n\r\nmodule home {\r\n angular.module(\"home\", [\"cr.translation\",\"cr.account\", \"ui.router\",\"cr.job\",\"ui.bootstrap\"]);\r\n}\r\n","module home.controllers {\r\n\r\n export class HomeCtrl {\r\n static $inject = [\"$state\", \"userPermission\", \"currentUser\", \"$scope\", \"carouselQuotes\",\"CrLazyLoader\"];\r\n\r\n constructor(private $state: any, userPermission:cr.account.IUserPermission, private currentUser: cr.account.ICurrentUser, $scope: any, carouselQuotes,public lazyLoader) {\r\n $scope.logout = () => this.logout();\r\n $scope.user=()=>{return this.currentUser.getUser();}\r\n $scope.userPermission=userPermission;\r\n $scope.carouselQuotes = carouselQuotes;\r\n\r\n\r\n }\r\n\r\n /**\r\n * Method: logout\r\n * Description:\r\n * - Logs out the current user by calling currentUser service\r\n * - Redirects the user to the account/signin state\r\n */\r\n logout() {\r\n\r\n this.currentUser.logout();\r\n this.$state.go('account/signin');\r\n }\r\n\r\n\r\n }\r\n\r\n //homeModule.controller('HomeCtrl',['$state','userPermission', 'currentUser', '$scope', 'carouselQuotes', HomeCtrl]);\r\n\r\n}\r\n","module home.controllers\r\n{\r\n export class MainCtrl {\r\n\r\n static $inject = ['applicationService','currentApplication','currentLangage','$scope', '$modal',\r\n //'notificationService',\r\n 'currentUser','cfg'];\r\n\r\n constructor(\r\n private applicationService:cr.account.IApplicationService\r\n ,private currentApplication: cr.account.ICurrentApplication\r\n ,currentLangage, private $scope: any, private $modal\r\n // ,private notificationService:cr.infrastructure.notification.INotificationService\r\n ,private currentUser, private cfg)\r\n {\r\n //this.scope = $scope;\r\n\r\n // current application set by caller for oauth\r\n /*if (!currentApplication.currentApplication()) {\r\n applicationService.GetApplicationDetails('chronoracekey').then(details => {\r\n // attach oAuth data to currentApplication\r\n currentApplication.currentApplication(details);\r\n });\r\n }*/\r\n $scope.user = currentUser.getUser();\r\n\r\n // Samy: Fetch these from a JSON resource?\r\n // (modules/home/resources/carouselImages.json)\r\n // - I tried same as carouselQuotes, resolving in route.ts.\r\n // - Almost got it to work, but the var was not visible for ng-repeat in the carousel.\r\n // I don't know how to fix or debug that.\r\n $scope.carouselImages = [\r\n {\r\n \"url\": \"img/backgrounds/background-user1.jpg\"\r\n },\r\n {\r\n \"url\": \"img/backgrounds/background-user2.jpg\"\r\n },\r\n {\r\n \"url\": \"img/backgrounds/background-user3.jpg\"\r\n },\r\n {\r\n \"url\": \"img/backgrounds/background-user4.jpg\"\r\n }\r\n ];\r\n\r\n $scope.login = ()=> {\r\n $scope.showLogin = false;\r\n };\r\n\r\n $scope.ApplicationName = cfg.Name;\r\n\r\n $scope.applicationDetails=()=>this.currentApplication.currentApplication();\r\n\r\n $scope.logout = ()=> {\r\n //$scope.showLogin = true;\r\n console.log(\"logout from mainctrl\");\r\n this.currentUser.logout();\r\n };\r\n\r\n $scope.langages = [\"FR\", \"NL\", \"EN\", \"DE\"];\r\n $scope.selectLangage = false;\r\n $scope.langage = currentLangage.Langage();\r\n\r\n $scope.setLangage = langage=>\r\n {\r\n currentLangage.Langage(langage);\r\n $scope.selectLangage = false;\r\n $scope.langage = currentLangage.Langage();\r\n };\r\n\r\n $scope.currentUser=()=>{\r\n console.log(\"cu: \", currentUser.getUser() );\r\n return currentUser.getUser();\r\n }\r\n\r\n $scope.isAuthenticated=()=>{\r\n return currentUser.isAuthenticated();\r\n };\r\n\r\n $scope.showTasks=false;\r\n\r\n //console.log(\"Main Scope\");\r\n $scope.showLogin = true;\r\n\r\n function getsubdomain() {\r\n var full = window.location.host;\r\n\r\n var parts = full.split('.');\r\n if (parts.length == 3 && parts[0] != \"www\") {\r\n return parts[0];\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n }\r\n }\r\n\r\n //l2sModule.controller('mainCtrl', ['applicationService','currentApplication','currentLangage','$scope', '$modal','notificationService','currentUser','cfg', MainCtrl]);\r\n}\r\n","module home\r\n{\r\n angular.module(\"home\")\r\n .config(['$urlRouterProvider', '$stateProvider',\r\n ($urlRouterProvider: angular.ui.IUrlRouterProvider, $stateProvider: any) => {\r\n // For any unmatched url, redirect to /\r\n $urlRouterProvider.otherwise(\"/\");\r\n\r\n // Configure states.\r\n $stateProvider\r\n .state('index', {\r\n url: \"/\",\r\n resolve: {\r\n carouselQuotes: function($http, $q) {\r\n var defer = $q.defer();\r\n $http\r\n .get('modules/home/resources/carouselQuotes.json')\r\n .success(function(data) { defer.resolve(data); })\r\n .error(function() { defer.reject(); });\r\n return defer.promise;\r\n }\r\n },\r\n views: {\r\n main: {\r\n controller: 'HomeCtrl',\r\n controllerAs: 'homeCtrl',\r\n templateUrl: \"modules/home/views/index.html\"\r\n },\r\n sidebar: {\r\n controller: 'HomeCtrl',\r\n templateUrl: \"modules/home/views/index.sidebar.html\"\r\n }\r\n },\r\n ncyBreadcrumb: {\r\n skip:true\r\n }\r\n })\r\n .state('contact', {\r\n url: \"/contact\",\r\n templateUrl: \"modules/home/views/contact.html\"\r\n });\r\n }]);\r\n\r\n}\r\n\r\n","\r\nmodule home\r\n{\r\n angular.module(\"home\")\r\n .controller( controllers )\r\n .run( [\"editableOptions\", ( editableOptions ) => {\r\n editableOptions.theme = 'bs3'; // bootstrap3 theme. Can be also 'bs2', 'default'\r\n } ] );\r\n}\r\n","(function(module) {\ntry { module = angular.module(\"home\"); }\ncatch(err) { module = angular.module(\"home\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"modules/home/resources/carouselImages.json\",\n \"[{\\\"url\\\":\\\"img/backgrounds/background-user1.jpg\\\"},{\\\"url\\\":\\\"img/backgrounds/background-user2.jpg\\\"},{\\\"url\\\":\\\"img/backgrounds/background-user3.jpg\\\"},{\\\"url\\\":\\\"img/backgrounds/background-user4.jpg\\\"}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"home\"); }\ncatch(err) { module = angular.module(\"home\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"modules/home/resources/carouselQuotes.json\",\n \"[{\\\"name\\\":\\\"Steve Jobs\\\",\\\"quote\\\":\\\"Stay Hungry, Stay Foolish\\\"},{\\\"name\\\":\\\"Jack Dempsey\\\",\\\"quote\\\":\\\"A champion is someone who gets up when he can’t.\\\"},{\\\"name\\\":\\\"John Wooden\\\",\\\"quote\\\":\\\"Do not let what you can not do interfere with what you can do.\\\"},{\\\"name\\\":\\\"Michael Jordan\\\",\\\"quote\\\":\\\"You have to expect things of yourself before you can do them\\\"}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"home\"); }\ncatch(err) { module = angular.module(\"home\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"modules/home/views/contact.html\",\n \"

Hello from Christian! {{isAuthenticated()}}

link 2














































link 1

\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"home\"); }\ncatch(err) { module = angular.module(\"home\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"modules/home/views/index.html\",\n \"

{{ 'WHATDOYOUWANTODO' | translate:'ChronoRace' }} {{'WELCOME'|translate:'ChronoRace':user()}}

\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"home\"); }\ncatch(err) { module = angular.module(\"home\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"modules/home/views/index.sidebar.html\",\n \"

Homepage!!

\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"home\"); }\ncatch(err) { module = angular.module(\"home\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n $templateCache.put(\"modules/home/views/permissions.html\",\n \"

PERMISSION TEST

Without context
{{ userPermission.isAllowed('menu.administration') }}
With context
{{ userPermission.isAllowed('menu.administration', '1') }}
Permission that doesn't exists
{{ userPermission.isAllowed('permissionthatdoesnotexists') }}
Name: inscriptions.managegroup, id: 1166590427036354
{{ userPermission.isAllowed('inscriptions.managegroup', '1166590427036354') }}
Ng if
If you see me I'm allowed to manage groups
Cache resolved via ui-router
{{ userPermissionCache | json }}
\");\n}]);\n})();\n"],"sourceRoot":"/source/"}