Commit 8e3988f5e9d0972b393bab4f9e6c1708015992dc
1 parent
31711803f0
Exists in
master
fix bugs about bolds; allow viewing help without being logged in
Showing 6 changed files with 71 additions and 80 deletions Side-by-side Diff
config.js
View file @
8e3988f
home.html
View file @
8e3988f
... | ... | @@ -54,21 +54,19 @@ |
54 | 54 | </ul> |
55 | 55 | <a href="#" class="brand-logo center">Flashy</a> |
56 | 56 | |
57 | + <ul ng-cloak id="nav-mobile" class="right hide-on-small-and-down"> | |
58 | + | |
59 | + <li ui-sref-active="active"><a ui-sref="help"><i class="tiny mdi-action-help tooltipped" | |
60 | + data-position="bottom" | |
61 | + data-delay="50" data-tooltip="Help"></i></a></li> | |
62 | + </ul> | |
57 | 63 | <ul ng-show="UserService.isLoggedIn()" ng-cloak id="nav-mobile" class="right hide-on-small-and-down"> |
58 | 64 | |
59 | 65 | <li ui-sref-active="active"><a ui-sref="study" class="tooltipped" data-position="bottom" data-delay="50" |
60 | 66 | data-tooltip="Study"> |
61 | 67 | <i class="tiny mdi-action-pageview"></i></a></li> |
62 | 68 | |
63 | - <!-- Settings Dropdown --> | |
64 | - <ul id="settingsDropdown" class="dropdown-content"> | |
65 | 69 | |
66 | - | |
67 | - </ul> | |
68 | - | |
69 | - <li ui-sref-active="active"><a ui-sref="help"><i class="tiny mdi-action-help tooltipped" | |
70 | - data-position="bottom" | |
71 | - data-delay="50" data-tooltip="Help"></i></a></li> | |
72 | 70 | <li ui-sref-active="active"><a ui-sref="settings"><i data-position="bottom" data-delay="50" |
73 | 71 | data-tooltip="Settings" |
74 | 72 | class="mdi-action-settings tooltipped"></i></a></li> |
scripts/FeedController.js
View file @
8e3988f
... | ... | @@ -207,10 +207,7 @@ |
207 | 207 | } |
208 | 208 | }); |
209 | 209 | |
210 | - $('button#blank-selected').click(function() { | |
211 | - console.log(window.getSelection()); | |
212 | - document.execCommand('bold'); | |
213 | - }); | |
210 | + | |
214 | 211 | $scope.newCardBlanks = []; |
215 | 212 | $scope.refreshNewCardInput = function() { |
216 | 213 | $scope.newCardText = $('#new-card-input').text(); |
scripts/FlashcardFactory.js
View file @
8e3988f
... | ... | @@ -70,7 +70,6 @@ |
70 | 70 | this.material_date = newversion.material_date; |
71 | 71 | return this.refreshFormattedText(); |
72 | 72 | }; |
73 | - | |
74 | 73 | Flashcard.prototype.editModalOptions = { |
75 | 74 | dismissible: true, // Modal can be dismissed by clicking outside of the modal |
76 | 75 | opacity: 0, // Opacity of modal background |
scripts/HelpController.js
View file @
8e3988f
1 | 1 | angular.module('flashy.HelpController', ['ui.router']). |
2 | 2 | |
3 | - controller('HelpController', ['$scope', '$state', '$http', '$timeout', 'UserService', | |
4 | - function($scope, $state, $http, $timeout, UserService) { | |
5 | - $scope.toggleContent = function(event, index) { | |
6 | - console.log(event, index); | |
3 | + controller('HelpController', function($scope, $state, $http, $timeout) { | |
4 | + $scope.toggleContent = function(event, index) { | |
5 | + console.log(event, index); | |
7 | 6 | |
8 | - if ($('#content-' + index).hasClass('open')) { // let's close it | |
9 | - // Note: 250 is duration (ms) of animation | |
10 | - $('#content-' + index).slideUp(250).removeClass('open'); | |
11 | - } else { // let'd open it | |
12 | - $('#content-' + index).slideDown(250).addClass('open'); | |
13 | - } | |
7 | + if ($('#content-' + index).hasClass('open')) { // let's close it | |
8 | + // Note: 250 is duration (ms) of animation | |
9 | + $('#content-' + index).slideUp(250).removeClass('open'); | |
10 | + } else { // let'd open it | |
11 | + $('#content-' + index).slideDown(250).addClass('open'); | |
12 | + } | |
14 | 13 | |
15 | 14 | // event.currentTarget |
16 | - }; | |
15 | + }; | |
17 | 16 | |
18 | - $scope.closeContent = function(event) { | |
17 | + $scope.closeContent = function(event) { | |
19 | 18 | |
20 | - }; | |
19 | + }; | |
21 | 20 | |
22 | - // JSON OF FAQ ENTRIES | |
23 | - $scope.entries = [ | |
24 | - { | |
25 | - // icon: 'mdi-editor-insert-emoticon small', | |
26 | - question: 'What is Flashy?', | |
27 | - answer: '<p>Flashy is a service for creating, sharing, and reviewing flashcards for your courses.' + | |
28 | - '</p><p>Flashy is optimized for contributing cards in real time during lecture to a shared live' + | |
29 | - " feed. Don't want to contribute cards? That's fine! By adding others' cards to your deck, you" + | |
30 | - ' help identify high-quality cards which should remain at the top of the feed for others to choose.' + | |
31 | - '</p><p>Based on the principles of spaced repetition, Flashy also intelligently determines which' + | |
32 | - ' cards you are most at risk of forgetting, based on your review history. Receive push ' + | |
33 | - "notifications on your Android device's Chrome browser without installing any other app," + | |
34 | - " and we'll notify you when you have a few cards which need to be reviewed.</p>" | |
35 | - }, | |
36 | - { | |
37 | - // icon: 'mdi-file-cloud-queue small', | |
38 | - question: 'Does Flashy work outside of UCSD?', | |
39 | - answer: "To simplify development, Flashy was configured only for courses at UCSD. If you'd like Flashy for your school, please send us an email to let us know!" | |
40 | - }, | |
41 | - { | |
42 | - // icon: 'mdi-hardware-security small', | |
43 | - question: 'How do registration and verification work?', | |
44 | - answer: "An account is required to use Flashy. We store the cards you save to your deck with your account. When you register, you'll be able to use the site immediately, but you must verify ownership of your email address within 24 hours. After 24 hours have passed, you'll need to verify your address before continuing to use the site. Don't worry, your cards and deck won't be deleted." | |
45 | - }, | |
46 | - { | |
47 | - question: "My question isn't answered above", | |
48 | - answer: ' <a href="mailto:or.so.help.me@flashy.cards">Send us an email!</a>' | |
49 | - }]; | |
21 | + // JSON OF FAQ ENTRIES | |
22 | + $scope.entries = [ | |
23 | + { | |
24 | + // icon: 'mdi-editor-insert-emoticon small', | |
25 | + question: 'What is Flashy?', | |
26 | + answer: '<p>Flashy is a service for creating, sharing, and reviewing flashcards for your courses.' + | |
27 | + '</p><p>Flashy is optimized for contributing cards in real time during lecture to a shared live' + | |
28 | + " feed. Don't want to contribute cards? That's fine! By adding others' cards to your deck, you" + | |
29 | + ' help identify high-quality cards which should remain at the top of the feed for others to choose.' + | |
30 | + '</p><p>Based on the principles of spaced repetition, Flashy also intelligently determines which' + | |
31 | + ' cards you are most at risk of forgetting, based on your review history. Receive push ' + | |
32 | + "notifications on your Android device's Chrome browser without installing any other app," + | |
33 | + " and we'll notify you when you have a few cards which need to be reviewed.</p>" | |
34 | + }, | |
35 | + { | |
36 | + // icon: 'mdi-file-cloud-queue small', | |
37 | + question: 'Does Flashy work outside of UCSD?', | |
38 | + answer: "To simplify development, Flashy was configured only for courses at UCSD. If you'd like Flashy for your school, please send us an email to let us know!" | |
39 | + }, | |
40 | + { | |
41 | + // icon: 'mdi-hardware-security small', | |
42 | + question: 'How do registration and verification work?', | |
43 | + answer: "An account is required to use Flashy. We store the cards you save to your deck with your account. When you register, you'll be able to use the site immediately, but you must verify ownership of your email address within 24 hours. After 24 hours have passed, you'll need to verify your address before continuing to use the site. Don't worry, your cards and deck won't be deleted." | |
44 | + }, | |
45 | + { | |
46 | + question: "My question isn't answered above", | |
47 | + answer: ' <a href="mailto:or.so.help.me@flashy.cards">Send us an email!</a>' | |
48 | + }]; | |
50 | 49 | |
51 | - // Functions | |
52 | - $scope.toggleContent = function(event, index) { | |
53 | - if ($('#content-' + index).hasClass('open')) { // let's close it | |
54 | - // Note: 250 is duration (ms) of animation | |
55 | - $('#content-' + index).slideUp(250).removeClass('open'); | |
56 | - } else { // let's open it | |
57 | - $('#content-' + index).slideDown(250).addClass('open'); | |
58 | - } | |
59 | - }; | |
50 | + // Functions | |
51 | + $scope.toggleContent = function(event, index) { | |
52 | + if ($('#content-' + index).hasClass('open')) { // let's close it | |
53 | + // Note: 250 is duration (ms) of animation | |
54 | + $('#content-' + index).slideUp(250).removeClass('open'); | |
55 | + } else { // let's open it | |
56 | + $('#content-' + index).slideDown(250).addClass('open'); | |
57 | + } | |
58 | + }; | |
60 | 59 | |
61 | - $scope.expandAllContent = function() { | |
62 | - for (var i = 0; i < $scope.entries.length; i++) { | |
63 | - $('#content-' + i).slideDown(0).addClass('open'); | |
64 | - } | |
65 | - }; | |
60 | + $scope.expandAllContent = function() { | |
61 | + for (var i = 0; i < $scope.entries.length; i++) { | |
62 | + $('#content-' + i).slideDown(0).addClass('open'); | |
63 | + } | |
64 | + }; | |
66 | 65 | |
67 | - $scope.collapseAllContent = function() { | |
68 | - for (var i = 0; i < $scope.entries.length; i++) { | |
69 | - $('#content-' + i).slideUp(0).removeClass('open'); | |
70 | - } | |
71 | - }; | |
72 | - }]); | |
66 | + $scope.collapseAllContent = function() { | |
67 | + for (var i = 0; i < $scope.entries.length; i++) { | |
68 | + $('#content-' + i).slideUp(0).removeClass('open'); | |
69 | + } | |
70 | + }; | |
71 | + }); |
templates/feed.html
View file @
8e3988f
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | <form id="edit-card-form"> |
4 | 4 | <div class="modal-content col"> |
5 | 5 | <div class="row" style="margin-bottom:0"> |
6 | - <div class="card cyan-text text-darken-2" | |
6 | + <div class="card cyan-text text-darken-2" | |
7 | 7 | style="width:300px; height:180px; margin-bottom:0; font-size:120%;"> |
8 | 8 | <div class="valign-wrapper"> |
9 | 9 | <div id="edit-card-input" ng-model="editCardFormattedText" style="outline:0px solid transparent;" |
... | ... | @@ -37,8 +37,7 @@ |
37 | 37 | </div> |
38 | 38 | |
39 | 39 | <div class="row"> |
40 | - <button id="blank-selected" style="float:left" class="btn" data-position="right" | |
41 | - onclick="document.execCommand('bold')" data-delay="50"> | |
40 | + <button class="blank-selected-btn btn tooltipped" style="float:left" onclick="document.execCommand('bold')" data-position="right" data-delay="50"> | |
42 | 41 | Blank Selected Text |
43 | 42 | </button> |
44 | 43 | </div> |
... | ... | @@ -114,8 +113,8 @@ |
114 | 113 | </button> |
115 | 114 | </div> |
116 | 115 | <div class="row"> |
117 | - <button id="blank-selected" style="float:left" class="btn tooltipped" data-position="right" data-delay="50" | |
118 | - data-tooltip="Ctrl-B">Blank Selected Text | |
116 | + <button style="float:left" class="blank-selected-btn btn tooltipped" data-position="right" data-delay="50" | |
117 | + data-tooltip="Ctrl-B" onclick="document.execCommand('bold')" >Blank Selected Text | |
119 | 118 | </button> |
120 | 119 | </div> |
121 | 120 | <div class="row" ng-show="newCardText" ng-style="(newCardText.length>160)?{color:'red'}:{}"> |