Commit 80b664e098c10fe95b89fd62cd1048ce693f7eda
1 parent
9d4168f45b
Exists in
master
and in
1 other branch
switched back to cardCols for lecture until queueing works
Showing 4 changed files with 27 additions and 13 deletions Side-by-side Diff
scripts/CardGridController.js
View file @
80b664e
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | $scope.cards = []; // all cards |
4 | 4 | $scope.deck = []; |
5 | 5 | $scope.cardCols = []; // organized data |
6 | - $scope.cardColsShow = []; // displayed data | |
6 | + $scope.cardColsShow = []; // displayed data | |
7 | 7 | $scope.numCols = 0; |
8 | 8 | $scope.cardTable = {}; // look up table of cards: {'colNum':col, 'obj':card} |
9 | 9 | $scope.sectionId = parseInt($stateParams.sectionId); |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | console.log('user is not enrolled in ' + $scope.sectionId); |
17 | 17 | $state.go('addclass'); |
18 | 18 | } |
19 | - | |
19 | + | |
20 | 20 | $scope.refreshColumnWidth = function() { |
21 | 21 | avail = $window.innerWidth - 17; |
22 | 22 | width = Math.floor(avail / Math.floor(avail / 250)); |
scripts/FeedController.js
View file @
80b664e
1 | 1 | angular.module('flashy.FeedController', ['ui.router', 'ngAnimate', 'ngWebSocket', 'contenteditable']).controller('FeedController', |
2 | 2 | function($scope, $rootScope, $state, $http, $window, $timeout, $stateParams, $websocket, $interval, UserService, Flashcard) { |
3 | 3 | angular.module('flashy.CardGridController').CardGridController.apply(this, arguments); |
4 | - | |
5 | - (function drawCols() { | |
6 | - $interval(function() { | |
7 | - if ($scope.cardColsShow != $scope.cardCols) { | |
8 | - $scope.cardColsShow = $scope.cardCols; | |
9 | - console.log('interval'); | |
10 | - } | |
11 | - }, 1000); | |
12 | - }()); | |
13 | - | |
4 | + | |
5 | + (function drawCols() { | |
6 | + $interval(function() { | |
7 | + if ($scope.cardColsShow != $scope.cardCols) { | |
8 | + $scope.cardColsShow = $scope.cardCols; | |
9 | + console.log('interval'); | |
10 | + } | |
11 | + }, 1000); | |
12 | + }()); | |
13 | + | |
14 | 14 | $scope.updateCardScore = function(card) { |
15 | 15 | console.log($scope.cardCols, card); |
16 | 16 | // if no colNum is attached, then this doesn't exist on the feed yet |
styles/flashy.css
View file @
80b664e
... | ... | @@ -379,6 +379,20 @@ |
379 | 379 | margin-bottom: -230px; |
380 | 380 | } |
381 | 381 | |
382 | +.repeated-card.ng-move > flashcard > .card { | |
383 | + background-color:blue; | |
384 | + top: -250px; | |
385 | +} | |
386 | + | |
387 | +.repeated-card.ng-move-active > flashcard > .card { | |
388 | + top: 0 | |
389 | +} | |
390 | + | |
391 | +.repeated-card.ng-move > flashcard > .card + div { | |
392 | + background-color:red; | |
393 | + top: -250px; | |
394 | +} | |
395 | + | |
382 | 396 | /* Animation CSS END */ |
383 | 397 | |
384 | 398 | .container, .push { |
templates/feed.html
View file @
80b664e
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <div class="indeterminate"></div> |
6 | 6 | </div> |
7 | 7 | |
8 | - <div class="cardColumn" ng-repeat="col in cardColsShow"> | |
8 | + <div class="cardColumn" ng-repeat="col in cardCols"> | |
9 | 9 | <div class="repeated-card" ng-repeat="card in col"> |
10 | 10 | <flashcard flashcard-obj="card"/> |
11 | 11 | </div> |