diff --git a/scripts/CardGridController.js b/scripts/CardGridController.js index af0d7a6..4491f00 100644 --- a/scripts/CardGridController.js +++ b/scripts/CardGridController.js @@ -3,7 +3,7 @@ angular.module('flashy.CardGridController', ['ui.router', 'ngAnimate', 'ngWebSoc $scope.cards = []; // all cards $scope.deck = []; $scope.cardCols = []; // organized data - $scope.cardColsShow = []; // displayed data + $scope.cardColsShow = []; // displayed data $scope.numCols = 0; $scope.cardTable = {}; // look up table of cards: {'colNum':col, 'obj':card} $scope.sectionId = parseInt($stateParams.sectionId); @@ -16,7 +16,7 @@ angular.module('flashy.CardGridController', ['ui.router', 'ngAnimate', 'ngWebSoc console.log('user is not enrolled in ' + $scope.sectionId); $state.go('addclass'); } - + $scope.refreshColumnWidth = function() { avail = $window.innerWidth - 17; width = Math.floor(avail / Math.floor(avail / 250)); diff --git a/scripts/FeedController.js b/scripts/FeedController.js index ec63f03..4d48491 100644 --- a/scripts/FeedController.js +++ b/scripts/FeedController.js @@ -1,16 +1,16 @@ angular.module('flashy.FeedController', ['ui.router', 'ngAnimate', 'ngWebSocket', 'contenteditable']).controller('FeedController', function($scope, $rootScope, $state, $http, $window, $timeout, $stateParams, $websocket, $interval, UserService, Flashcard) { angular.module('flashy.CardGridController').CardGridController.apply(this, arguments); - - (function drawCols() { - $interval(function() { - if ($scope.cardColsShow != $scope.cardCols) { - $scope.cardColsShow = $scope.cardCols; - console.log('interval'); - } - }, 1000); - }()); - + + (function drawCols() { + $interval(function() { + if ($scope.cardColsShow != $scope.cardCols) { + $scope.cardColsShow = $scope.cardCols; + console.log('interval'); + } + }, 1000); + }()); + $scope.updateCardScore = function(card) { console.log($scope.cardCols, card); // if no colNum is attached, then this doesn't exist on the feed yet diff --git a/styles/flashy.css b/styles/flashy.css index 779a79d..327d060 100644 --- a/styles/flashy.css +++ b/styles/flashy.css @@ -379,6 +379,20 @@ md-content.md-default-theme { margin-bottom: -230px; } +.repeated-card.ng-move > flashcard > .card { + background-color:blue; + top: -250px; +} + +.repeated-card.ng-move-active > flashcard > .card { + top: 0 +} + +.repeated-card.ng-move > flashcard > .card + div { + background-color:red; + top: -250px; +} + /* Animation CSS END */ .container, .push { diff --git a/templates/feed.html b/templates/feed.html index 26dfec2..6e8323e 100644 --- a/templates/feed.html +++ b/templates/feed.html @@ -5,7 +5,7 @@
-
+