diff --git a/hourglass/client/main/main.css b/hourglass/client/main/main.css
index e883c3f..0ae8e65 100644
--- a/hourglass/client/main/main.css
+++ b/hourglass/client/main/main.css
@@ -38,19 +38,23 @@ html {
}
::-webkit-input-placeholder {
- font-size: 70%;
+ color: #FCF0F0;
+ font-size: 70%;
}
:-moz-placeholder {
- font-size: 70%;
+ color: #FCF0F0;
+ font-size: 70%;
}
::-moz-placeholder {
- font-size: 70%;
+ color: #FCF0F0;
+ font-size: 70%;
}
-:-ms-input-placeholder {
- font-size: 70%;
+:-ms-input-placeholder {
+ color: #FCF0F0;
+ font-size: 70%;
}
.formInvalid::-webkit-input-placeholder {
@@ -163,9 +167,8 @@ input {
.noScroll input, .noScroll textarea {
font-family: 'Raleway';
- background-color: #EBEBEB;
- border: 3px solid #CECECE;
- border-radius: 3px;
+ background-color: rgba(0,0,0,0.2);
+ border: 0;
resize: none;
}
@@ -1287,12 +1290,14 @@ textarea.clickModify {
}
#requestArea {
- font-size: 1.8vh;
- width: 85%;
+ font-size: 1.5vh;
+ width: 80%;
height: 35%;
+ padding: 4%;
margin-left: calc(7.5% - 6px);
margin-bottom: 5px;
+ display: inline;
outline: none;
}
diff --git a/hourglass/client/main/main.html b/hourglass/client/main/main.html
index 89ae751..8428ad9 100644
--- a/hourglass/client/main/main.html
+++ b/hourglass/client/main/main.html
@@ -31,7 +31,7 @@
-
+
Hourglass
{{schoolName}}

@@ -81,7 +81,7 @@
diff --git a/hourglass/client/profile/profile.css b/hourglass/client/profile/profile.css
index d962527..5905859 100644
--- a/hourglass/client/profile/profile.css
+++ b/hourglass/client/profile/profile.css
@@ -34,12 +34,12 @@
background-color: rgba(0,0,0,0.2);
}
-#profPageWrapper .classBox:not(:first-child) {
+#profPageWrapper .classBox:not(#label) {
border: 1px solid #FCF0F0 !important;
}
-#profPageWrapper #createWrapper {
-
+#profPageWrapper .optionHolder {
+ width: 100%;
}
#basicInfo {
@@ -50,28 +50,17 @@
#newUserWrapper {
width: 25%;
- padding: 2.5%;
+ padding: 2%;
margin: auto;
background-color: rgba(255,255,255,0.2);
}
-#newUserWrapper .formDiv {
- width: 100%;
- margin: 0;
- padding: 0;
- background-color: transparent;
-}
-
.opTitle {
font-weight: 200;
margin: 0;
}
-#newUserWrapper .optionHolder {
- width: 100% !important;
-}
-
#basicNext {
padding: 2%;
border: 1px solid #FCF0F0;
@@ -142,11 +131,14 @@
#enrollUserWrapper {
width: 60%;
- height: 42vh;
+ height: 60vh;
margin: auto;
padding: 1%;
background-color: rgba(255,255,255,0.2);
- overflow-y: auto;
+}
+
+#enrollUserWrapper #classBody {
+ height: 40vh;
}
#enrollClassList {
@@ -236,25 +228,43 @@
top: 150%;
}
-#createWrapper {
+#profPageWrapper #createWrapper {
margin: auto;
+ padding: 3%;
+ padding-bottom: 2%;
width: 30%;
background-color: rgba(255,255,255,0.2);
}
-#createWrapper .formDiv {
+.formDiv {
width: 100%;
margin: 0;
+ padding: 2%;
background-color: transparent;
+ display: inline;
}
-#createWrapper #creSubmit {
- width: 30%;
- margin: auto;
+#profPageWrapper #creSubmit {
border: 1px solid #FCF0F0 !important;
}
+#profPageWrapper .profTitle {
+ margin-bottom: 1%;
+}
+
#createWrapper p {
margin: 0;
}
+
+#profPageWrapper input {
+ margin: 0;
+ padding: 2%;
+ background-color: rgba(0,0,0,0.1);
+ border: 0;
+}
+
+#profileSubmit {
+ position:absolute;
+ top: 5%;
+}
\ No newline at end of file
diff --git a/hourglass/client/profile/profile.html b/hourglass/client/profile/profile.html
index 0e9ab61..b8179e7 100644
--- a/hourglass/client/profile/profile.html
+++ b/hourglass/client/profile/profile.html
@@ -35,27 +35,31 @@
Class not here?
-
-
Class Name
-
Teacher
-
Hour
-
Members
+
- {{#if notsearching}}
- {{#each classes}}
- {{> classDisplay}}
- {{/each}}
- {{#if noclass}}
-
No results found...
+
+ {{#if notsearching}}
+ {{#each classes}}
+ {{> classDisplay}}
+ {{/each}}
+ {{#if noclass}}
+
No results found...
+ {{/if}}
+ {{else}}
+ {{#each autocompleteClasses}}
+ {{> classDisplay}}
+ {{/each}}
+ {{#if notfound}}
+ No results found...
+ {{/if}}
{{/if}}
- {{else}}
- {{#each autocompleteClasses}}
- {{> classDisplay}}
- {{/each}}
- {{#if notfound}}
- No results found...
- {{/if}}
- {{/if}}
+
@@ -73,15 +77,19 @@
+
+
Finish!
+
+
diff --git a/hourglass/client/profile/profile.js b/hourglass/client/profile/profile.js
index b633ab5..f9d8954 100644
--- a/hourglass/client/profile/profile.js
+++ b/hourglass/client/profile/profile.js
@@ -6,6 +6,7 @@ import {
Session.set("sections", [0,0]) // [Completed, Viewing]
Session.set("profile", {classes: []});
+Session.set("newClasses", []);
Session.set("autocompleteDivs", null);
Session.set("notsearching", true); // If user isn't searching
Session.set("noclass", null); // If user doesn't have classes.
@@ -132,8 +133,15 @@ Template.profile.helpers({
},
enrollClass() {
var myClasses = Session.get("profile").classes;
- if(myClasses === undefined || myClasses.length === 0) return [{name:"Enroll!",x:false}];
- return myClasses.map(function(a){return {name:classes.findOne({_id:a}).name,x:true,_id:a}});
+ var newClasses = Session.get("newClasses");
+ if((myClasses === undefined || myClasses.length === 0) && newClasses.length === 0) return [{name:"Enroll!",x:false}];
+ var array = myClasses.map(function(a) {
+ return {name:classes.findOne({_id:a}).name,x:true,_id:a}
+ });
+ array.push.apply(array,newClasses.map(function(a){
+ return {name:a.name,_id:(Math.floor(Math.random()*1000)).toString(),x:true};
+ }));
+ return array;
}
});
@@ -172,6 +180,58 @@ Template.profile.events({
Session.set("sections", [(Session.get("sections")[0] < 2) ? 2 : Session.get("sections")[0], Session.get("sections")[1]]);
slideToField(2);
},
+ 'click #creSubmit' () {
+ var inputs = document.getElementsByClassName("creInput");
+ var required = ["school", "name", "privacy", "category"];
+ var alert = checkComplete(required, inputs);
+ var values = alert[2];
+ if(!alert[0]) {
+ sAlert.error("Missing " + alert[1], {
+ effect: 'stackslide',
+ position: 'top',
+ timeout: 3000
+ });
+ return;
+ }
+ values.privacy = (values.privacy === "Public") ? false : true;
+ values.status = false;
+ values.category.toLowerCase();
+ values.code = "";
+ var newClasses = Session.get("newClasses");
+ var duplicate = false;
+ for(var i = 0; i < newClasses.length; i++) {
+ if(JSON.stringify(newClasses[i]) === JSON.stringify(values)) duplicate = true;
+ }
+ if(!duplicate && newClasses.length < 8) newClasses.push(values);
+ if(duplicate) sAlert.error("You already created this class!", {
+ effect: 'stackslide',
+ position: 'bottom-right',
+ timeout: 3000
+ });
+ if(newClasses.length === 8) sAlert.error("You already created 8 classes!", {
+ effect: 'stackslide',
+ position: 'bottom-right',
+ timeout: 3000
+ });
+ Session.set("newClasses", newClasses);
+ $(".creInput").each(function(){$(this).val('');});
+ /*if (!teachers.findOne({
+ name: values.teacher
+ })) {
+ Meteor.call("createTeacher", values.teacher, values.school, function(error, result) {
+ if (error !== undefined) {
+ sAlert.error(error.message, {
+ effect: 'stackslide',
+ position: 'top'
+ });
+ } else {
+ sendData("createClass");
+ }
+ });
+ } else {
+ sendData("createClass");
+ }*/
+ },
'click #backArrow' () {
slideToField(Session.get("sections")[1]-1);
},
@@ -300,6 +360,14 @@ Template.profile.events({
'click #ESCWrapper .fa-times' (event) {
var profile = Session.get("profile");
var id = event.target.parentNode.getAttribute("classid");
+ if(id.length < 17) {
+ var newClasses = Session.get("newClasses");
+ newClasses.splice(newClasses.map(function(a) {
+ return a._id;
+ }).indexOf(id),1);
+ Session.set("newClasses", newClasses);
+ return;
+ }
if(profile.classes.indexOf(id) !== -1) {
profile.classes.splice(profile.classes.indexOf(id),1);
Session.set("profile", profile);
@@ -320,19 +388,17 @@ Template.profile.events({
function slideToField(field) {
var order = ["basicInfo", "enrollInfo", "createInfo"];
$(".moveArrow").animate({"opacity":0})
- $("#enrollClassList").fadeOut(200);
+ if(field === 0) $("#enrollClassList").fadeOut(200);
var viewing = Session.get("sections")[1]
- var move = (viewing-field < 0) ? "-50%" : "150%";
+ var move = (viewing-field < 0) ? "-100%" : "150%";
$("#"+order[viewing]).animate({top: move});
$("#"+order[field]).animate({
- top:"20%"
+ top:"17%"
},{
complete: function() {
Session.set("sections", [Session.get("sections")[0],field]);
$(".moveArrow").animate({"opacity":1});
- if(field === 1) {
- $("#enrollClassList").fadeIn(200);
- }
+ if(field === 1) $("#enrollClassList").fadeIn(200);
}
});
}
diff --git a/hourglass/lib/constants.js b/hourglass/lib/constants.js
index 3649b06..1af0f98 100644
--- a/hourglass/lib/constants.js
+++ b/hourglass/lib/constants.js
@@ -2,8 +2,8 @@ themeColors = {
"lux": {
"background": "White.jpg",
"mainColor": "#DBDBDB",
- "secondaryColor": "#E8E8E8",
- "sidebarColor": "#799CB8",
+ "secondaryColor": "#567393",
+ "sidebarColor": "#6C94B4",
"userDropdownColor": "#E6E6E6",
"iconHighlight": "#FFF",
"modeHighlight": "#D34949",