From 2571f3b8c7f162e16dac7e2c11f41f1e2284bf29 Mon Sep 17 00:00:00 2001 From: rnlee0054 Date: Tue, 26 May 2015 23:08:57 -0700 Subject: [PATCH] Started study but getting stuck help --- scripts/StudyController.js | 34 ++++++++++++++++++++++-- styles/flashy.css | 6 ++++- templates/study.html | 64 ++++++++++++++++++++++++++++++++++++---------- 3 files changed, 88 insertions(+), 16 deletions(-) diff --git a/scripts/StudyController.js b/scripts/StudyController.js index b8f7a86..5092d6f 100644 --- a/scripts/StudyController.js +++ b/scripts/StudyController.js @@ -1,10 +1,40 @@ angular.module('flashy.StudyController', ['ui.router']). -controller('StudyController', ['$scope', '$stateParams', '$state', '$http', - function($scope, $stateParams, $state, $http) { +controller('StudyController', ['$scope', '$stateParams', '$state', '$http', 'UserService', + function($scope, $stateParams, $state, $http, UserService) { console.log('Flashy study controller content in this file. also hell0'); sectionId = $stateParams.sectionId; + $(document).ready(function() { + $('.datepicker').pickadate({ + selectMonths: true, // Creates a dropdown to control month + selectYears: 15 // Creates a dropdown of 15 years to control year + }); + }); + + $scope.UserService = UserService; + + console.log($scope.UserService.getUserData().sections); + + $scope.toggleSectionToStudy = function(id) { + console.log('toggle sect', id); + $scope.sectionToStudy = id; + }; + +/* + $scope.fetchQuiz = function() { + console.log('fetching quiz...'); + var studyRequest = { + 'sections': ($scope.sectionToStudy == null) ? [] : [$scope.sectionToStudy], + 'material_date_begin':, + 'material_date_end': + }; + +// $http.post('/api/study/', studyRequest). +//TODO + }; + */ + // Flashcard content $scope.htmlContent = 'sample text here longwordddddddddddddddddddddddddddd hello there from js review ctrl alwkejflakewjflk awjkefjkwefjlkea jfkewjaweajkakwef jk fjeawkafj kaewjf jawekfj akwejfk '; //single card diff --git a/styles/flashy.css b/styles/flashy.css index fa23b98..0fec607 100644 --- a/styles/flashy.css +++ b/styles/flashy.css @@ -224,7 +224,6 @@ body { font-family: 'Titillium Web', sans-serif; height: 100%; } - html { background: transparent; height: 100%; @@ -246,6 +245,11 @@ html { background-color: #0097cb; } +.toggley { + float: left; + margin: 10px; +} + #logo-container { margin-bottom: 18px; } diff --git a/templates/study.html b/templates/study.html index c1e2256..bf81fc0 100644 --- a/templates/study.html +++ b/templates/study.html @@ -1,14 +1,52 @@ -
-
-
-
- {{display}} -
-
- -
-
-
+ +
+
+

Choose what to study

+ + + + All classes +
+ + {{section.short_name}} +
+ + +
+
+ +
+
+
+ +
+
+
+ + +
+
+
+
+ {{display}}
+
+ +
+
+
+
-- 1.9.1