From 39636be7b018b9121696ce7bdc462ab2c3c8185d Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 11 Jan 2013 17:11:28 +0100 Subject: o Creating bin/web for running the web application. --- src/main/webapp/apps/app.js | 97 --------------------------------------------- 1 file changed, 97 deletions(-) delete mode 100755 src/main/webapp/apps/app.js (limited to 'src/main/webapp/apps/app.js') diff --git a/src/main/webapp/apps/app.js b/src/main/webapp/apps/app.js deleted file mode 100755 index 068f454..0000000 --- a/src/main/webapp/apps/app.js +++ /dev/null @@ -1,97 +0,0 @@ -var directives = angular.module('core.directives', []); - -directives.filter('countBadgeByLevel', function () { - return function (badges) { - // 5 levels - var levels = [0, 0, 0, 0, 0]; - angular.forEach(badges, function (value, key) { - levels[value.level - 1]++; - }); - return levels; - } -}); - -directives.filter('isodate', function () { - return function (date) { - return date.toISOString(); - } -}); - -directives.filter('gz', function () { - return function (num) { - if (angular.isArray(num)) { - var out = []; - angular.forEach(num, function (x) { - if (x > 0) { - out.push(x); - } - }); - - return out; - } - else if (angular.isNumber(num)) { - return num > 0; - } - console.log("fail"); - return undefined; - } -}); - -directives.directive('navbar', function () { - return { - restrict: 'E', - templateUrl: '/apps/core/navbar.html?noCache=' + noCache - }; -}); - -directives.directive('badge', function () { - return { - restrict: 'E', - scope: { - badgeDetail: '=badgeDetail' - }, - template: '' + - ' {{badgeDetail.badge.name}}' + - ' ' + - '' + - ' awarded to ' + - '{{badgeDetail.person.name}}. ' + - 'More' - } -}); - -directives.directive('badgeSpan', function () { - var template = - '' + - ' {{badge.name}}' + - ' ' + - ''; - - return { - restrict: 'E', - scope: { - badge: '=badge' - }, - template: template - } -}); - -directives.directive('personLink', function () { - return { - restrict: 'E', - scope: { - person: '=person' - }, - template: '{{person.name}}' - } -}); - -directives.directive('personAvatar', function () { - return { - restrict: 'E', - scope: { - person: '=person' - }, - template: '' - } -}); -- cgit v1.2.3