github.com/justinjmoses/evergreen@v0.0.0-20170530173719-1d50e381ff0d/public/static/js/directives/directives.drawer.js (about) 1 var directives = directives || {}; 2 directives.drawer = angular.module('directives.drawer', []); 3 directives.drawer.directive('revisionBlurb', function($timeout) { 4 return { 5 restrict: 'E', 6 scope: { 7 'linkType': '=linktype', 8 'linkId': '=linkid', 9 'revision': '=revision', 10 'task': '=task', 11 'hash': '&', 12 }, 13 link: function(scope, element, attrs) { 14 scope.getHref = function() { 15 href = "/" + scope.linkType + "/" + scope.linkId; 16 if (scope.hash) { 17 href = href + "#" + scope.hash(); 18 } 19 return href; 20 } 21 22 if (scope.linkType == 'task') { 23 scope.showStatus = true 24 } 25 26 scope.revision.exec = { 27 status: 'inactive' 28 }; 29 if (scope.revision.task) { 30 scope.revision.exec = scope.revision.task; 31 } 32 }, 33 templateUrl: '/static/partials/revision_blurb.html' 34 } 35 36 });