app.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. (function () {
  2. 'use strict';
  3. angular
  4. .module('fehlerberichtApp', [
  5. 'ngAnimate',
  6. 'ngCookies',
  7. 'ngResource',
  8. 'ngRoute',
  9. 'ngSanitize',
  10. 'ngTouch'
  11. ])
  12. .directive('popover', function() {
  13. return {
  14. restrict: 'EA',
  15. link: function(scope, element, attrs){
  16. $(element).popover({
  17. html : true,
  18. content: function() {
  19. return scope.getCommentsInfo($(element).attr('data-popover'));
  20. }
  21. });
  22. $(element).hover(function(){
  23. $(element).popover('show');
  24. }, function(){
  25. $(element).popover('hide');
  26. });
  27. }
  28. };
  29. })
  30. .config(function ($routeProvider) {
  31. $routeProvider
  32. .when('/overview/:customer/:date/:status', {
  33. templateUrl: 'views/overview.html',
  34. controller: 'OverviewCtrl'
  35. })
  36. .when('/calendar', {
  37. templateUrl: 'views/calendar.html',
  38. controller: 'CalendarCtrl'
  39. })
  40. .when('/customers', {
  41. templateUrl: 'views/customers.html',
  42. controller: 'CustomersCtrl'
  43. })
  44. .when('/stats/:customer', {
  45. templateUrl: 'views/stats.html',
  46. controller: 'StatsCtrl'
  47. })
  48. .when('/config/:customer/:date', {
  49. templateUrl: 'views/config.html',
  50. controller: 'ConfigCtrl'
  51. })
  52. .when('/config', {
  53. templateUrl: 'views/config.html',
  54. controller: 'ConfigCtrl'
  55. })
  56. .otherwise({
  57. redirectTo: '/overview/all/today/errors'
  58. });
  59. });
  60. moment.locale('de', {
  61. calendar: {
  62. lastDay: "[Gestern]",
  63. lastWeek: "[letzten] dddd",
  64. nextDay: "[Morgen]",
  65. nextWeek: "dddd",
  66. sameDay: "[Heute]",
  67. sameElse: "L"
  68. }
  69. });
  70. })();