From 35b02d3f264164604a9a7de63e4fa699017d73d0 Mon Sep 17 00:00:00 2001 From: Andrew Buss Date: Mon, 1 Jun 2015 23:57:40 -0700 Subject: [PATCH] initialize deck_cards to empty --- casper_test.js | 18 -------------- scripts/CardGridController.js | 4 +++- test.png | Bin 396 -> 0 bytes ws_debug.html | 54 ------------------------------------------ 4 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 casper_test.js delete mode 100644 test.png delete mode 100644 ws_debug.html diff --git a/casper_test.js b/casper_test.js deleted file mode 100644 index 9d9b9ba..0000000 --- a/casper_test.js +++ /dev/null @@ -1,18 +0,0 @@ -phantom.casperPath = 'path/to/node_modules/casperjs'; -phantom.injectJs('path/to/node_modules/casperjs/bin/bootstrap.js'); - -phantom.casperTest = true; - - -//var casper = require('casper'); -var x = require('casper').selectXPath; - -casper.start('http://google.com/', function() { - this.echo(this.getTitle()); - this.assertExists(x('//*[@id="gbqfbb"]'), 'the element exists'); -}); - -casper.run(); - - - diff --git a/scripts/CardGridController.js b/scripts/CardGridController.js index d08b643..cf872af 100644 --- a/scripts/CardGridController.js +++ b/scripts/CardGridController.js @@ -117,9 +117,11 @@ angular.module('flashy.CardGridController', ['ui.router', 'ngAnimate', 'ngWebSoc $timeout($scope.refreshColumnWidth); }; + + $scope.deck_cards = []; $http.get('/api/sections/' + $scope.sectionId + '/deck/'). success(function(data) { - $scope.deck_cards = []; + for (i in data) $scope.deck_cards[data[i].id] = data[i]; console.log("got user's deck"); }). diff --git a/test.png b/test.png deleted file mode 100644 index 25b134d2393daeb28100f1714a7d6d4047463594..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 396 zcmeAS@N?(olHy`uVBq!ia0vp^9~c-IbvW37tiSi{ihvYLv6E*A2N2Y7q;vrJoCO|{ z#S9GG!XV7ZFl&wkP=}tUi(^Q|oVN!J8G%X;E%@r6%dNiv$Q%WjAy6TmmchW7=CbJq ONY2yM&t;ucLK6TBD;rDz diff --git a/ws_debug.html b/ws_debug.html deleted file mode 100644 index f5a484f..0000000 --- a/ws_debug.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file -- 1.9.1