This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # @ngdoc overview | |
| # @name ui-commons.hook | |
| # @description | |
| # a directive to hook enter/leave events to select children without watchers or broadcasting | |
| @directive = angular.module('ui-commons.hook', []) | |
| @directive.controller 'UiHookController', ['$scope', ($scope) -> | |
| hooks = [] | |
| @addHook = (fn) -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('caco.feed.filter', []) | |
| .filter('sumByKey', function() { | |
| return function(data, key) { | |
| if (typeof(data) === 'undefined' || typeof(key) === 'undefined') { | |
| return 0; | |
| } | |
| var sum = 0; | |
| for (var i = data.length - 1; i >= 0; i--) { | |
| sum += parseInt(data[i][key]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .truncate { | |
| width: 250px; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } |
NewerOlder