Permalink
Browse files

rm ds_store

  • Loading branch information...
1 parent 4a16cc1 commit e20b186ee5811115c5cc4e2e6d699cb767a6e05f @zemirco committed Apr 5, 2013
Showing with 2 additions and 48 deletions.
  1. +2 −1 .gitignore
  2. BIN example/.DS_Store
  3. BIN example/vendor/.DS_Store
  4. +0 −47 index.js
View
@@ -1,3 +1,4 @@
.idea/
node_modules/
-font/
+font/
+.DS_Store
View
Binary file not shown.
View
Binary file not shown.
View
@@ -1,47 +0,0 @@
-angular.module('scoreboard', [])
- // inject $timeout and dateFilter service
- .directive('clock', function($timeout, dateFilter) {
- return {
- restrict: 'E',
- template: '<span></span>',
- replace: true,
- link: function(scope, iElem, iAttrs) {
- // save timeoutIds, so that we can cancel the time updates
- var updateTimeoutId;
- var hideTimeoutId;
-
- var colon = '<span class="colon" style="opacity: 1;">:</span>';
-
- // schedule update in one second
- var updateLater = function() {
- updateTimeoutId = $timeout(function() {
- updateUi();
- }, 1000);
- };
-
- // show and hide colon for 500ms, reappear each second
- var hideColon = function() {
- hideTimeoutId = $timeout(function() {
- angular.element('span.colon').css('opacity', '0');
- }, 500);
- };
-
- // update UI
- var updateUi = function() {
- iElem.html(dateFilter(Date.now(), iAttrs.format).split(':').join(colon));
- hideColon();
- updateLater();
- };
-
- // listen on DOM destroy and cancel the next UI update
- iElem.bind('$destroy', function() {
- $timeout.cancel(updateTimeoutId);
- $timeout.cancel(hideTimeoutId);
- });
-
- // start process
- updateUi();
-
- }
- };
- });

0 comments on commit e20b186

Please sign in to comment.